Bug 237152

Summary: [css-cascade] Support 'revert-layer' in @keyframes
Product: WebKit Reporter: Oriol Brufau <obrufau>
Component: CSSAssignee: Oriol Brufau <obrufau>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, graouts, koivisto, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=237073
Attachments:
Description Flags
testcase
none
Patch
none
Patch none

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>