Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 4dc830ec3f354ee59ebb466ea26e46672f0fe490 https://github.com/WebKit/WebKit/commit/4dc830ec3f354ee59ebb466ea26e46672f0fe490 Author: Vitor Roriz <vitor.ro...@apple.com> Date: 2025-08-08 (Fri, 08 Aug 2025)
Changed paths: M LayoutTests/TestExpectations M LayoutTests/editing/deleting/delete-line-break-before-underlined-content-expected.txt M LayoutTests/editing/deleting/delete-line-break-before-underlined-content-live-range-expected.txt M LayoutTests/editing/deleting/deleting-line-break-preserves-underline-color-expected.txt M LayoutTests/editing/deleting/deleting-line-break-preserves-underline-color-live-range-expected.txt M LayoutTests/editing/deleting/merge-div-from-span-with-style-expected.txt M LayoutTests/editing/deleting/merge-div-from-span-with-style-live-range-expected.txt M LayoutTests/editing/deleting/merge-paragraph-from-span-with-multiple-text-decoration-expected.txt M LayoutTests/editing/deleting/merge-paragraph-from-span-with-multiple-text-decoration-live-range-expected.txt M LayoutTests/editing/deleting/merge-paragraph-from-span-with-style-expected.txt M LayoutTests/editing/deleting/merge-paragraph-from-span-with-style-live-range-expected.txt M LayoutTests/editing/execCommand/inline-style-after-indentoutdent-expected.txt M LayoutTests/editing/execCommand/inline-style-after-indentoutdent.html M LayoutTests/editing/execCommand/toggle-mixed-text-decorations-expected.txt M LayoutTests/editing/execCommand/toggle-mixed-text-decorations.html M LayoutTests/editing/pasteboard/data-transfer-get-data-on-drop-rich-text-expected.txt M LayoutTests/editing/pasteboard/insert-text-decoration-expected.txt M LayoutTests/editing/pasteboard/insert-u-with-text-decoration-none-expected.txt M LayoutTests/editing/pasteboard/preserve-underline-color-expected.txt M LayoutTests/editing/style/push-down-implicit-styles-mac-expected.txt M LayoutTests/editing/style/push-down-implicit-styles-mac.html M LayoutTests/editing/style/push-down-inline-styles-expected.txt M LayoutTests/editing/style/push-down-inline-styles.html M LayoutTests/fast/css/style-enumerate-properties-expected.txt M LayoutTests/fast/css/style-enumerate-properties.html M LayoutTests/fast/events/input-events-paste-rich-datatransfer-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/first-letter-allowed-properties-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/first-line-allowed-properties-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-computed-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-shorthand-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-valid-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-decoration-expected.txt M LayoutTests/imported/w3c/web-platform-tests/editing/run/delete_3001-4000-expected.txt M LayoutTests/imported/w3c/web-platform-tests/editing/run/forwarddelete_3001-4000-expected.txt M LayoutTests/imported/w3c/web-platform-tests/editing/run/multitest_8001-9000-expected.txt M LayoutTests/imported/w3c/web-platform-tests/editing/run/strikethrough_1-1000-expected.txt M LayoutTests/imported/w3c/web-platform-tests/editing/run/strikethrough_1001-2000-expected.txt M LayoutTests/imported/w3c/web-platform-tests/editing/run/strikethrough_2001-last-expected.txt M LayoutTests/imported/w3c/web-platform-tests/editing/run/underline_1-1000-expected.txt M LayoutTests/imported/w3c/web-platform-tests/editing/run/underline_1001-2000-expected.txt M LayoutTests/imported/w3c/web-platform-tests/editing/run/underline_2001-last-expected.txt M LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt M LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt M LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt M LayoutTests/platform/glib/TestExpectations M LayoutTests/platform/glib/fast/events/input-events-paste-rich-datatransfer-expected.txt M LayoutTests/platform/glib/imported/w3c/web-platform-tests/editing/run/strikethrough_1-1000-expected.txt M LayoutTests/platform/glib/imported/w3c/web-platform-tests/editing/run/strikethrough_1001-2000-expected.txt M LayoutTests/platform/glib/imported/w3c/web-platform-tests/editing/run/strikethrough_2001-last-expected.txt M LayoutTests/platform/glib/imported/w3c/web-platform-tests/editing/run/underline_1-1000-expected.txt M LayoutTests/platform/glib/imported/w3c/web-platform-tests/editing/run/underline_1001-2000-expected.txt M LayoutTests/platform/glib/imported/w3c/web-platform-tests/editing/run/underline_2001-last-expected.txt M Source/WebCore/css/CSSProperties.json M Source/WebCore/css/ShorthandSerializer.cpp M Source/WebCore/css/StyleProperties.cpp M Source/WebCore/css/html.css M Source/WebCore/css/parser/CSSPropertyParserCustom.h M Source/WebCore/editing/EditingStyle.cpp M Source/WebCore/editing/EditingStyle.h M Source/WebCore/editing/ReplaceSelectionCommand.cpp M Source/WebCore/editing/markup.cpp M Source/WebCore/style/StyleExtractorCustom.h Log Message: ----------- Consolidate -webkit-text-decoration and text-decoration shorthands rdar://156011594 https://bugs.webkit.org/show_bug.cgi?id=296097 Reviewed by Ryosuke Niwa and Tim Nguyen. Currently, text-decoration can only handle text-decoration-line values, effectively making it a "alias" for it, while -webkit-text-decoration can handle only 3 of text-decoration longhands. We are consolidating behavior here, making -webkit-text-decoration an alias for text-decoration. The property will be the shorthand for all 4 longhands: - text-decoration-line - text-decoration-thickness - text-decoration-style - text-decoration-color We need to rebase a bunch of editing-related tests. Since text-decoration was effectively working as an alias to text-decoration-line, this behavior was assumed in EditingStyle. The changes here won't really change how things look from a user's point of view, but in some cases we will serialize, for example, inline style, "text-decoration: underline" as "text-decoration-line: underline", which actually make us more aligned with other engine implementations. While implementing this, I've realized there is a bug when propagating isCurrentColor for the animation style. This also affect other shorthands, like text-emphasis. So we are rebasing the animation tests here and aiming to intestigate it at: https://bugs.webkit.org/show_bug.cgi?id=296914 This is based on the previous attempts from: * Oriol Brufau (@Loirooriol): - https://commits.webkit.org/248000@main (reverted) * Tim Nguyen (@nt1m): - https://github.com/WebKit/WebKit/pull/6466 * Matthieu Dubet (@mdubet) - https://github.com/WebKit/WebKit/pull/23121 * LayoutTests/TestExpectations: * LayoutTests/editing/deleting/delete-line-break-before-underlined-content-expected.txt: * LayoutTests/editing/deleting/delete-line-break-before-underlined-content-live-range-expected.txt: * LayoutTests/editing/deleting/deleting-line-break-preserves-underline-color-expected.txt: * LayoutTests/editing/deleting/deleting-line-break-preserves-underline-color-live-range-expected.txt: * LayoutTests/editing/deleting/merge-div-from-span-with-style-expected.txt: * LayoutTests/editing/deleting/merge-div-from-span-with-style-live-range-expected.txt: * LayoutTests/editing/deleting/merge-paragraph-from-span-with-multiple-text-decoration-expected.txt: * LayoutTests/editing/deleting/merge-paragraph-from-span-with-multiple-text-decoration-live-range-expected.txt: * LayoutTests/editing/deleting/merge-paragraph-from-span-with-style-expected.txt: * LayoutTests/editing/deleting/merge-paragraph-from-span-with-style-live-range-expected.txt: * LayoutTests/editing/execCommand/inline-style-after-indentoutdent-expected.txt: * LayoutTests/editing/execCommand/inline-style-after-indentoutdent.html: * LayoutTests/editing/execCommand/toggle-mixed-text-decorations-expected.txt: * LayoutTests/editing/execCommand/toggle-mixed-text-decorations.html: * LayoutTests/editing/pasteboard/insert-text-decoration-expected.txt: * LayoutTests/editing/pasteboard/insert-u-with-text-decoration-none-expected.txt: * LayoutTests/editing/pasteboard/preserve-underline-color-expected.txt: * LayoutTests/editing/style/push-down-implicit-styles-mac-expected.txt: * LayoutTests/editing/style/push-down-implicit-styles-mac.html: * LayoutTests/editing/style/push-down-inline-styles-expected.txt: * LayoutTests/editing/style/push-down-inline-styles.html: * LayoutTests/fast/css/style-enumerate-properties-expected.txt: * LayoutTests/fast/css/style-enumerate-properties.html: * LayoutTests/fast/events/input-events-paste-rich-datatransfer-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/first-letter-allowed-properties-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/first-line-allowed-properties-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-computed-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-shorthand-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-decoration-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/editing/run/delete_3001-4000-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/editing/run/forwarddelete_3001-4000-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/editing/run/multitest_8001-9000-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/editing/run/strikethrough_1-1000-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/editing/run/strikethrough_1001-2000-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/editing/run/strikethrough_2001-last-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/editing/run/underline_1-1000-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/editing/run/underline_1001-2000-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/editing/run/underline_2001-last-expected.txt: * LayoutTests/platform/glib/fast/events/input-events-paste-rich-datatransfer-expected.txt: * Source/WebCore/css/CSSProperties.json: * Source/WebCore/css/ShorthandSerializer.cpp: (WebCore::ShorthandSerializer::serialize): * Source/WebCore/css/StyleProperties.cpp: (WebCore::canUseShorthandForLonghand): * Source/WebCore/css/html.css: (abbr[title], acronym[title]): * Source/WebCore/css/parser/CSSPropertyParserCustom.h: (WebCore::CSS::PropertyParserCustom::consumeSingleShorthand): Deleted. * Source/WebCore/editing/EditingStyle.cpp: (WebCore::EditingStyle::init): (WebCore::EditingStyle::styleWithResolvedTextDecorations const): (WebCore::EditingStyle::collapseTextDecorationProperties): (WebCore::EditingStyle::conflictsWithInlineStyleOfElement const): (WebCore::EditingStyle::mergeStyle): (WebCore::EditingStyle::removeStyleFromRulesAndContext): (WebCore::EditingStyle::removeEquivalentProperties): (WebCore::reconcileTextDecorationProperties): (WebCore::StyleChange::StyleChange): (WebCore::setTextDecorationProperty): (WebCore::StyleChange::extractTextStyles): * Source/WebCore/editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): * Source/WebCore/editing/markup.cpp: (WebCore::serializePreservingVisualAppearanceInternal): * Source/WebCore/style/StyleExtractorCustom.h: (WebCore::Style::isDefaultOrIgnorableTextDecorationLine): (WebCore::Style::ExtractorCustom::extractTextDecorationShorthand): (WebCore::Style::ExtractorCustom::extractTextDecorationShorthandSerialization): Canonical link: https://commits.webkit.org/298456@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes