<!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>[189654] trunk/Source</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/189654">189654</a></dd>
<dt>Author</dt> <dd>bburg@apple.com</dd>
<dt>Date</dt> <dd>2015-09-12 10:44:40 -0700 (Sat, 12 Sep 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: disambiguate inspected/frontend controllers and pages in backend code
https://bugs.webkit.org/show_bug.cgi?id=149071
Reviewed by Joseph Pecoraro.
Source/WebCore:
Be consistent about prefixing pages, inspector controllers, and window controllers
with either "frontend" or "inspected", as appropriate. This change makes obvious some bugs
in the frontend connection code, which are tracked by https://webkit.org/b/149006.
No new tests, no behavior change.
* WebCore.order:
* inspector/InspectorClient.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::inspectedPageDestroyed):
(WebCore::InspectorController::show):
(WebCore::InspectorController::close):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
(WebCore::InspectorFrontendClientLocal::~InspectorFrontendClientLocal):
(WebCore::InspectorFrontendClientLocal::canAttachWindow):
(WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight):
(WebCore::InspectorFrontendClientLocal::changeAttachedWindowWidth):
(WebCore::InspectorFrontendClientLocal::openInNewTab):
(WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight):
(WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):
(WebCore::InspectorFrontendClientLocal::isUnderTest):
* inspector/InspectorFrontendClientLocal.h:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::freePage):
* loader/EmptyClients.h:
Source/WebKit/ios:
* WebCoreSupport/WebInspectorClientIOS.mm:
(WebInspectorClient::WebInspectorClient):
(WebInspectorClient::inspectedPageDestroyed): Renamed.
(WebInspectorClient::openLocalFrontend): Renamed.
(WebInspectorClient::closeLocalFrontend): Renamed.
(WebInspectorClient::inspectorDestroyed): Deleted.
(WebInspectorClient::openInspectorFrontend): Deleted.
(WebInspectorClient::closeInspectorFrontend): Deleted.
(WebInspectorClient::showInspectorIndication):
(WebInspectorClient::hideInspectorIndication):
(WebInspectorClient::didSetSearchingForNode):
(WebInspectorFrontendClient::WebInspectorFrontendClient):
Source/WebKit/mac:
Be consistent about prefixing pages, inspector controllers, and window controllers
with either "frontend" or "inspected", as appropriate. This change makes obvious some bugs
in the frontend connection code, which are tracked by https://webkit.org/b/149006.
* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorClient::WebInspectorClient): Renamed.
(WebInspectorClient::inspectedPageDestroyed): Renamed.
(WebInspectorClient::openLocalFrontend): Renamed.
(WebInspectorClient::closeLocalFrontend): Renamed.
(WebInspectorClient::didSetSearchingForNode):
(WebInspectorFrontendClient::WebInspectorFrontendClient):
(WebInspectorFrontendClient::attachAvailabilityChanged):
(WebInspectorFrontendClient::canAttach):
(WebInspectorFrontendClient::frontendLoaded):
(WebInspectorFrontendClient::startWindowDrag):
(WebInspectorFrontendClient::bringToFront):
(WebInspectorFrontendClient::closeWindow):
(WebInspectorFrontendClient::disconnectFromBackend):
(WebInspectorFrontendClient::attachWindow):
(WebInspectorFrontendClient::detachWindow):
(WebInspectorFrontendClient::setAttachedWindowHeight):
(WebInspectorFrontendClient::setToolbarHeight):
(WebInspectorFrontendClient::updateWindowTitle):
(WebInspectorFrontendClient::save):
(WebInspectorFrontendClient::append):
(-[WebInspectorWindowController init]):
(-[WebInspectorWindowController initWithInspectedWebView:isUnderTest:]):
(-[WebInspectorWindowController dealloc]):
(-[WebInspectorWindowController frontendWebView]):
(-[WebInspectorWindowController close]):
(-[WebInspectorWindowController showWindow:]):
(-[WebInspectorWindowController setAttachedWindowHeight:]):
(-[WebInspectorWindowController destroyInspectorView]):
(-[WebInspectorWindowController webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:]):
(WebInspectorClient::inspectorDestroyed): Deleted.
(WebInspectorClient::openInspectorFrontend): Deleted.
(WebInspectorClient::closeInspectorFrontend): Deleted.
(-[WebInspectorWindowController webView]): Deleted.
* WebInspector/WebInspector.h:
* WebInspector/WebInspector.mm:
(-[WebInspector initWithInspectedWebView:]): Renamed.
(-[WebInspector inspectedWebViewClosed]): Renamed.
(-[WebInspector showWindow]):
(-[WebInspector close:]):
(-[WebInspector evaluateInFrontend:script:]):
(-[WebInspector releaseFrontend]):
(-[WebInspector initWithWebView:]): Deleted.
(-[WebInspector webViewClosed]): Deleted.
* WebView/WebView.mm:
(-[WebView _close]):
(-[WebView inspector]):
Source/WebKit/win:
Be consistent about prefixing pages, inspector controllers, and window controllers
with either "frontend" or "inspected", as appropriate. This change makes obvious some bugs
in the frontend connection code, which are tracked by https://webkit.org/b/149006.
* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorClient::inspectedPageDestroyed): Renamed.
(WebInspectorClient::openLocalFrontend): Renamed.
(WebInspectorClient::closeLocalFrontend): Renamed.
(WebInspectorClient::inspectorDestroyed): Deleted.
(WebInspectorClient::openInspectorFrontend): Deleted.
(WebInspectorClient::closeInspectorFrontend): Deleted.
* WebCoreSupport/WebInspectorClient.h:
* WebInspector.cpp:
(WebInspector::createInstance):
(WebInspector::WebInspector):
(WebInspector::inspectedWebViewClosed): Renamed.
(WebInspector::show):
(WebInspector::close):
(WebInspector::isJavaScriptProfilingEnabled):
(WebInspector::setJavaScriptProfilingEnabled):
(WebInspector::evaluateInFrontend):
(WebInspector::webViewClosed): Deleted.
* WebInspector.h:
* WebView.cpp:
(WebView::close):
Source/WebKit2:
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::inspectedPageDestroyed): Renamed.
(WebKit::WebInspectorClient::openLocalFrontend): Renamed.
(WebKit::WebInspectorClient::closeLocalFrontend): Renamed.
(WebKit::WebInspectorClient::inspectorDestroyed): Deleted.
(WebKit::WebInspectorClient::openInspectorFrontend): Deleted.
(WebKit::WebInspectorClient::closeInspectorFrontend): Deleted.
* WebProcess/WebCoreSupport/WebInspectorClient.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorClienth">trunk/Source/WebCore/inspector/InspectorClient.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorControllercpp">trunk/Source/WebCore/inspector/InspectorController.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorFrontendClientLocalcpp">trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorFrontendClientLocalh">trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorOverlaycpp">trunk/Source/WebCore/inspector/InspectorOverlay.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderEmptyClientsh">trunk/Source/WebCore/loader/EmptyClients.h</a></li>
<li><a href="#trunkSourceWebKitiosChangeLog">trunk/Source/WebKit/ios/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitiosWebCoreSupportWebInspectorClientIOSmm">trunk/Source/WebKit/ios/WebCoreSupport/WebInspectorClientIOS.mm</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebInspectorClienth">trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebInspectorClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebInspectorWebInspectorh">trunk/Source/WebKit/mac/WebInspector/WebInspector.h</a></li>
<li><a href="#trunkSourceWebKitmacWebInspectorWebInspectormm">trunk/Source/WebKit/mac/WebInspector/WebInspector.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebInspectorClientcpp">trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebInspectorClienth">trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h</a></li>
<li><a href="#trunkSourceWebKitwinWebInspectorcpp">trunk/Source/WebKit/win/WebInspector.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebInspectorh">trunk/Source/WebKit/win/WebInspector.h</a></li>
<li><a href="#trunkSourceWebKitwinWebViewcpp">trunk/Source/WebKit/win/WebView.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebInspectorClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebInspectorClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebCore/ChangeLog        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2015-09-12 Brian Burg <bburg@apple.com>
+
+ Web Inspector: disambiguate inspected/frontend controllers and pages in backend code
+ https://bugs.webkit.org/show_bug.cgi?id=149071
+
+ Reviewed by Joseph Pecoraro.
+
+ Be consistent about prefixing pages, inspector controllers, and window controllers
+ with either "frontend" or "inspected", as appropriate. This change makes obvious some bugs
+ in the frontend connection code, which are tracked by https://webkit.org/b/149006.
+
+ No new tests, no behavior change.
+
+ * WebCore.order:
+ * inspector/InspectorClient.h:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::inspectedPageDestroyed):
+ (WebCore::InspectorController::show):
+ (WebCore::InspectorController::close):
+ * inspector/InspectorFrontendClientLocal.cpp:
+ (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
+ (WebCore::InspectorFrontendClientLocal::~InspectorFrontendClientLocal):
+ (WebCore::InspectorFrontendClientLocal::canAttachWindow):
+ (WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight):
+ (WebCore::InspectorFrontendClientLocal::changeAttachedWindowWidth):
+ (WebCore::InspectorFrontendClientLocal::openInNewTab):
+ (WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight):
+ (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):
+ (WebCore::InspectorFrontendClientLocal::isUnderTest):
+ * inspector/InspectorFrontendClientLocal.h:
+ * inspector/InspectorOverlay.cpp:
+ (WebCore::InspectorOverlay::freePage):
+ * loader/EmptyClients.h:
+
</ins><span class="cx"> 2015-09-12 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> ChildNode.replaceWith() without argument should replace the node with an empty DocumentFragment
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorClient.h (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorClient.h        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebCore/inspector/InspectorClient.h        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -46,10 +46,10 @@
</span><span class="cx"> public:
</span><span class="cx"> virtual ~InspectorClient() { }
</span><span class="cx">
</span><del>- virtual void inspectorDestroyed() = 0;
</del><ins>+ virtual void inspectedPageDestroyed() = 0;
</ins><span class="cx">
</span><del>- virtual Inspector::FrontendChannel* openInspectorFrontend(InspectorController*) = 0;
- virtual void closeInspectorFrontend() = 0;
</del><ins>+ virtual Inspector::FrontendChannel* openLocalFrontend(InspectorController*) = 0;
+ virtual void closeLocalFrontend() = 0;
</ins><span class="cx"> virtual void bringFrontendToFront() = 0;
</span><span class="cx"> virtual void didResizeMainFrame(Frame*) { }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorController.cpp (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorController.cpp        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebCore/inspector/InspectorController.cpp        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -199,7 +199,7 @@
</span><span class="cx"> disconnectAllFrontends();
</span><span class="cx">
</span><span class="cx"> m_injectedScriptManager->disconnect();
</span><del>- m_inspectorClient->inspectorDestroyed();
</del><ins>+ m_inspectorClient->inspectedPageDestroyed();
</ins><span class="cx"> m_inspectorClient = nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -319,14 +319,14 @@
</span><span class="cx">
</span><span class="cx"> if (m_frontendRouter->hasLocalFrontend())
</span><span class="cx"> m_inspectorClient->bringFrontendToFront();
</span><del>- else if (Inspector::FrontendChannel* frontendChannel = m_inspectorClient->openInspectorFrontend(this))
</del><ins>+ else if (Inspector::FrontendChannel* frontendChannel = m_inspectorClient->openLocalFrontend(this))
</ins><span class="cx"> connectFrontend(frontendChannel);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InspectorController::close()
</span><span class="cx"> {
</span><span class="cx"> if (m_frontendRouter->hasLocalFrontend())
</span><del>- m_inspectorClient->closeInspectorFrontend();
</del><ins>+ m_inspectorClient->closeLocalFrontend();
</ins><span class="cx">
</span><span class="cx"> ASSERT(!m_frontendRouter->hasLocalFrontend());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorFrontendClientLocalcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -128,7 +128,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> InspectorFrontendClientLocal::InspectorFrontendClientLocal(InspectorController* inspectedPageController, Page* frontendPage, std::unique_ptr<Settings> settings)
</span><del>- : m_inspectorController(inspectedPageController)
</del><ins>+ : m_inspectedPageController(inspectedPageController)
</ins><span class="cx"> , m_frontendPage(frontendPage)
</span><span class="cx"> , m_settings(WTF::move(settings))
</span><span class="cx"> , m_dockSide(DockSide::Undocked)
</span><span class="lines">@@ -142,7 +142,7 @@
</span><span class="cx"> if (m_frontendHost)
</span><span class="cx"> m_frontendHost->disconnectClient();
</span><span class="cx"> m_frontendPage = nullptr;
</span><del>- m_inspectorController = nullptr;
</del><ins>+ m_inspectedPageController = nullptr;
</ins><span class="cx"> m_dispatchTask->reset();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -184,7 +184,7 @@
</span><span class="cx"> bool InspectorFrontendClientLocal::canAttachWindow()
</span><span class="cx"> {
</span><span class="cx"> // Don't allow attaching to another inspector -- two inspectors in one window is too much!
</span><del>- bool isInspectorPage = m_inspectorController->hasInspectorFrontendClient();
</del><ins>+ bool isInspectorPage = m_inspectedPageController->hasInspectorFrontendClient();
</ins><span class="cx"> if (isInspectorPage)
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="lines">@@ -193,8 +193,8 @@
</span><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> // Don't allow the attach if the window would be too small to accommodate the minimum inspector size.
</span><del>- unsigned inspectedPageHeight = m_inspectorController->inspectedPage().mainFrame().view()->visibleHeight();
- unsigned inspectedPageWidth = m_inspectorController->inspectedPage().mainFrame().view()->visibleWidth();
</del><ins>+ unsigned inspectedPageHeight = m_inspectedPageController->inspectedPage().mainFrame().view()->visibleHeight();
+ unsigned inspectedPageWidth = m_inspectedPageController->inspectedPage().mainFrame().view()->visibleWidth();
</ins><span class="cx"> unsigned maximumAttachedHeight = inspectedPageHeight * maximumAttachedHeightRatio;
</span><span class="cx"> return minimumAttachedHeight <= maximumAttachedHeight && minimumAttachedWidth <= inspectedPageWidth;
</span><span class="cx"> }
</span><span class="lines">@@ -206,7 +206,7 @@
</span><span class="cx">
</span><span class="cx"> void InspectorFrontendClientLocal::changeAttachedWindowHeight(unsigned height)
</span><span class="cx"> {
</span><del>- unsigned totalHeight = m_frontendPage->mainFrame().view()->visibleHeight() + m_inspectorController->inspectedPage().mainFrame().view()->visibleHeight();
</del><ins>+ unsigned totalHeight = m_frontendPage->mainFrame().view()->visibleHeight() + m_inspectedPageController->inspectedPage().mainFrame().view()->visibleHeight();
</ins><span class="cx"> unsigned attachedHeight = constrainedAttachedWindowHeight(height, totalHeight);
</span><span class="cx"> m_settings->setProperty(inspectorAttachedHeightSetting, String::number(attachedHeight));
</span><span class="cx"> setAttachedWindowHeight(attachedHeight);
</span><span class="lines">@@ -214,7 +214,7 @@
</span><span class="cx">
</span><span class="cx"> void InspectorFrontendClientLocal::changeAttachedWindowWidth(unsigned width)
</span><span class="cx"> {
</span><del>- unsigned totalWidth = m_frontendPage->mainFrame().view()->visibleWidth() + m_inspectorController->inspectedPage().mainFrame().view()->visibleWidth();
</del><ins>+ unsigned totalWidth = m_frontendPage->mainFrame().view()->visibleWidth() + m_inspectedPageController->inspectedPage().mainFrame().view()->visibleWidth();
</ins><span class="cx"> unsigned attachedWidth = constrainedAttachedWindowWidth(width, totalWidth);
</span><span class="cx"> setAttachedWindowWidth(attachedWidth);
</span><span class="cx"> }
</span><span class="lines">@@ -222,7 +222,7 @@
</span><span class="cx"> void InspectorFrontendClientLocal::openInNewTab(const String& url)
</span><span class="cx"> {
</span><span class="cx"> UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
</span><del>- Frame& mainFrame = m_inspectorController->inspectedPage().mainFrame();
</del><ins>+ Frame& mainFrame = m_inspectedPageController->inspectedPage().mainFrame();
</ins><span class="cx"> FrameLoadRequest request(mainFrame.document()->securityOrigin(), ResourceRequest(), "_blank", LockHistory::No, LockBackForwardList::No, MaybeSendReferrer, AllowNavigationToInvalidURL::Yes, NewFrameOpenerPolicy::Allow, ReplaceDocumentIfJavaScriptURL, ShouldOpenExternalURLsPolicy::ShouldNotAllow);
</span><span class="cx">
</span><span class="cx"> bool created;
</span><span class="lines">@@ -269,7 +269,7 @@
</span><span class="cx">
</span><span class="cx"> void InspectorFrontendClientLocal::restoreAttachedWindowHeight()
</span><span class="cx"> {
</span><del>- unsigned inspectedPageHeight = m_inspectorController->inspectedPage().mainFrame().view()->visibleHeight();
</del><ins>+ unsigned inspectedPageHeight = m_inspectedPageController->inspectedPage().mainFrame().view()->visibleHeight();
</ins><span class="cx"> String value = m_settings->getProperty(inspectorAttachedHeightSetting);
</span><span class="cx"> unsigned preferredHeight = value.isEmpty() ? defaultAttachedHeight : value.toUInt();
</span><span class="cx">
</span><span class="lines">@@ -332,7 +332,7 @@
</span><span class="cx">
</span><span class="cx"> void InspectorFrontendClientLocal::showMainResourceForFrame(Frame* frame)
</span><span class="cx"> {
</span><del>- String frameId = m_inspectorController->pageAgent()->frameId(frame);
</del><ins>+ String frameId = m_inspectedPageController->pageAgent()->frameId(frame);
</ins><span class="cx"> evaluateOnLoad(String::format("[\"showMainResourceForFrame\", \"%s\"]", frameId.ascii().data()));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -353,7 +353,7 @@
</span><span class="cx">
</span><span class="cx"> bool InspectorFrontendClientLocal::isUnderTest()
</span><span class="cx"> {
</span><del>- return m_inspectorController->isUnderTest();
</del><ins>+ return m_inspectedPageController->isUnderTest();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool InspectorFrontendClientLocal::evaluateAsBoolean(const String& expression)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorFrontendClientLocalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.h (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.h        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.h        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> virtual void setProperty(const String& name, const String& value);
</span><span class="cx"> };
</span><span class="cx">
</span><del>- WEBCORE_EXPORT InspectorFrontendClientLocal(InspectorController*, Page*, std::unique_ptr<Settings>);
</del><ins>+ WEBCORE_EXPORT InspectorFrontendClientLocal(InspectorController* inspectedPageController, Page* frontendPage, std::unique_ptr<Settings>);
</ins><span class="cx"> WEBCORE_EXPORT virtual ~InspectorFrontendClientLocal();
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT virtual void windowObjectCleared() override final;
</span><span class="lines">@@ -114,7 +114,7 @@
</span><span class="cx"> void evaluateOnLoad(const String& expression);
</span><span class="cx">
</span><span class="cx"> friend class FrontendMenuProvider;
</span><del>- InspectorController* m_inspectorController { nullptr };
</del><ins>+ InspectorController* m_inspectedPageController { nullptr };
</ins><span class="cx"> Page* m_frontendPage { nullptr };
</span><span class="cx"> // TODO(yurys): this ref shouldn't be needed.
</span><span class="cx"> RefPtr<InspectorFrontendHost> m_frontendHost;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorOverlaycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -947,7 +947,7 @@
</span><span class="cx">
</span><span class="cx"> void InspectorOverlay::freePage()
</span><span class="cx"> {
</span><del>- m_overlayPage.reset();
</del><ins>+ m_overlayPage = nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderEmptyClientsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/EmptyClients.h (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/EmptyClients.h        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebCore/loader/EmptyClients.h        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -593,10 +593,10 @@
</span><span class="cx"> EmptyInspectorClient() { }
</span><span class="cx"> virtual ~EmptyInspectorClient() { }
</span><span class="cx">
</span><del>- virtual void inspectorDestroyed() override { }
</del><ins>+ virtual void inspectedPageDestroyed() override { }
</ins><span class="cx">
</span><del>- virtual Inspector::FrontendChannel* openInspectorFrontend(InspectorController*) override { return 0; }
- virtual void closeInspectorFrontend() override { }
</del><ins>+ virtual Inspector::FrontendChannel* openLocalFrontend(InspectorController*) override { return 0; }
+ virtual void closeLocalFrontend() override { }
</ins><span class="cx"> virtual void bringFrontendToFront() override { }
</span><span class="cx">
</span><span class="cx"> virtual void highlight() override { }
</span></span></pre></div>
<a id="trunkSourceWebKitiosChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ios/ChangeLog (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ios/ChangeLog        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit/ios/ChangeLog        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2015-09-12 Brian Burg <bburg@apple.com>
+
+ Web Inspector: disambiguate inspected/frontend controllers and pages in backend code
+ https://bugs.webkit.org/show_bug.cgi?id=149071
+
+ Reviewed by Joseph Pecoraro.
+
+ * WebCoreSupport/WebInspectorClientIOS.mm:
+ (WebInspectorClient::WebInspectorClient):
+ (WebInspectorClient::inspectedPageDestroyed): Renamed.
+ (WebInspectorClient::openLocalFrontend): Renamed.
+ (WebInspectorClient::closeLocalFrontend): Renamed.
+ (WebInspectorClient::inspectorDestroyed): Deleted.
+ (WebInspectorClient::openInspectorFrontend): Deleted.
+ (WebInspectorClient::closeInspectorFrontend): Deleted.
+ (WebInspectorClient::showInspectorIndication):
+ (WebInspectorClient::hideInspectorIndication):
+ (WebInspectorClient::didSetSearchingForNode):
+ (WebInspectorFrontendClient::WebInspectorFrontendClient):
+
</ins><span class="cx"> 2015-08-17 Filip Pizlo <fpizlo@apple.com>
</span><span class="cx">
</span><span class="cx"> Replace all remaining uses of WTF::Mutex with WTF::Lock
</span></span></pre></div>
<a id="trunkSourceWebKitiosWebCoreSupportWebInspectorClientIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ios/WebCoreSupport/WebInspectorClientIOS.mm (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ios/WebCoreSupport/WebInspectorClientIOS.mm        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit/ios/WebCoreSupport/WebInspectorClientIOS.mm        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -42,19 +42,18 @@
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><del>-WebInspectorClient::WebInspectorClient(WebView *webView)
- : m_webView(webView)
- , m_highlighter(adoptNS([[WebNodeHighlighter alloc] initWithInspectedWebView:webView]))
- , m_frontendPage(0)
</del><ins>+WebInspectorClient::WebInspectorClient(WebView* inpectedWebView)
+ : m_inspectedWebView(inpectedWebView)
+ , m_highlighter(adoptNS([[WebNodeHighlighter alloc] initWithInspectedWebView:inpectedWebView]))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebInspectorClient::inspectorDestroyed()
</del><ins>+void WebInspectorClient::inspectedPageDestroyed()
</ins><span class="cx"> {
</span><span class="cx"> delete this;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Inspector::FrontendChannel* WebInspectorClient::openInspectorFrontend(InspectorController*)
</del><ins>+Inspector::FrontendChannel* WebInspectorClient::openLocalFrontend(InspectorController*)
</ins><span class="cx"> {
</span><span class="cx"> // iOS does not have a local inspector, this should not be reached.
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -66,7 +65,7 @@
</span><span class="cx"> // iOS does not have a local inspector, nothing to do here.
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebInspectorClient::closeInspectorFrontend()
</del><ins>+void WebInspectorClient::closeLocalFrontend()
</ins><span class="cx"> {
</span><span class="cx"> // iOS does not have a local inspector, nothing to do here.
</span><span class="cx"> }
</span><span class="lines">@@ -88,12 +87,12 @@
</span><span class="cx">
</span><span class="cx"> void WebInspectorClient::showInspectorIndication()
</span><span class="cx"> {
</span><del>- [m_webView setShowingInspectorIndication:YES];
</del><ins>+ [m_inspectedWebView setShowingInspectorIndication:YES];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebInspectorClient::hideInspectorIndication()
</span><span class="cx"> {
</span><del>- [m_webView setShowingInspectorIndication:NO];
</del><ins>+ [m_inspectedWebView setShowingInspectorIndication:NO];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebInspectorClient::setShowPaintRects(bool)
</span><span class="lines">@@ -108,7 +107,7 @@
</span><span class="cx">
</span><span class="cx"> void WebInspectorClient::didSetSearchingForNode(bool enabled)
</span><span class="cx"> {
</span><del>- WebInspector *inspector = [m_webView inspector];
</del><ins>+ WebInspector *inspector = [m_inspectedWebView inspector];
</ins><span class="cx"> NSString *notificationName = enabled ? WebInspectorDidStartSearchingForNode : WebInspectorDidStopSearchingForNode;
</span><span class="cx"> dispatch_async(dispatch_get_main_queue(), ^{
</span><span class="cx"> [[NSNotificationCenter defaultCenter] postNotificationName:notificationName object:inspector];
</span><span class="lines">@@ -118,8 +117,8 @@
</span><span class="cx"> #pragma mark -
</span><span class="cx"> #pragma mark WebInspectorFrontendClient Implementation
</span><span class="cx">
</span><del>-WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, WebInspectorWindowController* windowController, InspectorController* inspectorController, Page* frontendPage, std::unique_ptr<Settings> settings)
- : InspectorFrontendClientLocal(inspectorController, frontendPage, WTF::move(settings))
</del><ins>+WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, WebInspectorWindowController* frontendWindowController, InspectorController* inspectedPageController, Page* frontendPage, std::unique_ptr<Settings> settings)
+ : InspectorFrontendClientLocal(inspectedPageController, frontendPage, WTF::move(settings))
</ins><span class="cx"> {
</span><span class="cx"> // iOS does not have a local inspector, this should not be reached.
</span><span class="cx"> notImplemented();
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -1,3 +1,63 @@
</span><ins>+2015-09-12 Brian Burg <bburg@apple.com>
+
+ Web Inspector: disambiguate inspected/frontend controllers and pages in backend code
+ https://bugs.webkit.org/show_bug.cgi?id=149071
+
+ Reviewed by Joseph Pecoraro.
+
+ Be consistent about prefixing pages, inspector controllers, and window controllers
+ with either "frontend" or "inspected", as appropriate. This change makes obvious some bugs
+ in the frontend connection code, which are tracked by https://webkit.org/b/149006.
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::WebInspectorClient): Renamed.
+ (WebInspectorClient::inspectedPageDestroyed): Renamed.
+ (WebInspectorClient::openLocalFrontend): Renamed.
+ (WebInspectorClient::closeLocalFrontend): Renamed.
+ (WebInspectorClient::didSetSearchingForNode):
+ (WebInspectorFrontendClient::WebInspectorFrontendClient):
+ (WebInspectorFrontendClient::attachAvailabilityChanged):
+ (WebInspectorFrontendClient::canAttach):
+ (WebInspectorFrontendClient::frontendLoaded):
+ (WebInspectorFrontendClient::startWindowDrag):
+ (WebInspectorFrontendClient::bringToFront):
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::disconnectFromBackend):
+ (WebInspectorFrontendClient::attachWindow):
+ (WebInspectorFrontendClient::detachWindow):
+ (WebInspectorFrontendClient::setAttachedWindowHeight):
+ (WebInspectorFrontendClient::setToolbarHeight):
+ (WebInspectorFrontendClient::updateWindowTitle):
+ (WebInspectorFrontendClient::save):
+ (WebInspectorFrontendClient::append):
+ (-[WebInspectorWindowController init]):
+ (-[WebInspectorWindowController initWithInspectedWebView:isUnderTest:]):
+ (-[WebInspectorWindowController dealloc]):
+ (-[WebInspectorWindowController frontendWebView]):
+ (-[WebInspectorWindowController close]):
+ (-[WebInspectorWindowController showWindow:]):
+ (-[WebInspectorWindowController setAttachedWindowHeight:]):
+ (-[WebInspectorWindowController destroyInspectorView]):
+ (-[WebInspectorWindowController webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:]):
+ (WebInspectorClient::inspectorDestroyed): Deleted.
+ (WebInspectorClient::openInspectorFrontend): Deleted.
+ (WebInspectorClient::closeInspectorFrontend): Deleted.
+ (-[WebInspectorWindowController webView]): Deleted.
+ * WebInspector/WebInspector.h:
+ * WebInspector/WebInspector.mm:
+ (-[WebInspector initWithInspectedWebView:]): Renamed.
+ (-[WebInspector inspectedWebViewClosed]): Renamed.
+ (-[WebInspector showWindow]):
+ (-[WebInspector close:]):
+ (-[WebInspector evaluateInFrontend:script:]):
+ (-[WebInspector releaseFrontend]):
+ (-[WebInspector initWithWebView:]): Deleted.
+ (-[WebInspector webViewClosed]): Deleted.
+ * WebView/WebView.mm:
+ (-[WebView _close]):
+ (-[WebView inspector]):
+
</ins><span class="cx"> 2015-09-10 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> Node.appendChild(null) / replaceChild(null, null) / removeChild(null) / insertBefore(null, ref) should throw a TypeError
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebInspectorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -51,12 +51,12 @@
</span><span class="cx">
</span><span class="cx"> class WebInspectorClient : public WebCore::InspectorClient, public Inspector::FrontendChannel {
</span><span class="cx"> public:
</span><del>- explicit WebInspectorClient(WebView *);
</del><ins>+ explicit WebInspectorClient(WebView* inspectedWebView);
</ins><span class="cx">
</span><del>- virtual void inspectorDestroyed() override;
</del><ins>+ virtual void inspectedPageDestroyed() override;
</ins><span class="cx">
</span><del>- virtual Inspector::FrontendChannel* openInspectorFrontend(WebCore::InspectorController*) override;
- virtual void closeInspectorFrontend() override;
</del><ins>+ virtual Inspector::FrontendChannel* openLocalFrontend(WebCore::InspectorController*) override;
+ virtual void closeLocalFrontend() override;
</ins><span class="cx"> virtual void bringFrontendToFront() override;
</span><span class="cx"> virtual void didResizeMainFrame(WebCore::Frame*) override;
</span><span class="cx">
</span><span class="lines">@@ -92,9 +92,9 @@
</span><span class="cx"> private:
</span><span class="cx"> std::unique_ptr<WebCore::InspectorFrontendClientLocal::Settings> createFrontendSettings();
</span><span class="cx">
</span><del>- WebView *m_webView;
</del><ins>+ WebView *m_inspectedWebView { nullptr };
</ins><span class="cx"> RetainPtr<WebNodeHighlighter> m_highlighter;
</span><del>- WebCore::Page* m_frontendPage;
</del><ins>+ WebCore::Page* m_frontendPage { nullptr };
</ins><span class="cx"> std::unique_ptr<WebInspectorFrontendClient> m_frontendClient;
</span><span class="cx"> };
</span><span class="cx">
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx">
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> WebView* m_inspectedWebView;
</span><del>- RetainPtr<WebInspectorWindowController> m_windowController;
</del><ins>+ RetainPtr<WebInspectorWindowController> m_frontendWindowController;
</ins><span class="cx"> String m_inspectedURL;
</span><span class="cx"> HashMap<String, RetainPtr<NSURL>> m_suggestedToActualURLMap;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebInspectorClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> @interface WebInspectorWindowController : NSWindowController <NSWindowDelegate, WebPolicyDelegate, WebUIDelegate> {
</span><span class="cx"> @private
</span><span class="cx"> RetainPtr<WebView> _inspectedWebView;
</span><del>- WebView *_webView;
</del><ins>+ WebView* _frontendWebView;
</ins><span class="cx"> WebInspectorFrontendClient* _frontendClient;
</span><span class="cx"> WebInspectorClient* _inspectorClient;
</span><span class="cx"> BOOL _attachedToInspectedWebView;
</span><span class="lines">@@ -76,10 +76,10 @@
</span><span class="cx"> BOOL _visible;
</span><span class="cx"> BOOL _destroyingInspectorView;
</span><span class="cx"> }
</span><del>-- (id)initWithInspectedWebView:(WebView *)webView isUnderTest:(BOOL)isUnderTest;
</del><ins>+- (id)initWithInspectedWebView:(WebView *)inspectedWebView isUnderTest:(BOOL)isUnderTest;
</ins><span class="cx"> - (NSString *)inspectorPagePath;
</span><span class="cx"> - (NSString *)inspectorTestPagePath;
</span><del>-- (WebView *)webView;
</del><ins>+- (WebView *)frontendWebView;
</ins><span class="cx"> - (void)attach;
</span><span class="cx"> - (void)detach;
</span><span class="cx"> - (BOOL)attached;
</span><span class="lines">@@ -94,36 +94,35 @@
</span><span class="cx">
</span><span class="cx"> // MARK: -
</span><span class="cx">
</span><del>-WebInspectorClient::WebInspectorClient(WebView *webView)
- : m_webView(webView)
- , m_highlighter(adoptNS([[WebNodeHighlighter alloc] initWithInspectedWebView:webView]))
- , m_frontendPage(nullptr)
</del><ins>+WebInspectorClient::WebInspectorClient(WebView* inspectedWebView)
+ : m_inspectedWebView(inspectedWebView)
+ , m_highlighter(adoptNS([[WebNodeHighlighter alloc] initWithInspectedWebView:inspectedWebView]))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebInspectorClient::inspectorDestroyed()
</del><ins>+void WebInspectorClient::inspectedPageDestroyed()
</ins><span class="cx"> {
</span><del>- closeInspectorFrontend();
</del><ins>+ closeLocalFrontend();
</ins><span class="cx"> delete this;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-FrontendChannel* WebInspectorClient::openInspectorFrontend(InspectorController* inspectorController)
</del><ins>+FrontendChannel* WebInspectorClient::openLocalFrontend(InspectorController* inspectedPageController)
</ins><span class="cx"> {
</span><del>- RetainPtr<WebInspectorWindowController> windowController = adoptNS([[WebInspectorWindowController alloc] initWithInspectedWebView:m_webView isUnderTest:inspectorController->isUnderTest()]);
</del><ins>+ RetainPtr<WebInspectorWindowController> windowController = adoptNS([[WebInspectorWindowController alloc] initWithInspectedWebView:m_inspectedWebView isUnderTest:inspectedPageController->isUnderTest()]);
</ins><span class="cx"> [windowController.get() setInspectorClient:this];
</span><span class="cx">
</span><del>- m_frontendPage = core([windowController.get() webView]);
- m_frontendClient = std::make_unique<WebInspectorFrontendClient>(m_webView, windowController.get(), inspectorController, m_frontendPage, createFrontendSettings());
</del><ins>+ m_frontendPage = core([windowController.get() frontendWebView]);
+ m_frontendClient = std::make_unique<WebInspectorFrontendClient>(m_inspectedWebView, windowController.get(), inspectedPageController, m_frontendPage, createFrontendSettings());
</ins><span class="cx">
</span><span class="cx"> RetainPtr<WebInspectorFrontend> webInspectorFrontend = adoptNS([[WebInspectorFrontend alloc] initWithFrontendClient:m_frontendClient.get()]);
</span><del>- [[m_webView inspector] setFrontend:webInspectorFrontend.get()];
</del><ins>+ [[m_inspectedWebView inspector] setFrontend:webInspectorFrontend.get()];
</ins><span class="cx">
</span><span class="cx"> m_frontendPage->inspectorController().setInspectorFrontendClient(m_frontendClient.get());
</span><span class="cx">
</span><span class="cx"> return this;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebInspectorClient::closeInspectorFrontend()
</del><ins>+void WebInspectorClient::closeLocalFrontend()
</ins><span class="cx"> {
</span><span class="cx"> if (m_frontendClient)
</span><span class="cx"> m_frontendClient->disconnectFromBackend();
</span><span class="lines">@@ -164,7 +163,7 @@
</span><span class="cx">
</span><span class="cx"> void WebInspectorClient::didSetSearchingForNode(bool enabled)
</span><span class="cx"> {
</span><del>- WebInspector *inspector = [m_webView inspector];
</del><ins>+ WebInspector *inspector = [m_inspectedWebView inspector];
</ins><span class="cx">
</span><span class="cx"> ASSERT(isMainThread());
</span><span class="cx">
</span><span class="lines">@@ -181,23 +180,23 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, WebInspectorWindowController* windowController, InspectorController* inspectorController, Page* frontendPage, std::unique_ptr<Settings> settings)
- : InspectorFrontendClientLocal(inspectorController, frontendPage, WTF::move(settings))
</del><ins>+WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, WebInspectorWindowController* frontendWindowController, InspectorController* inspectedPageController, Page* frontendPage, std::unique_ptr<Settings> settings)
+ : InspectorFrontendClientLocal(inspectedPageController, frontendPage, WTF::move(settings))
</ins><span class="cx"> , m_inspectedWebView(inspectedWebView)
</span><del>- , m_windowController(windowController)
</del><ins>+ , m_frontendWindowController(frontendWindowController)
</ins><span class="cx"> {
</span><del>- [windowController setFrontendClient:this];
</del><ins>+ [frontendWindowController setFrontendClient:this];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebInspectorFrontendClient::attachAvailabilityChanged(bool available)
</span><span class="cx"> {
</span><span class="cx"> setDockingUnavailable(!available);
</span><del>- [m_windowController.get() setDockingUnavailable:!available];
</del><ins>+ [m_frontendWindowController.get() setDockingUnavailable:!available];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebInspectorFrontendClient::canAttach()
</span><span class="cx"> {
</span><del>- if ([[m_windowController window] styleMask] & NSFullScreenWindowMask)
</del><ins>+ if ([[m_frontendWindowController window] styleMask] & NSFullScreenWindowMask)
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> return canAttachWindow();
</span><span class="lines">@@ -205,8 +204,8 @@
</span><span class="cx">
</span><span class="cx"> void WebInspectorFrontendClient::frontendLoaded()
</span><span class="cx"> {
</span><del>- [m_windowController.get() showWindow:nil];
- if ([m_windowController.get() attached])
</del><ins>+ [m_frontendWindowController.get() showWindow:nil];
+ if ([m_frontendWindowController.get() attached])
</ins><span class="cx"> restoreAttachedWindowHeight();
</span><span class="cx">
</span><span class="cx"> InspectorFrontendClientLocal::frontendLoaded();
</span><span class="lines">@@ -218,14 +217,14 @@
</span><span class="cx"> CallFrameLoadDelegate(implementations->didClearInspectorWindowObjectForFrameFunc, m_inspectedWebView,
</span><span class="cx"> @selector(webView:didClearInspectorWindowObject:forFrame:), [frame windowObject], frame);
</span><span class="cx">
</span><del>- bool attached = [m_windowController.get() attached];
</del><ins>+ bool attached = [m_frontendWindowController.get() attached];
</ins><span class="cx"> setAttachedWindow(attached ? DockSide::Bottom : DockSide::Undocked);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebInspectorFrontendClient::startWindowDrag()
</span><span class="cx"> {
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100
</span><del>- [[m_windowController window] performWindowDragWithEvent:[NSApp currentEvent]];
</del><ins>+ [[m_frontendWindowController window] performWindowDragWithEvent:[NSApp currentEvent]];
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -244,40 +243,40 @@
</span><span class="cx"> {
</span><span class="cx"> updateWindowTitle();
</span><span class="cx">
</span><del>- [m_windowController.get() showWindow:nil];
</del><ins>+ [m_frontendWindowController.get() showWindow:nil];
</ins><span class="cx">
</span><del>- // Use the window from the WebView since m_windowController's window
</del><ins>+ // Use the window from the WebView since m_frontendWindowController's window
</ins><span class="cx"> // is not the same when the Inspector is docked.
</span><del>- WebView *webView = [m_windowController.get() webView];
- [[webView window] makeFirstResponder:webView];
</del><ins>+ WebView *frontendWebView = [m_frontendWindowController.get() frontendWebView];
+ [[frontendWebView window] makeFirstResponder:frontendWebView];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebInspectorFrontendClient::closeWindow()
</span><span class="cx"> {
</span><del>- [m_windowController.get() destroyInspectorView];
</del><ins>+ [m_frontendWindowController.get() destroyInspectorView];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebInspectorFrontendClient::disconnectFromBackend()
</span><span class="cx"> {
</span><del>- [m_windowController.get() destroyInspectorView];
</del><ins>+ [m_frontendWindowController.get() destroyInspectorView];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebInspectorFrontendClient::attachWindow(DockSide)
</span><span class="cx"> {
</span><del>- if ([m_windowController.get() attached])
</del><ins>+ if ([m_frontendWindowController.get() attached])
</ins><span class="cx"> return;
</span><del>- [m_windowController.get() attach];
</del><ins>+ [m_frontendWindowController.get() attach];
</ins><span class="cx"> restoreAttachedWindowHeight();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebInspectorFrontendClient::detachWindow()
</span><span class="cx"> {
</span><del>- [m_windowController.get() detach];
</del><ins>+ [m_frontendWindowController.get() detach];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebInspectorFrontendClient::setAttachedWindowHeight(unsigned height)
</span><span class="cx"> {
</span><del>- [m_windowController.get() setAttachedWindowHeight:height];
</del><ins>+ [m_frontendWindowController.get() setAttachedWindowHeight:height];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebInspectorFrontendClient::setAttachedWindowWidth(unsigned)
</span><span class="lines">@@ -288,7 +287,7 @@
</span><span class="cx"> void WebInspectorFrontendClient::setToolbarHeight(unsigned height)
</span><span class="cx"> {
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090
</span><del>- [[m_windowController window] setContentBorderThickness:height forEdge:NSMaxYEdge];
</del><ins>+ [[m_frontendWindowController window] setContentBorderThickness:height forEdge:NSMaxYEdge];
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -301,7 +300,7 @@
</span><span class="cx"> void WebInspectorFrontendClient::updateWindowTitle() const
</span><span class="cx"> {
</span><span class="cx"> NSString *title = [NSString stringWithFormat:UI_STRING_INTERNAL("Web Inspector — %@", "Web Inspector window title"), (NSString *)m_inspectedURL];
</span><del>- [[m_windowController.get() window] setTitle:title];
</del><ins>+ [[m_frontendWindowController.get() window] setTitle:title];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebInspectorFrontendClient::save(const String& suggestedURL, const String& content, bool base64Encoded, bool forceSaveDialog)
</span><span class="lines">@@ -337,7 +336,7 @@
</span><span class="cx"> } else
</span><span class="cx"> [contentCopy writeToURL:actualURL atomically:YES encoding:NSUTF8StringEncoding error:NULL];
</span><span class="cx">
</span><del>- core([m_windowController webView])->mainFrame().script().executeScript([NSString stringWithFormat:@"InspectorFrontendAPI.savedURL(\"%@\")", actualURL.absoluteString]);
</del><ins>+ core([m_frontendWindowController frontendWebView])->mainFrame().script().executeScript([NSString stringWithFormat:@"InspectorFrontendAPI.savedURL(\"%@\")", actualURL.absoluteString]);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> if (!forceSaveDialog) {
</span><span class="lines">@@ -356,9 +355,9 @@
</span><span class="cx"> saveToURL(panel.URL);
</span><span class="cx"> };
</span><span class="cx">
</span><del>- NSWindow *window = [[m_windowController webView] window];
- if (window)
- [panel beginSheetModalForWindow:window completionHandler:completionHandler];
</del><ins>+ NSWindow *frontendWindow = [[m_frontendWindowController frontendWebView] window];
+ if (frontendWindow)
+ [panel beginSheetModalForWindow:frontendWindow completionHandler:completionHandler];
</ins><span class="cx"> else
</span><span class="cx"> completionHandler([panel runModal]);
</span><span class="cx"> }
</span><span class="lines">@@ -377,7 +376,7 @@
</span><span class="cx"> [handle writeData:[content dataUsingEncoding:NSUTF8StringEncoding]];
</span><span class="cx"> [handle closeFile];
</span><span class="cx">
</span><del>- core([m_windowController webView])->mainFrame().script().executeScript([NSString stringWithFormat:@"InspectorFrontendAPI.appendedToURL(\"%@\")", [actualURL absoluteString]]);
</del><ins>+ core([m_frontendWindowController frontendWebView])->mainFrame().script().executeScript([NSString stringWithFormat:@"InspectorFrontendAPI.appendedToURL(\"%@\")", [actualURL absoluteString]]);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // MARK: -
</span><span class="lines">@@ -405,14 +404,14 @@
</span><span class="cx"> [preferences setTabsToLinks:NO];
</span><span class="cx"> [preferences setUserStyleSheetEnabled:NO];
</span><span class="cx">
</span><del>- _webView = [[WebView alloc] init];
- [_webView setPreferences:preferences];
- [_webView setProhibitsMainFrameScrolling:YES];
- [_webView setUIDelegate:self];
- [_webView setPolicyDelegate:self];
</del><ins>+ _frontendWebView = [[WebView alloc] init];
+ [_frontendWebView setPreferences:preferences];
+ [_frontendWebView setProhibitsMainFrameScrolling:YES];
+ [_frontendWebView setUIDelegate:self];
+ [_frontendWebView setPolicyDelegate:self];
</ins><span class="cx">
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090
</span><del>- [_webView setDrawsBackground:NO];
</del><ins>+ [_frontendWebView setDrawsBackground:NO];
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> [preferences release];
</span><span class="lines">@@ -430,7 +429,7 @@
</span><span class="cx">
</span><span class="cx"> NSString *pagePath = isUnderTest ? [self inspectorTestPagePath] : [self inspectorPagePath];
</span><span class="cx"> NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL fileURLWithPath: pagePath]];
</span><del>- [[_webView mainFrame] loadRequest:request];
</del><ins>+ [[_frontendWebView mainFrame] loadRequest:request];
</ins><span class="cx"> [request release];
</span><span class="cx">
</span><span class="cx"> return self;
</span><span class="lines">@@ -438,7 +437,7 @@
</span><span class="cx">
</span><span class="cx"> - (void)dealloc
</span><span class="cx"> {
</span><del>- [_webView release];
</del><ins>+ [_frontendWebView release];
</ins><span class="cx"> [super dealloc];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -470,9 +469,9 @@
</span><span class="cx">
</span><span class="cx"> // MARK: -
</span><span class="cx">
</span><del>-- (WebView *)webView
</del><ins>+- (WebView *)frontendWebView
</ins><span class="cx"> {
</span><del>- return _webView;
</del><ins>+ return _frontendWebView;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSWindow *)window
</span><span class="lines">@@ -550,7 +549,7 @@
</span><span class="cx"> if ([_inspectedWebView.get() _isClosed])
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- [_webView removeFromSuperview];
</del><ins>+ [_frontendWebView removeFromSuperview];
</ins><span class="cx">
</span><span class="cx"> WebFrameView *frameView = [[_inspectedWebView.get() mainFrame] frameView];
</span><span class="cx"> NSRect frameViewRect = [frameView frame];
</span><span class="lines">@@ -588,11 +587,11 @@
</span><span class="cx"> if (_shouldAttach) {
</span><span class="cx"> WebFrameView *frameView = [[_inspectedWebView.get() mainFrame] frameView];
</span><span class="cx">
</span><del>- [_webView removeFromSuperview];
- [_inspectedWebView.get() addSubview:_webView positioned:NSWindowBelow relativeTo:(NSView *)frameView];
- [[_inspectedWebView.get() window] makeFirstResponder:_webView];
</del><ins>+ [_frontendWebView removeFromSuperview];
+ [_inspectedWebView.get() addSubview:_frontendWebView positioned:NSWindowBelow relativeTo:(NSView *)frameView];
+ [[_inspectedWebView.get() window] makeFirstResponder:_frontendWebView];
</ins><span class="cx">
</span><del>- [_webView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable | NSViewMaxYMargin)];
</del><ins>+ [_frontendWebView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable | NSViewMaxYMargin)];
</ins><span class="cx"> [frameView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable | NSViewMinYMargin)];
</span><span class="cx">
</span><span class="cx"> _attachedToInspectedWebView = YES;
</span><span class="lines">@@ -600,10 +599,10 @@
</span><span class="cx"> _attachedToInspectedWebView = NO;
</span><span class="cx">
</span><span class="cx"> NSView *contentView = [[self window] contentView];
</span><del>- [_webView setFrame:[contentView frame]];
- [_webView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
- [_webView removeFromSuperview];
- [contentView addSubview:_webView];
</del><ins>+ [_frontendWebView setFrame:[contentView frame]];
+ [_frontendWebView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
+ [_frontendWebView removeFromSuperview];
+ [contentView addSubview:_frontendWebView];
</ins><span class="cx">
</span><span class="cx"> [super showWindow:nil];
</span><span class="cx"> }
</span><span class="lines">@@ -669,7 +668,7 @@
</span><span class="cx"> frameViewRect.size.height += heightDifference;
</span><span class="cx"> frameViewRect.origin.y = height;
</span><span class="cx">
</span><del>- [_webView setFrame:NSMakeRect(0.0, 0.0, NSWidth(frameViewRect), height)];
</del><ins>+ [_frontendWebView setFrame:NSMakeRect(0.0, 0.0, NSWidth(frameViewRect), height)];
</ins><span class="cx"> [frameView setFrame:frameViewRect];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -699,7 +698,7 @@
</span><span class="cx"> inspectedPage->inspectorController().disconnectFrontend(_inspectorClient);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- [_webView close];
</del><ins>+ [_frontendWebView close];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // MARK: -
</span><span class="lines">@@ -727,8 +726,8 @@
</span><span class="cx"> [resultListener chooseFilenames:filenames];
</span><span class="cx"> };
</span><span class="cx">
</span><del>- if (_webView.window)
- [panel beginSheetModalForWindow:_webView.window completionHandler:completionHandler];
</del><ins>+ if (_frontendWebView.window)
+ [panel beginSheetModalForWindow:_frontendWebView.window completionHandler:completionHandler];
</ins><span class="cx"> else
</span><span class="cx"> completionHandler([panel runModal]);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebInspectorWebInspectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebInspector/WebInspector.h (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebInspector/WebInspector.h        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit/mac/WebInspector/WebInspector.h        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -36,11 +36,11 @@
</span><span class="cx">
</span><span class="cx"> @interface WebInspector : NSObject
</span><span class="cx"> {
</span><del>- WebView *_webView;
</del><ins>+ WebView *_inspectedWebView;
</ins><span class="cx"> WebInspectorFrontend *_frontend;
</span><span class="cx"> }
</span><del>-- (id)initWithWebView:(WebView *)webView;
-- (void)webViewClosed;
</del><ins>+- (id)initWithInspectedWebView:(WebView *)inspectedWebView;
+- (void)inspectedWebViewClosed;
</ins><span class="cx"> - (void)show:(id)sender;
</span><span class="cx"> - (void)showConsole:(id)sender;
</span><span class="cx"> - (void)close:(id)sender;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebInspectorWebInspectormm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebInspector/WebInspector.mm (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebInspector/WebInspector.mm        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit/mac/WebInspector/WebInspector.mm        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -43,11 +43,11 @@
</span><span class="cx"> NSString *WebInspectorDidStopSearchingForNode = @"WebInspectorDidStopSearchingForNode";
</span><span class="cx">
</span><span class="cx"> @implementation WebInspector
</span><del>-- (id)initWithWebView:(WebView *)webView
</del><ins>+- (id)initWithInspectedWebView:(WebView *)inspectedWebView
</ins><span class="cx"> {
</span><span class="cx"> if (!(self = [super init]))
</span><span class="cx"> return nil;
</span><del>- _webView = webView; // not retained to prevent a cycle
</del><ins>+ _inspectedWebView = inspectedWebView; // not retained to prevent a cycle
</ins><span class="cx">
</span><span class="cx"> return self;
</span><span class="cx"> }
</span><span class="lines">@@ -58,15 +58,15 @@
</span><span class="cx"> [super dealloc];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)webViewClosed
</del><ins>+- (void)inspectedWebViewClosed
</ins><span class="cx"> {
</span><del>- _webView = nil;
</del><ins>+ _inspectedWebView = nil;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)showWindow
</span><span class="cx"> {
</span><del>- if (Page* page = core(_webView))
- page->inspectorController().show();
</del><ins>+ if (Page* inspectedPage = core(_inspectedWebView))
+ inspectedPage->inspectorController().show();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)show:(id)sender
</span><span class="lines">@@ -157,8 +157,8 @@
</span><span class="cx">
</span><span class="cx"> - (void)close:(id)sender
</span><span class="cx"> {
</span><del>- if (Page* page = core(_webView))
- page->inspectorController().close();
</del><ins>+ if (Page* inspectedPage = core(_inspectedWebView))
+ inspectedPage->inspectorController().close();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)attach:(id)sender
</span><span class="lines">@@ -173,8 +173,8 @@
</span><span class="cx">
</span><span class="cx"> - (void)evaluateInFrontend:(id)sender script:(NSString *)script
</span><span class="cx"> {
</span><del>- if (Page* page = core(_webView))
- page->inspectorController().evaluateForTestInFrontend(script);
</del><ins>+ if (Page* inspectedPage = core(_inspectedWebView))
+ inspectedPage->inspectorController().evaluateForTestInFrontend(script);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)setFrontend:(WebInspectorFrontend *)frontend
</span><span class="lines">@@ -185,6 +185,6 @@
</span><span class="cx"> - (void)releaseFrontend
</span><span class="cx"> {
</span><span class="cx"> [_frontend release];
</span><del>- _frontend = 0;
</del><ins>+ _frontend = nil;
</ins><span class="cx"> }
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -1756,7 +1756,7 @@
</span><span class="cx"> [self setScriptDebugDelegate:nil];
</span><span class="cx"> [self setUIDelegate:nil];
</span><span class="cx">
</span><del>- [_private->inspector webViewClosed];
</del><ins>+ [_private->inspector inspectedWebViewClosed];
</ins><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
</span><span class="cx"> [_private->immediateActionController webViewClosed];
</span><span class="lines">@@ -1890,7 +1890,7 @@
</span><span class="cx"> - (WebInspector *)inspector
</span><span class="cx"> {
</span><span class="cx"> if (!_private->inspector)
</span><del>- _private->inspector = [[WebInspector alloc] initWithWebView:self];
</del><ins>+ _private->inspector = [[WebInspector alloc] initWithInspectedWebView:self];
</ins><span class="cx"> return _private->inspector;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit/win/ChangeLog        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2015-09-12 Brian Burg <bburg@apple.com>
+
+ Web Inspector: disambiguate inspected/frontend controllers and pages in backend code
+ https://bugs.webkit.org/show_bug.cgi?id=149071
+
+ Reviewed by Joseph Pecoraro.
+
+ Be consistent about prefixing pages, inspector controllers, and window controllers
+ with either "frontend" or "inspected", as appropriate. This change makes obvious some bugs
+ in the frontend connection code, which are tracked by https://webkit.org/b/149006.
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorClient::inspectedPageDestroyed): Renamed.
+ (WebInspectorClient::openLocalFrontend): Renamed.
+ (WebInspectorClient::closeLocalFrontend): Renamed.
+ (WebInspectorClient::inspectorDestroyed): Deleted.
+ (WebInspectorClient::openInspectorFrontend): Deleted.
+ (WebInspectorClient::closeInspectorFrontend): Deleted.
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebInspector.cpp:
+ (WebInspector::createInstance):
+ (WebInspector::WebInspector):
+ (WebInspector::inspectedWebViewClosed): Renamed.
+ (WebInspector::show):
+ (WebInspector::close):
+ (WebInspector::isJavaScriptProfilingEnabled):
+ (WebInspector::setJavaScriptProfilingEnabled):
+ (WebInspector::evaluateInFrontend):
+ (WebInspector::webViewClosed): Deleted.
+ * WebInspector.h:
+ * WebView.cpp:
+ (WebView::close):
+
</ins><span class="cx"> 2015-09-08 Per Arne Vollan <peavo@outlook.com>
</span><span class="cx">
</span><span class="cx"> [Win] Implement DOMNode::attributes.
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebInspectorClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -72,13 +72,13 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebInspectorClient::inspectorDestroyed()
</del><ins>+void WebInspectorClient::inspectedPageDestroyed()
</ins><span class="cx"> {
</span><del>- closeInspectorFrontend();
</del><ins>+ closeLocalFrontend();
</ins><span class="cx"> delete this;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Inspector::FrontendChannel* WebInspectorClient::openInspectorFrontend(InspectorController* inspectorController)
</del><ins>+Inspector::FrontendChannel* WebInspectorClient::openLocalFrontend(InspectorController* inspectorController)
</ins><span class="cx"> {
</span><span class="cx"> registerWindowClass();
</span><span class="cx">
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx"> return this;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebInspectorClient::closeInspectorFrontend()
</del><ins>+void WebInspectorClient::closeLocalFrontend()
</ins><span class="cx"> {
</span><span class="cx"> if (m_frontendClient)
</span><span class="cx"> m_frontendClient->destroyInspectorView();
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebInspectorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -53,10 +53,10 @@
</span><span class="cx"> explicit WebInspectorClient(WebView*);
</span><span class="cx">
</span><span class="cx"> // InspectorClient
</span><del>- virtual void inspectorDestroyed();
</del><ins>+ virtual void inspectedPageDestroyed();
</ins><span class="cx">
</span><del>- virtual Inspector::FrontendChannel* openInspectorFrontend(WebCore::InspectorController*);
- virtual void closeInspectorFrontend();
</del><ins>+ virtual Inspector::FrontendChannel* openLocalFrontend(WebCore::InspectorController*);
+ virtual void closeLocalFrontend();
</ins><span class="cx"> virtual void bringFrontendToFront();
</span><span class="cx">
</span><span class="cx"> virtual void highlight();
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebInspectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebInspector.cpp (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebInspector.cpp        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit/win/WebInspector.cpp        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -37,18 +37,18 @@
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><del>-WebInspector* WebInspector::createInstance(WebView* webView, WebInspectorClient* inspectorClient)
</del><ins>+WebInspector* WebInspector::createInstance(WebView* inspectedWebView, WebInspectorClient* inspectorClient)
</ins><span class="cx"> {
</span><del>- WebInspector* inspector = new WebInspector(webView, inspectorClient);
</del><ins>+ WebInspector* inspector = new WebInspector(inspectedWebView, inspectorClient);
</ins><span class="cx"> inspector->AddRef();
</span><span class="cx"> return inspector;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-WebInspector::WebInspector(WebView* webView, WebInspectorClient* inspectorClient)
- : m_webView(webView)
</del><ins>+WebInspector::WebInspector(WebView* inspectedWebView, WebInspectorClient* inspectorClient)
+ : m_inspectedWebView(inspectedWebView)
</ins><span class="cx"> , m_inspectorClient(inspectorClient)
</span><span class="cx"> {
</span><del>- ASSERT_ARG(webView, webView);
</del><ins>+ ASSERT_ARG(inspectedWebView, inspectedWebView);
</ins><span class="cx">
</span><span class="cx"> gClassCount++;
</span><span class="cx"> gClassNameCount().add("WebInspector");
</span><span class="lines">@@ -65,9 +65,9 @@
</span><span class="cx"> return m_inspectorClient ? m_inspectorClient->frontendClient() : nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebInspector::webViewClosed()
</del><ins>+void WebInspector::inspectedWebViewClosed()
</ins><span class="cx"> {
</span><del>- m_webView = nullptr;
</del><ins>+ m_inspectedWebView = nullptr;
</ins><span class="cx"> m_inspectorClient = nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -105,8 +105,8 @@
</span><span class="cx">
</span><span class="cx"> HRESULT WebInspector::show()
</span><span class="cx"> {
</span><del>- if (m_webView)
- if (Page* page = m_webView->page())
</del><ins>+ if (m_inspectedWebView)
+ if (Page* page = m_inspectedWebView->page())
</ins><span class="cx"> page->inspectorController().show();
</span><span class="cx">
</span><span class="cx"> return S_OK;
</span><span class="lines">@@ -127,8 +127,8 @@
</span><span class="cx">
</span><span class="cx"> HRESULT WebInspector::close()
</span><span class="cx"> {
</span><del>- if (m_webView)
- if (Page* page = m_webView->page())
</del><ins>+ if (m_inspectedWebView)
+ if (Page* page = m_inspectedWebView->page())
</ins><span class="cx"> page->inspectorController().close();
</span><span class="cx">
</span><span class="cx"> return S_OK;
</span><span class="lines">@@ -210,42 +210,42 @@
</span><span class="cx">
</span><span class="cx"> *isProfilingEnabled = FALSE;
</span><span class="cx">
</span><del>- if (!m_webView)
</del><ins>+ if (!m_inspectedWebView)
</ins><span class="cx"> return S_OK;
</span><span class="cx">
</span><del>- Page* page = m_webView->page();
- if (!page)
</del><ins>+ Page* inspectedPage = m_inspectedWebView->page();
+ if (!inspectedPage)
</ins><span class="cx"> return S_OK;
</span><span class="cx">
</span><del>- *isProfilingEnabled = page->inspectorController().profilerEnabled();
</del><ins>+ *isProfilingEnabled = inspectedPage->inspectorController().profilerEnabled();
</ins><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> HRESULT WebInspector::setJavaScriptProfilingEnabled(BOOL enabled)
</span><span class="cx"> {
</span><del>- if (!m_webView)
</del><ins>+ if (!m_inspectedWebView)
</ins><span class="cx"> return S_OK;
</span><span class="cx">
</span><del>- Page* page = m_webView->page();
- if (!page)
</del><ins>+ Page* inspectedPage = m_inspectedWebView->page();
+ if (!inspectedPage)
</ins><span class="cx"> return S_OK;
</span><span class="cx">
</span><del>- page->inspectorController().setProfilerEnabled(enabled);
</del><ins>+ inspectedPage->inspectorController().setProfilerEnabled(enabled);
</ins><span class="cx">
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> HRESULT WebInspector::evaluateInFrontend(_In_ BSTR bScript)
</span><span class="cx"> {
</span><del>- if (!m_webView)
</del><ins>+ if (!m_inspectedWebView)
</ins><span class="cx"> return S_OK;
</span><span class="cx">
</span><del>- Page* page = m_webView->page();
- if (!page)
</del><ins>+ Page* inspectedPage = m_inspectedWebView->page();
+ if (!inspectedPage)
</ins><span class="cx"> return S_OK;
</span><span class="cx">
</span><span class="cx"> String script(bScript, SysStringLen(bScript));
</span><del>- page->inspectorController().evaluateForTestInFrontend(script);
</del><ins>+ inspectedPage->inspectorController().evaluateForTestInFrontend(script);
</ins><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebInspectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebInspector.h (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebInspector.h        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit/win/WebInspector.h        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -39,9 +39,9 @@
</span><span class="cx"> class WebInspector : public IWebInspector, public IWebInspectorPrivate {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(WebInspector);
</span><span class="cx"> public:
</span><del>- static WebInspector* createInstance(WebView*, WebInspectorClient*);
</del><ins>+ static WebInspector* createInstance(WebView* inspectedWebView, WebInspectorClient*);
</ins><span class="cx">
</span><del>- void webViewClosed();
</del><ins>+ void inspectedWebViewClosed();
</ins><span class="cx">
</span><span class="cx"> virtual HRESULT STDMETHODCALLTYPE QueryInterface(_In_ REFIID, _COM_Outptr_ void** ppvObject);
</span><span class="cx"> virtual ULONG STDMETHODCALLTYPE AddRef();
</span><span class="lines">@@ -69,14 +69,14 @@
</span><span class="cx"> virtual HRESULT STDMETHODCALLTYPE setTimelineProfilingEnabled(BOOL);
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- WebInspector(WebView*, WebInspectorClient*);
</del><ins>+ WebInspector(WebView* inspectedWebView, WebInspectorClient*);
</ins><span class="cx"> ~WebInspector();
</span><span class="cx">
</span><span class="cx"> WebInspectorFrontendClient* frontendClient();
</span><span class="cx">
</span><span class="cx"> ULONG m_refCount { 0 };
</span><del>- WebView* m_webView;
- WebInspectorClient* m_inspectorClient;
</del><ins>+ WebView* m_inspectedWebView { nullptr };
+ WebInspectorClient* m_inspectorClient { nullptr };
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> #endif // !defined(WebInspector_h)
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.cpp (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.cpp        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit/win/WebView.cpp        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -762,9 +762,9 @@
</span><span class="cx"> setUIDelegate(0);
</span><span class="cx"> setFormDelegate(0);
</span><span class="cx">
</span><del>- m_inspectorClient = 0;
</del><ins>+ m_inspectorClient = nullptr;
</ins><span class="cx"> if (m_webInspector)
</span><del>- m_webInspector->webViewClosed();
</del><ins>+ m_webInspector->inspectedWebViewClosed();
</ins><span class="cx">
</span><span class="cx"> delete m_page;
</span><span class="cx"> m_page = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit2/ChangeLog        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-09-12 Brian Burg <bburg@apple.com>
+
+ Web Inspector: disambiguate inspected/frontend controllers and pages in backend code
+ https://bugs.webkit.org/show_bug.cgi?id=149071
+
+ Reviewed by Joseph Pecoraro.
+
+ * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
+ (WebKit::WebInspectorClient::inspectedPageDestroyed): Renamed.
+ (WebKit::WebInspectorClient::openLocalFrontend): Renamed.
+ (WebKit::WebInspectorClient::closeLocalFrontend): Renamed.
+ (WebKit::WebInspectorClient::inspectorDestroyed): Deleted.
+ (WebKit::WebInspectorClient::openInspectorFrontend): Deleted.
+ (WebKit::WebInspectorClient::closeInspectorFrontend): Deleted.
+ * WebProcess/WebCoreSupport/WebInspectorClient.h:
+
</ins><span class="cx"> 2015-09-11 Beth Dakin <bdakin@apple.com>
</span><span class="cx">
</span><span class="cx"> Another build fix.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebInspectorClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -76,20 +76,20 @@
</span><span class="cx"> m_page->mainFrame()->pageOverlayController().uninstallPageOverlay(m_paintRectOverlay.get(), PageOverlay::FadeMode::Fade);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebInspectorClient::inspectorDestroyed()
</del><ins>+void WebInspectorClient::inspectedPageDestroyed()
</ins><span class="cx"> {
</span><del>- closeInspectorFrontend();
</del><ins>+ closeLocalFrontend();
</ins><span class="cx"> delete this;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Inspector::FrontendChannel* WebInspectorClient::openInspectorFrontend(InspectorController* controller)
</del><ins>+Inspector::FrontendChannel* WebInspectorClient::openLocalFrontend(InspectorController* controller)
</ins><span class="cx"> {
</span><span class="cx"> m_page->inspector()->openFrontendConnection(controller->isUnderTest());
</span><span class="cx">
</span><span class="cx"> return m_page->inspector();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebInspectorClient::closeInspectorFrontend()
</del><ins>+void WebInspectorClient::closeLocalFrontend()
</ins><span class="cx"> {
</span><span class="cx"> if (m_page->inspector()) {
</span><span class="cx"> m_page->corePage()->inspectorController().disconnectFrontend(m_page->inspector());
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebInspectorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h (189653 => 189654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h        2015-09-12 17:33:52 UTC (rev 189653)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h        2015-09-12 17:44:40 UTC (rev 189654)
</span><span class="lines">@@ -50,10 +50,10 @@
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> // WebCore::InspectorClient
</span><del>- void inspectorDestroyed() override;
</del><ins>+ void inspectedPageDestroyed() override;
</ins><span class="cx">
</span><del>- Inspector::FrontendChannel* openInspectorFrontend(WebCore::InspectorController*) override;
- void closeInspectorFrontend() override;
</del><ins>+ Inspector::FrontendChannel* openLocalFrontend(WebCore::InspectorController*) override;
+ void closeLocalFrontend() override;
</ins><span class="cx"> void bringFrontendToFront() override;
</span><span class="cx"> void didResizeMainFrame(WebCore::Frame*) override;
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>