Bug 167868 - Create a containing block when relevant properties are set in the current element will-change
Summary: Create a containing block when relevant properties are set in the current ele...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Nguyen (:ntim)
URL:
Keywords: InRadar, WebExposed
Depends on:
Blocks:
 
Reported: 2017-02-05 22:22 PST by Simon Fraser (smfr)
Modified: 2021-04-26 22:31 PDT (History)
16 users (show)

See Also:


Attachments
Patch (4.50 KB, patch)
2017-02-05 22:24 PST, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews115 for mac-elcapitan (1.78 MB, application/zip)
2017-02-05 23:24 PST, Build Bot
no flags Details
Archive of layout-test-results from ews101 for mac-elcapitan (894.25 KB, application/zip)
2017-02-05 23:28 PST, Build Bot
no flags Details
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 (856.09 KB, application/zip)
2017-02-05 23:34 PST, Build Bot
no flags Details
Archive of layout-test-results from ews123 for ios-simulator-wk2 (13.11 MB, application/zip)
2017-02-05 23:49 PST, Build Bot
no flags Details
Patch (4.60 KB, patch)
2021-04-21 10:18 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (4.61 KB, patch)
2021-04-21 13:12 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (10.93 KB, patch)
2021-04-22 06:47 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (13.47 KB, patch)
2021-04-25 12:28 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (13.41 KB, patch)
2021-04-25 12:45 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (13.24 KB, patch)
2021-04-25 15:09 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (13.08 KB, patch)
2021-04-26 11:35 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2017-02-05 22:22:34 PST
will-change: position should create containing block for positioned descendants
Comment 1 Simon Fraser (smfr) 2017-02-05 22:24:15 PST
Created attachment 300687 [details]
Patch
Comment 2 Build Bot 2017-02-05 23:24:44 PST
Comment on attachment 300687 [details]
Patch

Attachment 300687 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/3011973

New failing tests:
fast/css/will-change/will-change-creates-stacking-context-inline.html
Comment 3 Build Bot 2017-02-05 23:24:48 PST
Created attachment 300689 [details]
Archive of layout-test-results from ews115 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 4 Build Bot 2017-02-05 23:28:35 PST
Comment on attachment 300687 [details]
Patch

Attachment 300687 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/3012020

New failing tests:
fast/css/will-change/will-change-creates-stacking-context-inline.html
Comment 5 Build Bot 2017-02-05 23:28:39 PST
Created attachment 300690 [details]
Archive of layout-test-results from ews101 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 6 Build Bot 2017-02-05 23:34:13 PST
Comment on attachment 300687 [details]
Patch

Attachment 300687 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/3012028

New failing tests:
fast/css/will-change/will-change-creates-stacking-context-inline.html
Comment 7 Build Bot 2017-02-05 23:34:17 PST
Created attachment 300691 [details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 8 Build Bot 2017-02-05 23:48:59 PST
Comment on attachment 300687 [details]
Patch

Attachment 300687 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/3012033

New failing tests:
fast/css/will-change/will-change-creates-stacking-context-inline.html
Comment 9 Build Bot 2017-02-05 23:49:03 PST
Created attachment 300692 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6
Comment 10 Maciej Stachowiak 2020-06-01 14:51:16 PDT
Comment on attachment 300687 [details]
Patch

No idea if this patch is still relevant or still applies, but looks good to me. Maybe it should be re-run through modern EWS?

r=me assuming it still applies and passes tests.
Comment 11 Tim Nguyen (:ntim) 2021-04-21 10:18:03 PDT
Created attachment 426708 [details]
Patch
Comment 12 Radar WebKit Bug Importer 2021-04-21 10:31:40 PDT
<rdar://problem/76966899>
Comment 13 Tim Nguyen (:ntim) 2021-04-21 13:12:44 PDT
Created attachment 426734 [details]
Patch
Comment 14 Tim Nguyen (:ntim) 2021-04-22 05:56:34 PDT
I've made this more generic so I could fix multiple issues in one go.
Comment 15 Tim Nguyen (:ntim) 2021-04-22 06:47:45 PDT
Created attachment 426807 [details]
Patch
Comment 16 Tim Nguyen (:ntim) 2021-04-25 12:28:14 PDT
Created attachment 427007 [details]
Patch
Comment 17 Tim Nguyen (:ntim) 2021-04-25 12:45:21 PDT
Created attachment 427008 [details]
Patch
Comment 18 Darin Adler 2021-04-25 14:11:38 PDT
Comment on attachment 427008 [details]
Patch

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

> Source/WebCore/rendering/style/WillChangeData.cpp:75
> +        || containsProperty(CSSPropertyWebkitBackdropFilter);

Needs #if #if ENABLE(FILTERS_LEVEL_2).
Comment 19 Tim Nguyen (:ntim) 2021-04-25 15:09:14 PDT
Created attachment 427011 [details]
Patch
Comment 20 zalan 2021-04-26 09:03:24 PDT
Comment on attachment 427011 [details]
Patch

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

> Source/WebCore/rendering/RenderElement.h:432
> +        || (isRenderBlock() && hasTransform())
> +        // FIXME: will-change should create containing blocks on inline boxes (bug 225035)
> +        || (!isRenderInline() && style().willChange() && style().willChange()->canCreateContainingBlockForAbsOrFixedPos())

Since this is a workaround for RenderObject::containingBlock()'s return value, I'd specifically test for RenderBlock and not for !RenderInline (in practice they probably produce the same result, but checking against RenderBlock is less error prone).

> Source/WebCore/rendering/style/WillChangeData.cpp:63
> +bool WillChangeData::canCreateContainingBlockForAbsOrFixedPos() const

please do not shorten names like "Abs" or "Pos" (I am not good at naming but maybe this should read willCreate....)
Comment 21 Simon Fraser (smfr) 2021-04-26 09:28:06 PDT
Comment on attachment 427011 [details]
Patch

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

> Source/WebCore/rendering/style/WillChangeData.h:55
> +    bool canCreateContainingBlockForAbsOrFixedPos() const;

We call these "out of flow positioned:.
Comment 22 Tim Nguyen (:ntim) 2021-04-26 11:35:52 PDT
Created attachment 427067 [details]
Patch
Comment 23 EWS 2021-04-26 22:31:15 PDT
Committed r276627 (237055@main): <https://commits.webkit.org/237055@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 427067 [details].