Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 3322e6b61d68491df248d444fb09f3c990ad0414 https://github.com/WebKit/WebKit/commit/3322e6b61d68491df248d444fb09f3c990ad0414 Author: Tim Nguyen <n...@apple.com> Date: 2023-10-20 (Fri, 20 Oct 2023)
Changed paths: M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer.html M LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-wrap-valid-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-wrap-valid.html M LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/white-space-shorthand-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/white-space-shorthand-text-wrap-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/white-space-shorthand-text-wrap.html M LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/white-space-shorthand.html M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/white-space-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/white-space.html M LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt M LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt M LayoutTests/platform/ipad/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt M LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt M LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt M LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml M Source/WebCore/animation/CSSPropertyAnimation.cpp M Source/WebCore/css/CSSPrimitiveValueMappings.h M Source/WebCore/css/CSSProperties.json M Source/WebCore/css/ComputedStyleExtractor.cpp M Source/WebCore/css/ComputedStyleExtractor.h M Source/WebCore/css/ShorthandSerializer.cpp M Source/WebCore/css/parser/CSSParserContext.cpp M Source/WebCore/css/parser/CSSParserContext.h M Source/WebCore/css/parser/CSSPropertyParser.cpp M Source/WebCore/css/parser/CSSPropertyParser.h M Source/WebCore/editing/EditingStyle.cpp M Source/WebCore/editing/TextManipulationController.cpp M Source/WebCore/html/HTMLInputElement.cpp M Source/WebCore/html/HTMLPreElement.cpp M Source/WebCore/html/HTMLTableCellElement.cpp M Source/WebCore/html/HTMLTextAreaElement.cpp M Source/WebCore/html/track/TextTrackCueGeneric.cpp M Source/WebCore/html/track/VTTCue.cpp M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp M Source/WebCore/layout/formattingContexts/inline/InlineQuirks.cpp M Source/WebCore/layout/formattingContexts/inline/InlineTextItem.cpp M Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp M Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp M Source/WebCore/rendering/RenderBlock.cpp M Source/WebCore/rendering/RenderListItem.cpp M Source/WebCore/rendering/RenderText.cpp M Source/WebCore/rendering/RenderTheme.cpp M Source/WebCore/rendering/RenderThemeMac.mm M Source/WebCore/rendering/line/BreakingContext.h M Source/WebCore/rendering/style/RenderStyle.cpp M Source/WebCore/rendering/style/RenderStyle.h M Source/WebCore/rendering/style/RenderStyleConstants.cpp M Source/WebCore/rendering/style/RenderStyleConstants.h M Source/WebCore/rendering/style/RenderStyleInlines.h M Source/WebCore/rendering/style/TextSizeAdjustment.cpp M Source/WebCore/style/PropertyAllowlist.cpp M Source/WebCore/style/StyleAdjuster.cpp M Source/WebCore/svg/SVGTextContentElement.cpp Log Message: ----------- [css-text-4] Update `text-wrap` properties to latest spec https://bugs.webkit.org/show_bug.cgi?id=263432 rdar://117248327 Reviewed by Darin Adler. There is now a new arrangement for the longhands that this commit implements: - white-space is a shorthand of white-space-collapse & text-wrap-mode - text-wrap is a shorthand of text-wrap-mode & text-wrap-style The previous text-wrap property values are split between its longhands: - text-wrap-style takes the values auto / balance / pretty / stable. This property is disabled behind a preference. - text-wrap-mode takes the values wrap / nowrap. This commit also enables by default the longhands for white-space now that layout support for all the different combinations is implemented. It also removes the related workarounds. WPTs are updated to use shortest serialization. Specification: https://drafts.csswg.org/css-text-4/ * LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-wrap-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-wrap-valid.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/white-space-shorthand-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/white-space-shorthand-text-wrap-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/white-space-shorthand-text-wrap.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/white-space-shorthand.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/white-space-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/white-space.html: * LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * LayoutTests/platform/ipad/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt: * LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebCore/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * Source/WebCore/css/CSSPrimitiveValueMappings.h: (WebCore::toCSSValueID): (WebCore::fromCSSValueID): * Source/WebCore/css/CSSProperties.json: * Source/WebCore/css/ComputedStyleExtractor.cpp: (WebCore::ComputedStyleExtractor::textWrapShorthandValue const): (WebCore::ComputedStyleExtractor::whiteSpaceShorthandValue const): (WebCore::ComputedStyleExtractor::propertyValue const): (WebCore::ComputedStyleExtractor::valueForPropertyInStyle const): * Source/WebCore/css/ComputedStyleExtractor.h: * Source/WebCore/css/ShorthandSerializer.cpp: (WebCore::ShorthandSerializer::serialize): (WebCore::ShorthandSerializer::serializeTextWrap const): (WebCore::ShorthandSerializer::serializeWhiteSpace const): * Source/WebCore/css/parser/CSSParserContext.cpp: (WebCore::CSSParserContext::CSSParserContext): (WebCore::add): * Source/WebCore/css/parser/CSSParserContext.h: * Source/WebCore/css/parser/CSSPropertyParser.cpp: (WebCore::initialValueForLonghand): (WebCore::CSSPropertyParser::consumeTextWrapShorthand): (WebCore::CSSPropertyParser::consumeWhiteSpaceShorthand): (WebCore::CSSPropertyParser::parseShorthand): * Source/WebCore/css/parser/CSSPropertyParser.h: * Source/WebCore/editing/EditingStyle.cpp: (WebCore::EditingStyle::conflictsWithInlineStyleOfElement const): (WebCore::EditingStyle::removeStyleFromRulesAndContext): (WebCore::StyleChange::StyleChange): * Source/WebCore/editing/TextManipulationController.cpp: (WebCore::isEnclosingItemBoundaryElement): * Source/WebCore/html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::createInnerTextStyle): * Source/WebCore/html/HTMLPreElement.cpp: (WebCore::HTMLPreElement::collectPresentationalHintsForAttribute): * Source/WebCore/html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::collectPresentationalHintsForAttribute): * Source/WebCore/html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::collectPresentationalHintsForAttribute): * Source/WebCore/html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): * Source/WebCore/html/track/VTTCue.cpp: (WebCore::VTTCueBox::applyCSSProperties): * Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp: (WebCore::Layout::InlineFormattingContext::layout): * Source/WebCore/layout/formattingContexts/inline/InlineQuirks.cpp: (WebCore::Layout::InlineQuirks::trailingNonBreakingSpaceNeedsAdjustment const): * Source/WebCore/layout/formattingContexts/inline/InlineTextItem.cpp: (WebCore::Layout::InlineTextItem::isQuirkNonBreakingSpace const): * Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp: (WebCore::Layout::TextOnlySimpleLineBuilder::isEligibleForSimplifiedTextOnlyInlineLayout): * Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp: (WebCore::Layout::TextUtil::isWrappingAllowed): (WebCore::Layout::TextUtil::shouldTrailingWhitespaceHang): * Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp: (WebCore::LayoutIntegration::shouldInvalidateLineLayoutPathAfterChangeFor): * Source/WebCore/rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeBlockPreferredLogicalWidths const): * Source/WebCore/rendering/RenderListItem.cpp: (WebCore::RenderListItem::computeMarkerStyle const): * Source/WebCore/rendering/RenderText.cpp: (WebCore::RenderText::computePreferredLogicalWidths): * Source/WebCore/rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): * Source/WebCore/rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::adjustMenuListStyle const): * Source/WebCore/rendering/line/BreakingContext.h: (WebCore::BreakingContext::clearLineBreakIfFitsOnLine): (WebCore::BreakingContext::initializeForCurrentObject): (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::handleText): (WebCore::BreakingContext::trailingSpacesHang): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::handleEndOfLine): * Source/WebCore/rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): (WebCore::RenderStyle::changeRequiresLayout const): (WebCore::RenderStyle::conservativelyCollectChangedAnimatableProperties const): (WebCore::RenderStyle::whiteSpace const): * Source/WebCore/rendering/style/RenderStyle.h: (WebCore::RenderStyle::textWrapMode const): (WebCore::RenderStyle::textWrapStyle const): (WebCore::RenderStyle::setTextWrapMode): (WebCore::RenderStyle::setTextWrapStyle): (WebCore::RenderStyle::textWrap const): Deleted. (WebCore::RenderStyle::setTextWrap): Deleted. * Source/WebCore/rendering/style/RenderStyleConstants.cpp: (WebCore::operator<<): * Source/WebCore/rendering/style/RenderStyleConstants.h: * Source/WebCore/rendering/style/RenderStyleInlines.h: (WebCore::RenderStyle::initialTextWrapMode): (WebCore::RenderStyle::initialTextWrapStyle): (WebCore::RenderStyle::initialTextWrap): Deleted. * Source/WebCore/rendering/style/TextSizeAdjustment.cpp: (WebCore::AutosizeStatus::computeStatus): * Source/WebCore/style/PropertyAllowlist.cpp: (WebCore::Style::isValidMarkerStyleProperty): (WebCore::Style::isValidCueStyleProperty): * Source/WebCore/style/StyleAdjuster.cpp: (WebCore::Style::Adjuster::adjust const): * Source/WebCore/svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::collectPresentationalHintsForAttribute): Canonical link: https://commits.webkit.org/269613@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes