Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 32f01c92749cdfc19b67488b6b7cf0363eb0ebb4
https://github.com/WebKit/WebKit/commit/32f01c92749cdfc19b67488b6b7cf0363eb0ebb4
Author: Jessica Cheung <[email protected]>
Date: 2026-03-06 (Fri, 06 Mar 2026)
Changed paths:
M Source/WebCore/editing/InsertTextCommand.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/SmartLists.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/SmartListsSupport.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/SmartListsSupport.swift
Log Message:
-----------
[Smart Lists] Can’t create a numbered list using a RTL language
https://bugs.webkit.org/show_bug.cgi?id=309314
rdar://167786169
Reviewed by Richard Robinson, Ryosuke Niwa, Wenson Hsieh, and Abrar Rahman
Protyasha.
Smart lists do not work with RTL languages because
InsertTextCommand::applySmartListsIfNeeded() uses
startOfLine() which does not support bidi levels.
To fix this, use logicalStartOfLine() instead which
does support bidi levels.
Additionally, write an API test for creating ordered
smart lists with RTL languages. The current SmartListsSupport
does not support RTL so include a check if in RTL, then add the
dir attribute to specify the text direction.
Lastly, fix the memory leak in runTest by using adoptNS.
* Source/WebCore/editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::applySmartListsIfNeeded):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SmartLists.mm:
(runTest):
((SmartLists, OrderedSmartListWithRTL)):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SmartListsSupport.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SmartListsSupport.swift:
(SmartListsSupport.processConfiguration(_:)):
Canonical link: https://commits.webkit.org/308811@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications