Bug 236711

Summary: [content-visibility] Add support for css content-visibility: auto
Product: WebKit Reporter: cathiechen <cathiechen>
Component: CSSAssignee: Rob Buis <rbuis>
Status: RESOLVED FIXED    
Severity: Normal CC: bogdan.brinza, cathiechen, cdumez, changseok, clopez, cmarcelo, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, kangil.han, kondapallykalyan, mifenton, pdr, rbuis, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 236238    
Attachments:
Description Flags
Initial patch
none
Better ChangeLog.
none
Compute intersections synchronously
none
Fix intersection computation
none
Properly fix intersections
none
Rebase
none
Handle selection
none
c_v-auto-based-on-contain-intrinsic-size
none
Remove ChangeLog
none
Rebase
none
Rebase
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch ews-feeder: commit-queue-

Comment 1 Radar WebKit Bug Importer 2022-02-23 09:26:15 PST
<rdar://problem/89360404>
Comment 2 Rob Buis 2022-03-09 08:18:10 PST
Created attachment 454239 [details]
Initial patch

Initial patch.
Comment 3 Rob Buis 2022-03-11 07:48:48 PST
Created attachment 454485 [details]
Better ChangeLog.

Better ChangeLog.
Comment 4 Rob Buis 2022-03-16 05:04:00 PDT
Created attachment 454822 [details]
Compute intersections synchronously

Compute intersections synchronously.
Comment 5 Rob Buis 2022-03-16 09:11:01 PDT
Created attachment 454844 [details]
Fix intersection computation

Fix intersection computation, previous patch did the sync call before registration.
Comment 6 Rob Buis 2022-03-16 11:23:12 PDT
Created attachment 454866 [details]
Properly fix intersections

Properly fix intersections
Comment 7 Rob Buis 2022-03-24 09:24:52 PDT
Created attachment 455647 [details]
Rebase

Rebase.
Comment 8 Rob Buis 2022-04-06 07:11:19 PDT
Created attachment 456817 [details]
Handle selection

Handle selection.
Comment 9 cathiechen 2022-05-10 03:39:49 PDT
Comment on attachment 456817 [details]
Handle selection

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

> Source/WebCore/rendering/style/RenderStyle.h:543
> +    bool containsSize() const { return effectiveContainment().contains(Containment::Size) || skipsContents(); }

Maybe we can also move `skipsContents()` inside `effectiveContainment()`? Not sure why `containsLayout`, `containsStyle`, and `containsPaint` do not check `skipsContents()` like `containsSize`?
Comment 10 cathiechen 2022-05-10 03:39:51 PDT
Comment on attachment 456817 [details]
Handle selection

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

> Source/WebCore/rendering/style/RenderStyle.h:543
> +    bool containsSize() const { return effectiveContainment().contains(Containment::Size) || skipsContents(); }

Maybe we can also move `skipsContents()` inside `effectiveContainment()`? Not sure why `containsLayout`, `containsStyle`, and `containsPaint` do not check `skipsContents()` like `containsSize`?
Comment 11 Rob Buis 2022-05-11 02:10:03 PDT
Comment on attachment 456817 [details]
Handle selection

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

>>> Source/WebCore/rendering/style/RenderStyle.h:543
>>> +    bool containsSize() const { return effectiveContainment().contains(Containment::Size) || skipsContents(); }
>> 
>> Maybe we can also move `skipsContents()` inside `effectiveContainment()`? Not sure why `containsLayout`, `containsStyle`, and `containsPaint` do not check `skipsContents()` like `containsSize`?
> 
> Maybe we can also move `skipsContents()` inside `effectiveContainment()`? Not sure why `containsLayout`, `containsStyle`, and `containsPaint` do not check `skipsContents()` like `containsSize`?

See https://drafts.csswg.org/css-contain/#valdef-content-visibility-auto:
"Turns on layout containment, style containment, and paint containment for the element."
For c-v: hidden all containment is enabled. But actually, I am not sure in our patches c-v: hidden always enables size containment unconditionally....
Comment 12 cathiechen 2022-05-17 01:12:16 PDT
Created attachment 459488 [details]
c_v-auto-based-on-contain-intrinsic-size

The test results in this patch is based on the contain-intrinsic-size implementation patch.
Comment 13 Rob Buis 2022-05-19 01:46:32 PDT
Created attachment 459571 [details]
Remove ChangeLog
Comment 14 Rob Buis 2022-06-08 03:07:55 PDT
Created attachment 460087 [details]
Rebase
Comment 15 Rob Buis 2023-01-05 09:25:13 PST
Created attachment 464351 [details]
Rebase
Comment 16 Rob Buis 2023-01-10 11:42:52 PST
Created attachment 464444 [details]
Patch
Comment 17 Rob Buis 2023-01-12 07:49:27 PST
Created attachment 464468 [details]
Patch
Comment 18 EWS Watchlist 2023-01-12 07:53:10 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 19 Rob Buis 2023-01-13 01:53:43 PST
Created attachment 464480 [details]
Patch
Comment 20 Rob Buis 2023-01-13 05:55:49 PST
Created attachment 464485 [details]
Patch
Comment 21 Rob Buis 2023-01-17 06:56:47 PST
Created attachment 464526 [details]
Patch
Comment 22 Rob Buis 2023-01-18 02:31:20 PST
Created attachment 464533 [details]
Patch
Comment 23 Rob Buis 2023-01-18 03:34:23 PST
Created attachment 464534 [details]
Patch
Comment 24 Rob Buis 2023-01-18 07:16:07 PST
Created attachment 464536 [details]
Patch
Comment 25 Rob Buis 2023-01-19 08:13:51 PST
Created attachment 464561 [details]
Patch
Comment 26 Rob Buis 2023-01-19 12:02:05 PST
Created attachment 464565 [details]
Patch
Comment 27 Rob Buis 2023-01-20 06:32:18 PST
Created attachment 464578 [details]
Patch
Comment 28 Rob Buis 2023-01-25 02:23:27 PST
Pull request: https://github.com/WebKit/WebKit/pull/9096
Comment 29 EWS 2023-07-15 08:29:20 PDT
Committed 266084@main (b39fee5ba22e): <https://commits.webkit.org/266084@main>

Reviewed commits have been landed. Closing PR #9096 and removing active labels.
Comment 30 Rob Buis 2023-07-17 01:47:46 PDT
Re-opening for pull request https://github.com/WebKit/WebKit/pull/15879
Comment 31 EWS 2023-08-22 05:00:26 PDT
Committed 267130@main (6f118d4b6dd0): <https://commits.webkit.org/267130@main>

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