[webkit-reviews] review granted: [Bug 237079] [CSS Container Queries] offsetWidth/Height and similar should update layout for container queries : [Attachment 452966] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 23 09:26:36 PST 2022


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Antti Koivisto
<koivisto at iki.fi>'s request for review:
Bug 237079: [CSS Container Queries] offsetWidth/Height and similar should
update layout for container queries
https://bugs.webkit.org/show_bug.cgi?id=237079

Attachment 452966: Patch

https://bugs.webkit.org/attachment.cgi?id=452966&action=review




--- Comment #2 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 452966
  --> https://bugs.webkit.org/attachment.cgi?id=452966
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?


More information about the webkit-reviews mailing list