Bug 239118 - [CSS Container Queries] Limit query range syntax
Summary: [CSS Container Queries] Limit query range syntax
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-04-12 01:54 PDT by Antti Koivisto
Modified: 2022-04-13 11:50 PDT (History)
9 users (show)

See Also:


Attachments
Patch (7.08 KB, patch)
2022-04-12 02:41 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
Patch (7.11 KB, patch)
2022-04-12 02:46 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
Patch (7.35 KB, patch)
2022-04-13 01:55 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-04-12 01:54:19 PDT
The spec disallows things like (100px == width == 50px) and (100px < width > 10px).
Comment 1 Antti Koivisto 2022-04-12 02:41:10 PDT
Created attachment 457319 [details]
Patch
Comment 2 Antti Koivisto 2022-04-12 02:46:48 PDT
Created attachment 457322 [details]
Patch
Comment 3 Darin Adler 2022-04-12 13:07:08 PDT
Comment on attachment 457322 [details]
Patch

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

> Source/WebCore/css/ContainerQueryParser.cpp:82
> +        if (!sizeFeature || !blockRange.atEnd())

Why do we need the blockRange.atEnd() check, but no conditionRange.atEnd() check?
Comment 4 Antti Koivisto 2022-04-12 21:35:40 PDT
> Why do we need the blockRange.atEnd() check, but no conditionRange.atEnd()
> check?

consumeCondition always loops the range to the end, or returns a nullopt. consumeSizeFeature consumes the feature and returns a value whether at the end or not.

Maybe it would be better to check in consumeSizeFeature itself.
Comment 5 Antti Koivisto 2022-04-13 01:55:22 PDT
Created attachment 457516 [details]
Patch
Comment 6 EWS 2022-04-13 11:49:32 PDT
Committed r292816 (249596@main): <https://commits.webkit.org/249596@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 457516 [details].
Comment 7 Radar WebKit Bug Importer 2022-04-13 11:50:17 PDT
<rdar://problem/91705554>