aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/invalidation/element/state_and_attributes.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2019-11-05 10:24:36 +0000
committerEmilio Cobos Álvarez <emilio@crisal.io>2019-11-30 20:44:55 +0100
commitd797b0e47523fe7326abe874cf2e77b460f98c75 (patch)
treeac8396a9d68e0dbd83fe8f69fac22c4b3ae98c69 /components/style/invalidation/element/state_and_attributes.rs
parentd68d6f7c568e11518f90b3bb7c5a79a6ab031c34 (diff)
downloadservo-d797b0e47523fe7326abe874cf2e77b460f98c75.tar.gz
servo-d797b0e47523fe7326abe874cf2e77b460f98c75.zip
style: Fix ElementWrapper::is_link.
And do a full restyle only when the state goes from visited to unvisited or vice versa. That is, use regular invalidation for addition or removals of href attributes, for example. Differential Revision: https://phabricator.services.mozilla.com/D50821
Diffstat (limited to 'components/style/invalidation/element/state_and_attributes.rs')
-rw-r--r--components/style/invalidation/element/state_and_attributes.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/components/style/invalidation/element/state_and_attributes.rs b/components/style/invalidation/element/state_and_attributes.rs
index c4671b0011c..cb3a5525e39 100644
--- a/components/style/invalidation/element/state_and_attributes.rs
+++ b/components/style/invalidation/element/state_and_attributes.rs
@@ -159,14 +159,10 @@ where
// doesn't depend on the actual visited state at all, so we can't look
// at matching results to decide what to do for this case.
//
- // TODO(emilio): This should be contains(), to avoid doing subtree
- // restyles when adding or removing an href attribute, but invalidation
- // for that case is broken right now (bug 1591987).
- //
- // This piece of code should be removed when
+ // TODO(emilio): This piece of code should be removed when
// layout.css.always-repaint-on-unvisited is true, since we cannot get
// into this situation in that case.
- if state_changes.intersects(ElementState::IN_VISITED_OR_UNVISITED_STATE) {
+ if state_changes.contains(ElementState::IN_VISITED_OR_UNVISITED_STATE) {
trace!(" > visitedness change, force subtree restyle");
// We can't just return here because there may also be attribute
// changes as well that imply additional hints for siblings.