mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
parent
18b5453e09
commit
28a013cfc5
3 changed files with 34 additions and 16 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
use dom::attr::Attr;
|
||||
use dom::bindings::codegen::InheritTypes::{CommentCast, DocumentCast, DocumentTypeCast};
|
||||
use dom::bindings::codegen::InheritTypes::{ElementCast, HTMLStyleElementCast, TextCast, NodeCast};
|
||||
use dom::bindings::codegen::InheritTypes::{ElementCast, TextCast, NodeCast};
|
||||
use dom::bindings::codegen::InheritTypes::{CharacterDataCast, NodeBase, NodeDerived};
|
||||
use dom::bindings::codegen::InheritTypes::{ProcessingInstructionCast, EventTargetCast};
|
||||
use dom::bindings::codegen::NodeBinding::NodeConstants;
|
||||
|
@ -21,7 +21,6 @@ use dom::documentfragment::DocumentFragment;
|
|||
use dom::documenttype::DocumentType;
|
||||
use dom::element::{Element, ElementTypeId, HTMLAnchorElementTypeId};
|
||||
use dom::eventtarget::{EventTarget, NodeTargetTypeId};
|
||||
use dom::htmlstyleelement::StyleElementHelpers;
|
||||
use dom::nodelist::{NodeList};
|
||||
use dom::processinginstruction::ProcessingInstruction;
|
||||
use dom::text::Text;
|
||||
|
@ -270,8 +269,6 @@ pub trait NodeHelpers {
|
|||
fn add_child(&mut self, new_child: &mut JS<Node>, before: Option<JS<Node>>);
|
||||
fn remove_child(&mut self, child: &mut JS<Node>);
|
||||
|
||||
fn child_inserted(&self);
|
||||
|
||||
fn get_hover_state(&self) -> bool;
|
||||
fn set_hover_state(&mut self, state: bool);
|
||||
|
||||
|
@ -411,7 +408,7 @@ impl NodeHelpers for JS<Node> {
|
|||
}
|
||||
}
|
||||
|
||||
self.parent_node().map(|parent| parent.child_inserted());
|
||||
self.parent_node().map(|parent| vtable_for(&parent).child_inserted(self));
|
||||
document.get().content_changed();
|
||||
}
|
||||
|
||||
|
@ -503,15 +500,6 @@ impl NodeHelpers for JS<Node> {
|
|||
child_node.set_parent_node(None);
|
||||
}
|
||||
|
||||
fn child_inserted(&self) {
|
||||
// Parse text content added to an inline stylesheet.
|
||||
match HTMLStyleElementCast::to(self) {
|
||||
Some(elem) => elem.parse_own_css(),
|
||||
None => ()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fn get_hover_state(&self) -> bool {
|
||||
self.get().flags.get_in_hover_state()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue