Bug 229542 - [CSS Cascade Layers] Initial support
Summary: [CSS Cascade Layers] Initial support
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 220779
  Show dependency treegraph
 
Reported: 2021-08-26 01:25 PDT by Antti Koivisto
Modified: 2021-08-27 10:44 PDT (History)
9 users (show)

See Also:


Attachments
patch (36.83 KB, patch)
2021-08-26 02:23 PDT, Antti Koivisto
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
patch (36.83 KB, patch)
2021-08-26 03:56 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2021-08-26 01:25:41 PDT
Implement initial support
Comment 1 Antti Koivisto 2021-08-26 02:23:39 PDT
Created attachment 436483 [details]
patch
Comment 2 Antti Koivisto 2021-08-26 03:56:45 PDT
Created attachment 436491 [details]
patch
Comment 3 Simon Fraser (smfr) 2021-08-27 10:17:13 PDT
Comment on attachment 436491 [details]
patch

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

> Source/WebCore/css/StyleRule.h:265
> +    Variant<CascadeLayerName, Vector<CascadeLayerName>> m_nameVariant;

Is this preferable to just always using a Vector<>? Or is a name list with one item different from a simple name?

> Source/WebCore/css/StyleRuleType.h:40
>      Namespace = 10,

What happened to 9? Why do we number these from here on?

> Source/WebCore/css/parser/CSSAtRuleID.h:51
> +    CSSAtRuleLayer = 13,

Not sure why we need exploit values here?

> Source/WebCore/style/RuleSet.cpp:510
> +            // FIXME: This is not correct when adding a sublayer to an already registered layer after it has gained siblings.

Reference a bug url?

> Source/WebCore/style/RuleSet.h:196
> +    // FIXME: These should be in stack.

in a stack? on the stack?
Comment 4 Antti Koivisto 2021-08-27 10:22:28 PDT
> Is this preferable to just always using a Vector<>? Or is a name list with
> one item different from a simple name?

One for the statement case, another for the block case. See the different constructor variants. I just used Vector initially but this ended up reading better. Otherwise I also need a separate bool to differentiate between the cases.

> What happened to 9? Why do we number these from here on?

 Needs some historical digging.

> Not sure why we need exploit values here?

We don't, I was just sticking with the existing style.

> Reference a bug url?
> in a stack? on the stack?

I'll be fixing both shortly.
Comment 5 EWS 2021-08-27 10:43:12 PDT
Committed r281701 (241051@main): <https://commits.webkit.org/241051@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 436491 [details].
Comment 6 Radar WebKit Bug Importer 2021-08-27 10:44:25 PDT
<rdar://problem/82445409>