Introduce BindContext with in_doc and connected flags

Fix some is_in_doc -> is_connected mistakes
This commit is contained in:
Fernando Jiménez Moreno 2019-03-05 18:01:59 +01:00
parent 740aae06ba
commit 813b242419
21 changed files with 105 additions and 84 deletions

View file

@ -28,7 +28,7 @@ use crate::dom::htmlhtmlelement::HTMLHtmlElement;
use crate::dom::htmlinputelement::{HTMLInputElement, InputType};
use crate::dom::htmllabelelement::HTMLLabelElement;
use crate::dom::node::{document_from_node, window_from_node};
use crate::dom::node::{Node, NodeFlags, ShadowIncluding};
use crate::dom::node::{BindContext, Node, NodeFlags, ShadowIncluding};
use crate::dom::nodelist::NodeList;
use crate::dom::text::Text;
use crate::dom::virtualmethods::VirtualMethods;
@ -740,9 +740,9 @@ impl VirtualMethods for HTMLElement {
}
}
fn bind_to_tree(&self, tree_in_doc: bool) {
fn bind_to_tree(&self, context: &BindContext) {
if let Some(ref s) = self.super_type() {
s.bind_to_tree(tree_in_doc);
s.bind_to_tree(context);
}
self.update_sequentially_focusable_status();
}