[cascade] Ensure that !important :visited declaration win over animations
Consider a rule such as: a:visited { background-color: green !important; } If 'background-color' on 'a' is currently undergoing a @keyframes animation, and 'a' is a visited link, the -internal-visited-background- color (i.e. what we paint) must be 'green', but the 'background-color' as seen from JS must be the interpolated color. Since unvisited and visited colors are applied together by the interpolations machinery, we need to work around this manually. Whenever we apply an interpolated color, we check the priority of the -internal- visited- counterpart, and apply that again if its priority is higher. Note that despite CSSCascade being enabled for stable at the moment, this does not (yet) constitute a web-facing change, as the standard property animations are still using their own StyleCascade object (see ApplyAnimatedStandardProperties), and -internal-visited- properties are never added to that cascade. Bug: 1062217, 552085 Change-Id: Ic65b4986d41d7ada62fc5a857fdce8e08077609d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2106186 Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Reviewed-by:Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#751299}
Showing
Please register or sign in to comment