Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c59eb741b593db43b8c11e5731bf5de6c94a1648
https://github.com/WebKit/WebKit/commit/c59eb741b593db43b8c11e5731bf5de6c94a1648
Author: Megan Gardner <[email protected]>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M Source/WebCore/Headers.cmake
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/page/ChromeClient.h
A Source/WebCore/page/TextAnimationTypes.h
M Source/WebCore/page/writing-tools/WritingToolsController.mm
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/Scripts/webkit/messages.py
R Source/WebKit/Shared/TextAnimationType.serialization.in
A Source/WebKit/Shared/TextAnimationTypes.serialization.in
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
M Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.h
M Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.mm
M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
M Source/WebKit/UIProcess/PageClient.h
R Source/WebKit/UIProcess/TextAnimationType.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/WebPageProxy.messages.in
M Source/WebKit/UIProcess/WebPageProxyInternals.h
M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
M Source/WebKit/UIProcess/mac/WKTextAnimationManager.h
M Source/WebKit/UIProcess/mac/WKTextAnimationManager.mm
M Source/WebKit/UIProcess/mac/WebViewImpl.h
M Source/WebKit/UIProcess/mac/WebViewImpl.mm
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
M Source/WebKit/WebProcess/WebPage/Cocoa/TextAnimationController.h
M Source/WebKit/WebProcess/WebPage/Cocoa/TextAnimationController.mm
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WritingTools.mm
Log Message:
-----------
Writing Tools test CompositionWithMultipleUndosAndRestarts fails on mac.
https://bugs.webkit.org/show_bug.cgi?id=276700
rdar://131891447
Reviewed by Richard Robinson.
This test was failing because we get the final set of text to replace, we were
not comparing it against the previously replaced range correctly. The previous
range was adjusted to the the actual range of the text before it was stored
but we were comparing that against the full range of text, which was incorrect
and also if the replaced text was shorter, it would cause a debug assertion
which then caused the web process to crash and the completion handlers to not
be called and crashed the UI process as well.
This adds a way to have the completion handlers be called and not do any work,
so
the UI process won't crash as well, and also allows for the handler to replace
the text without running the animation again, as the final replace is always the
same as the second to last replace, and there is nothing to animate for that
final
replace, so we skip the animation step.
* Source/WebCore/page/ChromeClient.h:
(WebCore::ChromeClient::addSourceTextAnimation):
* Source/WebCore/page/writing-tools/WritingToolsController.mm:
(WebCore::WritingToolsController::compositionSessionDidReceiveTextWithReplacementRange):
* Source/WebCore/page/writing-tools/WritingToolsTypes.h:
* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Scripts/webkit/messages.py:
(headers_for_type):
* Source/WebKit/Shared/TextAnimationTypes.serialization.in: Renamed from
Source/WebKit/Shared/TextAnimationType.serialization.in.
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _enableSourceTextAnimationAfterElementWithID:]):
(-[WKWebView _enableFinalTextAnimationForElementWithID:]):
* Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.mm:
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::addTextAnimationForAnimationID):
(WebKit::WebPageProxy::callCompletionHandlerForAnimationID):
* Source/WebKit/UIProcess/PageClient.h:
* Source/WebKit/UIProcess/TextAnimationTypes.h: Renamed from
Source/WebKit/UIProcess/TextAnimationType.h.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/UIProcess/WebPageProxyInternals.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView callCompletionHandlerForAnimationID:]):
* Source/WebKit/UIProcess/mac/WKTextAnimationManager.h:
* Source/WebKit/UIProcess/mac/WKTextAnimationManager.mm:
(-[WKTextAnimationManager addTextAnimationForAnimationID:withData:]):
(-[WKTextAnimationManager restoreTextAnimationType]):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::addSourceTextAnimation):
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h:
* Source/WebKit/WebProcess/WebPage/Cocoa/TextAnimationController.h:
* Source/WebKit/WebProcess/WebPage/Cocoa/TextAnimationController.mm:
(WebKit::remainingCharacterRange):
(WebKit::TextAnimationController::addInitialTextAnimation):
(WebKit::TextAnimationController::addSourceTextAnimation):
(WebKit::TextAnimationController::addDestinationTextAnimation):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addTextAnimationForAnimationID):
(WebKit::WebPage::addSourceTextAnimation):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
Canonical link: https://commits.webkit.org/281219@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes