<!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>[179541] 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/179541">179541</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-02-02 22:14:34 -0800 (Mon, 02 Feb 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/179540">r179540</a>.
https://bugs.webkit.org/show_bug.cgi?id=141190

need further investigation to fix !WK_API_ENABLED (32bit)
build. (Requested by brrian_ on #webkit).

Reverted changeset:

&quot;Convert WebInspectorProxy to use WKWebView API for the
inspector view&quot;
https://bugs.webkit.org/show_bug.cgi?id=141037
http://trac.webkit.org/changeset/179540</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKPreferencesmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKPreferencesPrivateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebInspectorProxycpp">trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebInspectorProxyh">trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebInspectorProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (179540 => 179541)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-02-03 05:28:40 UTC (rev 179540)
+++ trunk/Source/WebKit2/ChangeLog        2015-02-03 06:14:34 UTC (rev 179541)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-02-02  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r179540.
+        https://bugs.webkit.org/show_bug.cgi?id=141190
+
+        need further investigation to fix !WK_API_ENABLED (32bit)
+        build. (Requested by brrian_ on #webkit).
+
+        Reverted changeset:
+
+        &quot;Convert WebInspectorProxy to use WKWebView API for the
+        inspector view&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=141037
+        http://trac.webkit.org/changeset/179540
+
</ins><span class="cx"> 2015-02-02  Brian J. Burg  &lt;burg@cs.washington.edu&gt;
</span><span class="cx"> 
</span><span class="cx">         Convert WebInspectorProxy to use WKWebView API for the inspector view
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKPreferencesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm (179540 => 179541)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm        2015-02-03 05:28:40 UTC (rev 179540)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm        2015-02-03 06:14:34 UTC (rev 179541)
</span><span class="lines">@@ -247,26 +247,6 @@
</span><span class="cx">     _preferences-&gt;setDeveloperExtrasEnabled(developerExtrasEnabled);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (BOOL)_logsPageMessagesToSystemConsoleEnabled
-{
-    return _preferences-&gt;logsPageMessagesToSystemConsoleEnabled();
-}
-
-- (void)_setLogsPageMessagesToSystemConsoleEnabled:(BOOL)logsPageMessagesToSystemConsoleEnabled
-{
-    _preferences-&gt;setLogsPageMessagesToSystemConsoleEnabled(logsPageMessagesToSystemConsoleEnabled);
-}
-
-- (BOOL)_allowFileAccessFromFileURLs
-{
-    return _preferences-&gt;allowFileAccessFromFileURLs();
-}
-
-- (void)_setAllowFileAccessFromFileURLs:(BOOL)allowFileAccessFromFileURLs
-{
-    _preferences-&gt;setAllowFileAccessFromFileURLs(allowFileAccessFromFileURLs);
-}
-
</del><span class="cx"> - (BOOL)_isStandalone
</span><span class="cx"> {
</span><span class="cx">     return _preferences-&gt;standalone();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKPreferencesPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h (179540 => 179541)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h        2015-02-03 05:28:40 UTC (rev 179540)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h        2015-02-03 06:14:34 UTC (rev 179541)
</span><span class="lines">@@ -56,10 +56,6 @@
</span><span class="cx"> 
</span><span class="cx"> @property (nonatomic, setter=_setDeveloperExtrasEnabled:) BOOL _developerExtrasEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</span><span class="cx"> 
</span><del>-@property (nonatomic, setter=_setLogsPageMessagesToSystemConsoleEnabled:) BOOL _logsPageMessagesToSystemConsoleEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
-
-@property (nonatomic, setter=_setAllowFileAccessFromFileURLs:) BOOL _allowFileAccessFromFileURLs WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
-
</del><span class="cx"> @property (nonatomic, setter=_setStandalone:, getter=_isStandalone) BOOL _standalone WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</span><span class="cx"> 
</span><span class="cx"> @property (nonatomic, setter=_setDiagnosticLoggingEnabled:) BOOL _diagnosticLoggingEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebInspectorProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp (179540 => 179541)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp        2015-02-03 05:28:40 UTC (rev 179540)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp        2015-02-03 06:14:34 UTC (rev 179541)
</span><span class="lines">@@ -121,9 +121,29 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspectorProxy::WebInspectorProxy(WebPageProxy* page)
</span><span class="cx">     : m_page(page)
</span><ins>+    , m_inspectorPage(nullptr)
+    , m_underTest(false)
+    , m_isVisible(false)
+    , m_isAttached(false)
+    , m_canAttach(false)
+    , m_isProfilingPage(false)
+    , m_showMessageSent(false)
+    , m_ignoreFirstBringToFront(false)
+    , m_attachmentSide(AttachmentSideBottom)
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     , m_closeTimer(RunLoop::main(), this, &amp;WebInspectorProxy::closeTimerFired)
</span><ins>+#elif PLATFORM(GTK) || PLATFORM(EFL)
+    , m_inspectorView(nullptr)
+    , m_inspectorWindow(nullptr)
+#if PLATFORM(GTK)
+    , m_headerBar(nullptr)
+    , m_dockBottomButton(nullptr)
+    , m_dockRightButton(nullptr)
</ins><span class="cx"> #endif
</span><ins>+#endif
+#if ENABLE(INSPECTOR_SERVER)
+    , m_remoteInspectionPageId(0)
+#endif
</ins><span class="cx"> {
</span><span class="cx">     m_level = WebInspectorPageGroups::singleton().inspectorLevel(m_page-&gt;pageGroup());
</span><span class="cx">     m_page-&gt;process().addMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_page-&gt;pageID(), *this);
</span><span class="lines">@@ -138,11 +158,6 @@
</span><span class="cx">     return WebInspectorPageGroups::singleton().inspectorPageGroupForLevel(m_level);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebPreferences&amp; WebInspectorProxy::inspectorPagePreferences() const
-{
-    return inspectorPageGroup()-&gt;preferences();
-}
-
</del><span class="cx"> void WebInspectorProxy::invalidate()
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR_SERVER)
</span><span class="lines">@@ -278,10 +293,10 @@
</span><span class="cx">     m_isAttached = true;
</span><span class="cx">     m_attachmentSide = side;
</span><span class="cx"> 
</span><del>-    inspectorPagePreferences().setInspectorAttachmentSide(side);
</del><ins>+    inspectorPageGroup()-&gt;preferences().setInspectorAttachmentSide(side);
</ins><span class="cx"> 
</span><span class="cx">     if (m_isVisible)
</span><del>-        inspectorPagePreferences().setInspectorStartsAttached(true);
</del><ins>+        inspectorPageGroup()-&gt;preferences().setInspectorStartsAttached(true);
</ins><span class="cx"> 
</span><span class="cx">     m_page-&gt;process().send(Messages::WebInspector::SetAttached(true), m_page-&gt;pageID());
</span><span class="cx"> 
</span><span class="lines">@@ -306,7 +321,7 @@
</span><span class="cx">     m_isAttached = false;
</span><span class="cx"> 
</span><span class="cx">     if (m_isVisible)
</span><del>-        inspectorPagePreferences().setInspectorStartsAttached(false);
</del><ins>+        inspectorPageGroup()-&gt;preferences().setInspectorStartsAttached(false);
</ins><span class="cx"> 
</span><span class="cx">     m_page-&gt;process().send(Messages::WebInspector::SetAttached(false), m_page-&gt;pageID());
</span><span class="cx">     m_inspectorPage-&gt;process().send(Messages::WebInspectorUI::Detached(), m_inspectorPage-&gt;pageID());
</span><span class="lines">@@ -316,13 +331,13 @@
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorProxy::setAttachedWindowHeight(unsigned height)
</span><span class="cx"> {
</span><del>-    inspectorPagePreferences().setInspectorAttachedHeight(height);
</del><ins>+    inspectorPageGroup()-&gt;preferences().setInspectorAttachedHeight(height);
</ins><span class="cx">     platformSetAttachedWindowHeight(height);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorProxy::setAttachedWindowWidth(unsigned width)
</span><span class="cx"> {
</span><del>-    inspectorPagePreferences().setInspectorAttachedWidth(width);
</del><ins>+    inspectorPageGroup()-&gt;preferences().setInspectorAttachedWidth(width);
</ins><span class="cx">     platformSetAttachedWindowWidth(width);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -524,7 +539,7 @@
</span><span class="cx">     if (!m_underTest) {
</span><span class="cx">         m_canAttach = canAttach;
</span><span class="cx">         m_isAttached = shouldOpenAttached();
</span><del>-        m_attachmentSide = static_cast&lt;AttachmentSide&gt;(inspectorPagePreferences().inspectorAttachmentSide());
</del><ins>+        m_attachmentSide = static_cast&lt;AttachmentSide&gt;(inspectorPageGroup()-&gt;preferences().inspectorAttachmentSide());
</ins><span class="cx"> 
</span><span class="cx">         m_page-&gt;process().send(Messages::WebInspector::SetAttached(m_isAttached), m_page-&gt;pageID());
</span><span class="cx"> 
</span><span class="lines">@@ -618,7 +633,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool WebInspectorProxy::shouldOpenAttached()
</span><span class="cx"> {
</span><del>-    return inspectorPagePreferences().inspectorStartsAttached() &amp;&amp; canAttach();
</del><ins>+    return inspectorPageGroup()-&gt;preferences().inspectorStartsAttached() &amp;&amp; canAttach();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INSPECTOR_SERVER)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebInspectorProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h (179540 => 179541)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h        2015-02-03 05:28:40 UTC (rev 179540)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h        2015-02-03 06:14:34 UTC (rev 179541)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include &quot;Attachment.h&quot;
</span><span class="cx"> #include &quot;MessageReceiver.h&quot;
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><ins>+#include &lt;wtf/PassRefPtr.h&gt;
</ins><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -44,7 +45,7 @@
</span><span class="cx"> OBJC_CLASS NSURL;
</span><span class="cx"> OBJC_CLASS NSWindow;
</span><span class="cx"> OBJC_CLASS WKWebInspectorProxyObjCAdapter;
</span><del>-OBJC_CLASS WKWebInspectorWKWebView;
</del><ins>+OBJC_CLASS WKWebInspectorWKView;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK)
</span><span class="lines">@@ -61,7 +62,6 @@
</span><span class="cx"> class WebFrameProxy;
</span><span class="cx"> class WebPageGroup;
</span><span class="cx"> class WebPageProxy;
</span><del>-class WebPreferences;
</del><span class="cx"> class WebProcessPool;
</span><span class="cx"> 
</span><span class="cx"> enum AttachmentSide {
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx">     void close();
</span><span class="cx"> 
</span><span class="cx">     void didRelaunchInspectorPageProcess();
</span><del>-
</del><ins>+    
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     void createInspectorWindow();
</span><span class="cx">     void updateInspectorWindowTitle() const;
</span><span class="lines">@@ -192,10 +192,7 @@
</span><span class="cx"> 
</span><span class="cx">     void open();
</span><span class="cx"> 
</span><del>-    // FIXME: this should return the page group identifier, not an instance. The Mac port cannot
-    // directly provide a page group instance, and instances are not necessary to compute levels.
</del><span class="cx">     WebPageGroup* inspectorPageGroup() const;
</span><del>-    WebPreferences&amp; inspectorPagePreferences() const;
</del><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK) || PLATFORM(EFL)
</span><span class="cx">     void createInspectorWindow();
</span><span class="lines">@@ -212,16 +209,16 @@
</span><span class="cx">     static const unsigned initialWindowWidth;
</span><span class="cx">     static const unsigned initialWindowHeight;
</span><span class="cx"> 
</span><del>-    WebPageProxy* m_page {nullptr};
-    WebPageProxy* m_inspectorPage {nullptr};
</del><ins>+    WebPageProxy* m_page;
+    WebPageProxy* m_inspectorPage;
</ins><span class="cx"> 
</span><del>-    bool m_underTest {false};
-    bool m_isVisible {false};
-    bool m_isAttached {false};
-    bool m_canAttach {false};
-    bool m_isProfilingPage {false};
-    bool m_showMessageSent {false};
-    bool m_ignoreFirstBringToFront {false};
</del><ins>+    bool m_underTest;
+    bool m_isVisible;
+    bool m_isAttached;
+    bool m_canAttach;
+    bool m_isProfilingPage;
+    bool m_showMessageSent;
+    bool m_ignoreFirstBringToFront;
</ins><span class="cx"> 
</span><span class="cx">     // The debugger stops all the pages in the same PageGroup. Having
</span><span class="cx">     // all the inspectors in the same group will make it impossible to debug
</span><span class="lines">@@ -230,10 +227,10 @@
</span><span class="cx">     
</span><span class="cx">     IPC::Attachment m_connectionIdentifier;
</span><span class="cx"> 
</span><del>-    AttachmentSide m_attachmentSide {AttachmentSideBottom};
</del><ins>+    AttachmentSide m_attachmentSide;
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-    RetainPtr&lt;WKWebInspectorWKWebView&gt; m_inspectorView;
</del><ins>+    RetainPtr&lt;WKWebInspectorWKView&gt; m_inspectorView;
</ins><span class="cx">     RetainPtr&lt;NSWindow&gt; m_inspectorWindow;
</span><span class="cx">     RetainPtr&lt;NSButton&gt; m_dockBottomButton;
</span><span class="cx">     RetainPtr&lt;NSButton&gt; m_dockRightButton;
</span><span class="lines">@@ -243,18 +240,18 @@
</span><span class="cx">     String m_urlString;
</span><span class="cx"> #elif PLATFORM(GTK)
</span><span class="cx">     WebInspectorClientGtk m_client;
</span><del>-    GtkWidget* m_inspectorView {nullptr};
-    GtkWidget* m_inspectorWindow {nullptr};
-    GtkWidget* m_headerBar {nullptr};
-    GtkWidget* m_dockBottomButton {nullptr};
-    GtkWidget* m_dockRightButton {nullptr};
</del><ins>+    GtkWidget* m_inspectorView;
+    GtkWidget* m_inspectorWindow;
+    GtkWidget* m_headerBar;
+    GtkWidget* m_dockBottomButton;
+    GtkWidget* m_dockRightButton;
</ins><span class="cx">     String m_inspectedURLString;
</span><span class="cx"> #elif PLATFORM(EFL)
</span><del>-    Evas_Object* m_inspectorView {nullptr};
-    Ecore_Evas* m_inspectorWindow {nullptr};
</del><ins>+    Evas_Object* m_inspectorView;
+    Ecore_Evas* m_inspectorWindow;
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(INSPECTOR_SERVER)
</span><del>-    int m_remoteInspectionPageId {0};
</del><ins>+    int m_remoteInspectionPageId;
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebInspectorProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm (179540 => 179541)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm        2015-02-03 05:28:40 UTC (rev 179540)
+++ trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm        2015-02-03 06:14:34 UTC (rev 179541)
</span><span class="lines">@@ -33,18 +33,15 @@
</span><span class="cx"> #import &quot;WKMutableArray.h&quot;
</span><span class="cx"> #import &quot;WKOpenPanelParameters.h&quot;
</span><span class="cx"> #import &quot;WKOpenPanelResultListener.h&quot;
</span><del>-#import &quot;WKPreferencesInternal.h&quot;
-#import &quot;WKProcessPoolInternal.h&quot;
</del><span class="cx"> #import &quot;WKRetainPtr.h&quot;
</span><span class="cx"> #import &quot;WKURLCF.h&quot;
</span><span class="cx"> #import &quot;WKViewInternal.h&quot;
</span><del>-#import &quot;WKWebViewConfigurationPrivate.h&quot;
-#import &quot;WKWebViewInternal.h&quot;
</del><span class="cx"> #import &quot;WebInspectorMessages.h&quot;
</span><span class="cx"> #import &quot;WebInspectorUIMessages.h&quot;
</span><span class="cx"> #import &quot;WebPageGroup.h&quot;
</span><span class="cx"> #import &quot;WebPageProxy.h&quot;
</span><span class="cx"> #import &quot;WebPreferences.h&quot;
</span><ins>+#import &quot;WebProcessPool.h&quot;
</ins><span class="cx"> #import &quot;WebProcessProxy.h&quot;
</span><span class="cx"> #import &lt;QuartzCore/CoreAnimation.h&gt;
</span><span class="cx"> #import &lt;WebCore/InspectorFrontendClientLocal.h&gt;
</span><span class="lines">@@ -173,7 +170,7 @@
</span><span class="cx"> 
</span><span class="cx"> @end
</span><span class="cx"> 
</span><del>-@interface WKWebInspectorWKWebView : WKWebView {
</del><ins>+@interface WKWebInspectorWKView : WKView {
</ins><span class="cx"> @private
</span><span class="cx">     WKWebInspectorProxyObjCAdapter *_inspectorProxyObjCAdapter;
</span><span class="cx"> }
</span><span class="lines">@@ -181,7 +178,7 @@
</span><span class="cx"> @property (nonatomic, assign) WKWebInspectorProxyObjCAdapter *inspectorProxyObjCAdapter;
</span><span class="cx"> @end
</span><span class="cx"> 
</span><del>-@implementation WKWebInspectorWKWebView
</del><ins>+@implementation WKWebInspectorWKView
</ins><span class="cx"> 
</span><span class="cx"> @synthesize inspectorProxyObjCAdapter = _inspectorProxyObjCAdapter;
</span><span class="cx"> 
</span><span class="lines">@@ -192,6 +189,8 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_didRelaunchProcess
</span><span class="cx"> {
</span><ins>+    [super _didRelaunchProcess];
+
</ins><span class="cx">     [self.inspectorProxyObjCAdapter didRelaunchProcess];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -313,7 +312,8 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (m_inspectorView) {
</span><del>-        m_inspectorView-&gt;_page-&gt;close();
</del><ins>+        WebPageProxy* inspectorPage = toImpl(m_inspectorView.get().pageRef);
+        inspectorPage-&gt;close();
</ins><span class="cx">         [m_inspectorView setInspectorProxyObjCAdapter:nil];
</span><span class="cx">         m_inspectorView = nil;
</span><span class="cx">     }
</span><span class="lines">@@ -331,7 +331,7 @@
</span><span class="cx">     dockButton.autoresizingMask = NSViewMinXMargin | NSViewMinYMargin;
</span><span class="cx"> 
</span><span class="cx">     // Get the dock image and make it a template so the button cell effects will apply.
</span><del>-    NSImage *dockImage = [[NSBundle bundleForClass:[WKWebInspectorWKWebView class]] imageForResource:imageName];
</del><ins>+    NSImage *dockImage = [[NSBundle bundleForClass:[WKWebInspectorWKView class]] imageForResource:imageName];
</ins><span class="cx">     [dockImage setTemplate:YES];
</span><span class="cx"> 
</span><span class="cx">     // Set the dock image on the button cell.
</span><span class="lines">@@ -453,7 +453,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (m_inspectorView) {
</span><span class="cx">         ASSERT(m_inspectorProxyObjCAdapter);
</span><del>-        return m_inspectorView-&gt;_page.get();
</del><ins>+        return toImpl(m_inspectorView.get().pageRef);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!m_inspectorView);
</span><span class="lines">@@ -465,10 +465,10 @@
</span><span class="cx"> 
</span><span class="cx">         switch (m_attachmentSide) {
</span><span class="cx">         case AttachmentSideBottom:
</span><del>-            initialRect = NSMakeRect(0, 0, NSWidth(inspectedViewFrame), inspectorPagePreferences().inspectorAttachedHeight());
</del><ins>+            initialRect = NSMakeRect(0, 0, NSWidth(inspectedViewFrame), inspectorPageGroup()-&gt;preferences().inspectorAttachedHeight());
</ins><span class="cx">             break;
</span><span class="cx">         case AttachmentSideRight:
</span><del>-            initialRect = NSMakeRect(0, 0, inspectorPagePreferences().inspectorAttachedWidth(), NSHeight(inspectedViewFrame));
</del><ins>+            initialRect = NSMakeRect(0, 0, inspectorPageGroup()-&gt;preferences().inspectorAttachedWidth(), NSHeight(inspectedViewFrame));
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">     } else {
</span><span class="lines">@@ -480,33 +480,19 @@
</span><span class="cx">             initialRect = [NSWindow contentRectForFrameRect:windowFrame styleMask:windowStyleMask];
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
-    WKPreferences *preferences = [configuration preferences];
-#ifndef NDEBUG
-    // Allow developers to inspect the Web Inspector in debug builds without changing settings.
-    preferences._developerExtrasEnabled = YES;
-    preferences._logsPageMessagesToSystemConsoleEnabled = YES;
-#endif
-    preferences._allowFileAccessFromFileURLs = YES;
-    [configuration setProcessPool: ::WebKit::wrapper(inspectorProcessPool())];
-    [configuration _setGroupIdentifier:inspectorPageGroup()-&gt;identifier()];
-
-    m_inspectorView = adoptNS([[WKWebInspectorWKWebView alloc] initWithFrame:initialRect configuration:configuration.get()]);
</del><ins>+    m_inspectorView = adoptNS([[WKWebInspectorWKView alloc] initWithFrame:initialRect contextRef:toAPI(&amp;inspectorProcessPool()) pageGroupRef:toAPI(inspectorPageGroup()) relatedToPage:nullptr]);
</ins><span class="cx">     ASSERT(m_inspectorView);
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1090
-    [m_inspectorView _setDrawsTransparentBackground:YES];
</del><ins>+#if __MAC_OS_X_VERSION_MIN_REQUIRED &lt;= 1090
+    [m_inspectorView setDrawsBackground:NO];
</ins><span class="cx"> #endif
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
-    [m_inspectorView _setAutomaticallyAdjustsContentInsets:NO];
-#endif
</del><span class="cx"> 
</span><span class="cx">     m_inspectorProxyObjCAdapter = adoptNS([[WKWebInspectorProxyObjCAdapter alloc] initWithWebInspectorProxy:this]);
</span><span class="cx">     ASSERT(m_inspectorProxyObjCAdapter);
</span><span class="cx"> 
</span><span class="cx">     [m_inspectorView setInspectorProxyObjCAdapter:m_inspectorProxyObjCAdapter.get()];
</span><span class="cx"> 
</span><del>-    WebPageProxy* inspectorPage = m_inspectorView-&gt;_page.get();
</del><ins>+    WebPageProxy* inspectorPage = toImpl(m_inspectorView.get().pageRef);
</ins><span class="cx">     ASSERT(inspectorPage);
</span><span class="cx"> 
</span><span class="cx">     WKPageUIClientV2 uiClient = {
</span><span class="lines">@@ -803,16 +789,16 @@
</span><span class="cx"> 
</span><span class="cx">     [m_inspectorView removeFromSuperview];
</span><span class="cx"> 
</span><ins>+    [m_inspectorView setAutoresizingMask:NSViewWidthSizable | NSViewMaxYMargin];
+
</ins><span class="cx">     CGFloat currentDimension;
</span><span class="cx"> 
</span><span class="cx">     switch (m_attachmentSide) {
</span><span class="cx">     case AttachmentSideBottom:
</span><del>-        [m_inspectorView setAutoresizingMask:NSViewWidthSizable | NSViewMaxYMargin];
-        currentDimension = inspectorPagePreferences().inspectorAttachedHeight();
</del><ins>+        currentDimension = inspectorPageGroup()-&gt;preferences().inspectorAttachedHeight();
</ins><span class="cx">         break;
</span><span class="cx">     case AttachmentSideRight:
</span><del>-        [m_inspectorView setAutoresizingMask:NSViewHeightSizable | NSViewMinXMargin];
-        currentDimension = inspectorPagePreferences().inspectorAttachedWidth();
</del><ins>+        currentDimension = inspectorPageGroup()-&gt;preferences().inspectorAttachedWidth();
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>