RESOLVED FIXED 164292
Sticky position should not use transformed position to compute sticky offset.
https://bugs.webkit.org/show_bug.cgi?id=164292
Summary Sticky position should not use transformed position to compute sticky offset.
Robert Flack
Reported 2016-11-01 14:05:47 PDT
Created attachment 293590 [details] Demo of sticky position in a transformed container. A sticky position element in a transformed container should use its untransformed position for the sticky position offset constraint. In the attached test case it should appear to stick 100px down as the transform should effectively be applied on its sticky position (See test case in Firefox or Chrome with --enable-experimental-web-platform-features).
Attachments
Demo of sticky position in a transformed container. (624 bytes, text/html)
2016-11-01 14:05 PDT, Robert Flack
no flags
Patch (6.15 KB, patch)
2021-08-19 01:39 PDT, Martin Robinson
no flags
Patch (6.12 KB, patch)
2021-08-20 02:32 PDT, Martin Robinson
no flags
Patch (6.15 KB, patch)
2021-08-23 01:58 PDT, Martin Robinson
no flags
Simon Fraser (smfr)
Comment 1 2016-11-01 14:21:17 PDT
Thanks for the report.
Radar WebKit Bug Importer
Comment 2 2016-11-01 16:21:15 PDT
Martin Robinson
Comment 3 2021-08-19 01:39:14 PDT
Martin Robinson
Comment 4 2021-08-19 05:25:28 PDT
*** Bug 94992 has been marked as a duplicate of this bug. ***
Martin Robinson
Comment 5 2021-08-20 02:32:13 PDT
Simon Fraser (smfr)
Comment 6 2021-08-20 12:15:42 PDT
Comment on attachment 435958 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=435958&action=review > Source/WebCore/rendering/RenderBoxModelObject.cpp:493 > + FloatRect containerRectRelativeToScrollingAncestor = containingBlock->localToContainerQuad(FloatRect(containerContentRect), &enclosingClippingBox, { } /* mode */).boundingBox(); Maybe instead of /* mode */ say /* ignore transforms */ > Source/WebCore/rendering/RenderBoxModelObject.cpp:521 > + auto stickyBoxRelativeToScrollingAncestor = parent()->localToContainerQuad(FloatRect(stickyBoxRect), &enclosingClippingBox, { } /* mode */).boundingBox(); Ditto.
Martin Robinson
Comment 7 2021-08-23 01:58:20 PDT
Martin Robinson
Comment 8 2021-08-23 02:08:26 PDT
(In reply to Simon Fraser (smfr) from comment #6) > Comment on attachment 435958 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=435958&action=review > > > Source/WebCore/rendering/RenderBoxModelObject.cpp:493 > > + FloatRect containerRectRelativeToScrollingAncestor = containingBlock->localToContainerQuad(FloatRect(containerContentRect), &enclosingClippingBox, { } /* mode */).boundingBox(); > > Maybe instead of /* mode */ say /* ignore transforms */ > > > Source/WebCore/rendering/RenderBoxModelObject.cpp:521 > > + auto stickyBoxRelativeToScrollingAncestor = parent()->localToContainerQuad(FloatRect(stickyBoxRect), &enclosingClippingBox, { } /* mode */).boundingBox(); > > Ditto. Thanks for the review! I've made these changes.
EWS
Comment 9 2021-08-23 08:11:44 PDT
Committed r281446 (240829@main): <https://commits.webkit.org/240829@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 436166 [details].
Brent Fulgham
Comment 10 2022-02-04 14:42:49 PST
This change should be present in STP 139, iOS 15.4 Beta, and macOS 12.3 Beta.
Note You need to log in before you can comment on or make changes to this bug.