Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c1c32c572b9d909aa927f785f09deced3ae853e7
https://github.com/WebKit/WebKit/commit/c1c32c572b9d909aa927f785f09deced3ae853e7
Author: Sam Weinig <[email protected]>
Date: 2026-08-10 (Mon, 10 Aug 2026)
Changed paths:
M Source/WebCore/SaferCPPExpectations/NoDeleteCheckerExpectations
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/animation/BlendingKeyframes.cpp
M Source/WebCore/animation/ViewTimelineInsetValue.h
M Source/WebCore/animation/ViewTimelineOptions.h
M Source/WebCore/css/CSSToLengthConversionData.cpp
M Source/WebCore/css/CSSToLengthConversionData.h
M Source/WebCore/css/CSSValue.cpp
M Source/WebCore/css/CSSValue.h
R Source/WebCore/css/ComputedStyleDependencies.cpp
M Source/WebCore/css/ComputedStyleDependencies.h
M Source/WebCore/css/calc/CSSCalcTree+ComputedStyleDependencies.cpp
M Source/WebCore/css/parser/CSSParserTokenRange.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+Timeline.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+Transform.cpp
M Source/WebCore/css/query/ContainerQueryFeatures.cpp
M Source/WebCore/css/query/GenericMediaQueryTypes.h
M Source/WebCore/css/query/MediaQueryEvaluator.cpp
M Source/WebCore/css/typedom/numeric/CSSMathValue.cpp
M Source/WebCore/style/ContainerQueryEvaluator.cpp
M Source/WebCore/style/IfConditionEvaluator.cpp
M Source/WebCore/style/values/easing/StyleCubicBezierEasingFunction.cpp
M Source/WebCore/style/values/easing/StyleLinearEasingFunction.cpp
M Source/WebCore/style/values/easing/StyleSpringEasingFunction.cpp
M Source/WebCore/style/values/easing/StyleStepsEasingFunction.cpp
M Source/WebCore/style/values/primitives/StyleLengthResolution.cpp
M Source/WebCore/style/values/primitives/StyleLengthResolution.h
Log Message:
-----------
Remove default constructor for CSSToLengthConversionData
https://bugs.webkit.org/show_bug.cgi?id=321305
Reviewed by Darin Adler and Antti Koivisto.
Removes the default constructor for CSSToLengthConversionData which was
a bit of foot gun, and allows the element style to always be non-null and
thus stored as a reference rather than a pointer.
CSSToLengthConversionData's default constructors remaining uses were for
invoking
canResolveDependenciesWithConversionData() with an empty
CSSToLengthConversionData.
This idiom has been replaced with a new predicate on ComputedStyleDependencies,
`isAbsolute()` which does the same thing. To make it a bit more accurate,
sibling
functions were added to ComputedStyleDependencies. This is not a change in
behavior as
all callers have invoked the parser in a way that doesn't permit sibling
functions,
but in the future that is unlikely to always be true.
`isComputationallyIndependent()` could not be used for `isAbsolute()` as the
concept
it is modeling allows viewport-percentage units (and anything else not
controlled
from CSS and therefore not capable of causing cycles).
Some additional cleanup was also done in this change:
- Removed unused `tryCreateForNonStyleBuildingResolution` factory functions
on `CSSToLengthConversionData`.
- Renamed `CSSToLengthConversionData::propertyToCompute()` to
`CSSToLengthConversionData::property()`.
- Removed std::optional containing `CSSToLengthConversionData::m_property`,
the sentinel value CSSPropertyInvalid works without it.
- Moved the following methods to `CSSToLengthConversionDataAdaptor`:
`CSSToLengthConversionData::computingFontSize()`
`CSSToLengthConversionData::computingLineHeight()`
`CSSToLengthConversionData::fontCascadeForFontUnits()`
`CSSToLengthConversionData::setUsesViewportUnits()`
`CSSToLengthConversionData::setUsesContainerUnits()`
- Removed some unnecessary `Style::` prefixes.
- Updated comments in StyleLengthResolution.h to accurately represent the
current implementations.
- Changed MQ::FeatureEvaluationContext initializations to use designated
initializer syntax.
Also added a SUPPRESS_NODELETE CSSParserTokenRange::eofToken() which is needed
due
to unified build ordering changes. Previously CSSParserToken.cpp was included
in the
same translation unit as CSSParserTokenRange, so the constructor bodies for
CSSParserToken
were visible. Now, they are in different translation units so it can't tell
that the
CSSParserToken constructor is NODELETE, and we don't have syntax to annotate a
constructor
as NODELETE yet.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/animation/BlendingKeyframes.cpp:
* Source/WebCore/animation/ViewTimelineInsetValue.h:
* Source/WebCore/css/CSSToLengthConversionData.cpp:
* Source/WebCore/css/CSSToLengthConversionData.h:
* Source/WebCore/css/CSSValue.cpp:
* Source/WebCore/css/CSSValue.h:
* Source/WebCore/css/ComputedStyleDependencies.cpp: Removed.
* Source/WebCore/css/ComputedStyleDependencies.h:
* Source/WebCore/css/calc/CSSCalcTree+ComputedStyleDependencies.cpp:
* Source/WebCore/css/parser/CSSParserTokenRange.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Timeline.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Transform.cpp:
* Source/WebCore/css/query/ContainerQueryFeatures.cpp:
* Source/WebCore/css/query/GenericMediaQueryTypes.h:
* Source/WebCore/css/query/MediaQueryEvaluator.cpp:
* Source/WebCore/css/typedom/numeric/CSSMathValue.cpp:
* Source/WebCore/style/ContainerQueryEvaluator.cpp:
* Source/WebCore/style/IfConditionEvaluator.cpp:
* Source/WebCore/style/values/easing/StyleCubicBezierEasingFunction.cpp:
* Source/WebCore/style/values/easing/StyleLinearEasingFunction.cpp:
* Source/WebCore/style/values/easing/StyleSpringEasingFunction.cpp:
* Source/WebCore/style/values/easing/StyleStepsEasingFunction.cpp:
* Source/WebCore/style/values/primitives/StyleLengthResolution.cpp:
* Source/WebCore/style/values/primitives/StyleLengthResolution.h:
Canonical link: https://commits.webkit.org/318923@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications