Bug 237152 - [css-cascade] Support 'revert-layer' in @keyframes
Summary: [css-cascade] Support 'revert-layer' in @keyframes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Oriol Brufau
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-24 12:44 PST by Oriol Brufau
Modified: 2022-03-02 07:25 PST (History)
4 users (show)

See Also:


Attachments
testcase (597 bytes, text/html)
2022-02-24 12:44 PST, Oriol Brufau
no flags Details
Patch (5.19 KB, patch)
2022-02-24 14:51 PST, Oriol Brufau
no flags Details | Formatted Diff | Diff
Patch (5.24 KB, patch)
2022-03-02 06:04 PST, Oriol Brufau
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oriol Brufau 2022-02-24 12:44:46 PST
Created attachment 453128 [details]
testcase

Analogous to bug 237073, 'revert-layer' doesn't work in @keyframes, it just behaves as 'unset'.

Note that unlike 'revert', it should roll back to author origin, not to user origin.

https://drafts.csswg.org/css-cascade-5/#revert-layer
Comment 1 Oriol Brufau 2022-02-24 14:51:52 PST
Created attachment 453142 [details]
Patch
Comment 2 Oriol Brufau 2022-02-25 05:41:38 PST
PTAL. Not sure if BuilderState is the right class to store the flag, or if it would be better in Builder or PropertyCascade.
Comment 3 Antti Koivisto 2022-03-02 05:52:28 PST
Comment on attachment 453142 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=453142&action=review

> Source/WebCore/style/StyleBuilderState.h:110
> +    void setIgnoreRevertLayer() { m_ignoreRevertLayer = true; }

Maybe this should be more specific like m_isBuildingKeyframeStyle as I don't think it has any other uses.
Comment 4 Oriol Brufau 2022-03-02 06:04:38 PST
Created attachment 453595 [details]
Patch
Comment 5 Oriol Brufau 2022-03-02 06:06:32 PST
(In reply to Antti Koivisto from comment #3)
> Maybe this should be more specific like m_isBuildingKeyframeStyle as I don't
> think it has any other uses.

Done. Also moved the comment since with the new name the explanation seemed more needed in Builder::applyProperty.
Comment 6 EWS 2022-03-02 07:24:51 PST
Committed r290729 (247976@main): <https://commits.webkit.org/247976@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453595 [details].
Comment 7 Radar WebKit Bug Importer 2022-03-02 07:25:21 PST
<rdar://problem/89686640>