Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 04667409d1ece238785c79683fc4b4e2fbb054fc
      
https://github.com/WebKit/WebKit/commit/04667409d1ece238785c79683fc4b4e2fbb054fc
  Author: Antti Koivisto <an...@apple.com>
  Date:   2024-10-01 (Tue, 01 Oct 2024)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-parse-invalid-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-parse-invalid.html
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-parse-valid-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-parse-valid.html
    M Source/WebCore/css/calc/CSSCalcTree+Copy.cpp
    M Source/WebCore/css/calc/CSSCalcTree+Evaluation.cpp
    M Source/WebCore/css/calc/CSSCalcTree+Evaluation.h
    M Source/WebCore/css/calc/CSSCalcTree+Parser.cpp
    M Source/WebCore/css/calc/CSSCalcTree+Serialization.cpp
    M Source/WebCore/css/calc/CSSCalcTree+Simplification.cpp
    M Source/WebCore/css/calc/CSSCalcTree.h
    M Source/WebCore/style/AnchorPositionEvaluator.cpp
    M Source/WebCore/style/AnchorPositionEvaluator.h

  Log Message:
  -----------
  [css-anchor-position-1] Parse anchor argument as <percent> instead of 
<percent-token>
https://bugs.webkit.org/show_bug.cgi?id=280648
rdar://137002629

Reviewed by Darin Adler.

Cases like anchor(calc(25% + 25%)) should be legal.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-parse-invalid-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-parse-invalid.html:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-parse-valid-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-parse-valid.html:
* Source/WebCore/css/calc/CSSCalcTree+Copy.cpp:
(WebCore::CSSCalc::copy):
* Source/WebCore/css/calc/CSSCalcTree+Evaluation.cpp:
(WebCore::CSSCalc::evaluate):
(WebCore::CSSCalc::evaluateWithoutFallback):

Evaluate the percentage.

* Source/WebCore/css/calc/CSSCalcTree+Evaluation.h:
* Source/WebCore/css/calc/CSSCalcTree+Parser.cpp:
(WebCore::CSSCalc::consumeValueWithoutSimplifyingCalc):

Factor into function.

(WebCore::CSSCalc::consumeAnchor):

Consume percentage value as calc tree.

* Source/WebCore/css/calc/CSSCalcTree+Serialization.cpp:
(WebCore::CSSCalc::serializeMathFunctionArguments):
(WebCore::CSSCalc::serializeWithoutOmittingPrefix):
* Source/WebCore/css/calc/CSSCalcTree+Simplification.cpp:
(WebCore::CSSCalc::simplify):
(WebCore::CSSCalc::copyAndSimplifyChildren):
* Source/WebCore/css/calc/CSSCalcTree.h:

Keep the percentage value for anchor-side as Node instead of resolved double.

* Source/WebCore/style/AnchorPositionEvaluator.cpp:
(WebCore::Style::computeInsetValue):
(WebCore::Style::AnchorPositionEvaluator::evaluate):
(WebCore::Style::AnchorPositionEvaluator::resolveAnchorValue): Deleted.
* Source/WebCore/style/AnchorPositionEvaluator.h:

Pass the evaluated Side value.

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