| Summary: | [CSS Container Queries] offsetWidth/Height and similar should update layout for container queries | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Antti Koivisto <koivisto> | ||||
| Component: | Layout and Rendering | Assignee: | Antti Koivisto <koivisto> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | bfulgham, cdumez, esprehn+autocc, ews-watchlist, kangil.han, simon.fraser, webkit-bug-importer, zalan | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 229659 | ||||||
| Attachments: |
|
||||||
|
Description
Antti Koivisto
2022-02-23 05:14:43 PST
Created attachment 452966 [details]
Patch
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? > 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).
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]. |