WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
238560
`contain: layout` on the html element should change position:fixed behavior
https://bugs.webkit.org/show_bug.cgi?id=238560
Summary
`contain: layout` on the html element should change position:fixed behavior
Simon Fraser (smfr)
Reported
2022-03-30 10:52:17 PDT
https://codepen.io/smfr/pen/VwyzQvb
https://www.w3.org/TR/css-contain-1/#layout-containment
says that layout containment creates containing block for position:fixed. That doesn't work in WebKit.
Attachments
Patch
(1.63 KB, patch)
2022-04-15 10:10 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(1.62 KB, patch)
2022-04-16 01:11 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(6.11 KB, patch)
2022-04-18 08:31 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(7.98 KB, patch)
2022-04-21 13:30 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-04-06 10:53:14 PDT
<
rdar://problem/91364127
>
Rob Buis
Comment 2
2022-04-13 07:14:57 PDT
I noticed the problem goes away if RenderLayerCompositor treats contain: layout always as a composited layer. However I guess it should work for non composited too...
Simon Fraser (smfr)
Comment 3
2022-04-13 09:22:08 PDT
Seems like `RenderElement::canContainFixedPositionObjects()` already considers containment so not sure why this is broken. Maybe RenderLayer::flagsForUpdateLayerPositions() also needs fixing.
Rob Buis
Comment 4
2022-04-15 10:10:24 PDT
Created
attachment 457706
[details]
Patch
Simon Fraser (smfr)
Comment 5
2022-04-15 10:26:50 PDT
Comment on
attachment 457706
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=457706&action=review
> Source/WebCore/rendering/RenderBox.cpp:2325 > + else if (hasTransform() || shouldApplyLayoutContainment(*this))
This should share code with canContainFixedPositionObjects()
Rob Buis
Comment 6
2022-04-16 01:11:08 PDT
Created
attachment 457744
[details]
Patch
Rob Buis
Comment 7
2022-04-18 08:31:39 PDT
Created
attachment 457806
[details]
Patch
EWS Watchlist
Comment 8
2022-04-18 08:33:16 PDT
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
Rob Buis
Comment 9
2022-04-19 13:29:54 PDT
Comment on
attachment 457706
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=457706&action=review
>> Source/WebCore/rendering/RenderBox.cpp:2325 >> + else if (hasTransform() || shouldApplyLayoutContainment(*this)) > > This should share code with canContainFixedPositionObjects()
Done.
Simon Fraser (smfr)
Comment 10
2022-04-21 11:20:53 PDT
Comment on
attachment 457806
[details]
Patch RenderSVGRoot::mapLocalToContainer() and RenderBox::mapAbsoluteToLocalPoint() need the same change.
Rob Buis
Comment 11
2022-04-21 13:30:17 PDT
Created
attachment 458086
[details]
Patch
EWS
Comment 12
2022-04-21 22:36:41 PDT
Committed
r293209
(
249880@main
): <
https://commits.webkit.org/249880@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 458086
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug