From d68d6f7c568e11518f90b3bb7c5a79a6ab031c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 4 Nov 2019 16:55:33 +0000 Subject: [PATCH] style: Always restyle / repaint when a visited query finishes. Differential Revision: https://phabricator.services.mozilla.com/D50810 --- .../style/invalidation/element/state_and_attributes.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/style/invalidation/element/state_and_attributes.rs b/components/style/invalidation/element/state_and_attributes.rs index 30521fb8c00..c4671b0011c 100644 --- a/components/style/invalidation/element/state_and_attributes.rs +++ b/components/style/invalidation/element/state_and_attributes.rs @@ -158,6 +158,14 @@ where // If we the visited state changed, we force a restyle here. Matching // 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 + // 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) { trace!(" > visitedness change, force subtree restyle"); // We can't just return here because there may also be attribute