Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2257a2c9dda1a6fb73c4fe4a93fb7936374020bf
      
https://github.com/WebKit/WebKit/commit/2257a2c9dda1a6fb73c4fe4a93fb7936374020bf
  Author: Tim Nguyen <[email protected]>
  Date:   2026-08-28 (Fri, 28 Aug 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/parsing/text-overflow-computed-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/parsing/text-overflow-valid-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-overflow-expected.txt
    M Source/WebCore/Headers.cmake
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/html/HTMLInputElement.cpp
    M Source/WebCore/html/shadow/TextControlInnerElements.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp
    M 
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp
    M Source/WebCore/layout/integration/LayoutIntegrationBoxTreeUpdater.cpp
    M Source/WebCore/layout/integration/inline/InlineIteratorLineBoxModernPath.h
    M Source/WebCore/rendering/HitTestResult.cpp
    M Source/WebCore/rendering/TextAutoSizing.cpp
    M Source/WebCore/rendering/style/RenderStyleConstants.cpp
    M Source/WebCore/rendering/style/RenderStyleConstants.h
    M Source/WebCore/style/computed/StyleComputedStyleBase.h
    M Source/WebCore/style/computed/data/StyleNonInheritedMiscData.cpp
    M Source/WebCore/style/computed/data/StyleNonInheritedMiscData.h
    A Source/WebCore/style/values/overflow/StyleTextOverflow.cpp
    A Source/WebCore/style/values/overflow/StyleTextOverflow.h
    M Source/WebCore/style/values/primitives/StyleKeyword+Mappings.h

  Log Message:
  -----------
  [css-overflow-4] Support `text-overflow: <string>`
https://bugs.webkit.org/show_bug.cgi?id=27545
rdar://94415937

Reviewed by Alan Baradlay.

Add support for the <string> value of text-overflow, alongside the existing 
clip and ellipsis
keywords, per the css-overflow-4 spec. text-overflow now mirrors 
block-ellipsis's representation:
Style::TextOverflow is a variant-like type holding either the clip/ellipsis 
keywords or a custom
string, replacing the old boolean TextOverflow enum.

Rendering was updated so InlineDisplayLineBuilder::applyEllipsisIfNeeded reads 
the custom string
from style when truncating overflowing inline content, the same way it already 
does for
block-ellipsis. The generated ellipsis TextRun now also carries the line's 
actual base direction
instead of defaulting to LTR, so a custom ellipsis string composed of 
mixed-direction characters is
bidi-resolved against the correct paragraph direction (matters for RTL 
paragraphs and
unicode-bidi: plaintext content whose resolved direction differs from the dir 
attribute).

* LayoutTests/TestExpectations:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/parsing/text-overflow-computed-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/parsing/text-overflow-valid-expected.txt:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::shouldTruncateText const):
(WebCore::HTMLInputElement::invalidateStyleOnFocusChangeIfNeeded):
(WebCore::HTMLInputElement::createInnerTextStyle):
* Source/WebCore/html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::resolveCustomStyle):
(WebCore::TextControlPlaceholderElement::resolveCustomStyle):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp:
(WebCore::Layout::InlineFormattingUtils::lineEndingTruncationPolicy):
* 
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:
(WebCore::Layout::InlineDisplayLineBuilder::applyEllipsisIfNeeded):
* Source/WebCore/layout/integration/LayoutIntegrationBoxTreeUpdater.cpp:
(WebCore::LayoutIntegration::BoxTreeUpdater::adjustStyleIfNeeded):
* Source/WebCore/layout/integration/inline/InlineIteratorLineBoxModernPath.h:
(WebCore::InlineIterator::LineBoxIteratorModernPath::ellipsisText const):
* Source/WebCore/rendering/HitTestResult.cpp:
(WebCore::HitTestResult::innerTextIfTruncated const):
* Source/WebCore/rendering/TextAutoSizing.cpp:
(WebCore::TextAutoSizingHashTranslator::hash):
* Source/WebCore/rendering/style/RenderStyleConstants.cpp:
* Source/WebCore/rendering/style/RenderStyleConstants.h:
* Source/WebCore/style/computed/StyleComputedStyleBase.h:
* Source/WebCore/style/computed/data/StyleNonInheritedMiscData.cpp:
(WebCore::Style::NonInheritedMiscData::NonInheritedMiscData):
(WebCore::Style::NonInheritedMiscData::operator== const):
(WebCore::Style::NonInheritedMiscData::dumpDifferences const):
* Source/WebCore/style/computed/data/StyleNonInheritedMiscData.h:
* Source/WebCore/style/values/overflow/StyleTextOverflow.cpp: Added.
(WebCore::Style::CSSValueConversion<TextOverflow>::operator):
* Source/WebCore/style/values/overflow/StyleTextOverflow.h: Added.
(WebCore::Style::TextOverflow::TextOverflow):
(WebCore::Style::TextOverflow::isClip const):
(WebCore::Style::TextOverflow::isEllipsis const):
(WebCore::Style::TextOverflow::isString const):
(WebCore::Style::TextOverflow::switchOn const):
* Source/WebCore/style/values/primitives/StyleKeyword+Mappings.h:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-overflow-expected.txt:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to