Summary: | Sticky position should not use transformed position to compute sticky offset. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Robert Flack <flackr> | ||||||||||
Component: | Layout and Rendering | Assignee: | Martin Robinson <mrobinson> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | bfulgham, changseok, dbates, esprehn+autocc, ews-watchlist, glenn, kondapallykalyan, mrobinson, pdr, simon.fraser, skyzyx.junk, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | FromImplementor, InRadar | ||||||||||
Version: | Safari 10 | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | All | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 228989 | ||||||||||||
Attachments: |
|
Thanks for the report. Created attachment 435854 [details]
Patch
*** Bug 94992 has been marked as a duplicate of this bug. *** Created attachment 435958 [details]
Patch
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. Created attachment 436166 [details]
Patch
(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. 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]. This change should be present in STP 139, iOS 15.4 Beta, and macOS 12.3 Beta. |
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).