[webkit-changes] [WebKit/WebKit] 71e24b: CSS grid should not eagerly evaluate calc() for re...
Commit Queue
noreply at github.com
Mon Sep 9 10:46:54 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 71e24b22e1d321b20aa881c422c45ed01674fc4b
https://github.com/WebKit/WebKit/commit/71e24b22e1d321b20aa881c422c45ed01674fc4b
Author: Sam Weinig <sam at webkit.org>
Date: 2024-09-09 (Mon, 09 Sep 2024)
Changed paths:
M LayoutTests/fast/css-grid-layout/grid-repeat-calc-expected.txt
M LayoutTests/fast/css-grid-layout/grid-repeat-calc.html
M Source/WebCore/css/CSSGridIntegerRepeatValue.cpp
M Source/WebCore/css/CSSGridIntegerRepeatValue.h
M Source/WebCore/css/CSSPrimitiveValue.cpp
M Source/WebCore/css/CSSPrimitiveValue.h
M Source/WebCore/css/ComputedStyleExtractor.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+Grid.cpp
M Source/WebCore/inspector/InspectorOverlay.cpp
M Source/WebCore/rendering/style/StyleGridData.h
M Source/WebCore/style/StyleBuilderConverter.h
M Tools/TestWebKitAPI/Tests/WebCore/CSSParser.cpp
Log Message:
-----------
CSS grid should not eagerly evaluate calc() for repetitions value
https://bugs.webkit.org/show_bug.cgi?id=279308
Reviewed by Darin Adler.
Replaces eager evaluation of calc() in CSS grid consumers with storing
the primitive value for resolution at style building time.
* LayoutTests/fast/css-grid-layout/grid-repeat-calc-expected.txt:
* LayoutTests/fast/css-grid-layout/grid-repeat-calc.html:
- Adds tests for more calc() cases including use of relative-lengths and corrected
existing test to ensure calc() is retained for the specified value.
* Source/WebCore/css/CSSGridIntegerRepeatValue.cpp:
* Source/WebCore/css/CSSGridIntegerRepeatValue.h:
* Source/WebCore/css/ComputedStyleExtractor.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Grid.cpp:
- Store repetitions as a CSSPrimitiveValue to all it to retain calc().
* Source/WebCore/inspector/InspectorOverlay.cpp:
- The use of `resolveAsIntegerDeprecated` is quite unfortunate. This code should
probably not be using pre-style resolved inline styles.
* Source/WebCore/style/StyleBuilderConverter.h:
- Resolve and clamp repetitions here now.
* Source/WebCore/css/CSSPrimitiveValue.cpp:
* Source/WebCore/css/CSSPrimitiveValue.h:
- The unit tests need to be able to call resolveAsIntegerNoConversionDataRequired(),
a few inline/export changes are needed here.
* Tools/TestWebKitAPI/Tests/WebCore/CSSParser.cpp:
- Use resolveAsIntegerNoConversionDataRequired() to resolve the now
CSSPrimitiveValue repetitions value. This is ok since we know all
the cases have no relative lengths.
Canonical link: https://commits.webkit.org/283350@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