Backed out changeset c5fe17b1caa9 (bug 489925)

This commit is contained in:
Boris Zbarsky 2009-10-13 15:39:31 -04:00
parent 99e0f23d60
commit c3214c55a5
3 changed files with 0 additions and 113 deletions

View File

@ -2389,11 +2389,6 @@ nsDocument::ContentAppended(nsIDocument* aDocument,
{
NS_ASSERTION(aDocument == this, "unexpected doc");
if (aContainer->GetBindingParent()) {
// Anonymous node; bail out
return;
}
for (nsINode::ChildIterator iter(aContainer, aNewIndexInContainer);
!iter.IsDone();
iter.Next()) {
@ -2411,11 +2406,6 @@ nsDocument::ContentInserted(nsIDocument* aDocument,
NS_ABORT_IF_FALSE(aContent, "Null content!");
if (aContent->GetBindingParent()) {
// Anonymous node; bail out
return;
}
RegisterNamedItems(aContent);
}
@ -2429,11 +2419,6 @@ nsDocument::ContentRemoved(nsIDocument* aDocument,
NS_ABORT_IF_FALSE(aChild, "Null content!");
if (aChild->GetBindingParent()) {
// Anonymous node; bail out
return;
}
UnregisterNamedItems(aChild);
}
@ -2445,11 +2430,6 @@ nsDocument::AttributeWillChange(nsIDocument* aDocument,
NS_ABORT_IF_FALSE(aContent, "Null content!");
NS_PRECONDITION(aAttribute, "Must have an attribute that's changing!");
if (aContent->GetBindingParent()) {
// Anonymous node; bail out
return;
}
if (aNameSpaceID != kNameSpaceID_None)
return;
if (aAttribute == nsGkAtoms::name) {
@ -2470,11 +2450,6 @@ nsDocument::AttributeChanged(nsIDocument* aDocument,
NS_ABORT_IF_FALSE(aContent, "Null content!");
NS_PRECONDITION(aAttribute, "Must have an attribute that's changing!");
if (aContent->GetBindingParent()) {
// Anonymous node; bail out
return;
}
if (aNameSpaceID != kNameSpaceID_None)
return;
if (aAttribute == nsGkAtoms::name) {

View File

@ -318,7 +318,6 @@ _TEST_FILES = test_bug5141.html \
bug466409-empty.css \
test_bug466409.html \
test_classList.html \
test_bug489925.xhtml \
test_bug514487.html \
test_range_bounds.html \
$(NULL)

View File

@ -1,87 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=489925
-->
<head>
<title>Test for Bug 489925</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<bindings xmlns="http://www.mozilla.org/xbl">
<binding id="t1">
<content>
<h:span anonid="test" xmlns:h="http://www.w3.org/1999/xhtml">
<children/>
</h:span>
</content>
<implementation>
<constructor>
document.getAnonymousElementByAttribute(this, "anonid", "test").id = "test1";
</constructor>
</implementation>
</binding>
<binding id="t2">
<content>
<h:span anonid="test" xmlns:h="http://www.w3.org/1999/xhtml">
<children/>
</h:span>
</content>
<implementation>
<constructor>
var s = document.createElement("span");
s.id = "test2";
document.getAnonymousElementByAttribute(this, "anonid", "test").appendChild(s);
</constructor>
</implementation>
</binding>
<binding id="t3">
<content>
<h:span anonid="test" xmlns:h="http://www.w3.org/1999/xhtml">
<children/>
</h:span>
</content>
<implementation>
<constructor>
var s = document.createElement("span");
s.id = "test3";
var p = document.getAnonymousElementByAttribute(this, "anonid", "test");
p.appendChild(document.createTextNode("testing"));
p.insertBefore(s, p.lastChild);
</constructor>
</implementation>
</binding>
</bindings>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=489925">Mozilla Bug 489925</a>
<p id="display">
<span style="-moz-binding: url(#t1)"/>
<span style="-moz-binding: url(#t2)"/>
<span style="-moz-binding: url(#t3)"/>
</p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script type="application/javascript">
<![CDATA[
/** Test for Bug 489925 **/
SimpleTest.waitForExplicitFinish();
addLoadEvent(function() {
is($("test1"), null, "Setting id should not add anonymous element to table");
is($("test2"), null, "Append should not add anonymous element to table");
is($("test3"), null, "Insert should not add anonymous element to table");
SimpleTest.finish();
});
]]>
</script>
</pre>
</body>
</html>