Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: aa6b7858fefa58b92a4ba4da1df0b837fb5cf1c6
      
https://github.com/WebKit/WebKit/commit/aa6b7858fefa58b92a4ba4da1df0b837fb5cf1c6
  Author: Antti Koivisto <[email protected]>
  Date:   2025-02-18 (Tue, 18 Feb 2025)

  Changed paths:
    M LayoutTests/TestExpectations
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-offset-change-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-position-try-013-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-position-try-014-expected.txt
    M Source/WebCore/style/AnchorPositionEvaluator.cpp
    M Source/WebCore/style/AnchorPositionEvaluator.h
    M Source/WebCore/style/StyleScope.cpp
    M Source/WebCore/style/StyleTreeResolver.cpp

  Log Message:
  -----------
  [css-anchor-position-1] Trigger evaluation of default anchor when it's used 
for anchor-center
https://bugs.webkit.org/show_bug.cgi?id=283295
rdar://problem/140124449

Reviewed by Alan Baradlay.

* LayoutTests/TestExpectations:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-offset-change-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-position-try-013-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-position-try-014-expected.txt:
* Source/WebCore/style/AnchorPositionEvaluator.cpp:
(WebCore::Style::AnchorPositionEvaluator::findAnchorForAnchorFunctionAndAttemptResolution):

Track in state whether the we are using anchor() or anchor-size().

(WebCore::Style::AnchorPositionEvaluator::evaluate):
(WebCore::Style::AnchorPositionEvaluator::evaluateSize):
(WebCore::Style::AnchorPositionEvaluator::updateAnchorPositioningStatesAfterInterleavedLayout):

Invalidate layout if after resolving anchors if using layout-time anchor 
positioning.

(WebCore::Style::AnchorPositionEvaluator::updateAnchorPositionedStateForLayoutTimePositioned):

Layout time anchor positioning requires state too. Create it if neeeded.

(WebCore::Style::AnchorPositionEvaluator::isLayoutTimeAnchorPositioned):

Helper to test the style to see if we are using layout-time anchor positioning.

(WebCore::Style::AnchorPositionEvaluator::findAnchorAndAttemptResolution): 
Deleted.
* Source/WebCore/style/AnchorPositionEvaluator.h:

Rename some enum values for clarity.

* Source/WebCore/style/StyleScope.cpp:
(WebCore::Style::Scope::invalidateForAnchorDependencies):

Invalidate layout (instead of style) if we are using layout-time anchoring.

(WebCore::Style::Scope::resetAnchorPositioningStateBeforeStyleResolution):
(WebCore::Style::Scope::updateAnchorPositioningStateAfterStyleResolution):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::updateAnchorPositioningState):

Create state for layout-time anchor positioning after style resolution if 
needed.

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



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

Reply via email to