Bug 237369 - [content-visibility] Lazily layout children
Summary: [content-visibility] Lazily layout children
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Rob Buis
URL:
Keywords: InRadar
Depends on:
Blocks: 236238
  Show dependency treegraph
 
Reported: 2022-03-02 08:18 PST by Rob Buis
Modified: 2023-09-22 06:47 PDT (History)
23 users (show)

See Also:


Attachments
Initial implementation (14.45 KB, patch)
2022-03-02 08:20 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Improved patch (19.28 KB, patch)
2022-03-02 13:56 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Rebase (17.69 KB, patch)
2022-04-22 03:10 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Remove ChangeLogs (15.58 KB, patch)
2022-05-18 07:25 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Fixed-forced-layout-test-failures-wip.diff (2.73 KB, patch)
2022-06-03 08:29 PDT, cathiechen
no flags Details | Formatted Diff | Diff
Patch (20.69 KB, patch)
2022-11-01 07:51 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (5.81 KB, patch)
2022-11-02 07:24 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (20.40 KB, patch)
2022-11-22 07:36 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (19.02 KB, patch)
2022-11-23 07:31 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (24.00 KB, patch)
2022-11-23 11:06 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (24.49 KB, patch)
2022-11-24 13:57 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (23.25 KB, patch)
2022-11-25 01:58 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (23.81 KB, patch)
2022-11-25 03:36 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (21.98 KB, patch)
2022-11-25 10:20 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (21.43 KB, patch)
2022-12-01 03:10 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (14.39 KB, patch)
2022-12-16 01:47 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (13.80 KB, patch)
2023-01-16 03:33 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (13.67 KB, patch)
2023-01-16 06:47 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (15.08 KB, patch)
2023-01-17 02:18 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (15.56 KB, patch)
2023-01-17 12:24 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (13.11 KB, patch)
2023-01-18 04:19 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (16.42 KB, patch)
2023-01-23 01:47 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (5.80 KB, patch)
2023-01-29 11:54 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (7.02 KB, patch)
2023-01-30 13:45 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (7.21 KB, patch)
2023-01-31 09:19 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (20.90 KB, patch)
2023-02-20 09:34 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (21.60 KB, patch)
2023-02-20 13:31 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (24.74 KB, patch)
2023-02-21 02:17 PST, Rob Buis
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Buis 2022-03-02 08:18:38 PST
Support forced layout.
Comment 1 Rob Buis 2022-03-02 08:20:38 PST
Created attachment 453614 [details]
Initial implementation

Initial implementation
Comment 2 Rob Buis 2022-03-02 13:56:51 PST
Created attachment 453656 [details]
Improved patch

Improved patch.
Comment 3 Radar WebKit Bug Importer 2022-03-09 08:19:16 PST
<rdar://problem/90032814>
Comment 4 Rob Buis 2022-04-22 03:10:31 PDT
Created attachment 458128 [details]
Rebase

Rebase
Comment 5 Rob Buis 2022-05-18 07:25:04 PDT
Created attachment 459542 [details]
Remove ChangeLogs

Remove ChangeLogs.
Comment 6 cathiechen 2022-05-26 09:50:51 PDT
Comment on attachment 459542 [details]
Remove ChangeLogs

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

I wonder why Element::offsetTop doesn't need Document::ForceLayout::Yes?

> Source/WebCore/dom/Element.cpp:1283
> +    document().updateLayoutIgnorePendingStylesheets(Document::ForceLayout::Yes);

I wonder why Element::offsetLeft doesn't need Document::ForceLayout::Yes?

> Source/WebCore/dom/Element.cpp:1443
> +    document().updateLayoutIgnorePendingStylesheets(Document::ForceLayout::Yes);

And Element::scrollLeft?
Comment 7 Rob Buis 2022-05-26 09:57:33 PDT
Comment on attachment 459542 [details]
Remove ChangeLogs

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

>> Source/WebCore/dom/Element.cpp:1283
>> +    document().updateLayoutIgnorePendingStylesheets(Document::ForceLayout::Yes);
> 
> I wonder why Element::offsetLeft doesn't need Document::ForceLayout::Yes?

It probably needs it as well, checking chromium. I just did the minimum amount to pass the tests.

>> Source/WebCore/dom/Element.cpp:1443
>> +    document().updateLayoutIgnorePendingStylesheets(Document::ForceLayout::Yes);
> 
> And Element::scrollLeft?

