Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 62cb2d15cfc80d1029a7fee940fcfa07d89bf0e8
      
https://github.com/WebKit/WebKit/commit/62cb2d15cfc80d1029a7fee940fcfa07d89bf0e8
  Author: Antti Koivisto <[email protected]>
  Date:   2024-09-27 (Fri, 27 Sep 2024)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-invalid-fallback-expected.txt
    M Source/WebCore/css/CSSToLengthConversionData.cpp
    M Source/WebCore/css/CSSToLengthConversionData.h
    M Source/WebCore/css/calc/CSSCalcTree+Evaluation.cpp
    M Source/WebCore/css/calc/CSSCalcTree+Simplification.cpp
    M Source/WebCore/style/StyleBuilder.cpp
    M Source/WebCore/style/StyleBuilderState.cpp
    M Source/WebCore/style/StyleBuilderState.h

  Log Message:
  -----------
  [css-anchor-position-1] Declaration referencing invalid anchor should be 
invalid at computed-value time
https://bugs.webkit.org/show_bug.cgi?id=280507
rdar://problem/136822454

Reviewed by Alan Baradlay.

https://drafts.csswg.org/css-anchor-position-1/#anchor-valid

"If any of these conditions are false, the anchor() function resolves to its 
specified fallback value.
If no fallback value is specified, it makes the declaration referencing it 
invalid at computed-value time."

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-invalid-fallback-expected.txt:
* Source/WebCore/css/CSSToLengthConversionData.cpp:
(WebCore::CSSToLengthConversionData::CSSToLengthConversionData):
* Source/WebCore/css/CSSToLengthConversionData.h:
(WebCore::CSSToLengthConversionData::styleBuilderState const):

Make non-const. The anchor code may mutate the builder state.

* Source/WebCore/css/calc/CSSCalcTree+Evaluation.cpp:
(WebCore::CSSCalc::evaluate):

Mark the property invalid at computed-value time if evaluation fails and there 
is no fallback.

* Source/WebCore/css/calc/CSSCalcTree+Simplification.cpp:
(WebCore::CSSCalc::simplify):

Mark the property invalid at computed-value time if evaluation fails and there 
is no fallback.

* Source/WebCore/style/StyleBuilder.cpp:
(WebCore::Style::Builder::applyProperty):

See if the property has became invalid during applying and apply value 'unset' 
if so.

(WebCore::Style::Builder::resolveVariableReferences):
(WebCore::Style::Builder::resolveCustomPropertyValue):
* Source/WebCore/style/StyleBuilderState.cpp:
(WebCore::Style::BuilderState::isCurrentPropertyInvalidAtComputedValueTime 
const):
(WebCore::Style::BuilderState::setCurrentPropertyInvalidAtComputedValueTime):
* Source/WebCore/style/StyleBuilderState.h:

Rename m_inUnitCycleProperties -> m_invalidAtComputedValueTimeProperties since 
it used in other
cases than unit cycles too.

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



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

Reply via email to