[webkit-changes] [WebKit/WebKit] e0fa0f: REGRESSION (258514 at main): Transition of !important...
Antti Koivisto
noreply at github.com
Mon Feb 27 06:11:48 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e0fa0f2073f1886a7272a69040adaaafde9754fd
https://github.com/WebKit/WebKit/commit/e0fa0f2073f1886a7272a69040adaaafde9754fd
Author: Antti Koivisto <antti at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/transition-important-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/transition-important.html
M Source/WebCore/style/PropertyCascade.cpp
M Source/WebCore/style/PropertyCascade.h
M Source/WebCore/style/StyleTreeResolver.cpp
M Source/WebCore/style/StyleTreeResolver.h
Log Message:
-----------
REGRESSION (258514 at main): Transition of !important property fails to animate
https://bugs.webkit.org/show_bug.cgi?id=111329
rdar://105929421
Reviewed by Antoine Quint.
The cascade precedence is (https://drafts.csswg.org/css-cascade-5/#cascade-sort)
1) Transition declarations [css-transitions-1]
2) Important user agent declarations
3) Important user declarations
4) Important author declarations
5) Animation declarations [css-animations-1]
6) Normal author declarations
7) Normal user declarations
8) Normal user agent declarations
but we were treating transitions and animations similarly.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/transition-important-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/transition-important.html: Added.
* Source/WebCore/style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::addMatch):
(WebCore::Style::PropertyCascade::shouldApplyAfterAnimation):
Don't let !important properties override transitions.
* Source/WebCore/style/PropertyCascade.h:
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
Tell the cascade if this is a transition or animation.
Note that this is still incorrect in the (rare) case where you would have both running on an element at the same time.
(WebCore::Style::TreeResolver::applyCascadeAfterAnimation):
* Source/WebCore/style/StyleTreeResolver.h:
Canonical link: https://commits.webkit.org/260880@main
More information about the webkit-changes
mailing list