RESOLVED FIXED 237079
[CSS Container Queries] offsetWidth/Height and similar should update layout for container queries
https://bugs.webkit.org/show_bug.cgi?id=237079
Summary [CSS Container Queries] offsetWidth/Height and similar should update layout f...
Antti Koivisto
Reported 2022-02-23 05:14:43 PST
css/css-contain/container-queries/inline-size-containment.html css/css-contain/container-queries/inline-size-containment-vertical-rl.html
Attachments
Patch (11.48 KB, patch)
2022-02-23 05:18 PST, Antti Koivisto
no flags
Antti Koivisto
Comment 1 2022-02-23 05:18:57 PST
Simon Fraser (smfr)
Comment 2 2022-02-23 09:26:36 PST
Comment on attachment 452966 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=452966&action=review > Source/WebCore/dom/Document.cpp:2218 > + while (styleScope().updateQueryContainerState(queryContainerUpdateContext)) { > + updateStyleIfNeeded(); > + > + if (!frameView->layoutContext().needsLayout()) > + break; > + > + frameView->layoutContext().layout(); This makes me nervous that we could get into an infinite loop here. Should we bail after N iterations?
Antti Koivisto
Comment 3 2022-02-23 09:42:24 PST
> This makes me nervous that we could get into an infinite loop here. Should > we bail after N iterations? The queryContainerUpdateContext thing does prevent infinite looping (since in worst case you'll eventually have every element in that set and won't invalidate anything any more).
EWS
Comment 4 2022-02-23 10:16:26 PST
Committed r290380 (247695@main): <https://commits.webkit.org/247695@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 452966 [details].
Radar WebKit Bug Importer
Comment 5 2022-02-23 10:17:18 PST
Note You need to log in before you can comment on or make changes to this bug.