Bug 243449 - [CSS Container Queries] Update query grammar to the spec
Summary: [CSS Container Queries] Update query grammar to the spec
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antti Koivisto
URL:
Keywords: InRadar
Depends on:
Blocks: 229659
  Show dependency treegraph
 
Reported: 2022-08-02 02:39 PDT by Antti Koivisto
Modified: 2022-08-02 08:33 PDT (History)
13 users (show)

See Also:


Attachments
Patch (43.11 KB, patch)
2022-08-02 03:05 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
Patch (43.09 KB, patch)
2022-08-02 03:09 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
Patch for landing (43.08 KB, patch)
2022-08-02 05:57 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
Patch for landing (43.08 KB, patch)
2022-08-02 05:59 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 2022-08-02 02:39:31 PDT
The spec was changed to allow logical operators on top level without parenthesis making

@container not (foo)

legal.

https://drafts.csswg.org/css-contain-3/#container-rule
Comment 1 Radar WebKit Bug Importer 2022-08-02 02:42:28 PDT
<rdar://problem/97967682>
Comment 2 Antti Koivisto 2022-08-02 03:05:17 PDT
Created attachment 461354 [details]
Patch
Comment 3 Antti Koivisto 2022-08-02 03:09:36 PDT
Created attachment 461355 [details]
Patch
Comment 4 Tim Nguyen (:ntim) 2022-08-02 05:45:41 PDT
Comment on attachment 461355 [details]
Patch

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

> Source/WebCore/css/ContainerQueryParser.cpp:98
>  

For posterity (and anyone else looking at this patch), the `not` part is handled just below (click expand to make it appear in the diff view).

> Source/WebCore/css/StyleRule.cpp:466
> +    , m_containerdQuery(WTFMove(query))
>  {
>  }
>  
>  StyleRuleContainer::StyleRuleContainer(const StyleRuleContainer& other)
>      : StyleRuleGroup(other)
> -    , m_filteredQuery(other.m_filteredQuery)
> +    , m_containerdQuery(other.m_containerdQuery)

typo: m_containerdQuery (extra d)

> Source/WebCore/css/StyleRule.h:303
> +    CQ::ContainerQuery m_containerdQuery;

ditto in this file
Comment 5 Antti Koivisto 2022-08-02 05:57:01 PDT
Created attachment 461357 [details]
Patch for landing
Comment 6 EWS 2022-08-02 05:58:25 PDT
Commit message contains (OOPS!), blocking PR #None
Comment 7 Antti Koivisto 2022-08-02 05:59:00 PDT
Created attachment 461358 [details]
Patch for landing
Comment 8 EWS 2022-08-02 08:33:34 PDT
Committed 253035@main (2956c932c8f4): <https://commits.webkit.org/253035@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 461358 [details].