mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Allow to share style across elements with similar XBL bindings.
This commit is contained in:
parent
af12284b6a
commit
c338745b17
4 changed files with 21 additions and 42 deletions
|
@ -321,7 +321,7 @@ fn fmt_subtree<F, N: TNode>(f: &mut fmt::Formatter, stringify: &F, n: N, indent:
|
|||
}
|
||||
|
||||
/// The ShadowRoot trait.
|
||||
pub trait TShadowRoot : Sized + Copy + Clone {
|
||||
pub trait TShadowRoot : Sized + Copy + Clone + PartialEq {
|
||||
/// The concrete node type.
|
||||
type ConcreteNode: TNode<ConcreteShadowRoot = Self>;
|
||||
|
||||
|
@ -390,15 +390,6 @@ pub trait TElement
|
|||
depth
|
||||
}
|
||||
|
||||
/// The style scope of this element is a node that represents which rules
|
||||
/// apply to the element.
|
||||
///
|
||||
/// In Servo, where we don't know about Shadow DOM or XBL, the style scope
|
||||
/// is always the document.
|
||||
fn style_scope(&self) -> Self::ConcreteNode {
|
||||
self.as_node().owner_doc().as_node()
|
||||
}
|
||||
|
||||
/// Get this node's parent element from the perspective of a restyle
|
||||
/// traversal.
|
||||
fn traversal_parent(&self) -> Option<Self> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue