mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Add code to make part rules affect the style of the elements.
I still haven't implemented each_part(), so this will do nothing yet. The cascade order stuff is fishy, I know, and I'll fix in a followup if it's fine with you. I moved the sorting of the rules to rule_collector, since it seemed to me it was better that way that duplicating the code, and those SelectorMap functions only have a single caller anyway. Differential Revision: https://phabricator.services.mozilla.com/D32647
This commit is contained in:
parent
39de0a068e
commit
7139a4185a
6 changed files with 100 additions and 27 deletions
|
@ -626,11 +626,6 @@ impl<'le> GeckoElement<'le> {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn has_part_attr(&self) -> bool {
|
||||
self.as_node().get_bool_flag(nsINode_BooleanFlag::ElementHasPart)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn may_have_anonymous_children(&self) -> bool {
|
||||
self.as_node()
|
||||
|
@ -1353,6 +1348,11 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
unsafe { bindings::Gecko_HasAttr(self.0, namespace.0.as_ptr(), attr.as_ptr()) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn has_part_attr(&self) -> bool {
|
||||
self.as_node().get_bool_flag(nsINode_BooleanFlag::ElementHasPart)
|
||||
}
|
||||
|
||||
// FIXME(emilio): we should probably just return a reference to the Atom.
|
||||
#[inline]
|
||||
fn id(&self) -> Option<&WeakAtom> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue