[webkit-changes] [WebKit/WebKit] 6cffe2: [Unified Text Replacement] Replacements should mai...
Richard Robinson
noreply at github.com
Thu Mar 7 20:51:24 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6cffe2c43cbad3173e4431d13a8c37881ad218fc
https://github.com/WebKit/WebKit/commit/6cffe2c43cbad3173e4431d13a8c37881ad218fc
Author: Richard Robinson <richard_robinson2 at apple.com>
Date: 2024-03-07 (Thu, 07 Mar 2024)
Changed paths:
M Source/WebCore/dom/Node.h
M Source/WebCore/editing/WebContentReader.h
M Source/WebCore/editing/cocoa/EditorCocoa.mm
M Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm
M Source/WebKit/Sources.txt
M Source/WebKit/SourcesCocoa.txt
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
A Source/WebKit/WebProcess/WebPage/Cocoa/UnifiedTextReplacementController.mm
R Source/WebKit/WebProcess/WebPage/UnifiedTextReplacementController.cpp
M Source/WebKit/WebProcess/WebPage/UnifiedTextReplacementController.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/CopyRTF.mm
Log Message:
-----------
[Unified Text Replacement] Replacements should maintain the original text attributes
https://bugs.webkit.org/show_bug.cgi?id=270606
rdar://122835651
Reviewed by Wenson Hsieh.
Add support for attributed strings to work properly and have their attributes persisted.
Also, add `WEBCORE_EXPORT` to `showTreeForThis` to ease future debugging, and make a correctness
fix for an unrelated API test.
* Source/WebCore/dom/Node.h:
* Source/WebCore/editing/WebContentReader.h:
* Source/WebCore/editing/cocoa/EditorCocoa.mm:
(WebCore::Editor::replaceSelectionWithAttributedString):
* Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::createFragment):
(WebCore::WebContentReader::readRTFD):
(WebCore::WebContentMarkupReader::readRTFD):
(WebCore::WebContentReader::readRTF):
(WebCore::WebContentMarkupReader::readRTF):
(WebCore::createFragmentAndAddResources): Deleted.
* Source/WebKit/Sources.txt:
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/WebPage/Cocoa/UnifiedTextReplacementController.mm: Renamed from Source/WebKit/WebProcess/WebPage/UnifiedTextReplacementController.cpp.
(WebKit::replaceTextInRange):
(WebKit::replaceContentsInRange):
(WebKit::extendedBoundaryPoint):
(WebKit::findReplacementMarkerByUUID):
(WebKit::UnifiedTextReplacementController::UnifiedTextReplacementController):
(WebKit::UnifiedTextReplacementController::willBeginTextReplacementSession):
(WebKit::UnifiedTextReplacementController::didBeginTextReplacementSession):
(WebKit::UnifiedTextReplacementController::textReplacementSessionDidReceiveReplacements):
(WebKit::UnifiedTextReplacementController::textReplacementSessionDidUpdateStateForReplacement):
(WebKit::UnifiedTextReplacementController::didEndTextReplacementSession):
(WebKit::UnifiedTextReplacementController::textReplacementSessionDidReceiveTextWithReplacementRange):
(WebKit::UnifiedTextReplacementController::textReplacementSessionDidReceiveEditAction):
* Source/WebKit/WebProcess/WebPage/UnifiedTextReplacementController.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/CopyRTF.mm:
(checkColor):
Canonical link: https://commits.webkit.org/275821@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list