[webkit-changes] [WebKit/WebKit] 6c4544: [css-anchor-position-1] Allow anchor-size() in siz...

Kiet Ho noreply at github.com
Thu Feb 13 09:24:46 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6c4544363ad49efd41d503ce907f971e17d204b6
      https://github.com/WebKit/WebKit/commit/6c4544363ad49efd41d503ce907f971e17d204b6
  Author: Kiet Ho <kiet.ho at apple.com>
  Date:   2025-02-13 (Thu, 13 Feb 2025)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-size-animation-expected.txt
    M Source/WebCore/animation/BlendingKeyframes.cpp
    M Source/WebCore/style/AnchorPositionEvaluator.cpp
    M Source/WebCore/style/AnchorPositionEvaluator.h

  Log Message:
  -----------
  [css-anchor-position-1] Allow anchor-size() in sizing/margin properties specified in animation keyframes
rdar://144569184
https://bugs.webkit.org/show_bug.cgi?id=287442

Reviewed by Tim Nguyen.

Current animation code only takes into account anchor functions (anchor()
and anchor-size()) when they're used in inset properties. This is correct for
anchor(), but anchor-size() can also be used in sizing/margin properties.
Fix this to allow anchor functions to be used in those properties too.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-size-animation-expected.txt:
* Source/WebCore/animation/BlendingKeyframes.cpp:
(WebCore::BlendingKeyframes::updatePropertiesMetadata):
* Source/WebCore/style/AnchorPositionEvaluator.cpp:
(WebCore::Style::AnchorPositionEvaluator::findAnchorAndAttemptResolution):
(WebCore::Style::AnchorPositionEvaluator::propertyAllowsAnchorFunction):
(WebCore::Style::AnchorPositionEvaluator::evaluate):
(WebCore::Style::anchorSizeDimensionToPhysicalDimension):
(WebCore::Style::AnchorPositionEvaluator::propertyAllowsAnchorSizeFunction):
(WebCore::Style::AnchorPositionEvaluator::evaluateSize):
* Source/WebCore/style/AnchorPositionEvaluator.h:

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