<https://bugs.webkit.org/show_bug.cgi?id=90216>
authorsullivan@apple.com <sullivan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2012 23:12:48 +0000 (23:12 +0000)
committersullivan@apple.com <sullivan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2012 23:12:48 +0000 (23:12 +0000)
commit2f7608ddd57f7e269bbe46e78ab889fccd4de21d
tree5b5d6e7091bc77cf79596768076a7ce614fcb6be
parent8e19c44e856a5880a7216ec220b365ed69cce0c3
<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().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/PageClientImpl.h
Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
Source/WebKit2/UIProcess/API/mac/WKView.mm