Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cda2ef22872dd8f0a077224eb1abc43f3e24f18d
      
https://github.com/WebKit/WebKit/commit/cda2ef22872dd8f0a077224eb1abc43f3e24f18d
  Author: Kiet Ho <kiet...@apple.com>
  Date:   2025-07-16 (Wed, 16 Jul 2025)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-fixedpos-004-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-fixedpos-004.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/reference/anchor-scroll-fixedpos-004-ref.html
    M Source/WebCore/rendering/RenderLayer.cpp

  Log Message:
  -----------
  [css-anchor-position-1] Scroll compensation transform should be applied 
before any other transforms
rdar://155637149
https://bugs.webkit.org/show_bug.cgi?id=295801

Reviewed by Simon Fraser.

For scroll compensation, WebKit applies the shift transform after other 
transforms,
but the spec says otherwise [1]:

> 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).

Transforms are not commutative, so e.g rotate(45deg) translate(...) is 
different from
translate(...) rotate(45deg). Fix this to follow the spec and match Chrome's 
behavior.

[1] https://drafts.csswg.org/css-anchor-position-1/#default-scroll-shift

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-fixedpos-004-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-fixedpos-004.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/reference/anchor-scroll-fixedpos-004-ref.html:
 Added.
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateTransformFromStyle const):
    - Apply scroll compensation transform before other transforms.

Canonical link: https://commits.webkit.org/297483@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to