Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8e1f14f5ccb7db0f651f27f324f46416abd3ec1f
      
https://github.com/WebKit/WebKit/commit/8e1f14f5ccb7db0f651f27f324f46416abd3ec1f
  Author: Richard Robinson <[email protected]>
  Date:   2024-08-20 (Tue, 20 Aug 2024)

  Changed paths:
    M Source/WebCore/page/writing-tools/WritingToolsController.mm
    M Source/WebKit/WebProcess/WebPage/Cocoa/TextAnimationController.mm

  Log Message:
  -----------
  [Writing Tools] Message body goes blank after selecting smart reply option
https://bugs.webkit.org/show_bug.cgi?id=278423
rdar://134365851

Reviewed by Aditya Keerthi.

It is valid to have an empty session state in the case where 
`didFinishWritingToolsSession` is called
prior to all animations finishing, since animations are performed async and 
`didFinishWritingToolsSession`
resets the state.

Fix by removing the erroneous assertion and instead just returning an empty 
optional.

Note that it is not possible currently to write a test for this, as the bug is 
dependent on iOS specific
code, and the WritingToolsUI framework is not currently available for iOS 
simulator.

* Source/WebCore/page/writing-tools/WritingToolsController.mm:
(WebCore::WritingToolsController::activeSessionRange const):
* Source/WebKit/WebProcess/WebPage/Cocoa/TextAnimationController.mm:
(WebKit::TextAnimationController::unreplacedRangeForActiveWritingToolsSession 
const):
(WebKit::TextAnimationController::addSourceTextAnimationForActiveWritingToolsSession):
(WebKit::TextAnimationController::addDestinationTextAnimationForActiveWritingToolsSession):

Canonical link: https://commits.webkit.org/282529@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

Reply via email to