Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: eb01ddc81f42db30b637d1bd67ac072189c6775b
https://github.com/WebKit/WebKit/commit/eb01ddc81f42db30b637d1bd67ac072189c6775b
Author: Chris Dumez <[email protected]>
Date: 2026-04-17 (Fri, 17 Apr 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/html/dom/elements/the-innertext-and-outertext-properties/getter-expected.txt
M Source/WebCore/editing/TextIterator.cpp
Log Message:
-----------
innerText getter: apply ::first-line text-transform
https://bugs.webkit.org/show_bug.cgi?id=312366
Reviewed by Darin Adler.
TextIterator::emitText() uses renderer.text() which has text-transform
applied from the base style only. Unlike ::first-letter which creates a
separate RenderTextFragment with its own style, ::first-line only
overrides styles for layout/painting without creating a distinct
renderer. As a result, innerText ignored ::first-line text-transform.
Fix this by checking whether the current text run is on the first line
and, if so, whether the ::first-line style has a different text-transform
than the base style. When it does, re-apply text-transform using the
first-line style on the original text.
No new tests, rebaselined existing WPT test. Firefox and Chrome were
already passing these subtests so we're aligning behavior with them.
*
LayoutTests/imported/w3c/web-platform-tests/html/dom/elements/the-innertext-and-outertext-properties/getter-expected.txt:
* Source/WebCore/editing/TextIterator.cpp:
(WebCore::TextIterator::emitText):
Canonical link: https://commits.webkit.org/311436@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications