WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
REOPENED
295801
[css-anchor-position-1] Scroll compensation transform should be applied before any other transforms
https://bugs.webkit.org/show_bug.cgi?id=295801
Summary
[css-anchor-position-1] Scroll compensation transform should be applied befor...
Kiet Ho
Reported
2025-07-11 12:38:04 PDT
Per spec (
https://drafts.csswg.org/css-anchor-position-1/#default-scroll-shift
)
> After layout has been performed for abspos, it is additionally shifted by the default scroll shift, as if affected by a transform (before any other transforms).
But currently, it seems we're applying the scroll compensation transform after other transforms: void RenderLayer::updateTransformFromStyle(TransformationMatrix& transform, const RenderStyle& style, OptionSet<RenderStyle::TransformOperationOption> options) const { auto referenceBoxRect = snapRectToDevicePixelsIfNeeded(renderer().transformReferenceBoxRect(style), renderer()); renderer().applyTransform(transform, style, referenceBoxRect, options); //
https://drafts.csswg.org/css-anchor-position-1/#anchor-pos
// "The positioned element is additionally visually shifted by its snapshotted scroll offset, as if by an additional translate() transform." if (m_snapshottedScrollOffsetForAnchorPositioning) transform.translate(m_snapshottedScrollOffsetForAnchorPositioning->width(), m_snapshottedScrollOffsetForAnchorPositioning->height()); makeMatrixRenderable(transform, canRender3DTransforms()); }
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2025-07-11 12:38:26 PDT
<
rdar://problem/155637149
>
Kiet Ho
Comment 2
2025-07-15 16:36:15 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/48086
Kiet Ho
Comment 3
2025-07-16 11:17:02 PDT
Submitted web-platform-tests pull request:
https://github.com/web-platform-tests/wpt/pull/53796
EWS
Comment 4
2025-07-16 12:32:49 PDT
Committed
297483@main
(cda2ef22872d): <
https://commits.webkit.org/297483@main
> Reviewed commits have been landed. Closing PR #48086 and removing active labels.
Jonathan Bedard
Comment 5
2025-07-17 09:16:23 PDT
Re-opening for pull request
https://github.com/apple/WebKit/pull/3250
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