aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/element.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-06-13 11:03:06 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-06-13 13:26:41 +0200
commitcb06375fe2d445a09c45865fcb0fe6585a545461 (patch)
tree1078c7344fa5ab1bb3fac2b64f73ed7fe2026dc3 /components/script/dom/element.rs
parentfd10729941a8a21938d88770250dc4b7cb6a48af (diff)
downloadservo-cb06375fe2d445a09c45865fcb0fe6585a545461.tar.gz
servo-cb06375fe2d445a09c45865fcb0fe6585a545461.zip
style: Implement a more fine-grained invalidation method.
This commit also removes the old restyle_hints module and splits it into multiple modules under components/style/invalidation/element/. The basic approach is to walk down the tree using compound selectors as needed, in order to do as little selector-matching as possible. Bug: 1368240 MozReview-Commit-ID: 2YO8fKFygZI
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r--components/script/dom/element.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index ebeef51de89..7e01bc66764 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -102,9 +102,9 @@ use style::applicable_declarations::ApplicableDeclarationBlock;
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
use style::context::{QuirksMode, ReflowGoal};
use style::element_state::*;
+use style::invalidation::element::restyle_hints::RESTYLE_SELF;
use style::properties::{Importance, PropertyDeclaration, PropertyDeclarationBlock, parse_style_attribute};
use style::properties::longhands::{self, background_image, border_spacing, font_family, font_size, overflow_x};
-use style::restyle_hints::RestyleHint;
use style::rule_tree::CascadeLevel;
use style::selector_parser::{NonTSPseudoClass, PseudoElement, RestyleDamage, SelectorImpl, SelectorParser};
use style::selector_parser::extended_filtering;
@@ -253,7 +253,7 @@ impl Element {
// FIXME(bholley): I think we should probably only do this for
// NodeStyleDamaged, but I'm preserving existing behavior.
- restyle.hint.insert(RestyleHint::for_self());
+ restyle.hint.insert(RESTYLE_SELF);
if damage == NodeDamage::OtherNodeDamage {
restyle.damage = RestyleDamage::rebuild_and_reflow();