Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9ef775bd0681492912c644241d85c723e86cc0f8
      
https://github.com/WebKit/WebKit/commit/9ef775bd0681492912c644241d85c723e86cc0f8
  Author: Kiet Ho <kiet...@apple.com>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/last-successful-animation-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/last-successful-animation.html
    M Source/WebCore/style/StyleTreeResolver.cpp

  Log Message:
  -----------
  [css-anchor-position-1] Only generate position options on base style
rdar://158900076
https://bugs.webkit.org/show_bug.cgi?id=297759

Reviewed by Antti Koivisto.

TreeResolver::generatePositionOptionsIfNeeded expects the input style
(from TreeResolver::styleForStyleable) to be the "base" style i.e the
style before any position options are applied.
TreeResolver::styleForStyleable returns a base style except if
1) we're in the middle of trying options and 2) if resolution type
is animations only, it returns the last style change event style.
In case of 2), the returned style could be a style with position option
applied, if the element has both animations and position-try. Since
we're only updating style for animation, we should not try position options,
so don't generate position options for this case.
TreeResolver::tryChoosePositionOption will then not try anything, because no
position options are generated.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/last-successful-animation-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/last-successful-animation.html:
 Added.
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::styleForStyleable):
(WebCore::Style::TreeResolver::resolveElement):

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



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

Reply via email to