Provide WKView SPI to defer telling the WebPageProxy and WebProcess about changes...
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Feb 2013 03:51:40 +0000 (03:51 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Feb 2013 03:51:40 +0000 (03:51 +0000)
commit73f09f93c76def2462bc6827ade2778fd3ab47b7
treebb19adbf0a7d4345e889feb0f471d20c7216f2ab
parent6e9dfab1ca4331f904d2c281a77aa4d978aac9e0
Provide WKView SPI to defer telling the WebPageProxy and WebProcess about changes in the hosting window
https://bugs.webkit.org/show_bug.cgi?id=110415
<rdar://problem/13095405>

Reviewed by Simon Fraser.

* UIProcess/API/mac/WKView.mm: Add _viewInWindowChangesDeferredCount and _viewInWindowChangeWasDeferred to WKViewData.
(-[WKView viewDidMoveToWindow]): If we're deferring window changes, don't include the ViewIsInWindow flag
when sending viewStateDidChange. Instead, save the fact that we want to do that later aside.
(-[WKView beginDeferringViewInWindowChanges]):
(-[WKView endDeferringViewInWindowChanges]): Straightforward begin/end pair. When we exit the last pair and
have a pending window change, let the WebPageProxy know. WebPageProxy will do the check to ensure that
the in-window state has actually changed.
(-[WKView isDeferringViewInWindowChanges]):
* UIProcess/API/mac/WKViewPrivate.h:

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