Title: [150034] trunk/Source
- Revision
- 150034
- Author
- [email protected]
- Date
- 2013-05-13 13:07:20 -0700 (Mon, 13 May 2013)
Log Message
Sometimes NSUndoManager can get into an inconsistent state
https://bugs.webkit.org/show_bug.cgi?id=116050
Reviewed by Enrica Casucci.
Always group undo items to work around a bug in NSUndoManager that manifests
when we call removeAllActionsWithTarget.
Source/WebKit/mac:
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::registerUndoOrRedoStep):
Source/WebKit2:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::registerEditCommand):
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (150033 => 150034)
--- trunk/Source/WebKit/mac/ChangeLog 2013-05-13 20:06:15 UTC (rev 150033)
+++ trunk/Source/WebKit/mac/ChangeLog 2013-05-13 20:07:20 UTC (rev 150034)
@@ -1,3 +1,16 @@
+2013-05-13 Ryosuke Niwa <[email protected]>
+
+ Sometimes NSUndoManager can get into an inconsistent state
+ https://bugs.webkit.org/show_bug.cgi?id=116050
+
+ Reviewed by Enrica Casucci.
+
+ Always group undo items to work around a bug in NSUndoManager that manifests
+ when we call removeAllActionsWithTarget.
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::registerUndoOrRedoStep):
+
2013-05-13 Zalan Bujtas <[email protected]>
WebProcess consuming very high CPU on linkedin.com
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm (150033 => 150034)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm 2013-05-13 20:06:15 UTC (rev 150033)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm 2013-05-13 20:07:20 UTC (rev 150034)
@@ -544,9 +544,11 @@
NSUndoManager *undoManager = [m_webView undoManager];
NSString *actionName = undoNameForEditAction(step->editingAction());
WebUndoStep *webEntry = [WebUndoStep stepWithUndoStep:step];
+ [undoManager beginUndoGrouping];
[undoManager registerUndoWithTarget:m_undoTarget.get() selector:(isRedo ? @selector(redoEditing:) : @selector(undoEditing:)) object:webEntry];
if (actionName)
[undoManager setActionName:actionName];
+ [undoManager endUndoGrouping];
m_haveUndoRedoOperations = YES;
}
Modified: trunk/Source/WebKit2/ChangeLog (150033 => 150034)
--- trunk/Source/WebKit2/ChangeLog 2013-05-13 20:06:15 UTC (rev 150033)
+++ trunk/Source/WebKit2/ChangeLog 2013-05-13 20:07:20 UTC (rev 150034)
@@ -1,3 +1,16 @@
+2013-05-13 Ryosuke Niwa <[email protected]>
+
+ Sometimes NSUndoManager can get into an inconsistent state
+ https://bugs.webkit.org/show_bug.cgi?id=116050
+
+ Reviewed by Enrica Casucci.
+
+ Always group undo items to work around a bug in NSUndoManager that manifests
+ when we call removeAllActionsWithTarget.
+
+ * UIProcess/API/mac/PageClientImpl.mm:
+ (WebKit::PageClientImpl::registerEditCommand):
+
2013-05-13 Anders Carlsson <[email protected]>
[WK2] Crash in WebKit::StorageAreaMap::didSetItem()
Modified: trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm (150033 => 150034)
--- trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm 2013-05-13 20:06:15 UTC (rev 150033)
+++ trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm 2013-05-13 20:07:20 UTC (rev 150034)
@@ -286,9 +286,11 @@
String actionName = WebEditCommandProxy::nameForEditAction(command->editAction());
NSUndoManager *undoManager = [m_wkView undoManager];
+ [undoManager beginUndoGrouping];
[undoManager registerUndoWithTarget:m_undoTarget.get() selector:((undoOrRedo == WebPageProxy::Undo) ? @selector(undoEditing:) : @selector(redoEditing:)) object:commandObjC.get()];
if (!actionName.isEmpty())
[undoManager setActionName:(NSString *)actionName];
+ [undoManager endUndoGrouping];
}
void PageClientImpl::clearAllEditCommands()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes