<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[191702] trunk/Source/WebKit2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/191702">191702</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2015-10-28 16:17:03 -0700 (Wed, 28 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174

Reviewed by Anders Carlsson.

* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(WKPageGetObjectRegistry):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _remoteObjectRegistry]):
* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):
(-[WKView _inspectorAttachmentView]):
(-[WKView _setInspectorAttachmentView:]):
(-[WKView windowOcclusionDetectionEnabled]):
(-[WKView setWindowOcclusionDetectionEnabled:]):
(-[WKView _setTotalHeightOfBanners:]):
(-[WKView _totalHeightOfBanners]):
(-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
(-[WKView _remoteObjectRegistry]): Deleted.
(-[WKView _startWindowDrag]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/Cocoa/WebViewImpl.h:
(WebKit::WebViewImpl::setWindowOcclusionDetectionEnabled):
(WebKit::WebViewImpl::windowOcclusionDetectionEnabled):
(WebKit::WebViewImpl::setTotalHeightOfBanners):
(WebKit::WebViewImpl::totalHeightOfBanners):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::window):
(WebKit::WebViewImpl::setInspectorAttachmentView):
(WebKit::WebViewImpl::inspectorAttachmentView):
(WebKit::WebViewImpl::remoteObjectRegistry):
(WebKit::WebViewImpl::destroyRemoteObjectRegistry):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::isViewVisible):
(WebKit::PageClientImpl::createColorPicker):
(WebKit::PageClientImpl::startWindowDrag):
(WebKit::PageClientImpl::platformWindow):
(WebKit::PageClientImpl::inspectorAttachmentView):
(WebKit::PageClientImpl::remoteObjectRegistry):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformCanAttach):
(WebKit::WebInspectorProxy::platformBringToFront):
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
(WebKit::WebInspectorProxy::platformInspectedWindowHeight):
(WebKit::WebInspectorProxy::platformInspectedWindowWidth):
(WebKit::WebInspectorProxy::platformAttach):
(WebKit::WebInspectorProxy::platformDetach):
(WebKit::WebInspectorProxy::platformStartWindowDrag):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::startWindowDrag):
(WebKit::WebPageProxy::platformWindow):
(WebKit::WebPageProxy::inspectorAttachmentView):
(WebKit::WebPageProxy::remoteObjectRegistry):
(WebKit::WebPageProxy::wkView): Deleted.
Get rid of the wkView() getters on PageClientImpl and WebPageProxy, because
those can't be a thing in the brave new world. Instead, plumb the four
callers through PageClient to WebViewImpl.

