aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/restyle_hints.rs
diff options
context:
space:
mode:
authorBobby Holley <bobbyholley@gmail.com>2017-04-11 14:06:11 +0800
committerBobby Holley <bobbyholley@gmail.com>2017-04-12 09:32:14 +0800
commitd51d95d0c7714d443536ee098e5e9022f4fbe810 (patch)
treedbbe3def9a38a31bbfe182998facd59aa23a3730 /components/style/restyle_hints.rs
parent6515f78f6dee9b5825c7b5b9c0590ba3fb86a461 (diff)
downloadservo-d51d95d0c7714d443536ee098e5e9022f4fbe810.tar.gz
servo-d51d95d0c7714d443536ee098e5e9022f4fbe810.zip
Merge style_affecting_attributes_selectors with selectors_for_cache_revalidation.
Diffstat (limited to 'components/style/restyle_hints.rs')
-rw-r--r--components/style/restyle_hints.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/components/style/restyle_hints.rs b/components/style/restyle_hints.rs
index 9fe5e8a439e..594246f4838 100644
--- a/components/style/restyle_hints.rs
+++ b/components/style/restyle_hints.rs
@@ -490,7 +490,6 @@ struct Dependency {
pub struct SelectorDependencyVisitor<'a> {
dependency_set: &'a mut DependencySet,
needs_cache_revalidation: bool,
- affected_by_attribute: bool,
}
impl<'a> SelectorDependencyVisitor<'a> {
@@ -499,7 +498,6 @@ impl<'a> SelectorDependencyVisitor<'a> {
SelectorDependencyVisitor {
dependency_set: dependency_set,
needs_cache_revalidation: false,
- affected_by_attribute: false,
}
}
@@ -508,12 +506,6 @@ impl<'a> SelectorDependencyVisitor<'a> {
pub fn needs_cache_revalidation(&self) -> bool {
self.needs_cache_revalidation
}
-
- /// Returns whether this visitor has known of a attribute-dependent
- /// selector.
- pub fn affected_by_attribute(&self) -> bool {
- self.affected_by_attribute
- }
}
impl<'a> SelectorVisitor for SelectorDependencyVisitor<'a> {
@@ -537,7 +529,7 @@ impl<'a> SelectorVisitor for SelectorDependencyVisitor<'a> {
let hint = combinator_to_restyle_hint(combinator);
- self.affected_by_attribute |= sensitivities.attrs;
+ self.needs_cache_revalidation |= sensitivities.attrs;
self.needs_cache_revalidation |= hint.intersects(RESTYLE_LATER_SIBLINGS);
if !sensitivities.is_empty() {