[webkit-changes] [WebKit/WebKit] f83902: [css-anchor-position-1] Don't attempt to reconstru...

David Choi noreply at github.com
Tue Aug 13 08:29:37 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f83902e89345526a0d5d1271cd108dffa45742ad
      https://github.com/WebKit/WebKit/commit/f83902e89345526a0d5d1271cd108dffa45742ad
  Author: David Choi <davidchoi1027 at gmail.com>
  Date:   2024-08-13 (Tue, 13 Aug 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-name-in-shadow-002-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-002-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-anchor-003-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-try-transition-flip-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-anchor-positioning-003-expected.txt
    M Source/WebCore/style/AnchorPositionEvaluator.cpp
    M Source/WebCore/style/StyleTreeResolver.cpp
    M Source/WebCore/style/StyleTreeResolver.h

  Log Message:
  -----------
  [css-anchor-position-1] Don't attempt to reconstruct layout order during style resolution
https://bugs.webkit.org/show_bug.cgi?id=277977
rdar://133710361

Reviewed by Antti Koivisto.

The current implementation of style & layout interleaving for anchor
positioning attempts to reproduce the order in which elements are
completely laid out (what I call "layout order") during style resolution
in TreeResolver. This is an incorrect implementation, and it needs to
be removed.

This patch removes that code, and instead opts to resolve the first
unresolved anchor-positioned element it sees during style resolution.
This is still an incorrect implementation, as valid anchor targets
that come after an anchor-positioned element in tree order will still
be missed.

This patch is simply cleaning up the incorrect code in preparation for
a future patch that will introduce a more spec-compliant implementation.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-name-in-shadow-002-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-002-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-anchor-003-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-try-transition-flip-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-anchor-positioning-003-expected.txt:
* Source/WebCore/style/AnchorPositionEvaluator.cpp:
(WebCore::Style::AnchorPositionEvaluator::resolveAnchorValue):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::popParent):
(WebCore::Style::TreeResolver::resolveComposedTree):
(WebCore::Style::TreeResolver::resolve):
(WebCore::Style::TreeResolver::updateAnchorPositioningState):
(WebCore::Style::TreeResolver::updateAnchorPositioningStateInInitialContainingBlock): Deleted.
* Source/WebCore/style/StyleTreeResolver.h:

Canonical link: https://commits.webkit.org/282168@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