Also, move a few more things (banners, window occlusion).</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICmacWKPagePrivateMacmm">trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKBrowsingContextControllermm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewmm">trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewInternalh">trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebViewImplh">trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebViewImplmm">trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplh">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplmm">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebInspectorProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebPageProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (191701 => 191702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-10-28 23:11:37 UTC (rev 191701)
+++ trunk/Source/WebKit2/ChangeLog        2015-10-28 23:17:03 UTC (rev 191702)
</span><span class="lines">@@ -1,3 +1,69 @@
</span><ins>+2015-10-28  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        WKView being inside WKWebView leads to weird API issues
+        https://bugs.webkit.org/show_bug.cgi?id=150174
+
+        Reviewed by Anders Carlsson.
+
+        * UIProcess/API/C/mac/WKPagePrivateMac.mm:
+        (WKPageGetObjectRegistry):
+        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
+        (-[WKBrowsingContextController _remoteObjectRegistry]):
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView dealloc]):
+        (-[WKView _inspectorAttachmentView]):
+        (-[WKView _setInspectorAttachmentView:]):
+        (-[WKView windowOcclusionDetectionEnabled]):
+        (-[WKView setWindowOcclusionDetectionEnabled:]):
+        (-[WKView _setTotalHeightOfBanners:]):
+        (-[WKView _totalHeightOfBanners]):
+        (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
+        (-[WKView _remoteObjectRegistry]): Deleted.
+        (-[WKView _startWindowDrag]): Deleted.
+        * UIProcess/API/mac/WKViewInternal.h:
+        * UIProcess/Cocoa/WebViewImpl.h:
+        (WebKit::WebViewImpl::setWindowOcclusionDetectionEnabled):
+        (WebKit::WebViewImpl::windowOcclusionDetectionEnabled):
+        (WebKit::WebViewImpl::setTotalHeightOfBanners):
+        (WebKit::WebViewImpl::totalHeightOfBanners):
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        (WebKit::WebViewImpl::window):
+        (WebKit::WebViewImpl::setInspectorAttachmentView):
+        (WebKit::WebViewImpl::inspectorAttachmentView):
+        (WebKit::WebViewImpl::remoteObjectRegistry):
+        (WebKit::WebViewImpl::destroyRemoteObjectRegistry):
+        * UIProcess/PageClient.h:
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/mac/PageClientImpl.h:
+        * UIProcess/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::isViewVisible):
+        (WebKit::PageClientImpl::createColorPicker):
+        (WebKit::PageClientImpl::startWindowDrag):
+        (WebKit::PageClientImpl::platformWindow):
+        (WebKit::PageClientImpl::inspectorAttachmentView):
+        (WebKit::PageClientImpl::remoteObjectRegistry):
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
+        (WebKit::WebInspectorProxy::platformCanAttach):
+        (WebKit::WebInspectorProxy::platformBringToFront):
+        (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
+        (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
+        (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
+        (WebKit::WebInspectorProxy::platformAttach):
+        (WebKit::WebInspectorProxy::platformDetach):
+        (WebKit::WebInspectorProxy::platformStartWindowDrag):
+        * UIProcess/mac/WebPageProxyMac.mm:
+        (WebKit::WebPageProxy::startWindowDrag):
+        (WebKit::WebPageProxy::platformWindow):
+        (WebKit::WebPageProxy::inspectorAttachmentView):
+        (WebKit::WebPageProxy::remoteObjectRegistry):
+        (WebKit::WebPageProxy::wkView): Deleted.
+        Get rid of the wkView() getters on PageClientImpl and WebPageProxy, because
+        those can't be a thing in the brave new world. Instead, plumb the four
+        callers through PageClient to WebViewImpl.
+
+        Also, move a few more things (banners, window occlusion).
+
</ins><span class="cx"> 2015-10-27  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Stub out more of the context menu SPI
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICmacWKPagePrivateMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.mm (191701 => 191702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.mm        2015-10-28 23:11:37 UTC (rev 191701)
+++ trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.mm        2015-10-28 23:17:03 UTC (rev 191702)
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx"> _WKRemoteObjectRegistry *WKPageGetObjectRegistry(WKPageRef pageRef)
</span><span class="cx"> {
</span><span class="cx"> #if WK_API_ENABLED &amp;&amp; !TARGET_OS_IPHONE
</span><del>-    return toImpl(pageRef)-&gt;wkView()._remoteObjectRegistry;
</del><ins>+    return toImpl(pageRef)-&gt;remoteObjectRegistry();
</ins><span class="cx"> #else
</span><span class="cx">     return nil;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKBrowsingContextControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm (191701 => 191702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm        2015-10-28 23:11:37 UTC (rev 191701)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm        2015-10-28 23:17:03 UTC (rev 191702)
</span><span class="lines">@@ -756,7 +756,7 @@
</span><span class="cx"> - (_WKRemoteObjectRegistry *)_remoteObjectRegistry
</span><span class="cx"> {
</span><span class="cx"> #if WK_API_ENABLED &amp;&amp; !TARGET_OS_IPHONE
</span><del>-    return _page-&gt;wkView()._remoteObjectRegistry;
</del><ins>+    return _page-&gt;remoteObjectRegistry();
</ins><span class="cx"> #else
</span><span class="cx">     return nil;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (191701 => 191702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2015-10-28 23:11:37 UTC (rev 191701)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2015-10-28 23:17:03 UTC (rev 191702)
</span><span class="lines">@@ -46,8 +46,6 @@
</span><span class="cx"> #import &quot;NativeWebWheelEvent.h&quot;
</span><span class="cx"> #import &quot;PageClientImpl.h&quot;
</span><span class="cx"> #import &quot;PasteboardTypes.h&quot;
</span><del>-#import &quot;RemoteObjectRegistry.h&quot;
-#import &quot;RemoteObjectRegistryMessages.h&quot;
</del><span class="cx"> #import &quot;StringUtilities.h&quot;
</span><span class="cx"> #import &quot;TextChecker.h&quot;
</span><span class="cx"> #import &quot;TextCheckerState.h&quot;
</span><span class="lines">@@ -64,7 +62,6 @@
</span><span class="cx"> #import &quot;WebBackForwardList.h&quot;
</span><span class="cx"> #import &quot;WebEventFactory.h&quot;
</span><span class="cx"> #import &quot;WebHitTestResultData.h&quot;
</span><del>-#import &quot;WebInspectorProxy.h&quot;
</del><span class="cx"> #import &quot;WebKit2Initialize.h&quot;
</span><span class="cx"> #import &quot;WebPage.h&quot;
</span><span class="cx"> #import &quot;WebPageGroup.h&quot;
</span><span class="lines">@@ -74,7 +71,6 @@
</span><span class="cx"> #import &quot;WebProcessProxy.h&quot;
</span><span class="cx"> #import &quot;WebSystemInterface.h&quot;
</span><span class="cx"> #import &quot;WebViewImpl.h&quot;
</span><del>-#import &quot;_WKRemoteObjectRegistryInternal.h&quot;
</del><span class="cx"> #import &lt;QuartzCore/QuartzCore.h&gt;
</span><span class="cx"> #import &lt;WebCore/AXObjectCache.h&gt;
</span><span class="cx"> #import &lt;WebCore/ColorMac.h&gt;
</span><span class="lines">@@ -155,9 +151,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx">     RetainPtr&lt;WKBrowsingContextController&gt; _browsingContextController;
</span><del>-    RetainPtr&lt;NSView&gt; _inspectorAttachmentView;
-
-    RetainPtr&lt;_WKRemoteObjectRegistry&gt; _remoteObjectRegistry;
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // For asynchronous validation.
</span><span class="lines">@@ -172,12 +165,6 @@
</span><span class="cx"> #else
</span><span class="cx">     WKViewInterpretKeyEventsParameters* _interpretKeyEventsParameters;
</span><span class="cx"> #endif
</span><del>-
-    BOOL _willBecomeFirstResponderAgain;
-
-    BOOL _windowOcclusionDetectionEnabled;
-
-    CGFloat _totalHeightOfBanners;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> @end
</span><span class="lines">@@ -207,10 +194,7 @@
</span><span class="cx"> - (void)dealloc
</span><span class="cx"> {
</span><span class="cx"> #if WK_API_ENABLED
</span><del>-    if (_data-&gt;_remoteObjectRegistry) {
-        _data-&gt;_page-&gt;process().processPool().removeMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _data-&gt;_page-&gt;pageID());
-        [_data-&gt;_remoteObjectRegistry _invalidate];
-    }
</del><ins>+    _data-&gt;_impl-&gt;destroyRemoteObjectRegistry();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     _data-&gt;_page-&gt;close();
</span><span class="lines">@@ -2299,8 +2283,6 @@
</span><span class="cx"> 
</span><span class="cx">     _data-&gt;_page-&gt;initializeWebPage();
</span><span class="cx"> 
</span><del>-    _data-&gt;_windowOcclusionDetectionEnabled = YES;
-
</del><span class="cx">     _data-&gt;_impl-&gt;registerDraggedTypes();
</span><span class="cx"> 
</span><span class="cx">     self.wantsLayer = YES;
</span><span class="lines">@@ -2330,25 +2312,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // WK_API_ENABLED
</span><span class="cx"> 
</span><del>-#if WK_API_ENABLED
-- (_WKRemoteObjectRegistry *)_remoteObjectRegistry
-{
-    if (!_data-&gt;_remoteObjectRegistry) {
-        _data-&gt;_remoteObjectRegistry = adoptNS([[_WKRemoteObjectRegistry alloc] _initWithMessageSender:*_data-&gt;_page]);
-        _data-&gt;_page-&gt;process().processPool().addMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _data-&gt;_page-&gt;pageID(), [_data-&gt;_remoteObjectRegistry remoteObjectRegistry]);
-    }
</del><span class="cx"> 
</span><del>-    return _data-&gt;_remoteObjectRegistry.get();
-}
-#endif
-
-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101100
-- (void)_startWindowDrag
-{
-    _data-&gt;_impl-&gt;startWindowDrag();
-}
-#endif
-
</del><span class="cx"> // FIXME: Get rid of this when we have better plumbing to WKViewLayoutStrategy.
</span><span class="cx"> - (void)_updateViewExposedRect
</span><span class="cx"> {
</span><span class="lines">@@ -2517,18 +2481,12 @@
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> - (NSView *)_inspectorAttachmentView
</span><span class="cx"> {
</span><del>-    NSView *attachmentView = _data-&gt;_inspectorAttachmentView.get();
-    return attachmentView ? attachmentView : self;
</del><ins>+    return _data-&gt;_impl-&gt;inspectorAttachmentView();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_setInspectorAttachmentView:(NSView *)newView
</span><span class="cx"> {
</span><del>-    NSView *oldView = _data-&gt;_inspectorAttachmentView.get();
-    if (oldView == newView)
-        return;
-
-    _data-&gt;_inspectorAttachmentView = newView;
-    _data-&gt;_page-&gt;inspector()-&gt;attachmentViewDidChange(oldView ? oldView : self, newView ? newView : self);
</del><ins>+    _data-&gt;_impl-&gt;setInspectorAttachmentView(newView);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -2570,12 +2528,12 @@
</span><span class="cx"> 
</span><span class="cx"> - (BOOL)windowOcclusionDetectionEnabled
</span><span class="cx"> {
</span><del>-    return _data-&gt;_windowOcclusionDetectionEnabled;
</del><ins>+    return _data-&gt;_impl-&gt;windowOcclusionDetectionEnabled();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)setWindowOcclusionDetectionEnabled:(BOOL)flag
</del><ins>+- (void)setWindowOcclusionDetectionEnabled:(BOOL)enabled
</ins><span class="cx"> {
</span><del>-    _data-&gt;_windowOcclusionDetectionEnabled = flag;
</del><ins>+    _data-&gt;_impl-&gt;setWindowOcclusionDetectionEnabled(enabled);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)setAllowsBackForwardNavigationGestures:(BOOL)allowsBackForwardNavigationGestures
</span><span class="lines">@@ -2676,12 +2634,12 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setTotalHeightOfBanners:(CGFloat)totalHeightOfBanners
</span><span class="cx"> {
</span><del>-    _data-&gt;_totalHeightOfBanners = totalHeightOfBanners;
</del><ins>+    _data-&gt;_impl-&gt;setTotalHeightOfBanners(totalHeightOfBanners);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (CGFloat)_totalHeightOfBanners
</span><span class="cx"> {
</span><del>-    return _data-&gt;_totalHeightOfBanners;
</del><ins>+    return _data-&gt;_impl-&gt;totalHeightOfBanners();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_setOverlayScrollbarStyle:(_WKOverlayScrollbarStyle)scrollbarStyle
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h (191701 => 191702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h        2015-10-28 23:11:37 UTC (rev 191701)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h        2015-10-28 23:17:03 UTC (rev 191702)
</span><span class="lines">@@ -41,7 +41,6 @@
</span><span class="cx"> 
</span><span class="cx"> @class WKWebView;
</span><span class="cx"> #if WK_API_ENABLED
</span><del>-@class _WKRemoteObjectRegistry;
</del><span class="cx"> @class _WKThumbnailView;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -49,16 +48,11 @@
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> - (instancetype)initWithFrame:(NSRect)frame processPool:(WebKit::WebProcessPool&amp;)processPool configuration:(Ref&lt;API::PageConfiguration&gt;&amp;&amp;)configuration webView:(WKWebView *)webView;
</span><span class="cx"> @property (nonatomic, setter=_setThumbnailView:) _WKThumbnailView *_thumbnailView;
</span><del>-@property (nonatomic, readonly) _WKRemoteObjectRegistry *_remoteObjectRegistry;
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> - (void)_doneWithKeyEvent:(NSEvent *)event eventWasHandled:(BOOL)eventWasHandled;
</span><span class="cx"> - (void)_addFontPanelObserver;
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101100
-- (void)_startWindowDrag;
-#endif
-
</del><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebViewImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h (191701 => 191702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h        2015-10-28 23:11:37 UTC (rev 191701)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h        2015-10-28 23:17:03 UTC (rev 191702)
</span><span class="lines">@@ -88,6 +88,8 @@
</span><span class="cx"> 
</span><span class="cx">     ~WebViewImpl();
</span><span class="cx"> 
</span><ins>+    NSWindow *window();
+
</ins><span class="cx">     void processDidExit();
</span><span class="cx">     void pageClosed();
</span><span class="cx">     void didRelaunchProcess();
</span><span class="lines">@@ -168,6 +170,9 @@
</span><span class="cx">     void endDeferringViewInWindowChangesSync();
</span><span class="cx">     bool isDeferringViewInWindowChanges() const { return m_shouldDeferViewInWindowChanges; }
</span><span class="cx"> 
</span><ins>+    void setWindowOcclusionDetectionEnabled(bool enabled) { m_windowOcclusionDetectionEnabled = enabled; }
+    bool windowOcclusionDetectionEnabled() const { return m_windowOcclusionDetectionEnabled; }
+
</ins><span class="cx">     void prepareForMoveToWindow(NSWindow *targetWindow, std::function&lt;void()&gt; completionHandler);
</span><span class="cx">     NSWindow *targetWindowForMovePreparation() const { return m_targetWindowForMovePreparation; }
</span><span class="cx"> 
</span><span class="lines">@@ -263,6 +268,12 @@
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx">     void setThumbnailView(_WKThumbnailView *);
</span><span class="cx">     _WKThumbnailView *thumbnailView() const { return m_thumbnailView; }
</span><ins>+
+    void setInspectorAttachmentView(NSView *);
+    NSView *inspectorAttachmentView();
+
+    _WKRemoteObjectRegistry *remoteObjectRegistry();
+    void destroyRemoteObjectRegistry(); // FIXME: Temporary. Can fold in after we move ownership of WebPageProxy here.
</ins><span class="cx"> #endif // WK_API_ENABLED
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><span class="lines">@@ -320,6 +331,9 @@
</span><span class="cx"> 
</span><span class="cx">     bool executeSavedCommandBySelector(SEL);
</span><span class="cx"> 
</span><ins>+    void setTotalHeightOfBanners(CGFloat totalHeightOfBanners) { m_totalHeightOfBanners = totalHeightOfBanners; }
+    CGFloat totalHeightOfBanners() const { return m_totalHeightOfBanners; }
+
</ins><span class="cx"> private:
</span><span class="cx">     WeakPtr&lt;WebViewImpl&gt; createWeakPtr() { return m_weakPtrFactory.createWeakPtr(); }
</span><span class="cx"> 
</span><span class="lines">@@ -353,6 +367,7 @@
</span><span class="cx">     bool m_needsViewFrameInWindowCoordinates;
</span><span class="cx">     bool m_didScheduleWindowAndViewFrameUpdate { false };
</span><span class="cx">     bool m_isDeferringViewInWindowChanges { false };
</span><ins>+    bool m_windowOcclusionDetectionEnabled { true };
</ins><span class="cx"> 
</span><span class="cx">     bool m_automaticallyAdjustsContentInsets { false };
</span><span class="cx">     CGFloat m_topContentInset { 0 };
</span><span class="lines">@@ -418,6 +433,8 @@
</span><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx">     _WKThumbnailView *m_thumbnailView { nullptr };
</span><ins>+
+    RetainPtr&lt;_WKRemoteObjectRegistry&gt; m_remoteObjectRegistry;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;ViewGestureController&gt; m_gestureController;
</span><span class="lines">@@ -431,6 +448,10 @@
</span><span class="cx">     String m_promisedURL;
</span><span class="cx"> 
</span><span class="cx">     WTF::Optional&lt;NSInteger&gt; m_spellCheckerDocumentTag;
</span><ins>+
+    CGFloat m_totalHeightOfBanners { 0 };
+
+    RetainPtr&lt;NSView&gt; m_inspectorAttachmentView;
</ins><span class="cx"> };
</span><span class="cx">     
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebViewImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm (191701 => 191702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm        2015-10-28 23:11:37 UTC (rev 191701)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm        2015-10-28 23:17:03 UTC (rev 191702)
</span><span class="lines">@@ -38,6 +38,8 @@
</span><span class="cx"> #import &quot;PageClient.h&quot;
</span><span class="cx"> #import &quot;PasteboardTypes.h&quot;
</span><span class="cx"> #import &quot;RemoteLayerTreeDrawingAreaProxy.h&quot;
</span><ins>+#import &quot;RemoteObjectRegistry.h&quot;
+#import &quot;RemoteObjectRegistryMessages.h&quot;
</ins><span class="cx"> #import &quot;StringUtilities.h&quot;
</span><span class="cx"> #import &quot;TiledCoreAnimationDrawingAreaProxy.h&quot;
</span><span class="cx"> #import &quot;ViewGestureController.h&quot;
</span><span class="lines">@@ -47,8 +49,11 @@
</span><span class="cx"> #import &quot;WKViewLayoutStrategy.h&quot;
</span><span class="cx"> #import &quot;WKWebView.h&quot;
</span><span class="cx"> #import &quot;WebEditCommandProxy.h&quot;
</span><ins>+#import &quot;WebInspectorProxy.h&quot;
</ins><span class="cx"> #import &quot;WebPageProxy.h&quot;
</span><ins>+#import &quot;WebProcessPool.h&quot;
</ins><span class="cx"> #import &quot;WebProcessProxy.h&quot;
</span><ins>+#import &quot;_WKRemoteObjectRegistryInternal.h&quot;
</ins><span class="cx"> #import &quot;_WKThumbnailViewInternal.h&quot;
</span><span class="cx"> #import &lt;HIToolbox/CarbonEventsCore.h&gt;
</span><span class="cx"> #import &lt;WebCore/AXObjectCache.h&gt;
</span><span class="lines">@@ -443,6 +448,11 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+NSWindow *WebViewImpl::window()
+{
+    return m_view.window;
+}
+
</ins><span class="cx"> std::unique_ptr&lt;WebKit::DrawingAreaProxy&gt; WebViewImpl::createDrawingAreaProxy()
</span><span class="cx"> {
</span><span class="cx">     if ([[[NSUserDefaults standardUserDefaults] objectForKey:@&quot;WebKit2UseRemoteLayerTreeDrawingArea&quot;] boolValue])
</span><span class="lines">@@ -1862,6 +1872,42 @@
</span><span class="cx">     if (thumbnailView._waitingForSnapshot &amp;&amp; m_view.window)
</span><span class="cx">         reparentLayerTreeInThumbnailView();
</span><span class="cx"> }
</span><ins>+
+void WebViewImpl::setInspectorAttachmentView(NSView *newView)
+{
+    NSView *oldView = m_inspectorAttachmentView.get();
+    if (oldView == newView)
+        return;
+
+    m_inspectorAttachmentView = newView;
+    m_page.inspector()-&gt;attachmentViewDidChange(oldView ? oldView : m_view, newView ? newView : m_view);
+}
+
+NSView *WebViewImpl::inspectorAttachmentView()
+{
+    NSView *attachmentView = m_inspectorAttachmentView.get();
+    return attachmentView ? attachmentView : m_view;
+}
+
+_WKRemoteObjectRegistry *WebViewImpl::remoteObjectRegistry()
+{
+    if (!m_remoteObjectRegistry) {
+        m_remoteObjectRegistry = adoptNS([[_WKRemoteObjectRegistry alloc] _initWithMessageSender:m_page]);
+        m_page.process().processPool().addMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), m_page.pageID(), [m_remoteObjectRegistry remoteObjectRegistry]);
+    }
+
+    return m_remoteObjectRegistry.get();
+}
+
+void WebViewImpl::destroyRemoteObjectRegistry()
+{
+    if (!m_remoteObjectRegistry)
+        return;
+
+    m_page.process().processPool().removeMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), m_page.pageID());
+    [m_remoteObjectRegistry _invalidate];
+    m_remoteObjectRegistry = nil;
+}
</ins><span class="cx"> #endif // WK_API_ENABLED
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (191701 => 191702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2015-10-28 23:11:37 UTC (rev 191701)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2015-10-28 23:17:03 UTC (rev 191702)
</span><span class="lines">@@ -260,8 +260,15 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void showPlatformContextMenu(NSMenu *, WebCore::IntPoint) = 0;
</span><span class="cx"> 
</span><ins>+    virtual void startWindowDrag() = 0;
+    virtual NSWindow *platformWindow() = 0;
+
+#if WK_API_ENABLED
+    virtual NSView *inspectorAttachmentView() = 0;
+    virtual _WKRemoteObjectRegistry *remoteObjectRegistry() = 0;
+#endif
+
</ins><span class="cx"> #if USE(APPKIT)
</span><del>-    virtual WKView* wkView() const = 0;
</del><span class="cx">     virtual void intrinsicContentSizeDidChange(const WebCore::IntSize&amp; intrinsicContentSize) = 0;
</span><span class="cx"> #if USE(DICTATION_ALTERNATIVES)
</span><span class="cx">     virtual uint64_t addDictationAlternatives(const RetainPtr&lt;NSTextAlternatives&gt;&amp;) = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (191701 => 191702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-10-28 23:11:37 UTC (rev 191701)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-10-28 23:17:03 UTC (rev 191702)
</span><span class="lines">@@ -84,6 +84,9 @@
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><ins>+OBJC_CLASS NSView;
+OBJC_CLASS _WKRemoteObjectRegistry;
+
</ins><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><span class="cx"> #include &lt;WebCore/DragActions.h&gt;
</span><span class="cx"> #endif
</span><span class="lines">@@ -166,10 +169,6 @@
</span><span class="cx"> struct WindowFeatures;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if USE(APPKIT)
-OBJC_CLASS WKView;
-#endif
-
</del><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx"> typedef GtkWidget* PlatformWidget;
</span><span class="cx"> #endif
</span><span class="lines">@@ -584,7 +583,14 @@
</span><span class="cx">     void cancelComposition();
</span><span class="cx"> #endif // !USE(ASYNC_NSTEXTINPUTCLIENT)
</span><span class="cx"> 
</span><del>-    WKView* wkView() const;
</del><ins>+    void startWindowDrag();
+    NSWindow *platformWindow();
+
+#if WK_API_ENABLED
+    NSView *inspectorAttachmentView();
+    _WKRemoteObjectRegistry *remoteObjectRegistry();
+#endif
+
</ins><span class="cx">     void intrinsicContentSizeDidChange(const WebCore::IntSize&amp; intrinsicContentSize);
</span><span class="cx">     CGRect boundsOfLayerInLayerBackedWindowCoordinates(CALayer *) const;
</span><span class="cx"> #endif // PLATFORM(MAC)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h (191701 => 191702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2015-10-28 23:11:37 UTC (rev 191701)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2015-10-28 23:17:03 UTC (rev 191702)
</span><span class="lines">@@ -166,7 +166,6 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void recommendedScrollbarStyleDidChange(WebCore::ScrollbarStyle) override;
</span><span class="cx"> 
</span><del>-    virtual WKView* wkView() const override { return m_wkView; }
</del><span class="cx">     virtual void intrinsicContentSizeDidChange(const WebCore::IntSize&amp; intrinsicContentSize) override;
</span><span class="cx"> 
</span><span class="cx"> #if USE(DICTATION_ALTERNATIVES)
</span><span class="lines">@@ -217,6 +216,14 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void didChangeBackgroundColor() override;
</span><span class="cx"> 
</span><ins>+    virtual void startWindowDrag() override;
+    virtual NSWindow *platformWindow() override;
+
+#if WK_API_ENABLED
+    virtual NSView *inspectorAttachmentView() override;
+    virtual _WKRemoteObjectRegistry *remoteObjectRegistry() override;
+#endif
+
</ins><span class="cx">     WKView *m_wkView;
</span><span class="cx">     WKWebView *m_webView;
</span><span class="cx">     WebViewImpl* m_impl { nullptr };
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (191701 => 191702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2015-10-28 23:11:37 UTC (rev 191701)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2015-10-28 23:17:03 UTC (rev 191702)
</span><span class="lines">@@ -199,7 +199,7 @@
</span><span class="cx">     if (activeView.isHiddenOrHasHiddenAncestor)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    if ([m_wkView windowOcclusionDetectionEnabled] &amp;&amp; (activeViewWindow.occlusionState &amp; NSWindowOcclusionStateVisible) != NSWindowOcclusionStateVisible)
</del><ins>+    if (m_impl-&gt;windowOcclusionDetectionEnabled() &amp;&amp; (activeViewWindow.occlusionState &amp; NSWindowOcclusionStateVisible) != NSWindowOcclusionStateVisible)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="lines">@@ -453,7 +453,7 @@
</span><span class="cx"> #if ENABLE(INPUT_TYPE_COLOR)
</span><span class="cx"> RefPtr&lt;WebColorPicker&gt; PageClientImpl::createColorPicker(WebPageProxy* page, const WebCore::Color&amp; initialColor,  const WebCore::IntRect&amp; rect)
</span><span class="cx"> {
</span><del>-    return WebColorPickerMac::create(page, initialColor, rect, wkView());
</del><ins>+    return WebColorPickerMac::create(page, initialColor, rect, m_wkView);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -827,6 +827,28 @@
</span><span class="cx">     CFRelease(m_wkView);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void PageClientImpl::startWindowDrag()
+{
+    m_impl-&gt;startWindowDrag();
+}
+
+NSWindow *PageClientImpl::platformWindow()
+{
+    return m_impl-&gt;window();
+}
+
+#if WK_API_ENABLED
+NSView *PageClientImpl::inspectorAttachmentView()
+{
+    return m_impl-&gt;inspectorAttachmentView();
+}
+
+_WKRemoteObjectRegistry *PageClientImpl::remoteObjectRegistry()
+{
+    return m_impl-&gt;remoteObjectRegistry();
+}
+#endif
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #endif // PLATFORM(MAC)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebInspectorProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm (191701 => 191702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm        2015-10-28 23:11:37 UTC (rev 191701)
+++ trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm        2015-10-28 23:17:03 UTC (rev 191702)
</span><span class="lines">@@ -346,7 +346,7 @@
</span><span class="cx">     ASSERT(!m_inspectorView);
</span><span class="cx">     ASSERT(!m_inspectorProxyObjCAdapter);
</span><span class="cx"> 
</span><del>-    NSView *inspectedView = inspectedPage()-&gt;wkView()._inspectorAttachmentView;
</del><ins>+    NSView *inspectedView = inspectedPage()-&gt;inspectorAttachmentView();
</ins><span class="cx"> 
</span><span class="cx">     NSRect initialRect;
</span><span class="cx">     if (m_isAttached) {
</span><span class="lines">@@ -467,7 +467,7 @@
</span><span class="cx">     if ([m_inspectorWindow styleMask] &amp; NSFullScreenWindowMask)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    NSView *inspectedView = inspectedPage()-&gt;wkView()._inspectorAttachmentView;
</del><ins>+    NSView *inspectedView = inspectedPage()-&gt;inspectorAttachmentView();
</ins><span class="cx">     if ([inspectedView isKindOfClass:[WKView class]])
</span><span class="cx">         return webProcessCanAttach;
</span><span class="cx"> 
</span><span class="lines">@@ -528,7 +528,7 @@
</span><span class="cx">     // If the Web Inspector is no longer in the same window as the inspected view,
</span><span class="cx">     // then we need to reopen the Inspector to get it attached to the right window.
</span><span class="cx">     // This can happen when dragging tabs to another window in Safari.
</span><del>-    if (m_isAttached &amp;&amp; m_inspectorView.get().window != inspectedPage()-&gt;wkView().window) {
</del><ins>+    if (m_isAttached &amp;&amp; m_inspectorView.get().window != inspectedPage()-&gt;platformWindow()) {
</ins><span class="cx">         platformOpen();
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -668,7 +668,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    NSView *inspectedView = inspectedPage()-&gt;wkView()._inspectorAttachmentView;
</del><ins>+    NSView *inspectedView = inspectedPage()-&gt;inspectorAttachmentView();
</ins><span class="cx">     NSRect inspectedViewFrame = [inspectedView frame];
</span><span class="cx">     NSRect inspectorFrame = NSZeroRect;
</span><span class="cx">     NSRect parentBounds = [[inspectedView superview] bounds];
</span><span class="lines">@@ -718,21 +718,21 @@
</span><span class="cx"> 
</span><span class="cx"> unsigned WebInspectorProxy::platformInspectedWindowHeight()
</span><span class="cx"> {
</span><del>-    NSView *inspectedView = inspectedPage()-&gt;wkView()._inspectorAttachmentView;
</del><ins>+    NSView *inspectedView = inspectedPage()-&gt;inspectorAttachmentView();
</ins><span class="cx">     NSRect inspectedViewRect = [inspectedView frame];
</span><span class="cx">     return static_cast&lt;unsigned&gt;(inspectedViewRect.size.height);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> unsigned WebInspectorProxy::platformInspectedWindowWidth()
</span><span class="cx"> {
</span><del>-    NSView *inspectedView = inspectedPage()-&gt;wkView()._inspectorAttachmentView;
</del><ins>+    NSView *inspectedView = inspectedPage()-&gt;inspectorAttachmentView();
</ins><span class="cx">     NSRect inspectedViewRect = [inspectedView frame];
</span><span class="cx">     return static_cast&lt;unsigned&gt;(inspectedViewRect.size.width);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorProxy::platformAttach()
</span><span class="cx"> {
</span><del>-    NSView *inspectedView = inspectedPage()-&gt;wkView()._inspectorAttachmentView;
</del><ins>+    NSView *inspectedView = inspectedPage()-&gt;inspectorAttachmentView();
</ins><span class="cx"> 
</span><span class="cx">     if (m_inspectorWindow) {
</span><span class="cx">         [m_inspectorWindow setDelegate:nil];
</span><span class="lines">@@ -763,7 +763,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorProxy::platformDetach()
</span><span class="cx"> {
</span><del>-    NSView *inspectedView = inspectedPage()-&gt;wkView()._inspectorAttachmentView;
</del><ins>+    NSView *inspectedView = inspectedPage()-&gt;inspectorAttachmentView();
</ins><span class="cx"> 
</span><span class="cx">     [m_inspectorView removeFromSuperview];
</span><span class="cx"> 
</span><span class="lines">@@ -808,7 +808,7 @@
</span><span class="cx"> void WebInspectorProxy::platformStartWindowDrag()
</span><span class="cx"> {
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101100
</span><del>-    [m_inspectorView-&gt;_page-&gt;wkView() _startWindowDrag];
</del><ins>+    m_inspectorView-&gt;_page-&gt;startWindowDrag();
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebPageProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (191701 => 191702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2015-10-28 23:11:37 UTC (rev 191701)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2015-10-28 23:17:03 UTC (rev 191702)
</span><span class="lines">@@ -558,11 +558,6 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WKView* WebPageProxy::wkView() const
-{
-    return m_pageClient.wkView();
-}
-
</del><span class="cx"> void WebPageProxy::intrinsicContentSizeDidChange(const IntSize&amp; intrinsicContentSize)
</span><span class="cx"> {
</span><span class="cx">     m_pageClient.intrinsicContentSizeDidChange(intrinsicContentSize);
</span><span class="lines">@@ -738,6 +733,28 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebPageProxy::startWindowDrag()
+{
+    m_pageClient.startWindowDrag();
+}
+
+NSWindow *WebPageProxy::platformWindow()
+{
+    return m_pageClient.platformWindow();
+}
+
+#if WK_API_ENABLED
+NSView *WebPageProxy::inspectorAttachmentView()
+{
+    return m_pageClient.inspectorAttachmentView();
+}
+
+_WKRemoteObjectRegistry *WebPageProxy::remoteObjectRegistry()
+{
+    return m_pageClient.remoteObjectRegistry();
+}
+#endif
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #endif // PLATFORM(MAC)
</span></span></pre>
</div>
</div>

</body>
</html>