mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Hold a Temporary in AncestorIterator
This commit is contained in:
parent
6a6ecb9afa
commit
bf7c791e3a
10 changed files with 91 additions and 63 deletions
|
@ -12,6 +12,7 @@ use dom::bindings::codegen::InheritTypes::{DocumentTypeCast, TextCast, CommentCa
|
|||
use dom::bindings::codegen::InheritTypes::ProcessingInstructionCast;
|
||||
use dom::bindings::codegen::InheritTypes::HTMLFormElementDerived;
|
||||
use dom::bindings::js::{JS, JSRef, Temporary, OptionalRootable, Root};
|
||||
use dom::bindings::js::RootedReference;
|
||||
use dom::bindings::trace::RootedVec;
|
||||
use dom::comment::Comment;
|
||||
use dom::document::{Document, DocumentHelpers};
|
||||
|
@ -350,10 +351,11 @@ pub fn parse_html_fragment(context_node: JSRef<Node>,
|
|||
|
||||
// Step 11.
|
||||
let form = context_node.inclusive_ancestors()
|
||||
.find(|element| element.is_htmlformelement());
|
||||
.map(|element| element.root())
|
||||
.find(|element| element.r().is_htmlformelement());
|
||||
let fragment_context = FragmentContext {
|
||||
context_elem: context_node,
|
||||
form_elem: form,
|
||||
form_elem: form.r(),
|
||||
};
|
||||
parse_html(document.r(), HTMLInput::InputString(input), &url, Some(fragment_context));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue