Bug 225442 - will-change: contain should create a containing block and a stacking context
Summary: will-change: contain should create a containing block and a stacking context
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Rob Buis
URL:
Keywords: InRadar
Depends on:
Blocks: 172026
  Show dependency treegraph
 
Reported: 2021-05-06 02:29 PDT by Tim Nguyen (:ntim)
Modified: 2021-05-17 07:54 PDT (History)
13 users (show)

See Also:


Attachments
Patch (5.15 KB, patch)
2021-05-16 07:09 PDT, Rob Buis
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (5.96 KB, patch)
2021-05-16 08:30 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (6.21 KB, patch)
2021-05-16 12:56 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (5.92 KB, patch)
2021-05-17 04:19 PDT, Rob Buis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Rob Buis 2021-05-06 02:33:08 PDT
This is possibly already done in https://bugs.webkit.org/show_bug.cgi?id=224742 but I am fine if this bug covers it (and in fact my change may only be a subset of this bug).
Comment 2 Radar WebKit Bug Importer 2021-05-13 02:30:14 PDT
<rdar://problem/77958378>
Comment 3 Tim Nguyen (:ntim) 2021-05-15 13:13:16 PDT
Rob, I'm tentatively assigning this to you. 

Relevant code is here:

https://webkit-search.igalia.com/webkit/rev/7c76a6e054902182b30fd3ce7f3a08f507dc1f1f/Source/WebCore/rendering/style/WillChangeData.cpp#63-78


Adding the property here will cause it to create a containing block for both position: fixed & position: absolute cases.

Please let me know if you have any questions.
Comment 4 Rob Buis 2021-05-16 07:09:43 PDT
Created attachment 428784 [details]
Patch
Comment 5 Rob Buis 2021-05-16 08:30:45 PDT
Created attachment 428789 [details]
Patch
Comment 6 Rob Buis 2021-05-16 12:56:54 PDT
Created attachment 428803 [details]
Patch
Comment 7 Tim Nguyen (:ntim) 2021-05-17 03:02:58 PDT
Comment on attachment 428803 [details]
Patch

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

> Source/WebCore/ChangeLog:3
> +        will-change: contain should create a containing block

I think the CSS stacking context change is important to mention in the main message and in LayoutTests/ChangeLog as well.

> LayoutTests/TestExpectations:4926
> +webkit.org/b/208988 imported/w3c/web-platform-tests/webxr/xrWebGLLayer_opaque_framebuffer_stencil.https.html [ Skip ]

nit: unrelated change
Comment 8 Tim Nguyen (:ntim) 2021-05-17 03:04:36 PDT
You'll probably need to rebase on top of bug 225443 btw (sorry for the conflict!).
Comment 9 Rob Buis 2021-05-17 04:19:37 PDT
Created attachment 428820 [details]
Patch
Comment 10 Rob Buis 2021-05-17 04:58:50 PDT
Comment on attachment 428803 [details]
Patch

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

>> Source/WebCore/ChangeLog:3
>> +        will-change: contain should create a containing block
> 
> I think the CSS stacking context change is important to mention in the main message and in LayoutTests/ChangeLog as well.

Done.

>> LayoutTests/TestExpectations:4926
>> +webkit.org/b/208988 imported/w3c/web-platform-tests/webxr/xrWebGLLayer_opaque_framebuffer_stencil.https.html [ Skip ]
> 
> nit: unrelated change

This is a vi(m) setting problem that comes up from time to time, I think I figured it out. Done!
Comment 11 EWS 2021-05-17 06:32:36 PDT
Committed r277580 (237807@main): <https://commits.webkit.org/237807@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 428820 [details].
Comment 12 Tim Nguyen (:ntim) 2021-05-17 07:54:25 PDT
(In reply to Rob Buis from comment #10)
> Comment on attachment 428803 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=428803&action=review
> 
> >> Source/WebCore/ChangeLog:3
> >> +        will-change: contain should create a containing block
> > 
> > I think the CSS stacking context change is important to mention in the main message and in LayoutTests/ChangeLog as well.
> 
> Done.

It doesn't matter too much since things are in the details, but that part wasn't done.

The main commit message should have been "will-change: contain should create a containing block & a stacking context".

Anyway, I'll rename this bug for clarity.