Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 646ee9045efce32c22709cc5f0be460075eab9cf
https://github.com/WebKit/WebKit/commit/646ee9045efce32c22709cc5f0be460075eab9cf
Author: Kiet Ho <[email protected]>
Date: 2026-04-16 (Thu, 16 Apr 2026)
Changed paths:
M Source/WebCore/style/AnchorPositionEvaluator.cpp
M Source/WebCore/style/AnchorPositionEvaluator.h
Log Message:
-----------
[css-anchor-position-1] Change findAnchorsForAnchorPositionedElement and
friends to take anchor-positioned elements as Styleable
rdar://174867992
https://bugs.webkit.org/show_bug.cgi?id=312416
Reviewed by Antti Koivisto.
Following 311053@main, make findAnchorsForAnchorPositionedElement and its
friends
take Styleable instead of Element for anchor-positioned elements.
Functions using RenderBox/RenderBoxModelObject were also changed to take
RenderElement whenever possible, this helps reduce unnecessary downcast
when RenderElement is sufficient.
Refactoring change, tested by existing test suite.
* Source/WebCore/style/AnchorPositionEvaluator.cpp:
(WebCore::Style::penultimateContainingBlockChainElement):
(WebCore::Style::anchorScopeForAnchorName):
(WebCore::Style::computeTopLayerStatus):
(WebCore::Style::isAcceptableAnchorElement):
(WebCore::Style::findImplicitAnchor):
(WebCore::Style::findLastAcceptableAnchorWithName):
(WebCore::Style::findAnchorsForAnchorPositionedElement):
(WebCore::Style::AnchorPositionEvaluator::updateAnchorPositioningStatesAfterInterleavedLayout):
(WebCore::Style::AnchorPositionEvaluator::findAnchorsForAnchorPositionedElement):
Deleted.
- Make this a static function in AnchorPositionEvaluator.cpp and
not part of AnchorPositionEvaluator class.
* Source/WebCore/style/AnchorPositionEvaluator.h:
Canonical link: https://commits.webkit.org/311384@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications