Skip to content

Commit

Permalink
Bug 1834133 part 2: Remove code that's flagged as to-be-removed once …
Browse files Browse the repository at this point in the history
…layout.css.always-repaint-on-unvisited is true. r=emilio

If I'm reading the code comment correctly, this is now unreachable code,
and hence can & should be removed.

Differential Revision: https://phabricator.services.mozilla.com/D178570
  • Loading branch information
dholbert committed May 20, 2023
1 parent 06aa3fb commit 4c2d0ab
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,20 +225,6 @@ where
return false;
}

// 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 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.contains(ElementState::VISITED_OR_UNVISITED) {
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.
self.data.hint.insert(RestyleHint::restyle_subtree());
}

let mut classes_removed = SmallVec::<[Atom; 8]>::new();
let mut classes_added = SmallVec::<[Atom; 8]>::new();
if snapshot.class_changed() {
Expand Down

0 comments on commit 4c2d0ab

Please sign in to comment.