[webkit-changes] [WebKit/WebKit] bd7169: Implement word-break: auto

Myles C. Maxfield noreply at github.com
Fri Jun 30 14:53:03 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bd716947b5196a89ab2d9621075984389e2d4e50
      https://github.com/WebKit/WebKit/commit/bd716947b5196a89ab2d9621075984389e2d4e50
  Author: Myles C. Maxfield <mmaxfield at apple.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/word-break-invalid-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/word-break-invalid.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/word-break-valid-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/word-break-valid.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/auto/word-break-auto-000-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/auto/word-break-auto-000.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/auto/word-break-auto-001-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/auto/word-break-auto-001.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/auto/word-break-auto-002-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/auto/word-break-auto-002.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/auto/word-break-auto-003-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/auto/word-break-auto-003.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/auto/word-break-auto-004-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/auto/word-break-auto-004.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/auto/word-break-auto-005-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/auto/word-break-auto-005.html
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/css/CSSPrimitiveValueMappings.h
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/css/parser/CSSParserContext.cpp
    M Source/WebCore/css/parser/CSSParserContext.h
    M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp
    M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h
    M Source/WebCore/rendering/RenderText.cpp
    M Source/WebCore/rendering/RenderText.h
    M Source/WebCore/rendering/line/BreakingContext.h
    M Source/WebCore/rendering/style/RenderStyleConstants.cpp
    M Source/WebCore/rendering/style/RenderStyleConstants.h
    M Source/WebCore/rendering/style/StyleRareInheritedData.h

  Log Message:
  -----------
  Implement word-break: auto
https://bugs.webkit.org/show_bug.cgi?id=258668
rdar://111507205

Reviewed by Tim Nguyen.

https://github.com/w3c/csswg-drafts/issues/7193#issuecomment-1611772475 says:
> RESOLVED: remove auto () from word-boundary-detection, add keyword to word-break
> for this functionality

This patch implements word-break: auto and hooks it up to the CFStringTokenizer
infrastructure already implemented in 265059 at main.

* Source/WebCore/css/CSSPrimitiveValueMappings.h:
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::InlineItemsBuilder::handleTextContent):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::endsWithSoftWrapOpportunity):
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::contentAnalysis):
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h:
* Source/WebCore/rendering/RenderText.cpp:
(WebCore::mapWordBreakToContentAnalysis):
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::mapWordBoundaryDetectionToContentAnalysis): Deleted.
* Source/WebCore/rendering/RenderText.h:
* Source/WebCore/rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleText):
* Source/WebCore/rendering/style/RenderStyleConstants.cpp:
(WebCore::operator<<):
* Source/WebCore/rendering/style/RenderStyleConstants.h:

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




More information about the webkit-changes mailing list