diff --git a/content/base/src/nsGenericElement.cpp b/content/base/src/nsGenericElement.cpp index ea5815d48ca..3060ef7828b 100644 --- a/content/base/src/nsGenericElement.cpp +++ b/content/base/src/nsGenericElement.cpp @@ -4006,14 +4006,12 @@ nsINode::ReplaceOrInsertBefore(PRBool aReplace, nsINode* aNewChild, return NS_ERROR_NULL_POINTER; } - if (IsNodeOfType(eDATA_NODE)) { + if (!IsNodeOfType(eDOCUMENT) && + !IsNodeOfType(eDOCUMENT_FRAGMENT) && + !IsElement()) { return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR; } - if (IsNodeOfType(eATTRIBUTE)) { - return NS_ERROR_NOT_IMPLEMENTED; - } - nsIContent* refContent; nsresult res = NS_OK; PRInt32 insPos; diff --git a/content/base/test/Makefile.in b/content/base/test/Makefile.in index 6592a31a82f..7e4ce96564a 100644 --- a/content/base/test/Makefile.in +++ b/content/base/test/Makefile.in @@ -421,6 +421,7 @@ _TEST_FILES2 = \ file_x-frame-options_main.html \ file_x-frame-options_page.sjs \ test_createHTMLDocument.html \ + test_bug564047.html \ test_bug567350.html \ test_bug574596.html \ test_bug578096.html \ diff --git a/content/base/test/test_bug564047.html b/content/base/test/test_bug564047.html new file mode 100644 index 00000000000..0d421aa1ee4 --- /dev/null +++ b/content/base/test/test_bug564047.html @@ -0,0 +1,31 @@ + + + +
++ ++ + diff --git a/dom/tests/mochitest/dom-level1-core/exclusions.js b/dom/tests/mochitest/dom-level1-core/exclusions.js index 1959e571e1c..a88568b10e9 100644 --- a/dom/tests/mochitest/dom-level1-core/exclusions.js +++ b/dom/tests/mochitest/dom-level1-core/exclusions.js @@ -74,7 +74,7 @@ var indexErrTests = ["characterdataindexsizeerrdeletedatacountnegative", "charac "characterdataindexsizeerrsubstringcountnegative", "hc_characterdataindexsizeerrdeletedatacountnegative", "hc_characterdataindexsizeerrreplacedatacountnegative", "hc_characterdataindexsizeerrsubstringcountnegative"]; -var attributeModTests = ["hc_attrappendchild1", "hc_attrappendchild2", "hc_attrappendchild3", "hc_attrappendchild5", +var attributeModTests = ["hc_attrappendchild1", "hc_attrappendchild3", "hc_attrappendchild5", "hc_attrappendchild6", "hc_attrchildnodes2", "hc_attrclonenode1", "hc_attrinsertbefore1", "hc_attrinsertbefore2", "hc_attrinsertbefore3", "hc_attrinsertbefore4", "hc_attrinsertbefore6", "hc_attrnormalize", "hc_attrremovechild2", "hc_attrreplacechild1", "hc_attrreplacechild2",