Skip to content

[text-box] Fix serialization of text-box shorthand#32267

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
nt1m:eng/text-box-serialization
Aug 16, 2024
Merged

[text-box] Fix serialization of text-box shorthand#32267
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
nt1m:eng/text-box-serialization

Conversation

@nt1m
Copy link
Member

@nt1m nt1m commented Aug 15, 2024

ad94a49

[text-box] Fix serialization of text-box shorthand
https://bugs.webkit.org/show_bug.cgi?id=278184
rdar://133974557

Reviewed by Alan Baradlay.

These changes are done to ensure correct serialization:
- Fix the second value default in text-box-edge/line-fit-edge (text for cap/ex and identical value for the other ones)
- Omit "trim-both" when text-box-edge value is non-default, since "trim-both" is the default in that case.
- none + auto serialize to normal

As a cleanup, also switch from CSSValueList to CSSValuePair for text-box-edge/line-fit-edge.

* LayoutTests/TestExpectations:
* LayoutTests/fast/text/text-box-edge-property-parsing-expected.txt: Removed.
* LayoutTests/fast/text/text-box-edge-property-parsing.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-edge-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-edge-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-edge-invalid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-edge-invalid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-edge-valid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-edge-valid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-invalid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-invalid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-trim-invalid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-trim-invalid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-valid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-valid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssom-getPropertyValue-common-checks-expected.txt:
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::valueForTextEdge):
(WebCore::ComputedStyleExtractor::textBoxShorthandValue const):
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle const):
(WebCore::valueForTextBoxEdge): Deleted.
(WebCore::valueForLineFitEdge): Deleted.
* Source/WebCore/css/ShorthandSerializer.cpp:
(WebCore::ShorthandSerializer::serializeTextBox const):
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeTextEdge):
* Source/WebCore/style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertTextEdge):

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

ad220b0

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug 🧪 wpe-wk2 ✅ 🧪 wincairo-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 🧪 api-mac 🧪 api-wpe
🧪 ios-wk2-wpt 🧪 mac-wk1 ✅ 🛠 wpe-cairo
🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision 🧪 mac-AS-debug-wk2 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2
✅ 🛠 tv
🛠 tv-sim
🛠 watch
🛠 watch-sim

@nt1m nt1m self-assigned this Aug 15, 2024
@nt1m nt1m added the CSS Cascading Style Sheets implementation label Aug 15, 2024
@nt1m nt1m force-pushed the eng/text-box-serialization branch from ea1ffc8 to 1224916 Compare August 15, 2024 22:41
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Aug 15, 2024
@nt1m nt1m removed the merging-blocked Applied to prevent a change from being merged label Aug 15, 2024
@nt1m nt1m force-pushed the eng/text-box-serialization branch from 1224916 to a093899 Compare August 16, 2024 00:11
@nt1m nt1m added the safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks label Aug 16, 2024
@nt1m nt1m force-pushed the eng/text-box-serialization branch from a093899 to 8107af4 Compare August 16, 2024 01:39
@nt1m nt1m force-pushed the eng/text-box-serialization branch from 8107af4 to ad220b0 Compare August 16, 2024 02:55
@nt1m nt1m added merge-queue Applied to send a pull request to merge-queue and removed safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks labels Aug 16, 2024
https://bugs.webkit.org/show_bug.cgi?id=278184
rdar://133974557

Reviewed by Alan Baradlay.

These changes are done to ensure correct serialization:
- Fix the second value default in text-box-edge/line-fit-edge (text for cap/ex and identical value for the other ones)
- Omit "trim-both" when text-box-edge value is non-default, since "trim-both" is the default in that case.
- none + auto serialize to normal

As a cleanup, also switch from CSSValueList to CSSValuePair for text-box-edge/line-fit-edge.

* LayoutTests/TestExpectations:
* LayoutTests/fast/text/text-box-edge-property-parsing-expected.txt: Removed.
* LayoutTests/fast/text/text-box-edge-property-parsing.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-edge-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-edge-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-edge-invalid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-edge-invalid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-edge-valid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-edge-valid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-invalid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-invalid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-trim-invalid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-trim-invalid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-valid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/parsing/text-box-valid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssom-getPropertyValue-common-checks-expected.txt:
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::valueForTextEdge):
(WebCore::ComputedStyleExtractor::textBoxShorthandValue const):
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle const):
(WebCore::valueForTextBoxEdge): Deleted.
(WebCore::valueForLineFitEdge): Deleted.
* Source/WebCore/css/ShorthandSerializer.cpp:
(WebCore::ShorthandSerializer::serializeTextBox const):
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeTextEdge):
* Source/WebCore/style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertTextEdge):

Canonical link: https://commits.webkit.org/282328@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/text-box-serialization branch from ad220b0 to ad94a49 Compare August 16, 2024 03:41
@webkit-commit-queue
Copy link
Collaborator

Committed 282328@main (ad94a49): https://commits.webkit.org/282328@main

Reviewed commits have been landed. Closing PR #32267 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit ad94a49 into WebKit:main Aug 16, 2024
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Aug 16, 2024
@nt1m nt1m deleted the eng/text-box-serialization branch August 16, 2024 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CSS Cascading Style Sheets implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants