From 564ccc0702469b0aa1d78805f6041cdd5641761a Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Tue, 1 Oct 2019 12:26:13 +0000 Subject: [PATCH] servo: Merge #17778 - stylo: Don't ignore visited state when deciding to share style contexts (from Manishearth:stylo-visited-fix); r=bz r=bz https://bugzilla.mozilla.org/show_bug.cgi?id=1381635 Source-Repo: https://github.com/servo/servo Source-Revision: 38e808645292a1e4e9264937b979137b194c2196 UltraBlame original commit: d396287f259511a918635420ecd87fd503df885b --- servo/components/style/sharing/checks.rs | 67 ------------------------ servo/components/style/sharing/mod.rs | 15 +++--- 2 files changed, 9 insertions(+), 73 deletions(-) diff --git a/servo/components/style/sharing/checks.rs b/servo/components/style/sharing/checks.rs index cd81daae6c01a..b92ace113e952 100644 --- a/servo/components/style/sharing/checks.rs +++ b/servo/components/style/sharing/checks.rs @@ -23,12 +23,6 @@ dom TElement ; use -element_state -: -: -* -; -use sharing : : @@ -339,67 +333,6 @@ class_list ( ) } -pub -fn -have_same_state_ignoring_visitedness -< -E -> -( -element -: -E -candidate -: -& -StyleSharingCandidate -< -E -> -) -- -> -bool -where -E -: -TElement -{ -let -state_mask -= -! -IN_VISITED_OR_UNVISITED_STATE -; -let -state -= -element -. -get_state -( -) -& -state_mask -; -let -candidate_state -= -candidate -. -element -. -get_state -( -) -& -state_mask -; -state -= -= -candidate_state -} # [ inline diff --git a/servo/components/style/sharing/mod.rs b/servo/components/style/sharing/mod.rs index 1fc3f9b992184..bf69bf5344a97 100644 --- a/servo/components/style/sharing/mod.rs +++ b/servo/components/style/sharing/mod.rs @@ -2467,16 +2467,19 @@ UserAndAuthorRules ) } if -! -checks -: -: -have_same_state_ignoring_visitedness -( target . element +. +get_state +( +) +! += candidate +. +get_state +( ) { miss