fune/testing/web-platform/tests/css/css-animations/animation-important-002-ref.html
Anders Hartvoll Ruud 42d8fdf550 Bug 1623263 [wpt PR 22315] - Let animations/transitions use the main cascade, a=testonly
Automatic update from web-platform-tests
Let animations/transitions use the main cascade

In order to solve difficult problems such as crbug.com/552085,
interpolations must be applied using the same cascade as where the
MatchResult was analyzed. This means we'll skip applying the
interpolation if an !important declaration exists for the same
property.

This CL:

 - Moves the MatchResult out of ElementRuleCollector. MatchResult must
   now be passed to ApplyAnimatedStandardProperties, hence it must
   outlive ElementRuleCollector.
 - Lifts the on-stack StyleCascade up to StyleForElement, such that it
   can be used in both ApplyBaseComputedStyle and ApplyAnimated-
   StandardProperties.
 - Sets as flag on StyleResolverState when an interpolation effect is
   skipped during Apply. This means something was !important, and we
   can't use the base-computed-style optimization.
 - Clears the base-computed-style if the above flag is set.
 - Due to how the base computed style optimizations works when DCHECK
   is on, it was necessary to add Reset functions to StyleCascade and
   MatchResult (see explanation near MaybeResetCascade).

This is a web-facing change: !important declarations will now override
declarations in the animation origin. WPT for this was apparently non-
existent, so this CLs adds a few tests (that also pass in Firefox).

Bug: 552085, 985049
Change-Id: I538f73936e96e1bd974e0855b081e99bf947e6a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2064248
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752476}

--

wpt-commits: a94e269aea2aeb21da3c210e50213a874beba71d
wpt-pr: 22315
2020-03-31 11:30:31 +00:00

9 lines
196 B
HTML

<!DOCTYPE html>
<style>
a {
text-decoration: underline;
background-color: rgb(0, 150, 0);
}
</style>
<a style="color: rgb(150, 0, 0)">Unvisited</a>
<a style="color: white">Visited</a>