[webkit-changes] [WebKit/WebKit] b98b62: [css-anchor-position-1] Use calc() based anchor() ...

Antti Koivisto noreply at github.com
Fri Sep 27 12:39:19 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b98b627a9d065a4742e1629037d7bb314aa636ac
      https://github.com/WebKit/WebKit/commit/b98b627a9d065a4742e1629037d7bb314aa636ac
  Author: Antti Koivisto <antti at apple.com>
  Date:   2024-09-27 (Fri, 27 Sep 2024)

  Changed paths:
    M Source/WebCore/css/calc/CSSCalcTree+Parser.cpp
    M Source/WebCore/css/calc/CSSCalcTree+Serialization.cpp
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+LengthPercentage.cpp

  Log Message:
  -----------
  [css-anchor-position-1] Use calc() based anchor() in all cases
https://bugs.webkit.org/show_bug.cgi?id=280514
rdar://136830360

Reviewed by Darin Adler and Sam Weinig.

Also use calc machinery based anchor() for the (common) top level case.
Fix some remaining minor issues.

With this CSSAnchorValue and the related code can be removed.

* Source/WebCore/css/calc/CSSCalcTree+Parser.cpp:
(WebCore::CSSCalc::consumeAnchor):

Bail out if the policy does not allow anchors.
Determine if percentHint is needed for the fallback.

* Source/WebCore/css/calc/CSSCalcTree+Serialization.cpp:
(WebCore::CSSCalc::serializeMathFunctionArguments):

Ensure we add "calc(" prefix correctly when needed for the fallback serialization.

* Source/WebCore/css/parser/CSSPropertyParserConsumer+LengthPercentage.cpp:
(WebCore::CSSPropertyParserHelpers::consumeLengthPercentage):

Don't call into CSSAnchorValue parsing code anymore.

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