Bug 236702 - [CSS Container Queries] Size queries on unsupported axis should evaluate to unknown
Summary: [CSS Container Queries] Size queries on unsupported axis should evaluate to u...
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-02-16 02:48 PST by Antti Koivisto
Modified: 2022-02-16 08:55 PST (History)
2 users (show)

See Also:


Attachments
Patch (17.74 KB, patch)
2022-02-16 03:05 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
Patch for landing (17.69 KB, patch)
2022-02-16 05:18 PST, 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-02-16 02:48:37 PST
"If ... the query container does not support container size queries on the relevant axes, then the result of evaluating the size feature is unknown.

https://drafts.csswg.org/css-contain-3/#size-container
Comment 1 Antti Koivisto 2022-02-16 03:05:00 PST
Created attachment 452170 [details]
Patch
Comment 2 Dean Jackson 2022-02-16 04:28:54 PST
Comment on attachment 452170 [details]
Patch

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

> Source/WebCore/style/ContainerQueryEvaluator.cpp:203
> +        if (axis == Axis::Width)
> +            axis = container.renderer.isHorizontalWritingMode() ? Axis::Inline : Axis::Block;
> +        else if (axis == Axis::Height)
> +            axis = container.renderer.isHorizontalWritingMode() ? Axis::Block : Axis::Inline;

I guess this is only needed in the ::InlineSize case - maybe it could go there? I don't have strong opinions.
Comment 3 Antti Koivisto 2022-02-16 04:56:39 PST
> I guess this is only needed in the ::InlineSize case - maybe it could go
> there? I don't have strong opinions.

Good point!
Comment 4 Antti Koivisto 2022-02-16 05:18:24 PST
Created attachment 452186 [details]
Patch for landing
Comment 5 EWS 2022-02-16 08:54:09 PST
Committed r289890 (247328@main): <https://commits.webkit.org/247328@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 452186 [details].
Comment 6 Radar WebKit Bug Importer 2022-02-16 08:55:21 PST
<rdar://problem/89028172>