style: Avoid selector-matching when only the style attribute is changed.

This commit is contained in:
Emilio Cobos Álvarez 2017-01-31 18:50:32 +01:00
parent da89099e26
commit 8859aa004f
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
5 changed files with 235 additions and 41 deletions

View file

@ -50,6 +50,14 @@ bitflags! {
}
}
impl RestyleHint {
/// The subset hints that affect the styling of a single element during the
/// traversal.
pub fn for_single_element() -> Self {
RESTYLE_SELF | RESTYLE_STYLE_ATTRIBUTE
}
}
#[cfg(feature = "gecko")]
impl From<nsRestyleHint> for RestyleHint {
fn from(raw: nsRestyleHint) -> Self {