Source/WebCore/ChangeLog

 12021-08-19 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 NOBODY (OOPS!).
 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
1172021-08-20 Myles C. Maxfield <mmaxfield@apple.com>
218
319 GlyphBuffer can become inconsistent with its backing string

Source/WebCore/rendering/RenderBoxModelObject.cpp

@@void RenderBoxModelObject::computeStickyPositionConstraints(StickyPositionViewpo
488488 // Compute the container-relative area within which the sticky element is allowed to move.
489489 containerContentRect.contract(minMargin);
490490
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, { } /* mode */).boundingBox();
493494 if (enclosingClippingLayer) {
494495 FloatPoint containerLocationRelativeToScrollingAncestor = containerRectRelativeToScrollingAncestor.location() -
495496 FloatSize(enclosingClippingBox.borderLeft() + enclosingClippingBox.paddingLeft(),

@@void RenderBoxModelObject::computeStickyPositionConstraints(StickyPositionViewpo
508509 // Ideally, it would be possible to call this->localToContainerQuad to determine the frame
509510 // rectangle in the coordinate system of the scrolling ancestor, but localToContainerQuad
510511 // 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.
512514 //
513  // FIXME: For now, assume that |this| is not transformed. It would also be nice to not have to
514  // call localToContainerQuad again since we have already done a similar call to move from
515  // the containing block to the scrolling ancestor above, but localToContainerQuad takes care
516  // of a lot of complex situations involving 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.
517519 if (parent()->isBox())
518520 downcast<RenderBox>(parent())->flipForWritingMode(stickyBoxRect);
519  auto stickyBoxRelativeToScrollingAncestor = parent()->localToContainerQuad(FloatRect(stickyBoxRect), &enclosingClippingBox).boundingBox();
 521 auto stickyBoxRelativeToScrollingAncestor = parent()->localToContainerQuad(FloatRect(stickyBoxRect), &enclosingClippingBox, { } /* mode */).boundingBox();
520522
521523 if (enclosingClippingLayer) {
522524 stickyBoxRelativeToScrollingAncestor.move(-FloatSize(enclosingClippingBox.borderLeft() + enclosingClippingBox.paddingLeft(),

LayoutTests/imported/w3c/ChangeLog

 12021-08-19 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 NOBODY (OOPS!).
 8
 9 * web-platform-tests/css/css-position/sticky/position-sticky-transforms-translate-expected.txt: Update results
 10 of test to show pass.
 11
1122021-08-20 Tim Nguyen <ntim@apple.com>
213
314 Ensure ancestors with opacity don't affect top layer elements

LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-transforms-translate-expected.txt

11
22PASS Translation transform can move sticky element past sticking point
33PASS 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
 4PASS The sticky element should stick before the container is offset by a translation
55