Skip to content

Commit

Permalink
style: Add a style attribute restyle hint.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Jan 30, 2017
1 parent 9cdf78d commit 7a9cdbb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion components/script/dom/document.rs
Expand Up @@ -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,
Expand Down
19 changes: 14 additions & 5 deletions components/style/restyle_hints.rs
Expand Up @@ -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,
}
}

Expand Down

0 comments on commit 7a9cdbb

Please sign in to comment.