Bug 241225

Summary: [CSS Container Queries] Re-evaluate queries after subframe size changes
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: CSSAssignee: Antti Koivisto <koivisto>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, kangil.han, macpherson, menard, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 229659    
Attachments:
Description Flags
Patch
koivisto: commit-queue+
Patch
none
Patch for landing
none
Patch
none
Patch
none
Patch for landing none

Description Antti Koivisto 2022-06-02 06:16:13 PDT
We fail to update on frame size change.
Comment 1 Antti Koivisto 2022-06-02 06:24:13 PDT
Created attachment 459959 [details]
Patch
Comment 2 zalan 2022-06-02 09:01:23 PDT
Comment on attachment 459959 [details]
Patch

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

> Source/WebCore/page/FrameViewLayoutContext.h:58
> +    void layoutWithoutUpdatingQueryContainers();

I assume we are not planning on introducing too many new layout() callsites, so in practice having these 2 functions and deciding "which one to call when" won't cause any issues -but in theory it may be a bit puzzling which one to actually use. I guess if you don't know whether you need query containers, it's better to just use layout().
Comment 3 Antti Koivisto 2022-06-02 09:03:40 PDT
> I assume we are not planning on introducing too many new layout() callsites,
> so in practice having these 2 functions and deciding "which one to call
> when" won't cause any issues -but in theory it may be a bit puzzling which
> one to actually use. I guess if you don't know whether you need query
> containers, it's better to just use layout().

The idea is to just use layout() except in container query related code (there is one other call site for some stupid reasons).
Comment 4 Antti Koivisto 2022-06-02 09:08:04 PDT
Created attachment 459962 [details]
Patch
Comment 5 Antti Koivisto 2022-06-02 09:12:38 PDT
Created attachment 459963 [details]
Patch for landing
Comment 6 Antti Koivisto 2022-06-02 09:36:14 PDT
Created attachment 459964 [details]
Patch
Comment 7 Antti Koivisto 2022-06-02 09:50:43 PDT
Created attachment 459965 [details]
Patch
Comment 8 Antti Koivisto 2022-06-03 01:45:06 PDT
Created attachment 460005 [details]
Patch for landing
Comment 9 EWS 2022-06-03 02:54:45 PDT
Committed r295200 (251257@main): <https://commits.webkit.org/251257@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 460005 [details].
Comment 10 Radar WebKit Bug Importer 2022-06-03 02:55:14 PDT
<rdar://problem/94337695>