Dito.
Comment 8 cathiechen 2022-06-03 08:29:07 PDT
Created attachment 460015 [details]
Fixed-forced-layout-test-failures-wip.diff

To address the forced layout issues, we need to make sure triggering layout when an element becomes a size containment or vice versa.
Looks like there is no need to change isLayoutForced in layoutContext.
Comment 9 Rob Buis 2022-11-01 07:51:11 PDT
Created attachment 463345 [details]
Patch
Comment 10 Rob Buis 2022-11-02 07:24:49 PDT
Created attachment 463361 [details]
Patch
Comment 11 Rob Buis 2022-11-22 07:36:51 PST
Created attachment 463668 [details]
Patch
Comment 12 Rob Buis 2022-11-23 07:31:05 PST
Created attachment 463692 [details]
Patch
Comment 13 cathiechen 2022-11-23 08:44:20 PST
Comment on attachment 463692 [details]
Patch

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

> Source/WebCore/rendering/style/RenderStyle.cpp:811
> +    if (first.contentVisibility != second.contentVisibility)

// content-visibiliy: hidden enabled contain:size
    if ((static_cast<ContentVisibility>(first.contentVisibility) == ContentVisibility::Hidden) != (static_cast<ContentVisibility>(second.contentVisibility) == ContentVisibility::Hidden))
        return true;
Comment 14 Rob Buis 2022-11-23 11:06:51 PST
Created attachment 463695 [details]
Patch
Comment 15 Rob Buis 2022-11-24 13:57:44 PST
Created attachment 463718 [details]
Patch
Comment 16 Rob Buis 2022-11-25 01:58:40 PST
Created attachment 463723 [details]
Patch
Comment 17 Rob Buis 2022-11-25 03:36:08 PST
Created attachment 463727 [details]
Patch
Comment 18 Rob Buis 2022-11-25 10:20:09 PST
Created attachment 463734 [details]
Patch
Comment 19 Rob Buis 2022-12-01 03:10:37 PST
Created attachment 463827 [details]
Patch
Comment 20 Rob Buis 2022-12-16 01:47:52 PST
Created attachment 464073 [details]
Patch
Comment 21 Rob Buis 2023-01-16 03:33:25 PST
Created attachment 464513 [details]
Patch
Comment 22 Rob Buis 2023-01-16 06:47:01 PST
Created attachment 464514 [details]
Patch
Comment 23 Rob Buis 2023-01-17 02:18:05 PST
Created attachment 464524 [details]
Patch
Comment 24 Rob Buis 2023-01-17 12:24:04 PST
Created attachment 464527 [details]
Patch
Comment 25 EWS Watchlist 2023-01-17 12:38:52 PST
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 26 Rob Buis 2023-01-18 04:19:59 PST
Created attachment 464535 [details]
Patch
Comment 27 Rob Buis 2023-01-18 06:37:10 PST
Pull request: https://github.com/WebKit/WebKit/pull/8763
Comment 28 Rob Buis 2023-01-23 01:47:25 PST
Created attachment 464602 [details]
Patch
Comment 29 Rob Buis 2023-01-29 11:54:24 PST
Created attachment 464745 [details]
Patch
Comment 30 Rob Buis 2023-01-30 13:45:39 PST
Created attachment 464762 [details]
Patch
Comment 31 Rob Buis 2023-01-31 09:19:25 PST
Created attachment 464781 [details]
Patch
Comment 32 Rob Buis 2023-02-02 10:39:03 PST
Pull request: https://github.com/WebKit/WebKit/pull/9537
Comment 33 Rob Buis 2023-02-20 09:34:48 PST
Created attachment 465087 [details]
Patch
Comment 34 Rob Buis 2023-02-20 13:31:42 PST
Created attachment 465094 [details]
Patch
Comment 35 Rob Buis 2023-02-21 02:17:58 PST
Created attachment 465106 [details]
Patch
Comment 36 Tim Nguyen (:ntim) 2023-09-21 10:26:44 PDT
Pull Request: https://github.com/WebKit/WebKit/pull/8763
Comment 37 EWS 2023-09-22 06:47:25 PDT
Committed 268310@main (faa0935aebd5): <https://commits.webkit.org/268310@main>

Reviewed commits have been landed. Closing PR #8763 and removing active labels.