Title: [124122] branches/safari-536.26-branch/Source/WebKit2
- Revision
- 124122
- Author
- [email protected]
- Date
- 2012-07-30 17:28:51 -0700 (Mon, 30 Jul 2012)
Log Message
Merged r121482. <rdar://problem/11932427>
Modified Paths
Diff
Modified: branches/safari-536.26-branch/Source/WebKit2/ChangeLog (124121 => 124122)
--- branches/safari-536.26-branch/Source/WebKit2/ChangeLog 2012-07-31 00:24:36 UTC (rev 124121)
+++ branches/safari-536.26-branch/Source/WebKit2/ChangeLog 2012-07-31 00:28:51 UTC (rev 124122)
@@ -1,3 +1,27 @@
+2012-07-30 Lucas Forschler <[email protected]>
+
+ Merge 121482
+
+ 2012-06-28 John Sullivan <[email protected]>
+
+ <https://bugs.webkit.org/show_bug.cgi?id=90216>
+ <rdar://problem/11766518>
+ Undo handling in WebKit2 is not robust against some page-closing code paths
+
+ Reviewed by Enrica Casucci.
+
+ * UIProcess/API/mac/PageClientImpl.h:
+ Declared public function viewWillMoveToAnotherWindow().
+
+ * UIProcess/API/mac/PageClientImpl.mm:
+ (WebKit::PageClientImpl::viewWillMoveToAnotherWindow):
+ New function, calls clearAllEditCommands() to remove any Undo actions from the stack.
+ This guarantees that no Undo actions will be abandoned when the PageClientImpl is dealloc'ed.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView viewWillMoveToWindow:]):
+ Now informs PageClientImpl via new function PageClientImpl::viewWillMoveToAnotherWindow().
+
2012-06-25 Lucas Forschler <[email protected]>
Rollout 120377 from branch.
Modified: branches/safari-536.26-branch/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h (124121 => 124122)
--- branches/safari-536.26-branch/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h 2012-07-31 00:24:36 UTC (rev 124121)
+++ branches/safari-536.26-branch/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h 2012-07-31 00:28:51 UTC (rev 124122)
@@ -44,6 +44,8 @@
public:
static PassOwnPtr<PageClientImpl> create(WKView*);
virtual ~PageClientImpl();
+
+ void viewWillMoveToAnotherWindow();
private:
PageClientImpl(WKView*);
Modified: branches/safari-536.26-branch/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm (124121 => 124122)
--- branches/safari-536.26-branch/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm 2012-07-31 00:24:36 UTC (rev 124121)
+++ branches/safari-536.26-branch/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm 2012-07-31 00:28:51 UTC (rev 124122)
@@ -200,6 +200,11 @@
return [m_wkView window];
}
+void PageClientImpl::viewWillMoveToAnotherWindow()
+{
+ clearAllEditCommands();
+}
+
LayerHostingMode PageClientImpl::viewLayerHostingMode()
{
#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
Modified: branches/safari-536.26-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm (124121 => 124122)
--- branches/safari-536.26-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm 2012-07-31 00:24:36 UTC (rev 124121)
+++ branches/safari-536.26-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm 2012-07-31 00:28:51 UTC (rev 124122)
@@ -1877,6 +1877,8 @@
if (window == currentWindow)
return;
+ _data->_pageClient->viewWillMoveToAnotherWindow();
+
[self removeWindowObservers];
[self addWindowObserversForWindow:window];
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes