diff options
author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-06-23 15:06:27 +0200 |
---|---|---|
committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-06-23 17:18:18 +0200 |
commit | fc88f81de3af49e125e1802b341745b043cc8dd3 (patch) | |
tree | c04a39510c981cc5a70ad4a6bb2a6064eec92af6 | |
parent | 0fb5d634a007f3d0424f95569ac3f83d500d054c (diff) | |
download | servo-fc88f81de3af49e125e1802b341745b043cc8dd3.tar.gz servo-fc88f81de3af49e125e1802b341745b043cc8dd3.zip |
Fix insert-adjacent error
5 files changed, 3 insertions, 73 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 0b639539f5f..479a73dee86 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -2069,14 +2069,14 @@ impl ElementMethods for Element { let context = match context.downcast::<Element>() { Some(elem) if elem.local_name() != &atom!("html") || !elem.html_element_in_html_document() => Root::from_ref(elem), - _ => Root::upcast(HTMLBodyElement::new(atom!("body"), None, &*context.owner_doc())) + _ => Root::upcast(HTMLBodyElement::new(atom!("body"), None, &*context.owner_doc())), }; // Step 3. let fragment = try!(context.upcast::<Node>().parse_fragment(text)); // Step 4. - context.insert_adjacent(position, fragment.upcast()).map(|_| ()) + self.insert_adjacent(position, fragment.upcast()).map(|_| ()) } } diff --git a/tests/wpt/metadata/domparsing/insert-adjacent.html.ini b/tests/wpt/metadata/domparsing/insert-adjacent.html.ini deleted file mode 100644 index 10a4345eeb0..00000000000 --- a/tests/wpt/metadata/domparsing/insert-adjacent.html.ini +++ /dev/null @@ -1,8 +0,0 @@ -[insert-adjacent.html] - type: testharness - [insertAdjacentHTML(beforebegin, <h3>beforebegin</h3> )] - expected: FAIL - - [insertAdjacentHTML(afterend, <h3>afterend</h3> )] - expected: FAIL - diff --git a/tests/wpt/metadata/domparsing/insert_adjacent_html.html.ini b/tests/wpt/metadata/domparsing/insert_adjacent_html.html.ini deleted file mode 100644 index 552aaec582f..00000000000 --- a/tests/wpt/metadata/domparsing/insert_adjacent_html.html.ini +++ /dev/null @@ -1,32 +0,0 @@ -[insert_adjacent_html.html] - type: testharness - [beforeBegin content without next sibling] - expected: FAIL - - [afterend content without next sibling] - expected: FAIL - - [beforeBegin content again, with next sibling] - expected: FAIL - - [afterend content again, with next sibling] - expected: FAIL - - [beforeBegin child node not in tree but has parent] - expected: FAIL - - [afterend child node not in tree but has parent] - expected: FAIL - - [beforeBegin content2 without next sibling] - expected: FAIL - - [afterend content2 without next sibling] - expected: FAIL - - [beforeBegin content2 test again, now that there's a next sibling] - expected: FAIL - - [afterend content2 test again, now that there's a next sibling] - expected: FAIL - diff --git a/tests/wpt/metadata/domparsing/insert_adjacent_html.xhtml.ini b/tests/wpt/metadata/domparsing/insert_adjacent_html.xhtml.ini index 9312a8de81a..68854311bc7 100644 --- a/tests/wpt/metadata/domparsing/insert_adjacent_html.xhtml.ini +++ b/tests/wpt/metadata/domparsing/insert_adjacent_html.xhtml.ini @@ -1,35 +1,5 @@ [insert_adjacent_html.xhtml] type: testharness - [beforeBegin content without next sibling] - expected: FAIL - - [afterend content without next sibling] - expected: FAIL - - [beforeBegin content again, with next sibling] - expected: FAIL - - [afterend content again, with next sibling] - expected: FAIL - - [beforeBegin child node not in tree but has parent] - expected: FAIL - - [afterend child node not in tree but has parent] - expected: FAIL - - [beforeBegin content2 without next sibling] - expected: FAIL - - [afterend content2 without next sibling] - expected: FAIL - - [beforeBegin content2 test again, now that there's a next sibling] - expected: FAIL - - [afterend content2 test again, now that there's a next sibling] - expected: FAIL - [insertAdjacentHTML in HTML] expected: FAIL diff --git a/tests/wpt/mozilla/meta/mozilla/sigsegv.html.ini b/tests/wpt/mozilla/meta/mozilla/sigsegv.html.ini index b6d80eeff3b..63ad264be81 100644 --- a/tests/wpt/mozilla/meta/mozilla/sigsegv.html.ini +++ b/tests/wpt/mozilla/meta/mozilla/sigsegv.html.ini @@ -1,4 +1,4 @@ [sigsegv.html] type: testharness - prefs: [dom.testbinding.enabled:true,dom.testable_crash.enabled:true] + prefs: [dom.testbinding.enabled:true, dom.testable_crash.enabled:true] expected: CRASH |