Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0942066d2a6f912865487ac2d673bebd5178c13d
      
https://github.com/WebKit/WebKit/commit/0942066d2a6f912865487ac2d673bebd5178c13d
  Author: Kiet Ho <kiet...@apple.com>
  Date:   2025-04-03 (Thu, 03 Apr 2025)

  Changed paths:
    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 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/last-successful-basic-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/last-successful-change-fallbacks-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/last-successful-iframe-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/last-successful-intermediate-ignored-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-in-position-try-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/try-tactic-position-area-expected.txt
    M Source/WebCore/rendering/style/PositionArea.cpp
    M Source/WebCore/rendering/style/PositionArea.h
    M Source/WebCore/style/StyleBuilderConverter.h

  Log Message:
  -----------
  [css-anchor-position-1] Implement swapping due to a try-tactic for 
position-area
rdar://146814606
https://bugs.webkit.org/show_bug.cgi?id=289589

Reviewed by Antti Koivisto.

This commit implements swapping due to a try-tactic [1] for position-area.
This is done at style building time; BuilderConverter::convertPositionArea
will flip position-area as specified by the position-try fallback. This is
needed instead of flipping position-area at layout time, because
position-area should compute to the flipped value.

There are some remaining test failures in try-tactic-position-area.html;
these has to do with how position-area should be computed. The test expects
the computed value of position-area to use axis-ambiguous keywords, when the
specified value also uses those keywords (e.g: 'start end' computes to
'start end'). However, WebKit currently computes to their axis-unambiguous
equivalent (e.g: 'start end' computes to 'block-start block-end').
This issue is tracked in [2].

[1]: https://drafts.csswg.org/css-anchor-position-1/#swap-due-to-a-try-tactic
[2]: https://github.com/w3c/csswg-drafts/issues/11828

* 
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:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/last-successful-basic-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/last-successful-change-fallbacks-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/last-successful-iframe-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/last-successful-intermediate-ignored-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-in-position-try-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/try-tactic-position-area-expected.txt:
* Source/WebCore/rendering/style/PositionArea.cpp:
(WebCore::operator<<):
    - Implemented operator<<(TextStream ts, PositionArea{Axis,Track,Self})
      operator<<(TextStream ts, PositionAreaSpan) will use these functions 
instead.
    - operator<< that takes references were changed to take values.

* Source/WebCore/rendering/style/PositionArea.h:
(WebCore::oppositePositionAreaAxis):
    - See below.

* Source/WebCore/style/StyleBuilderConverter.h:
(WebCore::Style::flipPositionAreaByLogicalAxis):
    - Added function to flip position-area by a logical axis (block/inline).

(WebCore::Style::mirrorPositionAreaAcrossDiagonal):
    - Added function to flip position-area according to flip-start.

(WebCore::Style::BuilderConverter::convertPositionArea):
    - Added code to flip position-area according to the fallback try tactic,
      if specified.

(WebCore::Style::BuilderConverter::convertPositionTryFallbacks):
    - Tightened parsing a bit by rejecting the CSS value if duplicate
      tactics are found.

(WebCore::Style::positionAreaOppositeAxis): Deleted.
    - Renamed to oppositePositionAreaAxis, and moved to PositionArea.h

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