mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Add a style attribute restyle hint.
This commit is contained in:
parent
9cdf78d53d
commit
7a9cdbb857
2 changed files with 15 additions and 6 deletions
|
@ -179,7 +179,7 @@ impl PendingRestyle {
|
|||
}
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#document
|
||||
/// https://dom.spec.whatwg.org/#document
|
||||
#[dom_struct]
|
||||
pub struct Document {
|
||||
node: Node,
|
||||
|
|
|
@ -30,14 +30,23 @@ bitflags! {
|
|||
/// expensive, and so we use RestyleHints to short-circuit work we know is
|
||||
/// unnecessary.
|
||||
pub flags RestyleHint: u32 {
|
||||
#[doc = "Rerun selector matching on the element."]
|
||||
/// Rerun selector matching on the element.
|
||||
const RESTYLE_SELF = 0x01,
|
||||
#[doc = "Rerun selector matching on all of the element's descendants."]
|
||||
// NB: In Gecko, we have RESTYLE_SUBTREE which is inclusive of self, but heycam isn't aware
|
||||
// of a good reason for that.
|
||||
|
||||
/// Rerun selector matching on all of the element's descendants.
|
||||
///
|
||||
/// NB: In Gecko, we have RESTYLE_SUBTREE which is inclusive of self,
|
||||
/// but heycam isn't aware of a good reason for that.
|
||||
const RESTYLE_DESCENDANTS = 0x02,
|
||||
#[doc = "Rerun selector matching on all later siblings of the element and all of their descendants."]
|
||||
|
||||
/// Rerun selector matching on all later siblings of the element and all
|
||||
/// of their descendants.
|
||||
const RESTYLE_LATER_SIBLINGS = 0x08,
|
||||
|
||||
/// Don't re-run selector-matching on the element, only the style
|
||||
/// attribute has changed, and this change didn't have any other
|
||||
/// dependencies.
|
||||
const RESTYLE_STYLE_ATTRIBUTE = 0x10,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue