Changeset 281446 in webkit
- Timestamp:
- Aug 23, 2021 8:11:36 AM (11 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-transforms-translate-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderBoxModelObject.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r281445 r281446 1 2021-08-23 Martin Robinson <mrobinson@webkit.org> 2 3 Sticky position should not use transformed position to compute sticky offset. 4 https://bugs.webkit.org/show_bug.cgi?id=164292 5 <rdar://problem/29054773> 6 7 Reviewed by Simon Fraser. 8 9 * web-platform-tests/css/css-position/sticky/position-sticky-transforms-translate-expected.txt: Update results 10 of test to show pass. 11 1 12 2021-08-23 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-transforms-translate-expected.txt
r280960 r281446 2 2 PASS Translation transform can move sticky element past sticking point 3 3 PASS Stuck elements can still be moved via translations 4 FAIL The sticky element should stick before the container is offset by a translation assert_equals: expected 150 but got 100 4 PASS The sticky element should stick before the container is offset by a translation 5 5 -
trunk/Source/WebCore/ChangeLog
r281444 r281446 1 2021-08-23 Martin Robinson <mrobinson@webkit.org> 2 3 Sticky position should not use transformed position to compute sticky offset. 4 https://bugs.webkit.org/show_bug.cgi?id=164292 5 <rdar://problem/29054773> 6 7 Reviewed by Simon Fraser. 8 9 No new tests. This change is tested by the following WPT test: 10 web-platform-tests/css/css-position/sticky/position-sticky-transforms-translate.html 11 12 * rendering/RenderBoxModelObject.cpp: 13 (WebCore::RenderBoxModelObject::computeStickyPositionConstraints const): When calling localToContainerQuad, 14 pass 0 for the mode which means that the transformation between coordinate systems does not include 15 transforms. 16 1 17 2021-08-23 Carlos Garcia Campos <cgarcia@igalia.com> 2 18 -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r281239 r281446 489 489 containerContentRect.contract(minMargin); 490 490 491 // Finally compute container rect relative to the scrolling ancestor. 492 FloatRect containerRectRelativeToScrollingAncestor = containingBlock->localToContainerQuad(FloatRect(containerContentRect), &enclosingClippingBox).boundingBox(); 491 // Finally compute container rect relative to the scrolling ancestor. We pass an empty 492 // mode here, because sticky positioning should ignore transforms. 493 FloatRect containerRectRelativeToScrollingAncestor = containingBlock->localToContainerQuad(FloatRect(containerContentRect), &enclosingClippingBox, { } /* ignore transforms */).boundingBox(); 493 494 if (enclosingClippingLayer) { 494 495 FloatPoint containerLocationRelativeToScrollingAncestor = containerRectRelativeToScrollingAncestor.location() - … … 509 510 // rectangle in the coordinate system of the scrolling ancestor, but localToContainerQuad 510 511 // itself depends on sticky positioning! Instead, start from the parent but first adjusting 511 // the rectangle for the writing mode of this stickily-positioned element. 512 // the rectangle for the writing mode of this stickily-positioned element. We also pass an 513 // empty mode here because sticky positioning should ignore transforms. 512 514 // 513 // FIXME: For now, assume that |this| is not transformed. It would also be nice to not have to514 // call localToContainerQuad again since we have already done a similar call to move from515 // the containing block to the scrolling ancestor above, but localToContainerQuad takes care516 // of a lot of complex situationsinvolving inlines, tables, and transformations.515 // FIXME: It would also be nice to not have to call localToContainerQuad again since we 516 // have already done a similar call to move from the containing block to the scrolling 517 // ancestor above, but localToContainerQuad takes care of a lot of complex situations 518 // involving inlines, tables, and transformations. 517 519 if (parent()->isBox()) 518 520 downcast<RenderBox>(parent())->flipForWritingMode(stickyBoxRect); 519 auto stickyBoxRelativeToScrollingAncestor = parent()->localToContainerQuad(FloatRect(stickyBoxRect), &enclosingClippingBox ).boundingBox();521 auto stickyBoxRelativeToScrollingAncestor = parent()->localToContainerQuad(FloatRect(stickyBoxRect), &enclosingClippingBox, { } /* ignore transforms */).boundingBox(); 520 522 521 523 if (enclosingClippingLayer) {
Note: See TracChangeset
for help on using the changeset viewer.