mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Bug 1364377: Fix inheritance of NAC, and selector-matching of pseudo-implementing NAC. r=bholley
MozReview-Commit-ID: DjSyaWHq1Xj Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
58253f545b
commit
2ffffcfdce
3 changed files with 59 additions and 8 deletions
|
@ -325,6 +325,21 @@ pub trait TElement : Eq + PartialEq + Debug + Hash + Sized + Copy + Clone +
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns the parent element we should inherit from.
|
||||
///
|
||||
/// This is pretty much always the parent element itself, except in the case
|
||||
/// of Gecko's Native Anonymous Content, which may need to find the closest
|
||||
/// non-NAC ancestor.
|
||||
fn inheritance_parent(&self) -> Option<Self> {
|
||||
self.parent_element()
|
||||
}
|
||||
|
||||
/// For a given NAC element, return the closest non-NAC ancestor, which is
|
||||
/// guaranteed to exist.
|
||||
fn closest_non_native_anonymous_ancestor(&self) -> Option<Self> {
|
||||
unreachable!("Servo doesn't know about NAC");
|
||||
}
|
||||
|
||||
/// Get this element's style attribute.
|
||||
fn style_attribute(&self) -> Option<&Arc<Locked<PropertyDeclarationBlock>>>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue