Title: [289327] branches/safari-613-branch/Source/WebKit
- Revision
- 289327
- Author
- [email protected]
- Date
- 2022-02-07 18:56:44 -0800 (Mon, 07 Feb 2022)
Log Message
Cherry-pick r288864. rdar://problem/87192657
[iOS] Don't register undo actions in undoManager overridden by WKWebView client
https://bugs.webkit.org/show_bug.cgi?id=235928
<rdar://problem/87192657>
Patch by Matt Gilligan <[email protected]> on 2022-01-31
Reviewed by Tim Horton.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::registerEditCommand):
Use -[WKContentView undoManagerForWebView] rather than -undoManager to prevent registering
actions in an undo manager overridden by a WKWebView subclass. This ensures that all
actions are registered in the same manager. If the client has disabled groupsByEvent on the
overridden undoManager, this prevents an exception from being thrown due to registering
actions outside of an undo group.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-613-branch/Source/WebKit/ChangeLog (289326 => 289327)
--- branches/safari-613-branch/Source/WebKit/ChangeLog 2022-02-08 02:56:42 UTC (rev 289326)
+++ branches/safari-613-branch/Source/WebKit/ChangeLog 2022-02-08 02:56:44 UTC (rev 289327)
@@ -1,5 +1,42 @@
2022-02-07 Russell Epstein <[email protected]>
+ Cherry-pick r288864. rdar://problem/87192657
+
+ [iOS] Don't register undo actions in undoManager overridden by WKWebView client
+ https://bugs.webkit.org/show_bug.cgi?id=235928
+ <rdar://problem/87192657>
+
+ Patch by Matt Gilligan <[email protected]> on 2022-01-31
+ Reviewed by Tim Horton.
+
+ * UIProcess/ios/PageClientImplIOS.mm:
+ (WebKit::PageClientImpl::registerEditCommand):
+ Use -[WKContentView undoManagerForWebView] rather than -undoManager to prevent registering
+ actions in an undo manager overridden by a WKWebView subclass. This ensures that all
+ actions are registered in the same manager. If the client has disabled groupsByEvent on the
+ overridden undoManager, this prevents an exception from being thrown due to registering
+ actions outside of an undo group.
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-01-31 Matt Gilligan <[email protected]>
+
+ [iOS] Don't register undo actions in undoManager overridden by WKWebView client
+ https://bugs.webkit.org/show_bug.cgi?id=235928
+ <rdar://problem/87192657>
+
+ Reviewed by Tim Horton.
+
+ * UIProcess/ios/PageClientImplIOS.mm:
+ (WebKit::PageClientImpl::registerEditCommand):
+ Use -[WKContentView undoManagerForWebView] rather than -undoManager to prevent registering
+ actions in an undo manager overridden by a WKWebView subclass. This ensures that all
+ actions are registered in the same manager. If the client has disabled groupsByEvent on the
+ overridden undoManager, this prevents an exception from being thrown due to registering
+ actions outside of an undo group.
+
+2022-02-07 Russell Epstein <[email protected]>
+
Cherry-pick r288860. rdar://problem/88584471
[iOS] Clean up some issues in the 'com.apple.WebKit.adattributiond.sb' sandbox
Modified: branches/safari-613-branch/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm (289326 => 289327)
--- branches/safari-613-branch/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm 2022-02-08 02:56:42 UTC (rev 289326)
+++ branches/safari-613-branch/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm 2022-02-08 02:56:44 UTC (rev 289327)
@@ -320,7 +320,7 @@
auto actionName = command->label();
auto commandObjC = adoptNS([[WKEditCommand alloc] initWithWebEditCommandProxy:WTFMove(command)]);
- NSUndoManager *undoManager = [m_contentView undoManager];
+ NSUndoManager *undoManager = [m_contentView undoManagerForWebView];
[undoManager registerUndoWithTarget:m_undoTarget.get() selector:((undoOrRedo == UndoOrRedo::Undo) ? @selector(undoEditing:) : @selector(redoEditing:)) object:commandObjC.get()];
if (!actionName.isEmpty())
[undoManager setActionName:(NSString *)actionName];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes