mirror of
https://github.com/servo/servo
synced 2026-05-05 06:32:13 +02:00
Introduce BindContext with in_doc and connected flags
Fix some is_in_doc -> is_connected mistakes
This commit is contained in:
@@ -12,7 +12,7 @@ use crate::dom::element::Element;
|
||||
use crate::dom::htmlelement::HTMLElement;
|
||||
use crate::dom::htmlfieldsetelement::HTMLFieldSetElement;
|
||||
use crate::dom::htmlformelement::{FormControl, HTMLFormElement};
|
||||
use crate::dom::node::{Node, UnbindContext};
|
||||
use crate::dom::node::{BindContext, Node, UnbindContext};
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
@@ -56,9 +56,9 @@ impl VirtualMethods for HTMLLegendElement {
|
||||
Some(self.upcast::<HTMLElement>() as &dyn VirtualMethods)
|
||||
}
|
||||
|
||||
fn bind_to_tree(&self, tree_connected: bool) {
|
||||
fn bind_to_tree(&self, context: &BindContext) {
|
||||
if let Some(ref s) = self.super_type() {
|
||||
s.bind_to_tree(tree_connected);
|
||||
s.bind_to_tree(context);
|
||||
}
|
||||
|
||||
self.upcast::<Element>()
|
||||
|
||||
Reference in New Issue
Block a user