[webkit-changes] [WebKit/WebKit] df419b: [css-anchor-position-1] Disregard transforms when ...
David Choi
noreply at github.com
Thu Aug 15 23:13:53 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: df419b7ac5fae718ea1dce64c347a87c9ca8e849
https://github.com/WebKit/WebKit/commit/df419b7ac5fae718ea1dce64c347a87c9ca8e849
Author: David Choi <davidchoi1027 at gmail.com>
Date: 2024-08-15 (Thu, 15 Aug 2024)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-001-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-002-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-004-expected.txt
M Source/WebCore/style/AnchorPositionEvaluator.cpp
Log Message:
-----------
[css-anchor-position-1] Disregard transforms when calculating `anchor()` location
https://bugs.webkit.org/show_bug.cgi?id=277935
rdar://133652587
Reviewed by Alan Baradlay.
CSS transforms should not impact anchor positioning. We should not use
`localToContainerPoint()` to compute the location of an anchor.
This patch instead uses `offsetFromAncestorContainer()`, which ignores
transforms. Some test progressions occur as a result of subtle
differences between how the two functions handle multicol content.
This patch also addresses the fact that an anchor's enclosing fragmented
flow may actually be an ancestor of the anchor's containing block.
(Previously it was assumed that the anchor's enclosing fragmented flow
is always a descendant of the anchor's containing block.)
* LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-001-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-002-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-004-expected.txt:
* Source/WebCore/style/AnchorPositionEvaluator.cpp:
(WebCore::Style::offsetFromAncestorContainer):
(WebCore::Style::computeAnchorRectRelativeToContainingBlock):
Canonical link: https://commits.webkit.org/282335@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list