<!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>[173929] 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/173929">173929</a></dd>
<dt>Author</dt> <dd>timothy@apple.com</dd>
<dt>Date</dt> <dd>2014-09-24 12:58:08 -0700 (Wed, 24 Sep 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Make the Web Inspector use a separate web process.

https://bugs.webkit.org/show_bug.cgi?id=135120

Reviewed by Anders Carlsson.

Source/WebCore:

* English.lproj/Localizable.strings: Updated.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptGlobalObject.h:
* bindings/js/ScriptState.h:
* inspector/InspectorFrontendHost.h:
* inspector/InspectorPageAgent.h:
* page/Chrome.h:
Exported a few functions and private headers.

* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::setInspectorFrontendClient):
(WebCore::InspectorController::hasInspectorFrontendClient):
(WebCore::InspectorController::show):
* inspector/InspectorController.h:
Make InspectorFrontendClient a pointer instead of a std::unique_ptr.
This makes it easier to implement InspectorFrontendClient as
part of an existing object that is externally owned.

* testing/Internals.cpp:
(WebCore::Internals::openDummyInspectorFrontend):
(WebCore::Internals::closeDummyInspectorFrontend):
* testing/Internals.h:
Change InspectorFrontendClientDummy from being moved to owned.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js: Updated.

* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector.contentLoaded):
Move InspectorFrontendHost.loaded to later in the load.
Calling it early just shows the window before we have
a user interface to show.

* UserInterface/Base/Test.js:
(WebInspector.loaded):
(WebInspector.contentLoaded):
Match the changes in Main.js.

* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.savedURL): Change comment.
(InspectorFrontendAPI.appendedToURL): Change comment.
(InspectorFrontendAPI.dispatch): Add an assert and early
return to be safe from unknown commands.
(InspectorFrontendAPI.loadCompleted): Delete _pendingCommands,
no need to keep an empty array around a one time use.

Source/WebKit/ios:

* WebCoreSupport/WebInspectorClientIOS.mm:
(WebInspectorClient::WebInspectorClient):
Removed m_frontendClient initialization since it is
now a std::unique_ptr that defaults to nullptr.

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorClient::WebInspectorClient):
(WebInspectorClient::openInspectorFrontend):
(WebInspectorClient::releaseFrontend):
Own WebInspectorFrontendClient instead of moving it.

Source/WebKit/win:

* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorClient::openInspectorFrontend):
* WebCoreSupport/WebInspectorClient.h:
(WebInspectorClient::frontendClient):
Own WebInspectorFrontendClient instead of moving it.

Source/WebKit2:

* CMakeLists.txt:
* DerivedSources.make:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* WebKit2.xcodeproj/project.pbxproj:
Added new WebInspectorUI files and removed WebInspectorFrontendClient.cpp.

* Shared/APIObject.h: Added BundleInspectorUI.

* Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm:
(WebKit::ChildProcessMainDelegate::getExtraInitializationData):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
Add support for &quot;inspector-process&quot; data, a boolean that is used by
WebProcess::initializeProcessName.

* UIProcess/API/C/WKInspector.cpp:
(WKInspectorIsDebuggingJavaScript):
(WKInspectorToggleJavaScriptDebugging):
(WKInspectorIsProfilingJavaScript):
(WKInspectorToggleJavaScriptProfiling):
* UIProcess/API/C/WKInspector.h:
Stub out functions we don't support but need to keep for nightly compatibility.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorPageGroups::createInspectorPageGroup):
(WebKit::WebInspectorProxy::WebInspectorProxy):
(WebKit::WebInspectorProxy::invalidate):
(WebKit::WebInspectorProxy::connect):
(WebKit::WebInspectorProxy::showConsole):
(WebKit::WebInspectorProxy::showResources):
(WebKit::WebInspectorProxy::showMainResourceForFrame):
(WebKit::WebInspectorProxy::attach):
(WebKit::WebInspectorProxy::detach):
(WebKit::WebInspectorProxy::inspectorContext):
(WebKit::WebInspectorProxy::dispatchMessageFromRemoteFrontend):
(WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
(WebKit::WebInspectorProxy::createInspectorPage):
(WebKit::WebInspectorProxy::open):
(WebKit::WebInspectorProxy::didClose):
(WebKit::WebInspectorProxy::attachAvailabilityChanged):
* UIProcess/WebInspectorProxy.h:
(WebKit::WebInspectorProxy::isConnected):
(WebKit::WebInspectorProxy::canAttach):
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformAttach):
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter close]):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformDidClose):
(WebKit::WebInspectorProxy::platformHide):
(WebKit::WebInspectorProxy::platformSave):
(WebKit::WebInspectorProxy::platformAppend):
(WebKit::WebInspectorProxy::platformAttach):
Changed how the Inspector page is created by making it in a new WebContext for
the Inspector. This removes us from the main process pool and guarantees no process
sharing for our user interface. Also send new WebInspectorUI messages to the Inspector
page and not the inspected page when appropriate.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getLaunchOptions): Add &quot;inspector-process&quot; to extraInitializationData
if the context is the Inspector context. This is used by WebProcess::initializeProcessName.

* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::openInspectorFrontend):
(WebKit::WebInspectorClient::closeInspectorFrontend):
(WebKit::WebInspectorClient::bringFrontendToFront):
* WebProcess/WebCoreSupport/WebInspectorClient.h:
Remove the InspectorFrontendChannel class from WebInspectorClient and clean up a little.
InspectorFrontendChannel implementation moved to WebInspector.

* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: Removed. Superseded by WebInspectorUI.

* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::create):
(WebKit::WebInspector::WebInspector):
(WebKit::WebInspector::createInspectorPage):
(WebKit::WebInspector::closeFrontend):
(WebKit::WebInspector::openInNewTab):
(WebKit::WebInspector::showConsole):
(WebKit::WebInspector::showResources):
(WebKit::WebInspector::showMainResourceForFrame):
(WebKit::WebInspector::startPageProfiling):
(WebKit::WebInspector::stopPageProfiling):
(WebKit::WebInspector::canAttachWindow):
(WebKit::WebInspector::updateDockingAvailability):
(WebKit::WebInspector::sendMessageToBackend):
(WebKit::WebInspector::sendMessageToFrontend):
(WebKit::WebInspector::remoteFrontendConnected):
(WebKit::WebInspector::remoteFrontendDisconnected):
* WebProcess/WebPage/WebInspector.h:
(WebKit::WebInspector::didClose):
(WebKit::WebInspector::didReceiveInvalidMessage):
(WebKit::WebInspector::setAttached):
* WebProcess/WebPage/WebInspector.messages.in:
Stop taking an optional InspectorFrontendChannel and inherit it instead. Create a connection that
can be passed to the other web process for WebInspectorUI to use. Stop referencing Inspector's page
directly, since it is in another process now.

* WebProcess/WebPage/WebInspectorUI.cpp: Added.
(WebKit::WebInspectorUI::create):
(WebKit::WebInspectorUI::WebInspectorUI):
(WebKit::WebInspectorUI::establishConnection):
(WebKit::WebInspectorUI::windowObjectCleared):
(WebKit::WebInspectorUI::frontendLoaded):
(WebKit::WebInspectorUI::moveWindowBy):
(WebKit::WebInspectorUI::bringToFront):
(WebKit::WebInspectorUI::closeWindow):
(WebKit::WebInspectorUI::requestSetDockSide):
(WebKit::WebInspectorUI::setDockSide):
(WebKit::WebInspectorUI::changeAttachedWindowHeight):
(WebKit::WebInspectorUI::changeAttachedWindowWidth):
(WebKit::WebInspectorUI::setToolbarHeight):
(WebKit::WebInspectorUI::openInNewTab):
(WebKit::WebInspectorUI::save):
(WebKit::WebInspectorUI::append):
(WebKit::WebInspectorUI::inspectedURLChanged):
(WebKit::WebInspectorUI::showConsole):
(WebKit::WebInspectorUI::showResources):
(WebKit::WebInspectorUI::showMainResourceForFrame):
(WebKit::WebInspectorUI::startPageProfiling):
(WebKit::WebInspectorUI::stopPageProfiling):
(WebKit::WebInspectorUI::didSave):
(WebKit::WebInspectorUI::didAppend):
(WebKit::WebInspectorUI::sendMessageToFrontend):
(WebKit::WebInspectorUI::sendMessageToBackend):
(WebKit::WebInspectorUI::evaluateCommandOnLoad):
(WebKit::WebInspectorUI::evaluateExpressionOnLoad):
(WebKit::WebInspectorUI::evaluatePendingExpressions):
* WebProcess/WebPage/WebInspectorUI.h: Added.
(WebKit::WebInspectorUI::page):
(WebKit::WebInspectorUI::didClose):
(WebKit::WebInspectorUI::didReceiveInvalidMessage):
(WebKit::WebInspectorUI::attachedBottom):
(WebKit::WebInspectorUI::attachedRight):
(WebKit::WebInspectorUI::detached):
(WebKit::WebInspectorUI::evaluateCommandOnLoad):
* WebProcess/WebPage/WebInspectorUI.messages.in: Added.
* WebProcess/WebPage/efl/WebInspectorUIEfl.cpp: Added.
(WebKit::WebInspectorUI::canSave):
(WebKit::WebInspectorUI::localizedStringsURL):
* WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp: Added.
(WebKit::WebInspectorUI::canSave):
(WebKit::WebInspectorUI::localizedStringsURL):
* WebProcess/WebPage/mac/WebInspectorUIMac.mm: Added.
(WebKit::WebInspectorUI::canSave):
(WebKit::WebInspectorUI::localizedStringsURL):
Implement the InspectorFrontendClient and handle a connection to the inspected page's WebInspector.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::~WebPage):
(WebKit::WebPage::inspector):
(WebKit::WebPage::inspectorUI):
(WebKit::WebPage::didReceiveMessage):
Setup as a listener for WebInspectorUI messages.

* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::isInspectorPage): It is an Inspector page if we have a m_inspectorUI.

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::initializeProcessName):
Name the process &quot;%@ Web Inspector&quot; if it is an Inspector content process. Processes in that
context are not shared with multiple pages.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreEnglishlprojLocalizablestrings">trunk/Source/WebCore/English.lproj/Localizable.strings</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptGlobalObjecth">trunk/Source/WebCore/bindings/js/ScriptGlobalObject.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptStateh">trunk/Source/WebCore/bindings/js/ScriptState.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorControllercpp">trunk/Source/WebCore/inspector/InspectorController.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorControllerh">trunk/Source/WebCore/inspector/InspectorController.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorFrontendHosth">trunk/Source/WebCore/inspector/InspectorFrontendHost.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorPageAgenth">trunk/Source/WebCore/inspector/InspectorPageAgent.h</a></li>
<li><a href="#trunkSourceWebCorepageChromeh">trunk/Source/WebCore/page/Chrome.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsh">trunk/Source/WebCore/testing/Internals.h</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs">trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceBaseMainjs">trunk/Source/WebInspectorUI/UserInterface/Base/Main.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceBaseTestjs">trunk/Source/WebInspectorUI/UserInterface/Base/Test.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolInspectorFrontendAPIjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js</a></li>
<li><a href="#trunkSourceWebKitWebKitvcxprojWebKitExportGeneratorWebKitExportsdefin">trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in</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="#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="#trunkSourceWebKit2CMakeListstxt">trunk/Source/WebKit2/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2DerivedSourcesmake">trunk/Source/WebKit2/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebKit2PlatformEflcmake">trunk/Source/WebKit2/PlatformEfl.cmake</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIObjecth">trunk/Source/WebKit2/Shared/APIObject.h</a></li>
<li><a href="#trunkSourceWebKit2SharedEntryPointUtilitiesmacLegacyProcessChildProcessEntryPointmm">trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedEntryPointUtilitiesmacXPCServiceXPCServiceEntryPointmm">trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKInspectorcpp">trunk/Source/WebKit2/UIProcess/API/C/WKInspector.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKInspectorh">trunk/Source/WebKit2/UIProcess/API/C/WKInspector.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="#trunkSourceWebKit2UIProcessWebInspectorProxymessagesin">trunk/Source/WebKit2/UIProcess/WebInspectorProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxycpp">trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcesseflWebInspectorProxyEflcpp">trunk/Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessgtkWebInspectorProxyGtkcpp">trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebInspectorProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</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>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebInspectorcpp">trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebInspectorh">trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebInspectormessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcesscocoaWebProcessCocoamm">trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebInspectorUIcpp">trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebInspectorUIh">trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebInspectorUImessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageeflWebInspectorUIEflcpp">trunk/Source/WebKit2/WebProcess/WebPage/efl/WebInspectorUIEfl.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagegtkWebInspectorUIGtkcpp">trunk/Source/WebKit2/WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacWebInspectorUIMacmm">trunk/Source/WebKit2/WebProcess/WebPage/mac/WebInspectorUIMac.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebInspectorFrontendClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebCore/ChangeLog        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2014-09-21  Timothy Hatcher  &lt;timothy@apple.com&gt;
+
+        Make the Web Inspector use a separate web process.
+
+        https://bugs.webkit.org/show_bug.cgi?id=135120
+
+        Reviewed by Anders Carlsson.
+
+        * English.lproj/Localizable.strings: Updated.
+
+        * WebCore.exp.in:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/ScriptGlobalObject.h:
+        * bindings/js/ScriptState.h:
+        * inspector/InspectorFrontendHost.h:
+        * inspector/InspectorPageAgent.h:
+        * page/Chrome.h:
+        Exported a few functions and private headers.
+
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::InspectorController):
+        (WebCore::InspectorController::setInspectorFrontendClient):
+        (WebCore::InspectorController::hasInspectorFrontendClient):
+        (WebCore::InspectorController::show):
+        * inspector/InspectorController.h:
+        Make InspectorFrontendClient a pointer instead of a std::unique_ptr.
+        This makes it easier to implement InspectorFrontendClient as
+        part of an existing object that is externally owned.
+
+        * testing/Internals.cpp:
+        (WebCore::Internals::openDummyInspectorFrontend):
+        (WebCore::Internals::closeDummyInspectorFrontend):
+        * testing/Internals.h:
+        Change InspectorFrontendClientDummy from being moved to owned.
+
</ins><span class="cx"> 2014-09-23  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Yosemite] Button text doesn't go white while pushing the button, like it does for real buttons
</span></span></pre></div>
<a id="trunkSourceWebCoreEnglishlprojLocalizablestrings"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/English.lproj/Localizable.strings (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/English.lproj/Localizable.strings        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebCore/English.lproj/Localizable.strings        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -49,6 +49,9 @@
</span><span class="cx"> /* Visible name of the web process. The argument is the application name. */
</span><span class="cx"> &quot;%@ Web Content&quot; = &quot;%@ Web Content&quot;;
</span><span class="cx"> 
</span><ins>+/* Visible name of Web Inspector's web process. The argument is the application name. */
+&quot;%@ Web Inspector&quot; = &quot;%@ Web Inspector&quot;;
+
</ins><span class="cx"> /* Name of application's single WebCrypto master key in Keychain */
</span><span class="cx"> &quot;%@ WebCrypto Master Key&quot; = &quot;%@ WebCrypto Master Key&quot;;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -770,6 +770,7 @@
</span><span class="cx"> __ZN7WebCore17SubresourceLoader6createEPNS_5FrameEPNS_14CachedResourceERKNS_15ResourceRequestERKNS_21ResourceLoaderOptionsE
</span><span class="cx"> __ZN7WebCore17cacheDOMStructureEPNS_17JSDOMGlobalObjectEPN3JSC9StructureEPKNS2_9ClassInfoE
</span><span class="cx"> __ZN7WebCore17encodeForFileNameERKN3WTF6StringE
</span><ins>+__ZN7WebCore17execStateFromPageERNS_15DOMWrapperWorldEPNS_4PageE
</ins><span class="cx"> __ZN7WebCore17languageDidChangeEv
</span><span class="cx"> __ZN7WebCore17openTemporaryFileERKN3WTF6StringERi
</span><span class="cx"> __ZN7WebCore17sRGBColorSpaceRefEv
</span><span class="lines">@@ -793,6 +794,7 @@
</span><span class="cx"> __ZN7WebCore18PlatformPasteboard8getTypesERN3WTF6VectorINS1_6StringELm0ENS1_15CrashOnOverflowEEE
</span><span class="cx"> __ZN7WebCore18PlatformPasteboard8setTypesERKN3WTF6VectorINS1_6StringELm0ENS1_15CrashOnOverflowEEE
</span><span class="cx"> __ZN7WebCore18PlatformPasteboardC1ERKN3WTF6StringE
</span><ins>+__ZN7WebCore18ScriptGlobalObject3setEPN3JSC9ExecStateEPKcPNS_21InspectorFrontendHostE
</ins><span class="cx"> __ZN7WebCore18StyleSheetContents11parseStringERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore18StyleSheetContentsC1EPNS_15StyleRuleImportERKN3WTF6StringERKNS_16CSSParserContextE
</span><span class="cx"> __ZN7WebCore18StyleSheetContentsD1Ev
</span><span class="lines">@@ -1925,7 +1927,10 @@
</span><span class="cx"> __ZNK7WebCore5Range9firstNodeEv
</span><span class="cx"> __ZNK7WebCore5Range9textQuadsERN3WTF6VectorINS_9FloatQuadELm0ENS1_15CrashOnOverflowEEEbPNS0_20RangeInFixedPositionE
</span><span class="cx"> __ZNK7WebCore5Range9textRectsERN3WTF6VectorINS_7IntRectELm0ENS1_15CrashOnOverflowEEEbPNS0_20RangeInFixedPositionE
</span><ins>+__ZNK7WebCore6Chrome10windowRectEv
</ins><span class="cx"> __ZNK7WebCore6Chrome12createWindowEPNS_5FrameERKNS_16FrameLoadRequestERKNS_14WindowFeaturesERKNS_16NavigationActionE
</span><ins>+__ZNK7WebCore6Chrome13setWindowRectERKNS_9FloatRectE
+__ZNK7WebCore6Chrome4showEv
</ins><span class="cx"> __ZNK7WebCore6Editor12selectedTextEv
</span><span class="cx"> __ZNK7WebCore6Editor13canEditRichlyEv
</span><span class="cx"> __ZNK7WebCore6Editor16compositionRangeEv
</span><span class="lines">@@ -3122,13 +3127,18 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx"> __ZN7WebCore14SchemeRegistry27shouldTreatURLSchemeAsLocalERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore15InspectorClient31doDispatchMessageOnFrontendPageEPNS_4PageERKN3WTF6StringE
</span><ins>+__ZN7WebCore18InspectorPageAgent7frameIdEPNS_5FrameE
</ins><span class="cx"> __ZN7WebCore19InspectorController15connectFrontendEPN9Inspector24InspectorFrontendChannelEb
</span><span class="cx"> __ZN7WebCore19InspectorController18disconnectFrontendEN9Inspector25InspectorDisconnectReasonE
</span><span class="cx"> __ZN7WebCore19InspectorController18setProfilerEnabledEb
</span><span class="cx"> __ZN7WebCore19InspectorController25evaluateForTestInFrontendERKN3WTF6StringE
</span><del>-__ZN7WebCore19InspectorController26setInspectorFrontendClientENSt3__110unique_ptrINS_23InspectorFrontendClientENS1_14default_deleteIS3_EEEE
</del><ins>+__ZN7WebCore19InspectorController26setInspectorFrontendClientEPNS_23InspectorFrontendClientE
+__ZN7WebCore19InspectorController27dispatchMessageFromFrontendERKN3WTF6StringE
</ins><span class="cx"> __ZN7WebCore19InspectorController4showEv
</span><span class="cx"> __ZN7WebCore19InspectorController5closeEv
</span><ins>+__ZN7WebCore21InspectorFrontendHost16disconnectClientEv
+__ZN7WebCore21InspectorFrontendHostC1EPNS_23InspectorFrontendClientEPNS_4PageE
+__ZN7WebCore21InspectorFrontendHostD1Ev
</ins><span class="cx"> __ZN7WebCore22instrumentationForPageEPNS_4PageE
</span><span class="cx"> __ZN7WebCore24InspectorInstrumentation17s_frontendCounterE
</span><span class="cx"> __ZN7WebCore24InspectorInstrumentation26instrumentingAgentsForPageEPNS_4PageE
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1761,7 +1761,7 @@
</span><span class="cx">                 4F1534E011B533020021FD86 /* EditingBehaviorTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F1534DF11B533020021FD86 /* EditingBehaviorTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 4F4F5FFB11CBD2E100A186BF /* InspectorWebFrontendDispatchers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F4F5FFA11CBD2D200A186BF /* InspectorWebFrontendDispatchers.cpp */; };
</span><span class="cx">                 4F6FDD641341DEDD001F8EE3 /* InspectorPageAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F6FDD621341DEDD001F8EE3 /* InspectorPageAgent.cpp */; };
</span><del>-                4F6FDD651341DEDD001F8EE3 /* InspectorPageAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F6FDD631341DEDD001F8EE3 /* InspectorPageAgent.h */; };
</del><ins>+                4F6FDD651341DEDD001F8EE3 /* InspectorPageAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F6FDD631341DEDD001F8EE3 /* InspectorPageAgent.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 4F707A9911EF679400ACDA69 /* InspectorWebBackendDispatchers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F707A9711EF679400ACDA69 /* InspectorWebBackendDispatchers.cpp */; };
</span><span class="cx">                 4F707A9A11EF679400ACDA69 /* InspectorWebBackendDispatchers.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F707A9811EF679400ACDA69 /* InspectorWebBackendDispatchers.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 4FB390AD15EF61F3007AD51F /* GeneratedImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FB390AC15EF61F3007AD51F /* GeneratedImage.cpp */; };
</span><span class="lines">@@ -2330,7 +2330,7 @@
</span><span class="cx">                 79F2F5A11091939A000D87CB /* CompositionEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 79F2F59E1091939A000D87CB /* CompositionEvent.cpp */; };
</span><span class="cx">                 79F2F5A21091939A000D87CB /* CompositionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 79F2F59F1091939A000D87CB /* CompositionEvent.h */; };
</span><span class="cx">                 7A0E770E10C00A8800A0276E /* InspectorFrontendHost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A0E770B10C00A8800A0276E /* InspectorFrontendHost.cpp */; };
</span><del>-                7A0E770F10C00A8800A0276E /* InspectorFrontendHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A0E770C10C00A8800A0276E /* InspectorFrontendHost.h */; };
</del><ins>+                7A0E770F10C00A8800A0276E /* InspectorFrontendHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A0E770C10C00A8800A0276E /* InspectorFrontendHost.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 7A0E771E10C00DB100A0276E /* JSInspectorFrontendHost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A0E771C10C00DB100A0276E /* JSInspectorFrontendHost.cpp */; };
</span><span class="cx">                 7A0E771F10C00DB100A0276E /* JSInspectorFrontendHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A0E771D10C00DB100A0276E /* JSInspectorFrontendHost.h */; };
</span><span class="cx">                 7A1D7FCB18F85F0F00C385AD /* mediaControlsLocalizedStrings.js in Resources */ = {isa = PBXBuildFile; fileRef = 7A1D7FC918F85F0F00C385AD /* mediaControlsLocalizedStrings.js */; };
</span><span class="lines">@@ -2370,7 +2370,7 @@
</span><span class="cx">                 7AB0B1C11211A62200A76940 /* InspectorDatabaseAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AB0B1BF1211A62200A76940 /* InspectorDatabaseAgent.h */; };
</span><span class="cx">                 7ACD88D314C08BD60084EDD2 /* InspectorIndexedDBAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7ACD88D114C08BD60084EDD2 /* InspectorIndexedDBAgent.cpp */; };
</span><span class="cx">                 7ACD88D414C08BD60084EDD2 /* InspectorIndexedDBAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ACD88D214C08BD60084EDD2 /* InspectorIndexedDBAgent.h */; };
</span><del>-                7ADE722610CBBB9B006B3B3A /* ContextMenuProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ADE722510CBBB9B006B3B3A /* ContextMenuProvider.h */; };
</del><ins>+                7ADE722610CBBB9B006B3B3A /* ContextMenuProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ADE722510CBBB9B006B3B3A /* ContextMenuProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 7AF9B20218CFB2DF00C64BEF /* VTTRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AF9B1FC18CFB2DF00C64BEF /* VTTRegion.cpp */; };
</span><span class="cx">                 7AF9B20318CFB2DF00C64BEF /* VTTRegion.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AF9B1FD18CFB2DF00C64BEF /* VTTRegion.h */; };
</span><span class="cx">                 7AF9B20518CFB2DF00C64BEF /* VTTRegionList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AF9B1FF18CFB2DF00C64BEF /* VTTRegionList.cpp */; };
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptGlobalObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptGlobalObject.h (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptGlobalObject.h        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebCore/bindings/js/ScriptGlobalObject.h        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> public:
</span><span class="cx">     static bool set(JSC::ExecState*, const char* name, const Deprecated::ScriptObject&amp;);
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><del>-    static bool set(JSC::ExecState*, const char* name, InspectorFrontendHost*);
</del><ins>+    WEBCORE_EXPORT static bool set(JSC::ExecState*, const char* name, InspectorFrontendHost*);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     static bool get(JSC::ExecState*, const char* name, Deprecated::ScriptObject&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptStateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptState.h (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptState.h        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebCore/bindings/js/ScriptState.h        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> JSC::ExecState* mainWorldExecState(Frame*);
</span><span class="cx"> 
</span><span class="cx"> JSC::ExecState* execStateFromNode(DOMWrapperWorld&amp;, Node*);
</span><del>-JSC::ExecState* execStateFromPage(DOMWrapperWorld&amp;, Page*);
</del><ins>+WEBCORE_EXPORT JSC::ExecState* execStateFromPage(DOMWrapperWorld&amp;, Page*);
</ins><span class="cx"> JSC::ExecState* execStateFromWorkerGlobalScope(WorkerGlobalScope*);
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorController.cpp (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorController.cpp        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebCore/inspector/InspectorController.cpp        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -86,6 +86,7 @@
</span><span class="cx">     , m_inspectorFrontendChannel(nullptr)
</span><span class="cx">     , m_page(page)
</span><span class="cx">     , m_inspectorClient(inspectorClient)
</span><ins>+    , m_inspectorFrontendClient(nullptr)
</ins><span class="cx">     , m_isUnderTest(false)
</span><span class="cx"> #if ENABLE(REMOTE_INSPECTOR)
</span><span class="cx">     , m_hasRemoteFrontend(false)
</span><span class="lines">@@ -188,9 +189,9 @@
</span><span class="cx">     m_inspectorClient = nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorController::setInspectorFrontendClient(std::unique_ptr&lt;InspectorFrontendClient&gt; inspectorFrontendClient)
</del><ins>+void InspectorController::setInspectorFrontendClient(InspectorFrontendClient* inspectorFrontendClient)
</ins><span class="cx"> {
</span><del>-    m_inspectorFrontendClient = WTF::move(inspectorFrontendClient);
</del><ins>+    m_inspectorFrontendClient = inspectorFrontendClient;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool InspectorController::hasLocalFrontend() const
</span><span class="lines">@@ -213,7 +214,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool InspectorController::hasInspectorFrontendClient() const
</span><span class="cx"> {
</span><del>-    return m_inspectorFrontendClient.get();
</del><ins>+    return m_inspectorFrontendClient;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InspectorController::didClearWindowObjectInWorld(Frame* frame, DOMWrapperWorld&amp; world)
</span><span class="lines">@@ -283,9 +284,10 @@
</span><span class="cx">     if (m_inspectorFrontendChannel)
</span><span class="cx">         m_inspectorClient-&gt;bringFrontendToFront();
</span><span class="cx">     else {
</span><del>-        InspectorFrontendChannel* frontendChannel = m_inspectorClient-&gt;openInspectorFrontend(this);
-        if (frontendChannel)
-            connectFrontend(frontendChannel, false);
</del><ins>+        if (InspectorFrontendChannel* frontendChannel = m_inspectorClient-&gt;openInspectorFrontend(this)) {
+            bool isAutomaticInspection = false;
+            connectFrontend(frontendChannel, isAutomaticInspection);
+        }
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorController.h (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorController.h        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebCore/inspector/InspectorController.h        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx">     WEBCORE_EXPORT void show();
</span><span class="cx">     WEBCORE_EXPORT void close();
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT void setInspectorFrontendClient(std::unique_ptr&lt;InspectorFrontendClient&gt;);
</del><ins>+    WEBCORE_EXPORT void setInspectorFrontendClient(InspectorFrontendClient*);
</ins><span class="cx">     bool hasInspectorFrontendClient() const;
</span><span class="cx">     void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx">     void resume();
</span><span class="cx"> 
</span><span class="cx">     InspectorClient* inspectorClient() const { return m_inspectorClient; }
</span><del>-    InspectorPageAgent* pageAgent() const { return m_pageAgent; }
</del><ins>+    WEBCORE_EXPORT InspectorPageAgent* pageAgent() const { return m_pageAgent; }
</ins><span class="cx"> 
</span><span class="cx">     virtual bool developerExtrasEnabled() const override;
</span><span class="cx">     virtual bool canAccessInspectedScriptState(JSC::ExecState*) const override;
</span><span class="lines">@@ -146,10 +146,10 @@
</span><span class="cx">     InspectorTimelineAgent* m_timelineAgent;
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Inspector::InspectorBackendDispatcher&gt; m_inspectorBackendDispatcher;
</span><del>-    std::unique_ptr&lt;InspectorFrontendClient&gt; m_inspectorFrontendClient;
</del><span class="cx">     Inspector::InspectorFrontendChannel* m_inspectorFrontendChannel;
</span><span class="cx">     Page&amp; m_page;
</span><span class="cx">     InspectorClient* m_inspectorClient;
</span><ins>+    InspectorFrontendClient* m_inspectorFrontendClient;
</ins><span class="cx">     Inspector::InspectorAgentRegistry m_agents;
</span><span class="cx">     Vector&lt;InspectorInstrumentationCookie, 2&gt; m_injectedScriptInstrumentationCookies;
</span><span class="cx">     bool m_isUnderTest;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorFrontendHosth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorFrontendHost.h (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorFrontendHost.h        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebCore/inspector/InspectorFrontendHost.h        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -50,8 +50,8 @@
</span><span class="cx">         return adoptRef(new InspectorFrontendHost(client, frontendPage));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    ~InspectorFrontendHost();
-    void disconnectClient();
</del><ins>+    WEBCORE_EXPORT ~InspectorFrontendHost();
+    WEBCORE_EXPORT void disconnectClient();
</ins><span class="cx"> 
</span><span class="cx">     void loaded();
</span><span class="cx">     void requestSetDockSide(const String&amp;);
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx"> #if ENABLE(CONTEXT_MENUS)
</span><span class="cx">     friend class FrontendMenuProvider;
</span><span class="cx"> #endif
</span><del>-    InspectorFrontendHost(InspectorFrontendClient*, Page* frontendPage);
</del><ins>+    WEBCORE_EXPORT InspectorFrontendHost(InspectorFrontendClient*, Page* frontendPage);
</ins><span class="cx"> 
</span><span class="cx">     InspectorFrontendClient* m_client;
</span><span class="cx">     Page* m_frontendPage;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorPageAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.h (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorPageAgent.h        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.h        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -155,7 +155,7 @@
</span><span class="cx">     Frame* mainFrame();
</span><span class="cx">     String createIdentifier();
</span><span class="cx">     Frame* frameForId(const String&amp; frameId);
</span><del>-    String frameId(Frame*);
</del><ins>+    WEBCORE_EXPORT String frameId(Frame*);
</ins><span class="cx">     bool hasIdForFrame(Frame*) const;
</span><span class="cx">     String loaderId(DocumentLoader*);
</span><span class="cx">     Frame* findFrameWithSecurityOrigin(const String&amp; originRawString);
</span></span></pre></div>
<a id="trunkSourceWebCorepageChromeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Chrome.h (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Chrome.h        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebCore/page/Chrome.h        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -102,8 +102,8 @@
</span><span class="cx"> 
</span><span class="cx">     void contentsSizeChanged(Frame*, const IntSize&amp;) const;
</span><span class="cx"> 
</span><del>-    void setWindowRect(const FloatRect&amp;) const;
-    FloatRect windowRect() const;
</del><ins>+    WEBCORE_EXPORT void setWindowRect(const FloatRect&amp;) const;
+    WEBCORE_EXPORT FloatRect windowRect() const;
</ins><span class="cx"> 
</span><span class="cx">     FloatRect pageRect() const;
</span><span class="cx"> 
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx">     void focusedFrameChanged(Frame*) const;
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT Page* createWindow(Frame*, const FrameLoadRequest&amp;, const WindowFeatures&amp;, const NavigationAction&amp;) const;
</span><del>-    void show() const;
</del><ins>+    WEBCORE_EXPORT void show() const;
</ins><span class="cx"> 
</span><span class="cx">     bool canRunModal() const;
</span><span class="cx">     bool canRunModalNow() const;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebCore/testing/Internals.cpp        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1470,13 +1470,11 @@
</span><span class="cx">     Page* frontendPage = m_frontendWindow-&gt;document()-&gt;page();
</span><span class="cx">     ASSERT(frontendPage);
</span><span class="cx"> 
</span><del>-    auto frontendClient = std::make_unique&lt;InspectorFrontendClientDummy&gt;(&amp;page-&gt;inspectorController(), frontendPage);
</del><ins>+    m_frontendClient = std::make_unique&lt;InspectorFrontendClientDummy&gt;(&amp;page-&gt;inspectorController(), frontendPage);
+    frontendPage-&gt;inspectorController().setInspectorFrontendClient(m_frontendClient.get());
</ins><span class="cx"> 
</span><del>-    frontendPage-&gt;inspectorController().setInspectorFrontendClient(WTF::move(frontendClient));
-
-    m_frontendChannel = adoptPtr(new InspectorFrontendChannelDummy(frontendPage));
-
</del><span class="cx">     bool isAutomaticInspection = false;
</span><ins>+    m_frontendChannel = std::make_unique&lt;InspectorFrontendChannelDummy&gt;(frontendPage);
</ins><span class="cx">     page-&gt;inspectorController().connectFrontend(m_frontendChannel.get(), isAutomaticInspection);
</span><span class="cx"> 
</span><span class="cx">     return m_frontendWindow;
</span><span class="lines">@@ -1490,10 +1488,11 @@
</span><span class="cx"> 
</span><span class="cx">     page-&gt;inspectorController().disconnectFrontend(InspectorDisconnectReason::InspectorDestroyed);
</span><span class="cx"> 
</span><del>-    m_frontendChannel.release();
</del><ins>+    m_frontendClient = nullptr;
+    m_frontendChannel = nullptr;
</ins><span class="cx"> 
</span><span class="cx">     m_frontendWindow-&gt;close(m_frontendWindow-&gt;scriptExecutionContext());
</span><del>-    m_frontendWindow.release();
</del><ins>+    m_frontendWindow.clear();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Internals::setJavaScriptProfilingEnabled(bool enabled, ExceptionCode&amp; ec)
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.h (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.h        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebCore/testing/Internals.h        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> class Element;
</span><span class="cx"> class Frame;
</span><span class="cx"> class InspectorFrontendChannelDummy;
</span><ins>+class InspectorFrontendClientDummy;
</ins><span class="cx"> class InternalSettings;
</span><span class="cx"> class MallocStatistics;
</span><span class="cx"> class MemoryInfo;
</span><span class="lines">@@ -350,7 +351,8 @@
</span><span class="cx">     DocumentMarker* markerAt(Node*, const String&amp; markerType, unsigned index, ExceptionCode&amp;);
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     RefPtr&lt;DOMWindow&gt; m_frontendWindow;
</span><del>-    OwnPtr&lt;InspectorFrontendChannelDummy&gt; m_frontendChannel;
</del><ins>+    std::unique_ptr&lt;InspectorFrontendClientDummy&gt; m_frontendClient;
+    std::unique_ptr&lt;InspectorFrontendChannelDummy&gt; m_frontendChannel;
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebInspectorUI/ChangeLog        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2014-09-21  Timothy Hatcher  &lt;timothy@apple.com&gt;
+
+        Make the Web Inspector use a separate web process.
+
+        https://bugs.webkit.org/show_bug.cgi?id=135120
+
+        Reviewed by Anders Carlsson.
+
+        * Localizations/en.lproj/localizedStrings.js: Updated.
+
+        * UserInterface/Base/Main.js:
+        (WebInspector.loaded):
+        (WebInspector.contentLoaded):
+        Move InspectorFrontendHost.loaded to later in the load.
+        Calling it early just shows the window before we have
+        a user interface to show.
+
+        * UserInterface/Base/Test.js:
+        (WebInspector.loaded):
+        (WebInspector.contentLoaded):
+        Match the changes in Main.js.
+
+        * UserInterface/Protocol/InspectorFrontendAPI.js:
+        (InspectorFrontendAPI.savedURL): Change comment.
+        (InspectorFrontendAPI.appendedToURL): Change comment.
+        (InspectorFrontendAPI.dispatch): Add an assert and early
+        return to be safe from unknown commands.
+        (InspectorFrontendAPI.loadCompleted): Delete _pendingCommands,
+        no need to keep an empty array around a one time use.
+
</ins><span class="cx"> 2014-09-24  Andres Gomez  &lt;agomez@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed. Add more free icons for the Web Inspector in GTK+
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -10,7 +10,6 @@
</span><span class="cx"> localizedStrings[&quot;%.1fhrs&quot;] = &quot;%.1fhrs&quot;;
</span><span class="cx"> localizedStrings[&quot;%.1fmin&quot;] = &quot;%.1fmin&quot;;
</span><span class="cx"> localizedStrings[&quot;%.1fms&quot;] = &quot;%.1fms&quot;;
</span><del>-localizedStrings[&quot;%.2f %%&quot;] = &quot;%.2f %%&quot;;
</del><span class="cx"> localizedStrings[&quot;%.2f KB&quot;] = &quot;%.2f KB&quot;;
</span><span class="cx"> localizedStrings[&quot;%.2f MB&quot;] = &quot;%.2f MB&quot;;
</span><span class="cx"> localizedStrings[&quot;%.2f\u00d7&quot;] = &quot;%.2f\u00d7&quot;;
</span><span class="lines">@@ -65,7 +64,6 @@
</span><span class="cx"> localizedStrings[&quot;Attributes&quot;] = &quot;Attributes&quot;;
</span><span class="cx"> localizedStrings[&quot;Author Stylesheet&quot;] = &quot;Author Stylesheet&quot;;
</span><span class="cx"> localizedStrings[&quot;Automatically continue after evaluating&quot;] = &quot;Automatically continue after evaluating&quot;;
</span><del>-localizedStrings[&quot;Average&quot;] = &quot;Average&quot;;
</del><span class="cx"> localizedStrings[&quot;Average Time&quot;] = &quot;Average Time&quot;;
</span><span class="cx"> localizedStrings[&quot;Back (%s)&quot;] = &quot;Back (%s)&quot;;
</span><span class="cx"> localizedStrings[&quot;Begin Capturing&quot;] = &quot;Begin Capturing&quot;;
</span><span class="lines">@@ -96,7 +94,6 @@
</span><span class="cx"> localizedStrings[&quot;Closure Variables&quot;] = &quot;Closure Variables&quot;;
</span><span class="cx"> localizedStrings[&quot;Code&quot;] = &quot;Code&quot;;
</span><span class="cx"> localizedStrings[&quot;Collapse columns&quot;] = &quot;Collapse columns&quot;;
</span><del>-localizedStrings[&quot;Collect JavaScript Profile&quot;] = &quot;Collect JavaScript Profile&quot;;
</del><span class="cx"> localizedStrings[&quot;Comment&quot;] = &quot;Comment&quot;;
</span><span class="cx"> localizedStrings[&quot;Compressed&quot;] = &quot;Compressed&quot;;
</span><span class="cx"> localizedStrings[&quot;Compression&quot;] = &quot;Compression&quot;;
</span><span class="lines">@@ -247,10 +244,7 @@
</span><span class="cx"> localizedStrings[&quot;Input: &quot;] = &quot;Input: &quot;;
</span><span class="cx"> localizedStrings[&quot;Inspect&quot;] = &quot;Inspect&quot;;
</span><span class="cx"> localizedStrings[&quot;Invalid&quot;] = &quot;Invalid&quot;;
</span><del>-localizedStrings[&quot;Invert call tree&quot;] = &quot;Invert call tree&quot;;
-localizedStrings[&quot;JAVASCRIPT PROFILES&quot;] = &quot;JAVASCRIPT PROFILES&quot;;
</del><span class="cx"> localizedStrings[&quot;JavaScript &amp; Events&quot;] = &quot;JavaScript &amp; Events&quot;;
</span><del>-localizedStrings[&quot;JavaScript profiles show where the execution time is spent in your page's JavaScript functions.&quot;] = &quot;JavaScript profiles show where the execution time is spent in your page's JavaScript functions.&quot;;
</del><span class="cx"> localizedStrings[&quot;Key&quot;] = &quot;Key&quot;;
</span><span class="cx"> localizedStrings[&quot;Label&quot;] = &quot;Label&quot;;
</span><span class="cx"> localizedStrings[&quot;Latency&quot;] = &quot;Latency&quot;;
</span><span class="lines">@@ -307,7 +301,6 @@
</span><span class="cx"> localizedStrings[&quot;No Search Results&quot;] = &quot;No Search Results&quot;;
</span><span class="cx"> localizedStrings[&quot;No exact ARIA role match.&quot;] = &quot;No exact ARIA role match.&quot;;
</span><span class="cx"> localizedStrings[&quot;Node&quot;] = &quot;Node&quot;;
</span><del>-localizedStrings[&quot;Normal call tree&quot;] = &quot;Normal call tree&quot;;
</del><span class="cx"> localizedStrings[&quot;Not found&quot;] = &quot;Not found&quot;;
</span><span class="cx"> localizedStrings[&quot;Online&quot;] = &quot;Online&quot;;
</span><span class="cx"> localizedStrings[&quot;Options&quot;] = &quot;Options&quot;;
</span><span class="lines">@@ -336,7 +329,6 @@
</span><span class="cx"> localizedStrings[&quot;Probe Sample Recorded&quot;] = &quot;Probe Sample Recorded&quot;;
</span><span class="cx"> localizedStrings[&quot;Probes&quot;] = &quot;Probes&quot;;
</span><span class="cx"> localizedStrings[&quot;Processing Instruction&quot;] = &quot;Processing Instruction&quot;;
</span><del>-localizedStrings[&quot;Profile %d&quot;] = &quot;Profile %d&quot;;
</del><span class="cx"> localizedStrings[&quot;Properties&quot;] = &quot;Properties&quot;;
</span><span class="cx"> localizedStrings[&quot;Prototype&quot;] = &quot;Prototype&quot;;
</span><span class="cx"> localizedStrings[&quot;Query Parameters&quot;] = &quot;Query Parameters&quot;;
</span><span class="lines">@@ -346,8 +338,6 @@
</span><span class="cx"> localizedStrings[&quot;Readonly&quot;] = &quot;Readonly&quot;;
</span><span class="cx"> localizedStrings[&quot;Reasons for compositing:&quot;] = &quot;Reasons for compositing:&quot;;
</span><span class="cx"> localizedStrings[&quot;Recording&quot;] = &quot;Recording&quot;;
</span><del>-localizedStrings[&quot;Recording JavaScript Profile\u2026&quot;] = &quot;Recording JavaScript Profile\u2026&quot;;
-localizedStrings[&quot;Recording\u2026&quot;] = &quot;Recording\u2026&quot;;
</del><span class="cx"> localizedStrings[&quot;Records&quot;] = &quot;Records&quot;;
</span><span class="cx"> localizedStrings[&quot;Reference Issue&quot;] = &quot;Reference Issue&quot;;
</span><span class="cx"> localizedStrings[&quot;Reflection&quot;] = &quot;Reflection&quot;;
</span><span class="lines">@@ -387,7 +377,6 @@
</span><span class="cx"> localizedStrings[&quot;Selected&quot;] = &quot;Selected&quot;;
</span><span class="cx"> localizedStrings[&quot;Selected Item&quot;] = &quot;Selected Item&quot;;
</span><span class="cx"> localizedStrings[&quot;Selected Items&quot;] = &quot;Selected Items&quot;;
</span><del>-localizedStrings[&quot;Self&quot;] = &quot;Self&quot;;
</del><span class="cx"> localizedStrings[&quot;Self Time&quot;] = &quot;Self Time&quot;;
</span><span class="cx"> localizedStrings[&quot;Semantic Issue&quot;] = &quot;Semantic Issue&quot;;
</span><span class="cx"> localizedStrings[&quot;Session&quot;] = &quot;Session&quot;;
</span><span class="lines">@@ -408,8 +397,6 @@
</span><span class="cx"> localizedStrings[&quot;Show the %s details sidebar (%s)&quot;] = &quot;Show the %s details sidebar (%s)&quot;;
</span><span class="cx"> localizedStrings[&quot;Show the %s navigation sidebar&quot;] = &quot;Show the %s navigation sidebar&quot;;
</span><span class="cx"> localizedStrings[&quot;Show the %s navigation sidebar (%s)&quot;] = &quot;Show the %s navigation sidebar (%s)&quot;;
</span><del>-localizedStrings[&quot;Show times as absolute times&quot;] = &quot;Show times as absolute times&quot;;
-localizedStrings[&quot;Show times as percentages&quot;] = &quot;Show times as percentages&quot;;
</del><span class="cx"> localizedStrings[&quot;Show type information&quot;] = &quot;Show type information&quot;;
</span><span class="cx"> localizedStrings[&quot;Size&quot;] = &quot;Size&quot;;
</span><span class="cx"> localizedStrings[&quot;Small Icons&quot;] = &quot;Small Icons&quot;;
</span><span class="lines">@@ -417,7 +404,6 @@
</span><span class="cx"> localizedStrings[&quot;Sockets&quot;] = &quot;Sockets&quot;;
</span><span class="cx"> localizedStrings[&quot;Source Code&quot;] = &quot;Source Code&quot;;
</span><span class="cx"> localizedStrings[&quot;Spelling&quot;] = &quot;Spelling&quot;;
</span><del>-localizedStrings[&quot;Start JavaScript profiling.&quot;] = &quot;Start JavaScript profiling.&quot;;
</del><span class="cx"> localizedStrings[&quot;Start Playback&quot;] = &quot;Start Playback&quot;;
</span><span class="cx"> localizedStrings[&quot;Start Recording&quot;] = &quot;Start Recording&quot;;
</span><span class="cx"> localizedStrings[&quot;Start Time&quot;] = &quot;Start Time&quot;;
</span><span class="lines">@@ -425,7 +411,6 @@
</span><span class="cx"> localizedStrings[&quot;Step into (%s or %s)&quot;] = &quot;Step into (%s or %s)&quot;;
</span><span class="cx"> localizedStrings[&quot;Step out (%s or %s)&quot;] = &quot;Step out (%s or %s)&quot;;
</span><span class="cx"> localizedStrings[&quot;Step over (%s or %s)&quot;] = &quot;Step over (%s or %s)&quot;;
</span><del>-localizedStrings[&quot;Stop JavaScript profiling.&quot;] = &quot;Stop JavaScript profiling.&quot;;
</del><span class="cx"> localizedStrings[&quot;Stop Recording&quot;] = &quot;Stop Recording&quot;;
</span><span class="cx"> localizedStrings[&quot;Storage&quot;] = &quot;Storage&quot;;
</span><span class="cx"> localizedStrings[&quot;Style&quot;] = &quot;Style&quot;;
</span><span class="lines">@@ -450,7 +435,6 @@
</span><span class="cx"> localizedStrings[&quot;Timer Installed&quot;] = &quot;Timer Installed&quot;;
</span><span class="cx"> localizedStrings[&quot;Timer Removed&quot;] = &quot;Timer Removed&quot;;
</span><span class="cx"> localizedStrings[&quot;Tip: &quot;] = &quot;Tip: &quot;;
</span><del>-localizedStrings[&quot;Total&quot;] = &quot;Total&quot;;
</del><span class="cx"> localizedStrings[&quot;Total Time&quot;] = &quot;Total Time&quot;;
</span><span class="cx"> localizedStrings[&quot;Total number of resources, click to show the Resources navigation sidebar&quot;] = &quot;Total number of resources, click to show the Resources navigation sidebar&quot;;
</span><span class="cx"> localizedStrings[&quot;Total size of all resources, click to show the Network Requests timeline&quot;] = &quot;Total size of all resources, click to show the Network Requests timeline&quot;;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseMainjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -49,10 +49,7 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector.loaded = function()
</span><span class="cx"> {
</span><del>-    // Tell the InspectorFrontendHost we loaded first to establish communication with InspectorBackend.
-    InspectorFrontendHost.loaded();
-
-    // Initialize WebSocket to communication
</del><ins>+    // Initialize WebSocket to communication.
</ins><span class="cx">     this._initializeWebSocketIfNeeded();
</span><span class="cx"> 
</span><span class="cx">     // Register observers for events from the InspectorBackend.
</span><span class="lines">@@ -328,12 +325,13 @@
</span><span class="cx">     if (this._detailsSidebarWidthSetting.value)
</span><span class="cx">         this.detailsSidebar.width = this._detailsSidebarWidthSetting.value;
</span><span class="cx"> 
</span><del>-    // Update the docked state based on the query string passed when the Web Inspector was loaded.
-    this.updateDockedState(parseLocationQueryParameters().dockSide || &quot;undocked&quot;);
-
-    // Tell the frontend API we are loaded so any pending frontend commands can be dispatched.
</del><ins>+    // Signal that the frontend is now ready to receive messages.
</ins><span class="cx">     InspectorFrontendAPI.loadCompleted();
</span><span class="cx"> 
</span><ins>+    // Tell the InspectorFrontendHost we loaded, which causes the window to display
+    // and pending InspectorFrontendAPI commands to be sent.
+    InspectorFrontendHost.loaded();
+
</ins><span class="cx">     // Set collapsed after loading the pending frontend commands are dispatched so only the final
</span><span class="cx">     // selected sidebar panel gets shown and has a say in what content view gets shown.
</span><span class="cx">     this.navigationSidebar.collapsed = this._navigationSidebarCollapsedSetting.value;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseTestjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Test.js (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/Test.js        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Test.js        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -55,15 +55,16 @@
</span><span class="cx"> 
</span><span class="cx">     // Perform one-time tasks.
</span><span class="cx">     WebInspector.CSSCompletions.requestCSSNameCompletions();
</span><del>-
-    // Establish communication with the InspectorBackend.
-    InspectorFrontendHost.loaded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebInspector.contentLoaded = function()
</span><span class="cx"> {
</span><span class="cx">     // Signal that the frontend is now ready to receive messages.
</span><span class="cx">     InspectorFrontendAPI.loadCompleted();
</span><ins>+
+    // Tell the InspectorFrontendHost we loaded, which causes the window to display
+    // and pending InspectorFrontendAPI commands to be sent.
+    InspectorFrontendHost.loaded();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebInspector.UIString = function(string)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolInspectorFrontendAPIjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -25,30 +25,18 @@
</span><span class="cx"> 
</span><span class="cx"> InspectorFrontendAPI = {
</span><span class="cx">     _loaded: false,
</span><del>-
</del><span class="cx">     _pendingCommands: [],
</span><span class="cx"> 
</span><span class="cx">     savedURL: function(url)
</span><span class="cx">     {
</span><del>-        // FIXME: Not implemented.
</del><ins>+        // Not used yet.
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     appendedToURL: function(url)
</span><span class="cx">     {
</span><del>-        // FIXME: Not implemented.
</del><ins>+        // Not used yet.
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    isDebuggingEnabled: function()
-    {
-        // FIXME: Not implemented.
-        return false;
-    },
-
-    setDebuggingEnabled: function(enabled)
-    {
-        // FIXME: Not implemented.
-    },
-
</del><span class="cx">     isTimelineProfilingEnabled: function()
</span><span class="cx">     {
</span><span class="cx">         return WebInspector.timelineManager.isCapturing();
</span><span class="lines">@@ -108,11 +96,6 @@
</span><span class="cx">         WebInspector.resourceSidebarPanel.showSourceCodeForFrame(frameIdentifier, true);
</span><span class="cx">     },
</span><span class="cx"> 
</span><del>-    setDockingUnavailable: function(unavailable)
-    {
-        // Not used.
-    },
-
</del><span class="cx">     contextMenuItemSelected: function(id)
</span><span class="cx">     {
</span><span class="cx">         WebInspector.contextMenuItemSelected(id);
</span><span class="lines">@@ -141,6 +124,10 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         var methodName = signature.shift();
</span><ins>+        console.assert(InspectorFrontendAPI[methodName], &quot;Unexpected InspectorFrontendAPI method name: &quot; + InspectorFrontendAPI[methodName]);
+        if (!InspectorFrontendAPI[methodName])
+            return;
+
</ins><span class="cx">         return InspectorFrontendAPI[methodName].apply(InspectorFrontendAPI, signature);
</span><span class="cx">     },
</span><span class="cx"> 
</span><span class="lines">@@ -151,6 +138,6 @@
</span><span class="cx">         for (var i = 0; i &lt; InspectorFrontendAPI._pendingCommands.length; ++i)
</span><span class="cx">             InspectorFrontendAPI.dispatch(InspectorFrontendAPI._pendingCommands[i]);
</span><span class="cx"> 
</span><del>-        InspectorFrontendAPI._pendingCommands = [];
</del><ins>+        delete InspectorFrontendAPI._pendingCommands;
</ins><span class="cx">     }
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitvcxprojWebKitExportGeneratorWebKitExportsdefin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -227,7 +227,7 @@
</span><span class="cx">         symbolWithPointer(?openInNewTab@InspectorFrontendClientLocal@WebCore@@UAEXABVString@WTF@@@Z, ?openInNewTab@InspectorFrontendClientLocal@WebCore@@UEAAXAEBVString@WTF@@@Z)
</span><span class="cx">         symbolWithPointer(?requestSetDockSide@InspectorFrontendClientLocal@WebCore@@UAEXW4DockSide@InspectorFrontendClient@2@@Z, ?requestSetDockSide@InspectorFrontendClientLocal@WebCore@@UEAAXW4DockSide@InspectorFrontendClient@2@@Z)
</span><span class="cx">         symbolWithPointer(?sendMessageToBackend@InspectorFrontendClientLocal@WebCore@@UAEXABVString@WTF@@@Z, ?sendMessageToBackend@InspectorFrontendClientLocal@WebCore@@UEAAXAEBVString@WTF@@@Z)
</span><del>-        symbolWithPointer(?setInspectorFrontendClient@InspectorController@WebCore@@QAEXV?$unique_ptr@VInspectorFrontendClient@WebCore@@U?$default_delete@VInspectorFrontendClient@WebCore@@@std@@@std@@@Z, ?setInspectorFrontendClient@InspectorController@WebCore@@QEAAXV?$unique_ptr@VInspectorFrontendClient@WebCore@@U?$default_delete@VInspectorFrontendClient@WebCore@@@std@@@std@@@Z)
</del><ins>+        symbolWithPointer(?setInspectorFrontendClient@InspectorController@WebCore@@QAEXPAVInspectorFrontendClient@2@@Z, ?setInspectorFrontendClient@InspectorController@WebCore@@QEAAXVInspectorFrontendClient@2@@Z)
</ins><span class="cx">         symbolWithPointer(?setProperty@Settings@InspectorFrontendClientLocal@WebCore@@UAEXABVString@WTF@@0@Z, ?setProperty@Settings@InspectorFrontendClientLocal@WebCore@@UEAAXAEBVString@WTF@@0@Z)
</span><span class="cx">         symbolWithPointer(?windowObjectCleared@InspectorFrontendClientLocal@WebCore@@UAEXXZ, ?windowObjectCleared@InspectorFrontendClientLocal@WebCore@@UEAAXXZ)
</span><span class="cx">         symbolWithPointer(?pathByAppendingComponent@WebCore@@YA?AVString@WTF@@ABV23@0@Z, ?pathByAppendingComponent@WebCore@@YA?AVString@WTF@@AEBV23@0@Z)
</span></span></pre></div>
<a id="trunkSourceWebKitiosChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ios/ChangeLog (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ios/ChangeLog        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit/ios/ChangeLog        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2014-09-21  Timothy Hatcher  &lt;timothy@apple.com&gt;
+
+        Make the Web Inspector use a separate web process.
+
+        https://bugs.webkit.org/show_bug.cgi?id=135120
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/WebInspectorClientIOS.mm:
+        (WebInspectorClient::WebInspectorClient):
+        Removed m_frontendClient initialization since it is
+        now a std::unique_ptr that defaults to nullptr.
+
</ins><span class="cx"> 2014-09-23  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Use downcast&lt;HTML*Element&gt;() instead of toHTML*Element()
</span></span></pre></div>
<a id="trunkSourceWebKitiosWebCoreSupportWebInspectorClientIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ios/WebCoreSupport/WebInspectorClientIOS.mm (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ios/WebCoreSupport/WebInspectorClientIOS.mm        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit/ios/WebCoreSupport/WebInspectorClientIOS.mm        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -46,7 +46,6 @@
</span><span class="cx">     : m_webView(webView)
</span><span class="cx">     , m_highlighter(adoptNS([[WebNodeHighlighter alloc] initWithInspectedWebView:webView]))
</span><span class="cx">     , m_frontendPage(0)
</span><del>-    , m_frontendClient(0)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-09-21  Timothy Hatcher  &lt;timothy@apple.com&gt;
+
+        Make the Web Inspector use a separate web process.
+
+        https://bugs.webkit.org/show_bug.cgi?id=135120
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/WebInspectorClient.h:
+        * WebCoreSupport/WebInspectorClient.mm:
+        (WebInspectorClient::WebInspectorClient):
+        (WebInspectorClient::openInspectorFrontend):
+        (WebInspectorClient::releaseFrontend):
+        Own WebInspectorFrontendClient instead of moving it.
+
</ins><span class="cx"> 2014-09-23  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Use downcast&lt;HTML*Element&gt;() instead of toHTML*Element()
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebInspectorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx">     WebView *m_webView;
</span><span class="cx">     RetainPtr&lt;WebNodeHighlighter&gt; m_highlighter;
</span><span class="cx">     WebCore::Page* m_frontendPage;
</span><del>-    WebInspectorFrontendClient* m_frontendClient;
</del><ins>+    std::unique_ptr&lt;WebInspectorFrontendClient&gt; m_frontendClient;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebInspectorClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -133,8 +133,7 @@
</span><span class="cx"> WebInspectorClient::WebInspectorClient(WebView *webView)
</span><span class="cx">     : m_webView(webView)
</span><span class="cx">     , m_highlighter(adoptNS([[WebNodeHighlighter alloc] initWithInspectedWebView:webView]))
</span><del>-    , m_frontendPage(0)
-    , m_frontendClient(0)
</del><ins>+    , m_frontendPage(nullptr)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -150,11 +149,13 @@
</span><span class="cx">     [windowController.get() setInspectorClient:this];
</span><span class="cx"> 
</span><span class="cx">     m_frontendPage = core([windowController.get() webView]);
</span><del>-    auto frontendClient = std::make_unique&lt;WebInspectorFrontendClient&gt;(m_webView, windowController.get(), inspectorController, m_frontendPage, createFrontendSettings());
-    m_frontendClient = frontendClient.get();
-    RetainPtr&lt;WebInspectorFrontend&gt; webInspectorFrontend = adoptNS([[WebInspectorFrontend alloc] initWithFrontendClient:frontendClient.get()]);
</del><ins>+    m_frontendClient = std::make_unique&lt;WebInspectorFrontendClient&gt;(m_webView, windowController.get(), inspectorController, m_frontendPage, createFrontendSettings());
+
+    RetainPtr&lt;WebInspectorFrontend&gt; webInspectorFrontend = adoptNS([[WebInspectorFrontend alloc] initWithFrontendClient:m_frontendClient.get()]);
</ins><span class="cx">     [[m_webView inspector] setFrontend:webInspectorFrontend.get()];
</span><del>-    m_frontendPage-&gt;inspectorController().setInspectorFrontendClient(WTF::move(frontendClient));
</del><ins>+
+    m_frontendPage-&gt;inspectorController().setInspectorFrontendClient(m_frontendClient.get());
+
</ins><span class="cx">     return this;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -199,8 +200,8 @@
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorClient::releaseFrontend()
</span><span class="cx"> {
</span><del>-    m_frontendClient = 0;
-    m_frontendPage = 0;
</del><ins>+    m_frontendClient = nullptr;
+    m_frontendPage = nullptr;
</ins><span class="cx"> }
</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 (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit/win/ChangeLog        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-09-21  Timothy Hatcher  &lt;timothy@apple.com&gt;
+
+        Make the Web Inspector use a separate web process.
+
+        https://bugs.webkit.org/show_bug.cgi?id=135120
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/WebInspectorClient.cpp:
+        (WebInspectorClient::openInspectorFrontend):
+        * WebCoreSupport/WebInspectorClient.h:
+        (WebInspectorClient::frontendClient):
+        Own WebInspectorFrontendClient instead of moving it.
+
</ins><span class="cx"> 2014-09-23  Christophe Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed build fix after r173893.
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebInspectorClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -68,7 +68,6 @@
</span><span class="cx"> WebInspectorClient::WebInspectorClient(WebView* webView)
</span><span class="cx">     : m_inspectedWebView(webView)
</span><span class="cx">     , m_frontendPage(0)
</span><del>-    , m_frontendClient(0)
</del><span class="cx"> {
</span><span class="cx">     ASSERT(m_inspectedWebView);
</span><span class="cx">     m_inspectedWebView-&gt;viewWindow(&amp;m_inspectedWebViewHandle);
</span><span class="lines">@@ -171,9 +170,8 @@
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     m_frontendPage = core(frontendWebView.get());
</span><del>-    auto frontendClient = std::make_unique&lt;WebInspectorFrontendClient&gt;(m_inspectedWebView, m_inspectedWebViewHandle, frontendHwnd, frontendWebView, frontendWebViewHwnd, this, createFrontendSettings());
-    m_frontendClient = frontendClient.get();
-    m_frontendPage-&gt;inspectorController().setInspectorFrontendClient(WTF::move(frontendClient));
</del><ins>+    m_frontendClient = std::make_unique&lt;WebInspectorFrontendClient&gt;(m_inspectedWebView, m_inspectedWebViewHandle, frontendHwnd, frontendWebView, frontendWebViewHwnd, this, createFrontendSettings());
+    m_frontendPage-&gt;inspectorController().setInspectorFrontendClient(m_frontendClient.get());
</ins><span class="cx">     m_frontendHandle = frontendHwnd;
</span><span class="cx">     return this;
</span><span class="cx"> }
</span><span class="lines">@@ -219,7 +217,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorClient::releaseFrontend()
</span><span class="cx"> {
</span><del>-    m_frontendClient = 0;
</del><ins>+    m_frontendClient = nullptr;
</ins><span class="cx">     m_frontendPage = 0;
</span><span class="cx">     m_frontendHandle = 0;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebInspectorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> 
</span><span class="cx">     void releaseFrontend();
</span><span class="cx"> 
</span><del>-    WebInspectorFrontendClient* frontendClient() { return m_frontendClient; }
</del><ins>+    WebInspectorFrontendClient* frontendClient() { return m_frontendClient.get(); }
</ins><span class="cx"> 
</span><span class="cx">     void updateHighlight();
</span><span class="cx"> 
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> 
</span><span class="cx">     WebView* m_inspectedWebView;
</span><span class="cx">     WebCore::Page* m_frontendPage;
</span><del>-    WebInspectorFrontendClient* m_frontendClient;
</del><ins>+    std::unique_ptr&lt;WebInspectorFrontendClient&gt; m_frontendClient;
</ins><span class="cx">     HWND m_inspectedWebViewHandle;
</span><span class="cx">     HWND m_frontendHandle;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2CMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/CMakeLists.txt (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/CMakeLists.txt        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/CMakeLists.txt        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -530,7 +530,6 @@
</span><span class="cx">     WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
</span><span class="cx">     WebProcess/WebCoreSupport/WebGeolocationClient.cpp
</span><span class="cx">     WebProcess/WebCoreSupport/WebInspectorClient.cpp
</span><del>-    WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp
</del><span class="cx">     WebProcess/WebCoreSupport/WebNotificationClient.cpp
</span><span class="cx">     WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
</span><span class="cx">     WebProcess/WebCoreSupport/WebPlugInClient.cpp
</span><span class="lines">@@ -552,6 +551,7 @@
</span><span class="cx">     WebProcess/WebPage/WebDocumentLoader.cpp
</span><span class="cx">     WebProcess/WebPage/WebFrame.cpp
</span><span class="cx">     WebProcess/WebPage/WebInspector.cpp
</span><ins>+    WebProcess/WebPage/WebInspectorUI.cpp
</ins><span class="cx">     WebProcess/WebPage/WebOpenPanelResultListener.cpp
</span><span class="cx">     WebProcess/WebPage/WebPage.cpp
</span><span class="cx">     WebProcess/WebPage/WebPageGroupProxy.cpp
</span><span class="lines">@@ -645,6 +645,7 @@
</span><span class="cx">     WebProcess/WebPage/EventDispatcher.messages.in
</span><span class="cx">     WebProcess/WebPage/VisitedLinkTableController.messages.in
</span><span class="cx">     WebProcess/WebPage/WebInspector.messages.in
</span><ins>+    WebProcess/WebPage/WebInspectorUI.messages.in
</ins><span class="cx">     WebProcess/WebPage/WebPage.messages.in
</span><span class="cx">     WebProcess/WebPage/WebPageGroupProxy.messages.in
</span><span class="cx"> )
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/ChangeLog        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1,3 +1,180 @@
</span><ins>+2014-09-21  Timothy Hatcher  &lt;timothy@apple.com&gt;
+
+        Make the Web Inspector use a separate web process.
+
+        https://bugs.webkit.org/show_bug.cgi?id=135120
+
+        Reviewed by Anders Carlsson.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * PlatformEfl.cmake:
+        * PlatformGTK.cmake:
+        * WebKit2.xcodeproj/project.pbxproj:
+        Added new WebInspectorUI files and removed WebInspectorFrontendClient.cpp.
+
+        * Shared/APIObject.h: Added BundleInspectorUI.
+
+        * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm:
+        (WebKit::ChildProcessMainDelegate::getExtraInitializationData):
+        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
+        (WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
+        Add support for &quot;inspector-process&quot; data, a boolean that is used by
+        WebProcess::initializeProcessName.
+
+        * UIProcess/API/C/WKInspector.cpp:
+        (WKInspectorIsDebuggingJavaScript):
+        (WKInspectorToggleJavaScriptDebugging):
+        (WKInspectorIsProfilingJavaScript):
+        (WKInspectorToggleJavaScriptProfiling):
+        * UIProcess/API/C/WKInspector.h:
+        Stub out functions we don't support but need to keep for nightly compatibility.
+
+        * UIProcess/WebInspectorProxy.cpp:
+        (WebKit::WebInspectorPageGroups::createInspectorPageGroup):
+        (WebKit::WebInspectorProxy::WebInspectorProxy):
+        (WebKit::WebInspectorProxy::invalidate):
+        (WebKit::WebInspectorProxy::connect):
+        (WebKit::WebInspectorProxy::showConsole):
+        (WebKit::WebInspectorProxy::showResources):
+        (WebKit::WebInspectorProxy::showMainResourceForFrame):
+        (WebKit::WebInspectorProxy::attach):
+        (WebKit::WebInspectorProxy::detach):
+        (WebKit::WebInspectorProxy::inspectorContext):
+        (WebKit::WebInspectorProxy::dispatchMessageFromRemoteFrontend):
+        (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
+        (WebKit::WebInspectorProxy::createInspectorPage):
+        (WebKit::WebInspectorProxy::open):
+        (WebKit::WebInspectorProxy::didClose):
+        (WebKit::WebInspectorProxy::attachAvailabilityChanged):
+        * UIProcess/WebInspectorProxy.h:
+        (WebKit::WebInspectorProxy::isConnected):
+        (WebKit::WebInspectorProxy::canAttach):
+        * UIProcess/WebInspectorProxy.messages.in:
+        * UIProcess/efl/WebInspectorProxyEfl.cpp:
+        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
+        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
+        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
+        (WebKit::WebInspectorProxy::platformAttach):
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (-[WKWebInspectorProxyObjCAdapter close]):
+        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
+        (WebKit::WebInspectorProxy::platformDidClose):
+        (WebKit::WebInspectorProxy::platformHide):
+        (WebKit::WebInspectorProxy::platformSave):
+        (WebKit::WebInspectorProxy::platformAppend):
+        (WebKit::WebInspectorProxy::platformAttach):
+        Changed how the Inspector page is created by making it in a new WebContext for
+        the Inspector. This removes us from the main process pool and guarantees no process
+        sharing for our user interface. Also send new WebInspectorUI messages to the Inspector
+        page and not the inspected page when appropriate.
+
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::getLaunchOptions): Add &quot;inspector-process&quot; to extraInitializationData
+        if the context is the Inspector context. This is used by WebProcess::initializeProcessName.
+
+        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
+        (WebKit::WebInspectorClient::openInspectorFrontend):
+        (WebKit::WebInspectorClient::closeInspectorFrontend):
+        (WebKit::WebInspectorClient::bringFrontendToFront):
+        * WebProcess/WebCoreSupport/WebInspectorClient.h:
+        Remove the InspectorFrontendChannel class from WebInspectorClient and clean up a little.
+        InspectorFrontendChannel implementation moved to WebInspector.
+
+        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: Removed. Superseded by WebInspectorUI.
+
+        * WebProcess/WebPage/WebInspector.cpp:
+        (WebKit::WebInspector::create):
+        (WebKit::WebInspector::WebInspector):
+        (WebKit::WebInspector::createInspectorPage):
+        (WebKit::WebInspector::closeFrontend):
+        (WebKit::WebInspector::openInNewTab):
+        (WebKit::WebInspector::showConsole):
+        (WebKit::WebInspector::showResources):
+        (WebKit::WebInspector::showMainResourceForFrame):
+        (WebKit::WebInspector::startPageProfiling):
+        (WebKit::WebInspector::stopPageProfiling):
+        (WebKit::WebInspector::canAttachWindow):
+        (WebKit::WebInspector::updateDockingAvailability):
+        (WebKit::WebInspector::sendMessageToBackend):
+        (WebKit::WebInspector::sendMessageToFrontend):
+        (WebKit::WebInspector::remoteFrontendConnected):
+        (WebKit::WebInspector::remoteFrontendDisconnected):
+        * WebProcess/WebPage/WebInspector.h:
+        (WebKit::WebInspector::didClose):
+        (WebKit::WebInspector::didReceiveInvalidMessage):
+        (WebKit::WebInspector::setAttached):
+        * WebProcess/WebPage/WebInspector.messages.in:
+        Stop taking an optional InspectorFrontendChannel and inherit it instead. Create a connection that
+        can be passed to the other web process for WebInspectorUI to use. Stop referencing Inspector's page
+        directly, since it is in another process now.
+
+        * WebProcess/WebPage/WebInspectorUI.cpp: Added.
+        (WebKit::WebInspectorUI::create):
+        (WebKit::WebInspectorUI::WebInspectorUI):
+        (WebKit::WebInspectorUI::establishConnection):
+        (WebKit::WebInspectorUI::windowObjectCleared):
+        (WebKit::WebInspectorUI::frontendLoaded):
+        (WebKit::WebInspectorUI::moveWindowBy):
+        (WebKit::WebInspectorUI::bringToFront):
+        (WebKit::WebInspectorUI::closeWindow):
+        (WebKit::WebInspectorUI::requestSetDockSide):
+        (WebKit::WebInspectorUI::setDockSide):
+        (WebKit::WebInspectorUI::changeAttachedWindowHeight):
+        (WebKit::WebInspectorUI::changeAttachedWindowWidth):
+        (WebKit::WebInspectorUI::setToolbarHeight):
+        (WebKit::WebInspectorUI::openInNewTab):
+        (WebKit::WebInspectorUI::save):
+        (WebKit::WebInspectorUI::append):
+        (WebKit::WebInspectorUI::inspectedURLChanged):
+        (WebKit::WebInspectorUI::showConsole):
+        (WebKit::WebInspectorUI::showResources):
+        (WebKit::WebInspectorUI::showMainResourceForFrame):
+        (WebKit::WebInspectorUI::startPageProfiling):
+        (WebKit::WebInspectorUI::stopPageProfiling):
+        (WebKit::WebInspectorUI::didSave):
+        (WebKit::WebInspectorUI::didAppend):
+        (WebKit::WebInspectorUI::sendMessageToFrontend):
+        (WebKit::WebInspectorUI::sendMessageToBackend):
+        (WebKit::WebInspectorUI::evaluateCommandOnLoad):
+        (WebKit::WebInspectorUI::evaluateExpressionOnLoad):
+        (WebKit::WebInspectorUI::evaluatePendingExpressions):
+        * WebProcess/WebPage/WebInspectorUI.h: Added.
+        (WebKit::WebInspectorUI::page):
+        (WebKit::WebInspectorUI::didClose):
+        (WebKit::WebInspectorUI::didReceiveInvalidMessage):
+        (WebKit::WebInspectorUI::attachedBottom):
+        (WebKit::WebInspectorUI::attachedRight):
+        (WebKit::WebInspectorUI::detached):
+        (WebKit::WebInspectorUI::evaluateCommandOnLoad):
+        * WebProcess/WebPage/WebInspectorUI.messages.in: Added.
+        * WebProcess/WebPage/efl/WebInspectorUIEfl.cpp: Added.
+        (WebKit::WebInspectorUI::canSave):
+        (WebKit::WebInspectorUI::localizedStringsURL):
+        * WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp: Added.
+        (WebKit::WebInspectorUI::canSave):
+        (WebKit::WebInspectorUI::localizedStringsURL):
+        * WebProcess/WebPage/mac/WebInspectorUIMac.mm: Added.
+        (WebKit::WebInspectorUI::canSave):
+        (WebKit::WebInspectorUI::localizedStringsURL):
+        Implement the InspectorFrontendClient and handle a connection to the inspected page's WebInspector.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+        (WebKit::WebPage::~WebPage):
+        (WebKit::WebPage::inspector):
+        (WebKit::WebPage::inspectorUI):
+        (WebKit::WebPage::didReceiveMessage):
+        Setup as a listener for WebInspectorUI messages.
+
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::isInspectorPage): It is an Inspector page if we have a m_inspectorUI.
+
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::WebProcess::initializeProcessName):
+        Name the process &quot;%@ Web Inspector&quot; if it is an Inspector content process. Processes in that
+        context are not shared with multiple pages.
+
</ins><span class="cx"> 2014-09-24  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add a deprecated stub for WKPreferencesSetMultithreadedWebGLEnabled (and Get)
</span></span></pre></div>
<a id="trunkSourceWebKit2DerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DerivedSources.make (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DerivedSources.make        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/DerivedSources.make        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -121,6 +121,7 @@
</span><span class="cx">     WebIconDatabaseProxy \
</span><span class="cx">     WebInspector \
</span><span class="cx">     WebInspectorProxy \
</span><ins>+    WebInspectorUI \
</ins><span class="cx">     WebMediaCacheManager \
</span><span class="cx">     WebMediaCacheManagerProxy \
</span><span class="cx">     WebNotificationManager \
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformEflcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformEfl.cmake (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformEfl.cmake        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/PlatformEfl.cmake        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -194,7 +194,7 @@
</span><span class="cx"> 
</span><span class="cx">     WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp
</span><span class="cx"> 
</span><del>-    WebProcess/WebPage/efl/WebInspectorEfl.cpp
</del><ins>+    WebProcess/WebPage/efl/WebInspectorUIEfl.cpp
</ins><span class="cx">     WebProcess/WebPage/efl/WebPageEfl.cpp
</span><span class="cx"> 
</span><span class="cx">     WebProcess/efl/SeccompFiltersWebProcessEfl.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -302,7 +302,7 @@
</span><span class="cx"> 
</span><span class="cx">     WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp
</span><span class="cx">     WebProcess/WebPage/gtk/PrinterListGtk.cpp
</span><del>-    WebProcess/WebPage/gtk/WebInspectorGtk.cpp
</del><ins>+    WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp
</ins><span class="cx">     WebProcess/WebPage/gtk/WebPageGtk.cpp
</span><span class="cx">     WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/APIObject.h (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/APIObject.h        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/Shared/APIObject.h        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -143,6 +143,7 @@
</span><span class="cx">         BundleFrame,
</span><span class="cx">         BundleHitTestResult,
</span><span class="cx">         BundleInspector,
</span><ins>+        BundleInspectorUI,
</ins><span class="cx">         BundleNavigationAction,
</span><span class="cx">         BundleNodeHandle,
</span><span class="cx">         BundlePage,
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedEntryPointUtilitiesmacLegacyProcessChildProcessEntryPointmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -88,8 +88,11 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool ChildProcessMainDelegate::getExtraInitializationData(HashMap&lt;String, String&gt;&amp;)
</del><ins>+bool ChildProcessMainDelegate::getExtraInitializationData(HashMap&lt;String, String&gt;&amp; extraInitializationData)
</ins><span class="cx"> {
</span><ins>+    String inspectorProcess = m_commandLine[&quot;inspector-process&quot;];
+    if (!inspectorProcess.isEmpty())
+        extraInitializationData.add(ASCIILiteral(&quot;inspector-process&quot;), inspectorProcess);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedEntryPointUtilitiesmacXPCServiceXPCServiceEntryPointmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -92,8 +92,14 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool XPCServiceInitializerDelegate::getExtraInitializationData(HashMap&lt;String, String&gt;&amp;)
</del><ins>+bool XPCServiceInitializerDelegate::getExtraInitializationData(HashMap&lt;String, String&gt;&amp; extraInitializationData)
</ins><span class="cx"> {
</span><ins>+    xpc_object_t extraDataInitializationDataObject = xpc_dictionary_get_value(m_initializerMessage, &quot;extra-initialization-data&quot;);
+
+    String inspectorProcess = xpc_dictionary_get_string(extraDataInitializationDataObject, &quot;inspector-process&quot;);
+    if (!inspectorProcess.isEmpty())
+        extraInitializationData.add(ASCIILiteral(&quot;inspector-process&quot;), inspectorProcess);
+
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKInspectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKInspector.cpp (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKInspector.cpp        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKInspector.cpp        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -174,44 +174,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WKInspectorIsDebuggingJavaScript(WKInspectorRef inspectorRef)
-{
-#if ENABLE(INSPECTOR)
-    return toImpl(inspectorRef)-&gt;isDebuggingJavaScript();
-#else
-    UNUSED_PARAM(inspectorRef);
-    return false;
-#endif
-}
-
-void WKInspectorToggleJavaScriptDebugging(WKInspectorRef inspectorRef)
-{
-#if ENABLE(INSPECTOR)
-    toImpl(inspectorRef)-&gt;toggleJavaScriptDebugging();
-#else
-    UNUSED_PARAM(inspectorRef);
-#endif
-}
-
-bool WKInspectorIsProfilingJavaScript(WKInspectorRef inspectorRef)
-{
-#if ENABLE(INSPECTOR)
-    return toImpl(inspectorRef)-&gt;isProfilingJavaScript();
-#else
-    UNUSED_PARAM(inspectorRef);
-    return false;
-#endif
-}
-
-void WKInspectorToggleJavaScriptProfiling(WKInspectorRef inspectorRef)
-{
-#if ENABLE(INSPECTOR)
-    toImpl(inspectorRef)-&gt;toggleJavaScriptProfiling();
-#else
-    UNUSED_PARAM(inspectorRef);
-#endif
-}
-
</del><span class="cx"> bool WKInspectorIsProfilingPage(WKInspectorRef inspectorRef)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKInspectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKInspector.h (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKInspector.h        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKInspector.h        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -58,12 +58,6 @@
</span><span class="cx"> WK_EXPORT void WKInspectorAttach(WKInspectorRef inspector);
</span><span class="cx"> WK_EXPORT void WKInspectorDetach(WKInspectorRef inspector);
</span><span class="cx"> 
</span><del>-WK_EXPORT bool WKInspectorIsDebuggingJavaScript(WKInspectorRef inspector);
-WK_EXPORT void WKInspectorToggleJavaScriptDebugging(WKInspectorRef inspector);
-
-WK_EXPORT bool WKInspectorIsProfilingJavaScript(WKInspectorRef inspector);
-WK_EXPORT void WKInspectorToggleJavaScriptProfiling(WKInspectorRef inspector);
-
</del><span class="cx"> WK_EXPORT bool WKInspectorIsProfilingPage(WKInspectorRef inspector);
</span><span class="cx"> WK_EXPORT void WKInspectorTogglePageProfiling(WKInspectorRef inspector);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebInspectorProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  * Portions Copyright (c) 2011 Motorola Mobility, Inc.  All rights reserved.
</span><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -30,11 +30,12 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;APIURLRequest.h&quot;
</span><ins>+#include &quot;WebContext.h&quot;
</ins><span class="cx"> #include &quot;WebFramePolicyListenerProxy.h&quot;
</span><span class="cx"> #include &quot;WebFrameProxy.h&quot;
</span><span class="cx"> #include &quot;WebInspectorMessages.h&quot;
</span><span class="cx"> #include &quot;WebInspectorProxyMessages.h&quot;
</span><del>-#include &quot;WebPageCreationParameters.h&quot;
</del><ins>+#include &quot;WebInspectorUIMessages.h&quot;
</ins><span class="cx"> #include &quot;WebPageGroup.h&quot;
</span><span class="cx"> #include &quot;WebPageProxy.h&quot;
</span><span class="cx"> #include &quot;WebPreferences.h&quot;
</span><span class="lines">@@ -57,9 +58,6 @@
</span><span class="cx"> const unsigned WebInspectorProxy::initialWindowWidth = 1000;
</span><span class="cx"> const unsigned WebInspectorProxy::initialWindowHeight = 650;
</span><span class="cx"> 
</span><del>-const unsigned WebInspectorProxy::minimumAttachedWidth = 750;
-const unsigned WebInspectorProxy::minimumAttachedHeight = 250;
-
</del><span class="cx"> class WebInspectorPageGroups {
</span><span class="cx"> public:
</span><span class="cx">     static WebInspectorPageGroups&amp; shared()
</span><span class="lines">@@ -105,11 +103,12 @@
</span><span class="cx">         RefPtr&lt;WebPageGroup&gt; pageGroup = WebPageGroup::create(String::format(&quot;__WebInspectorPageGroupLevel%u__&quot;, level), false, false);
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><del>-        // Allow developers to inspect the Web Inspector in debug builds.
</del><ins>+        // Allow developers to inspect the Web Inspector in debug builds without changing settings.
</ins><span class="cx">         pageGroup-&gt;preferences().setDeveloperExtrasEnabled(true);
</span><span class="cx">         pageGroup-&gt;preferences().setLogsPageMessagesToSystemConsoleEnabled(true);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+        pageGroup-&gt;preferences().setAllowFileAccessFromFileURLs(true);
</ins><span class="cx">         pageGroup-&gt;preferences().setApplicationChromeModeEnabled(true);
</span><span class="cx"> 
</span><span class="cx">         return pageGroup.release();
</span><span class="lines">@@ -124,16 +123,18 @@
</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)
</ins><span class="cx">     , m_isVisible(false)
</span><span class="cx">     , m_isAttached(false)
</span><del>-    , m_isDebuggingJavaScript(false)
-    , m_isProfilingJavaScript(false)
</del><ins>+    , m_canAttach(false)
</ins><span class="cx">     , m_isProfilingPage(false)
</span><span class="cx">     , m_showMessageSent(false)
</span><del>-    , m_createdInspectorPage(false)
</del><span class="cx">     , m_ignoreFirstBringToFront(false)
</span><span class="cx">     , m_attachmentSide(AttachmentSideBottom)
</span><del>-#if PLATFORM(GTK) || PLATFORM(EFL)
</del><ins>+#if PLATFORM(MAC)
+    , m_closeTimer(RunLoop::main(), this, &amp;WebInspectorProxy::closeTimerFired)
+#elif PLATFORM(GTK) || PLATFORM(EFL)
</ins><span class="cx">     , m_inspectorView(0)
</span><span class="cx">     , m_inspectorWindow(0)
</span><span class="cx"> #endif
</span><span class="lines">@@ -165,7 +166,7 @@
</span><span class="cx"> 
</span><span class="cx">     didClose();
</span><span class="cx"> 
</span><del>-    m_page = 0;
</del><ins>+    m_page = nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // Public APIs
</span><span class="lines">@@ -188,6 +189,8 @@
</span><span class="cx">     m_showMessageSent = true;
</span><span class="cx">     m_ignoreFirstBringToFront = true;
</span><span class="cx"> 
</span><ins>+    eagerlyCreateInspectorPage();
+
</ins><span class="cx">     m_page-&gt;process().send(Messages::WebInspector::Show(), m_page-&gt;pageID());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -232,6 +235,8 @@
</span><span class="cx">     if (!m_page)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    eagerlyCreateInspectorPage();
+
</ins><span class="cx">     m_page-&gt;process().send(Messages::WebInspector::ShowConsole(), m_page-&gt;pageID());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -240,6 +245,8 @@
</span><span class="cx">     if (!m_page)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    eagerlyCreateInspectorPage();
+
</ins><span class="cx">     m_page-&gt;process().send(Messages::WebInspector::ShowResources(), m_page-&gt;pageID());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -248,6 +255,8 @@
</span><span class="cx">     if (!m_page)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    eagerlyCreateInspectorPage();
+
</ins><span class="cx">     m_page-&gt;process().send(Messages::WebInspector::ShowMainResourceForFrame(frame-&gt;frameID()), m_page-&gt;pageID());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -274,13 +283,15 @@
</span><span class="cx">     if (m_isVisible)
</span><span class="cx">         inspectorPageGroup()-&gt;preferences().setInspectorStartsAttached(true);
</span><span class="cx"> 
</span><ins>+    m_page-&gt;process().send(Messages::WebInspector::SetAttached(true), m_page-&gt;pageID());
+
</ins><span class="cx">     switch (m_attachmentSide) {
</span><span class="cx">     case AttachmentSideBottom:
</span><del>-        m_page-&gt;process().send(Messages::WebInspector::AttachedBottom(), m_page-&gt;pageID());
</del><ins>+        m_inspectorPage-&gt;process().send(Messages::WebInspectorUI::AttachedBottom(), m_inspectorPage-&gt;pageID());
</ins><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx">     case AttachmentSideRight:
</span><del>-        m_page-&gt;process().send(Messages::WebInspector::AttachedRight(), m_page-&gt;pageID());
</del><ins>+        m_inspectorPage-&gt;process().send(Messages::WebInspectorUI::AttachedRight(), m_inspectorPage-&gt;pageID());
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -297,7 +308,8 @@
</span><span class="cx">     if (m_isVisible)
</span><span class="cx">         inspectorPageGroup()-&gt;preferences().setInspectorStartsAttached(false);
</span><span class="cx"> 
</span><del>-    m_page-&gt;process().send(Messages::WebInspector::Detached(), m_page-&gt;pageID());
</del><ins>+    m_page-&gt;process().send(Messages::WebInspector::SetAttached(false), m_page-&gt;pageID());
+    m_inspectorPage-&gt;process().send(Messages::WebInspectorUI::Detached(), m_inspectorPage-&gt;pageID());
</ins><span class="cx"> 
</span><span class="cx">     platformDetach();
</span><span class="cx"> }
</span><span class="lines">@@ -314,34 +326,6 @@
</span><span class="cx">     platformSetAttachedWindowWidth(width);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebInspectorProxy::toggleJavaScriptDebugging()
-{
-    if (!m_page)
-        return;
-
-    if (m_isDebuggingJavaScript)
-        m_page-&gt;process().send(Messages::WebInspector::StopJavaScriptDebugging(), m_page-&gt;pageID());
-    else
-        m_page-&gt;process().send(Messages::WebInspector::StartJavaScriptDebugging(), m_page-&gt;pageID());
-
-    // FIXME: have the WebProcess notify us on state changes.
-    m_isDebuggingJavaScript = !m_isDebuggingJavaScript;
-}
-
-void WebInspectorProxy::toggleJavaScriptProfiling()
-{
-    if (!m_page)
-        return;
-
-    if (m_isProfilingJavaScript)
-        m_page-&gt;process().send(Messages::WebInspector::StopJavaScriptProfiling(), m_page-&gt;pageID());
-    else
-        m_page-&gt;process().send(Messages::WebInspector::StartJavaScriptProfiling(), m_page-&gt;pageID());
-
-    // FIXME: have the WebProcess notify us on state changes.
-    m_isProfilingJavaScript = !m_isProfilingJavaScript;
-}
-
</del><span class="cx"> void WebInspectorProxy::togglePageProfiling()
</span><span class="cx"> {
</span><span class="cx">     if (!m_page)
</span><span class="lines">@@ -361,6 +345,22 @@
</span><span class="cx">     return WebInspectorPageGroups::shared().isInspectorPageGroup(page.pageGroup());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+WebContext&amp; WebInspectorProxy::inspectorContext()
+{
+    // Having our own context removes us from the main context's process pool and
+    // guarantees no process sharing for our user interface.
+
+    static WebContext* context;
+    if (!context) {
+        WebContextConfiguration configuration;
+        WebContext::applyPlatformSpecificConfigurationDefaults(configuration);
+        context = (WebContext::create(configuration)).leakRef();
+        context-&gt;setProcessModel(ProcessModelMultipleSecondaryProcesses);
+    }
+
+    return *context;
+}
+
</ins><span class="cx"> static bool isMainOrTestInspectorPage(const WebInspectorProxy* webInspectorProxy, WKURLRequestRef requestRef)
</span><span class="cx"> {
</span><span class="cx">     URL requestURL(URL(), toImpl(requestRef)-&gt;resourceRequest().url());
</span><span class="lines">@@ -426,29 +426,20 @@
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorProxy::dispatchMessageFromRemoteFrontend(const String&amp; message)
</span><span class="cx"> {
</span><del>-    m_page-&gt;process().send(Messages::WebInspector::DispatchMessageFromRemoteFrontend(message), m_page-&gt;pageID());
</del><ins>+    m_page-&gt;process().send(Messages::WebInspector::SendMessageToBackend(message), m_page-&gt;pageID());
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-// Called by WebInspectorProxy messages
-void WebInspectorProxy::createInspectorPage(uint64_t&amp; inspectorPageID, WebPageCreationParameters&amp; inspectorPageParameters)
</del><ins>+void WebInspectorProxy::eagerlyCreateInspectorPage()
</ins><span class="cx"> {
</span><del>-    inspectorPageID = 0;
-
-    if (!m_page)
</del><ins>+    if (m_inspectorPage)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_isAttached = shouldOpenAttached();
-    m_attachmentSide = static_cast&lt;AttachmentSide&gt;(inspectorPageGroup()-&gt;preferences().inspectorAttachmentSide());
-
-    WebPageProxy* inspectorPage = platformCreateInspectorPage();
-    ASSERT(inspectorPage);
-    if (!inspectorPage)
</del><ins>+    m_inspectorPage = platformCreateInspectorPage();
+    ASSERT(m_inspectorPage);
+    if (!m_inspectorPage)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    inspectorPageID = inspectorPage-&gt;pageID();
-    inspectorPageParameters = inspectorPage-&gt;creationParameters();
-
</del><span class="cx">     WKPagePolicyClientV1 policyClient = {
</span><span class="cx">         { 1, this },
</span><span class="cx">         0, /* decidePolicyForNavigationAction_deprecatedForUseWithV0 */
</span><span class="lines">@@ -459,73 +450,57 @@
</span><span class="cx">         0, /* decidePolicyForResponse */
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    WKPageSetPagePolicyClient(toAPI(inspectorPage), &amp;policyClient.base);
</del><ins>+    WKPageSetPagePolicyClient(toAPI(m_inspectorPage), &amp;policyClient.base);
</ins><span class="cx"> 
</span><del>-    StringBuilder url;
-
-    url.append(inspectorPageURL());
-
-    url.appendLiteral(&quot;?dockSide=&quot;);
-
-    if (m_isAttached) {
-        switch (m_attachmentSide) {
-        case AttachmentSideBottom:
-            url.appendLiteral(&quot;bottom&quot;);
-            m_page-&gt;process().send(Messages::WebInspector::AttachedBottom(), m_page-&gt;pageID());
-            break;
-        case AttachmentSideRight:
-            url.appendLiteral(&quot;right&quot;);
-            m_page-&gt;process().send(Messages::WebInspector::AttachedRight(), m_page-&gt;pageID());
-            break;
-        }
-    } else
-        url.appendLiteral(&quot;undocked&quot;);
-
-    m_page-&gt;process().assumeReadAccessToBaseURL(inspectorBaseURL());
-
-    inspectorPage-&gt;loadRequest(URL(URL(), url.toString()));
-
-    m_createdInspectorPage = true;
</del><ins>+    m_inspectorPage-&gt;process().addMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_page-&gt;pageID(), *this);
+    m_inspectorPage-&gt;process().assumeReadAccessToBaseURL(inspectorBaseURL());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebInspectorProxy::createInspectorPageForTest(uint64_t&amp; inspectorPageID, WebPageCreationParameters&amp; inspectorPageParameters)
</del><ins>+// Called by WebInspectorProxy messages
+void WebInspectorProxy::createInspectorPage(IPC::Attachment connectionIdentifier, bool canAttach, bool underTest)
</ins><span class="cx"> {
</span><del>-    inspectorPageID = 0;
-
</del><span class="cx">     if (!m_page)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_isAttached = false;
</del><ins>+    eagerlyCreateInspectorPage();
</ins><span class="cx"> 
</span><del>-    WebPageProxy* inspectorPage = platformCreateInspectorPage();
-    ASSERT(inspectorPage);
-    if (!inspectorPage)
</del><ins>+    ASSERT(m_inspectorPage);
+    if (!m_inspectorPage)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    inspectorPageID = inspectorPage-&gt;pageID();
-    inspectorPageParameters = inspectorPage-&gt;creationParameters();
</del><ins>+    m_underTest = underTest;
</ins><span class="cx"> 
</span><del>-    WKPagePolicyClientV1 policyClient = {
-        { 1, this },
-        0, /* decidePolicyForNavigationAction_deprecatedForUseWithV0 */
-        0, /* decidePolicyForNewWindowAction */
-        0, /* decidePolicyForResponse_deprecatedForUseWithV0 */
-        0, /* unableToImplementPolicy */
-        decidePolicyForNavigationAction,
-        0, /* decidePolicyForResponse */
-    };
</del><ins>+    m_inspectorPage-&gt;process().send(Messages::WebInspectorUI::EstablishConnection(connectionIdentifier, m_page-&gt;pageID(), m_underTest), m_inspectorPage-&gt;pageID());
</ins><span class="cx"> 
</span><del>-    WKPageSetPagePolicyClient(toAPI(inspectorPage), &amp;policyClient.base);
</del><ins>+    if (!m_underTest) {
+        m_canAttach = canAttach;
+        m_isAttached = shouldOpenAttached();
+        m_attachmentSide = static_cast&lt;AttachmentSide&gt;(inspectorPageGroup()-&gt;preferences().inspectorAttachmentSide());
</ins><span class="cx"> 
</span><del>-    m_page-&gt;process().assumeReadAccessToBaseURL(inspectorBaseURL());
</del><ins>+        m_page-&gt;process().send(Messages::WebInspector::SetAttached(m_isAttached), m_page-&gt;pageID());
</ins><span class="cx"> 
</span><del>-    inspectorPage-&gt;loadRequest(URL(URL(), inspectorTestPageURL()));
</del><ins>+        if (m_isAttached) {
+            switch (m_attachmentSide) {
+            case AttachmentSideBottom:
+                m_inspectorPage-&gt;process().send(Messages::WebInspectorUI::AttachedBottom(), m_inspectorPage-&gt;pageID());
+                break;
</ins><span class="cx"> 
</span><del>-    m_createdInspectorPage = true;
</del><ins>+            case AttachmentSideRight:
+                m_inspectorPage-&gt;process().send(Messages::WebInspectorUI::AttachedRight(), m_inspectorPage-&gt;pageID());
+                break;
+            }
+        } else
+            m_inspectorPage-&gt;process().send(Messages::WebInspectorUI::Detached(), m_inspectorPage-&gt;pageID());
+    }
+
+    m_inspectorPage-&gt;loadRequest(URL(URL(), m_underTest ? inspectorTestPageURL() : inspectorPageURL()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorProxy::open()
</span><span class="cx"> {
</span><ins>+    if (m_underTest)
+        return;
+
</ins><span class="cx">     m_isVisible = true;
</span><span class="cx"> 
</span><span class="cx">     platformOpen();
</span><span class="lines">@@ -533,20 +508,22 @@
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorProxy::didClose()
</span><span class="cx"> {
</span><del>-    if (!m_createdInspectorPage)
</del><ins>+    if (!m_inspectorPage)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    m_inspectorPage-&gt;process().removeMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_page-&gt;pageID());
+    m_inspectorPage = nullptr;
+
</ins><span class="cx">     m_isVisible = false;
</span><del>-    m_isDebuggingJavaScript = false;
-    m_isProfilingJavaScript = false;
</del><span class="cx">     m_isProfilingPage = false;
</span><del>-    m_createdInspectorPage = false;
</del><span class="cx">     m_showMessageSent = false;
</span><span class="cx">     m_ignoreFirstBringToFront = false;
</span><span class="cx"> 
</span><span class="cx">     if (m_isAttached)
</span><span class="cx">         platformDetach();
</span><span class="cx">     m_isAttached = false;
</span><ins>+    m_canAttach = false;
+    m_underTest = false;
</ins><span class="cx"> 
</span><span class="cx">     platformDidClose();
</span><span class="cx"> }
</span><span class="lines">@@ -569,6 +546,8 @@
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorProxy::attachAvailabilityChanged(bool available)
</span><span class="cx"> {
</span><ins>+    m_canAttach = available;
+
</ins><span class="cx">     platformAttachAvailabilityChanged(available);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -587,28 +566,6 @@
</span><span class="cx">     platformAppend(filename, content);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebInspectorProxy::canAttach()
-{
-    // Keep this in sync with InspectorFrontendClientLocal::canAttachWindow. There are two implementations
-    // to make life easier in the multi-process world we have. WebInspectorProxy uses canAttach to decide if
-    // we can attach on open (on the UI process side). And InspectorFrontendClientLocal::canAttachWindow is
-    // used to decide if we can attach when the attach button is pressed (on the WebProcess side).
-
-    // If we are already attached, allow attaching again to allow switching sides.
-    if (m_isAttached)
-        return true;
-
-    // Don't allow attaching to another inspector -- two inspectors in one window is too much!
-    if (m_level &gt; 1)
-        return false;
-
-    // Don't allow the attach if the window would be too small to accommodate the minimum inspector height.
-    unsigned inspectedPageHeight = platformInspectedWindowHeight();
-    unsigned inspectedPageWidth = platformInspectedWindowWidth();
-    unsigned maximumAttachedHeight = inspectedPageHeight * 3 / 4;
-    return minimumAttachedHeight &lt;= maximumAttachedHeight &amp;&amp; minimumAttachedWidth &lt;= inspectedPageWidth;
-}
-
</del><span class="cx"> bool WebInspectorProxy::shouldOpenAttached()
</span><span class="cx"> {
</span><span class="cx">     return inspectorPageGroup()-&gt;preferences().inspectorStartsAttached() &amp;&amp; canAttach();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebInspectorProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  * Portions Copyright (c) 2011 Motorola Mobility, Inc.  All rights reserved.
</span><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;APIObject.h&quot;
</span><ins>+#include &quot;Attachment.h&quot;
</ins><span class="cx"> #include &quot;MessageReceiver.h&quot;
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><span class="lines">@@ -40,6 +41,7 @@
</span><span class="cx"> #include &quot;WKGeometry.h&quot;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/RetainPtr.h&gt;
</span><ins>+#include &lt;wtf/RunLoop.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> OBJC_CLASS NSButton;
</span><span class="cx"> OBJC_CLASS NSURL;
</span><span class="lines">@@ -59,10 +61,10 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><ins>+class WebContext;
</ins><span class="cx"> class WebFrameProxy;
</span><span class="cx"> class WebPageGroup;
</span><span class="cx"> class WebPageProxy;
</span><del>-struct WebPageCreationParameters;
</del><span class="cx"> 
</span><span class="cx"> enum AttachmentSide {
</span><span class="cx">     AttachmentSideBottom,
</span><span class="lines">@@ -83,7 +85,7 @@
</span><span class="cx">     // Public APIs
</span><span class="cx">     WebPageProxy* page() const { return m_page; }
</span><span class="cx"> 
</span><del>-    bool isConnected() const { return m_createdInspectorPage; }
</del><ins>+    bool isConnected() const { return !!m_inspectorPage; }
</ins><span class="cx">     bool isVisible() const { return m_isVisible; }
</span><span class="cx">     bool isFront();
</span><span class="cx"> 
</span><span class="lines">@@ -102,6 +104,8 @@
</span><span class="cx"> 
</span><span class="cx">     void setInspectorWindowFrame(WKRect&amp;);
</span><span class="cx">     WKRect inspectorWindowFrame();
</span><ins>+
+    void closeTimerFired();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK)
</span><span class="lines">@@ -123,16 +127,11 @@
</span><span class="cx">     void setAttachedWindowWidth(unsigned);
</span><span class="cx">     void setToolbarHeight(unsigned height) { platformSetToolbarHeight(height); }
</span><span class="cx"> 
</span><del>-    bool isDebuggingJavaScript() const { return m_isDebuggingJavaScript; }
-    void toggleJavaScriptDebugging();
-
-    bool isProfilingJavaScript() const { return m_isProfilingJavaScript; }
-    void toggleJavaScriptProfiling();
-
</del><span class="cx">     bool isProfilingPage() const { return m_isProfilingPage; }
</span><span class="cx">     void togglePageProfiling();
</span><span class="cx"> 
</span><span class="cx">     static bool isInspectorPage(WebPageProxy&amp;);
</span><ins>+    static WebContext&amp; inspectorContext();
</ins><span class="cx"> 
</span><span class="cx">     // Provided by platform WebInspectorProxy implementations.
</span><span class="cx">     String inspectorPageURL() const;
</span><span class="lines">@@ -150,9 +149,10 @@
</span><span class="cx"> private:
</span><span class="cx">     explicit WebInspectorProxy(WebPageProxy*);
</span><span class="cx"> 
</span><ins>+    void eagerlyCreateInspectorPage();
+
</ins><span class="cx">     // IPC::MessageReceiver
</span><span class="cx">     virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&amp;) override;
</span><del>-    virtual void didReceiveSyncMessage(IPC::Connection*, IPC::MessageDecoder&amp;, std::unique_ptr&lt;IPC::MessageEncoder&gt;&amp;) override;
</del><span class="cx"> 
</span><span class="cx">     WebPageProxy* platformCreateInspectorPage();
</span><span class="cx">     void platformOpen();
</span><span class="lines">@@ -173,8 +173,7 @@
</span><span class="cx">     void platformAppend(const String&amp; filename, const String&amp; content);
</span><span class="cx"> 
</span><span class="cx">     // Called by WebInspectorProxy messages
</span><del>-    void createInspectorPage(uint64_t&amp; inspectorPageID, WebPageCreationParameters&amp;);
-    void createInspectorPageForTest(uint64_t&amp; inspectorPageID, WebPageCreationParameters&amp;);
</del><ins>+    void createInspectorPage(IPC::Attachment, bool canAttach, bool underTest);
</ins><span class="cx">     void didClose();
</span><span class="cx">     void bringToFront();
</span><span class="cx">     void attachAvailabilityChanged(bool);
</span><span class="lines">@@ -187,7 +186,7 @@
</span><span class="cx">     void sendMessageToRemoteFrontend(const String&amp; message);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    bool canAttach();
</del><ins>+    bool canAttach() const { return m_canAttach; }
</ins><span class="cx">     bool shouldOpenAttached();
</span><span class="cx"> 
</span><span class="cx">     void open();
</span><span class="lines">@@ -204,19 +203,15 @@
</span><span class="cx">     static const unsigned initialWindowWidth;
</span><span class="cx">     static const unsigned initialWindowHeight;
</span><span class="cx"> 
</span><del>-    // Keep this in sync with the value in InspectorFrontendClientLocal.
-    static const unsigned minimumAttachedWidth;
-    static const unsigned minimumAttachedHeight;
-
</del><span class="cx">     WebPageProxy* m_page;
</span><ins>+    WebPageProxy* m_inspectorPage;
</ins><span class="cx"> 
</span><ins>+    bool m_underTest;
</ins><span class="cx">     bool m_isVisible;
</span><span class="cx">     bool m_isAttached;
</span><del>-    bool m_isDebuggingJavaScript;
-    bool m_isProfilingJavaScript;
</del><ins>+    bool m_canAttach;
</ins><span class="cx">     bool m_isProfilingPage;
</span><span class="cx">     bool m_showMessageSent;
</span><del>-    bool m_createdInspectorPage;
</del><span class="cx">     bool m_ignoreFirstBringToFront;
</span><span class="cx"> 
</span><span class="cx">     // The debugger stops all the pages in the same PageGroup. Having
</span><span class="lines">@@ -232,8 +227,9 @@
</span><span class="cx">     RetainPtr&lt;NSButton&gt; m_dockBottomButton;
</span><span class="cx">     RetainPtr&lt;NSButton&gt; m_dockRightButton;
</span><span class="cx">     RetainPtr&lt;WKWebInspectorProxyObjCAdapter&gt; m_inspectorProxyObjCAdapter;
</span><del>-    String m_urlString;
</del><span class="cx">     HashMap&lt;String, RetainPtr&lt;NSURL&gt;&gt; m_suggestedToActualURLMap;
</span><ins>+    RunLoop::Timer&lt;WebInspectorProxy&gt; m_closeTimer;
+    String m_urlString;
</ins><span class="cx"> #elif PLATFORM(GTK)
</span><span class="cx">     WebInspectorClientGtk m_client;
</span><span class="cx">     GtkWidget* m_inspectorView;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebInspectorProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.messages.in (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.messages.in        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.messages.in        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-# Copyright (C) 2010 Apple Inc. All rights reserved.
</del><ins>+# Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> #
</span><span class="cx"> # Redistribution and use in source and binary forms, with or without
</span><span class="cx"> # modification, are permitted provided that the following conditions
</span><span class="lines">@@ -23,10 +23,11 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx"> 
</span><span class="cx"> messages -&gt; WebInspectorProxy {
</span><del>-    CreateInspectorPage() -&gt; (uint64_t inspectorPageID, WebKit::WebPageCreationParameters inspectorPageParameters)
-    CreateInspectorPageForTest() -&gt; (uint64_t inspectorPageID, WebKit::WebPageCreationParameters inspectorPageParameters)
</del><ins>+    CreateInspectorPage(IPC::Attachment connectionIdentifier, bool canAttach, bool underTest)
+
</ins><span class="cx">     DidClose()
</span><span class="cx">     BringToFront()
</span><ins>+
</ins><span class="cx">     InspectedURLChanged(String urlString)
</span><span class="cx"> 
</span><span class="cx">     Save(String filename, String content, bool base64Encoded, bool forceSaveAs)
</span><span class="lines">@@ -35,6 +36,7 @@
</span><span class="cx">     AttachBottom()
</span><span class="cx">     AttachRight()
</span><span class="cx">     Detach()
</span><ins>+
</ins><span class="cx">     AttachAvailabilityChanged(bool available)
</span><span class="cx"> 
</span><span class="cx">     SetAttachedWindowHeight(unsigned height)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> #include &quot;WebUserContentControllerProxy.h&quot;
</span><span class="cx"> #include &quot;WebBackForwardListItem.h&quot;
</span><span class="cx"> #include &quot;WebContext.h&quot;
</span><ins>+#include &quot;WebInspectorProxy.h&quot;
</ins><span class="cx"> #include &quot;WebNavigationDataStore.h&quot;
</span><span class="cx"> #include &quot;WebNotificationManagerProxy.h&quot;
</span><span class="cx"> #include &quot;WebPageGroup.h&quot;
</span><span class="lines">@@ -115,6 +116,8 @@
</span><span class="cx"> void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions&amp; launchOptions)
</span><span class="cx"> {
</span><span class="cx">     launchOptions.processType = ProcessLauncher::WebProcess;
</span><ins>+    if (&amp;m_context.get() == &amp;WebInspectorProxy::inspectorContext())
+        launchOptions.extraInitializationData.add(ASCIILiteral(&quot;inspector-process&quot;), ASCIILiteral(&quot;1&quot;));
</ins><span class="cx">     platformGetLaunchOptions(launchOptions);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesseflWebInspectorProxyEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx">     if (!m_inspectorWindow)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-    WKContextRef wkContext = toAPI(&amp;page()-&gt;process().context());
</del><ins>+    WKContextRef wkContext = toAPI(&amp;inspectorContext());
</ins><span class="cx">     WKPageGroupRef wkPageGroup = toAPI(inspectorPageGroup());
</span><span class="cx"> 
</span><span class="cx">     m_inspectorView = EWKViewCreate(wkContext, wkPageGroup, ecore_evas_get(m_inspectorWindow), /* smart */ 0);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkWebInspectorProxyGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_page);
</span><span class="cx">     ASSERT(!m_inspectorView);
</span><del>-    m_inspectorView = GTK_WIDGET(webkitWebViewBaseCreate(&amp;page()-&gt;process().context(), nullptr, inspectorPageGroup(), nullptr, m_page));
</del><ins>+    m_inspectorView = GTK_WIDGET(webkitWebViewBaseCreate(&amp;inspectorContext(), nullptr, inspectorPageGroup(), nullptr, nullptr));
</ins><span class="cx">     g_object_add_weak_pointer(G_OBJECT(m_inspectorView), reinterpret_cast&lt;void**&gt;(&amp;m_inspectorView));
</span><span class="cx">     return webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(m_inspectorView));
</span><span class="cx"> }
</span><span class="lines">@@ -182,8 +182,11 @@
</span><span class="cx">         m_inspectorWindow = 0;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // Set a default attached size based on InspectorFrontendClientLocal.
</del><ins>+    // Set a default sizes based on InspectorFrontendClientLocal.
</ins><span class="cx">     static const unsigned defaultAttachedSize = 300;
</span><ins>+    static const unsigned minimumAttachedWidth = 750;
+    static const unsigned minimumAttachedHeight = 250;
+
</ins><span class="cx">     if (m_attachmentSide == AttachmentSideBottom) {
</span><span class="cx">         unsigned maximumAttachedHeight = platformInspectedWindowHeight() * 3 / 4;
</span><span class="cx">         platformSetAttachedWindowHeight(std::max(minimumAttachedHeight, std::min(defaultAttachedSize, maximumAttachedHeight)));
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebInspectorProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #if PLATFORM(MAC) &amp;&amp; ENABLE(INSPECTOR)
</span><span class="cx"> 
</span><span class="cx"> #import &quot;WKAPICast.h&quot;
</span><del>-#import &quot;WebContext.h&quot;
</del><span class="cx"> #import &quot;WKInspectorPrivateMac.h&quot;
</span><span class="cx"> #import &quot;WKMutableArray.h&quot;
</span><span class="cx"> #import &quot;WKOpenPanelParameters.h&quot;
</span><span class="lines">@@ -37,17 +36,20 @@
</span><span class="cx"> #import &quot;WKRetainPtr.h&quot;
</span><span class="cx"> #import &quot;WKURLCF.h&quot;
</span><span class="cx"> #import &quot;WKViewPrivate.h&quot;
</span><ins>+#import &quot;WebContext.h&quot;
</ins><span class="cx"> #import &quot;WebInspectorMessages.h&quot;
</span><ins>+#import &quot;WebInspectorUIMessages.h&quot;
</ins><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><span class="cx"> #import &quot;WebProcessProxy.h&quot;
</span><del>-#import &lt;algorithm&gt;
-#import &lt;mach-o/dyld.h&gt;
-#import &lt;WebKitSystemInterface.h&gt;
</del><ins>+#import &lt;QuartzCore/CoreAnimation.h&gt;
</ins><span class="cx"> #import &lt;WebCore/InspectorFrontendClientLocal.h&gt;
</span><span class="cx"> #import &lt;WebCore/LocalizedStrings.h&gt;
</span><span class="cx"> #import &lt;WebCore/SoftLinking.h&gt;
</span><ins>+#import &lt;WebKitSystemInterface.h&gt;
+#import &lt;algorithm&gt;
+#import &lt;mach-o/dyld.h&gt;
</ins><span class="cx"> #import &lt;wtf/text/Base64.h&gt;
</span><span class="cx"> #import &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -73,10 +75,16 @@
</span><span class="cx"> static const NSUInteger windowStyleMask = NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask | NSTexturedBackgroundWindowMask;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+// The time we keep our WebView alive before closing it and its process.
+// Reusing the WebView improves start up time for people that jump in and out of the Inspector.
+static const unsigned webViewCloseTimeout = 60;
+
</ins><span class="cx"> // WKWebInspectorProxyObjCAdapter is a helper ObjC object used as a delegate or notification observer
</span><span class="cx"> // for the sole purpose of getting back into the C++ code from an ObjC caller.
</span><span class="cx"> 
</span><del>-@interface WKWebInspectorProxyObjCAdapter ()
</del><ins>+@interface WKWebInspectorProxyObjCAdapter () {
+    BOOL _ignoreNextInspectedViewFrameDidChange;
+}
</ins><span class="cx"> 
</span><span class="cx"> - (id)initWithWebInspectorProxy:(WebInspectorProxy*)inspectorProxy;
</span><span class="cx"> - (void)close;
</span><span class="lines">@@ -114,7 +122,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)close
</span><span class="cx"> {
</span><del>-    _inspectorProxy = 0;
</del><ins>+    _inspectorProxy = nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)windowDidMove:(NSNotification *)notification
</span><span class="lines">@@ -132,8 +140,18 @@
</span><span class="cx">     static_cast&lt;WebInspectorProxy*&gt;(_inspectorProxy)-&gt;close();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)ignoreNextInspectedViewFrameDidChange
+{
+    _ignoreNextInspectedViewFrameDidChange = YES;
+}
+
</ins><span class="cx"> - (void)inspectedViewFrameDidChange:(NSNotification *)notification
</span><span class="cx"> {
</span><ins>+    if (_ignoreNextInspectedViewFrameDidChange)
+        return;
+
+    _ignoreNextInspectedViewFrameDidChange = NO;
+
</ins><span class="cx">     // Resizing the views while inside this notification can lead to bad results when entering
</span><span class="cx">     // or exiting full screen. To avoid that we need to perform the work after a delay. We only
</span><span class="cx">     // depend on this for enforcing the height constraints, so a small delay isn't terrible. Most
</span><span class="lines">@@ -269,6 +287,18 @@
</span><span class="cx">     return WKRectMake(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebInspectorProxy::closeTimerFired()
+{
+    ASSERT(!m_isAttached || !m_inspectorWindow);
+    if (m_isAttached || m_inspectorWindow)
+        return;
+
+    m_inspectorView = nil;
+
+    [m_inspectorProxyObjCAdapter close];
+    m_inspectorProxyObjCAdapter = nil;
+}
+
</ins><span class="cx"> static NSButton *createDockButton(NSString *imageName)
</span><span class="cx"> {
</span><span class="cx">     // Create a full screen button so we can turn it into a dock button.
</span><span class="lines">@@ -395,7 +425,16 @@
</span><span class="cx"> WebPageProxy* WebInspectorProxy::platformCreateInspectorPage()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_page);
</span><ins>+
+    m_closeTimer.stop();
+
+    if (m_inspectorView) {
+        ASSERT(m_inspectorProxyObjCAdapter);
+        return toImpl(m_inspectorView.get().pageRef);
+    }
+
</ins><span class="cx">     ASSERT(!m_inspectorView);
</span><ins>+    ASSERT(!m_inspectorProxyObjCAdapter);
</ins><span class="cx"> 
</span><span class="cx">     NSRect initialRect;
</span><span class="cx">     if (m_isAttached) {
</span><span class="lines">@@ -418,7 +457,7 @@
</span><span class="cx">             initialRect = [NSWindow contentRectForFrameRect:windowFrame styleMask:windowStyleMask];
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_inspectorView = adoptNS([[WKWebInspectorWKView alloc] initWithFrame:initialRect contextRef:toAPI(&amp;page()-&gt;process().context()) pageGroupRef:toAPI(inspectorPageGroup()) relatedToPage:toAPI(m_page)]);
</del><ins>+    m_inspectorView = adoptNS([[WKWebInspectorWKView alloc] initWithFrame:initialRect contextRef:toAPI(&amp;inspectorContext()) pageGroupRef:toAPI(inspectorPageGroup()) relatedToPage:nullptr]);
</ins><span class="cx">     ASSERT(m_inspectorView);
</span><span class="cx"> 
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &lt;= 1090
</span><span class="lines">@@ -426,8 +465,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     m_inspectorProxyObjCAdapter = adoptNS([[WKWebInspectorProxyObjCAdapter alloc] initWithWebInspectorProxy:this]);
</span><ins>+    ASSERT(m_inspectorProxyObjCAdapter);
</ins><span class="cx"> 
</span><span class="cx">     WebPageProxy* inspectorPage = toImpl(m_inspectorView.get().pageRef);
</span><ins>+    ASSERT(inspectorPage);
</ins><span class="cx"> 
</span><span class="cx">     WKPageUIClientV2 uiClient = {
</span><span class="cx">         { 2, this },
</span><span class="lines">@@ -499,13 +540,10 @@
</span><span class="cx">     if (m_inspectorWindow) {
</span><span class="cx">         [m_inspectorWindow setDelegate:nil];
</span><span class="cx">         [m_inspectorWindow orderOut:nil];
</span><del>-        m_inspectorWindow = 0;
</del><ins>+        m_inspectorWindow = nil;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_inspectorView = 0;
-
-    [m_inspectorProxyObjCAdapter close];
-    m_inspectorProxyObjCAdapter = 0;
</del><ins>+    m_closeTimer.startOneShot(webViewCloseTimeout);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorProxy::platformHide()
</span><span class="lines">@@ -518,7 +556,7 @@
</span><span class="cx">     if (m_inspectorWindow) {
</span><span class="cx">         [m_inspectorWindow setDelegate:nil];
</span><span class="cx">         [m_inspectorWindow orderOut:nil];
</span><del>-        m_inspectorWindow = 0;
</del><ins>+        m_inspectorWindow = nil;
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -589,7 +627,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>-        m_page-&gt;process().send(Messages::WebInspector::DidSave([actualURL absoluteString]), m_page-&gt;pageID());
</del><ins>+        m_inspectorPage-&gt;process().send(Messages::WebInspectorUI::DidSave([actualURL absoluteString]), m_inspectorPage-&gt;pageID());
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     if (!forceSaveDialog) {
</span><span class="lines">@@ -623,7 +661,7 @@
</span><span class="cx">     [handle writeData:[content dataUsingEncoding:NSUTF8StringEncoding]];
</span><span class="cx">     [handle closeFile];
</span><span class="cx"> 
</span><del>-    m_page-&gt;process().send(Messages::WebInspector::DidAppend([actualURL absoluteString]), m_page-&gt;pageID());
</del><ins>+    m_inspectorPage-&gt;process().send(Messages::WebInspectorUI::DidAppend([actualURL absoluteString]), m_inspectorPage-&gt;pageID());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorProxy::windowFrameDidChange()
</span><span class="lines">@@ -679,6 +717,11 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    if (NSEqualRects([m_inspectorView frame], inspectorFrame) &amp;&amp; NSEqualRects([inspectedView frame], inspectedViewFrame))
+        return;
+
+    [m_inspectorProxyObjCAdapter ignoreNextInspectedViewFrameDidChange];
+
</ins><span class="cx">     // Disable screen updates to make sure the layers for both views resize in sync.
</span><span class="cx">     [[m_inspectorView window] disableScreenUpdatesUntilFlush];
</span><span class="cx"> 
</span><span class="lines">@@ -708,7 +751,7 @@
</span><span class="cx">     if (m_inspectorWindow) {
</span><span class="cx">         [m_inspectorWindow setDelegate:nil];
</span><span class="cx">         [m_inspectorWindow orderOut:nil];
</span><del>-        m_inspectorWindow = 0;
</del><ins>+        m_inspectorWindow = nil;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     [m_inspectorView removeFromSuperview];
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -495,10 +495,10 @@
</span><span class="cx">                 1AFE436518B6C081009C7A48 /* UIDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AFE436318B6C081009C7A48 /* UIDelegate.mm */; };
</span><span class="cx">                 1AFE436618B6C081009C7A48 /* UIDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AFE436418B6C081009C7A48 /* UIDelegate.h */; };
</span><span class="cx">                 1AFF49001833DE78009AB15A /* WKDeprecatedFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFF48FE1833DE78009AB15A /* WKDeprecatedFunctions.cpp */; };
</span><ins>+                1C891D6519B124FF00BA79DD /* WebInspectorUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C891D6219B124FF00BA79DD /* WebInspectorUI.cpp */; };
+                1C891D6619B124FF00BA79DD /* WebInspectorUI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C891D6319B124FF00BA79DD /* WebInspectorUI.h */; };
</ins><span class="cx">                 1C8AE7611992F63A00ABF6EC /* DockBottomLegacy.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 1C8AE75F1992F62F00ABF6EC /* DockBottomLegacy.pdf */; };
</span><span class="cx">                 1C8AE7621992F63C00ABF6EC /* DockRightLegacy.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 1C8AE7601992F62F00ABF6EC /* DockRightLegacy.pdf */; };
</span><del>-                1C8E25A81270E3BB00BC7BD0 /* WebInspectorFrontendClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C8E256B1270DE3800BC7BD0 /* WebInspectorFrontendClient.cpp */; };
-                1C8E25A91270E3BC00BC7BD0 /* WebInspectorFrontendClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C8E256A1270DE3800BC7BD0 /* WebInspectorFrontendClient.h */; };
</del><span class="cx">                 1C8E28201275D15400BC7BD0 /* WebInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C8E281E1275D15400BC7BD0 /* WebInspector.h */; };
</span><span class="cx">                 1C8E28211275D15400BC7BD0 /* WebInspector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C8E281F1275D15400BC7BD0 /* WebInspector.cpp */; };
</span><span class="cx">                 1C8E28341275D73800BC7BD0 /* WebInspectorProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C8E28321275D73800BC7BD0 /* WebInspectorProxy.h */; };
</span><span class="lines">@@ -510,8 +510,10 @@
</span><span class="cx">                 1CA8B936127C774E00576C2B /* WebInspectorProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1CA8B935127C774E00576C2B /* WebInspectorProxyMac.mm */; };
</span><span class="cx">                 1CA8B945127C882A00576C2B /* WebInspectorProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CA8B943127C882A00576C2B /* WebInspectorProxyMessageReceiver.cpp */; };
</span><span class="cx">                 1CA8B946127C882A00576C2B /* WebInspectorProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CA8B944127C882A00576C2B /* WebInspectorProxyMessages.h */; };
</span><del>-                1CA8B954127C891500576C2B /* WebInspectorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C8E2DAD1278C5B200BC7BD0 /* WebInspectorMac.mm */; };
</del><ins>+                1CA8B954127C891500576C2B /* WebInspectorUIMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C8E2DAD1278C5B200BC7BD0 /* WebInspectorUIMac.mm */; };
</ins><span class="cx">                 1CB75C941701E880009F809F /* DockRight.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 1CB75C931701E880009F809F /* DockRight.pdf */; };
</span><ins>+                1CBBE4A019B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CBBE49E19B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp */; };
+                1CBBE4A119B66C53006B7D81 /* WebInspectorUIMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CBBE49F19B66C53006B7D81 /* WebInspectorUIMessages.h */; };
</ins><span class="cx">                 1CBC945E16515ED200D68AAE /* DockBottom.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 1CBC945D16515ED200D68AAE /* DockBottom.pdf */; };
</span><span class="cx">                 1F335BC0185B84F0001A201A /* WKWebProcessPlugInLoadDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F335BBF185B84D8001A201A /* WKWebProcessPlugInLoadDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1F604BA81889FA7400EE0395 /* WKRenderingProgressEvents.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F604BA61889FA7400EE0395 /* WKRenderingProgressEvents.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2475,10 +2477,11 @@
</span><span class="cx">                 1AFF48FE1833DE78009AB15A /* WKDeprecatedFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKDeprecatedFunctions.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1BB417C912C00CCA002BE67B /* TextCheckerCompletion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextCheckerCompletion.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C77C1951288A872006A742F /* WebInspectorProxy.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebInspectorProxy.messages.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1C891D6219B124FF00BA79DD /* WebInspectorUI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspectorUI.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1C891D6319B124FF00BA79DD /* WebInspectorUI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorUI.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1C891D6419B124FF00BA79DD /* WebInspectorUI.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebInspectorUI.messages.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1C8AE75F1992F62F00ABF6EC /* DockBottomLegacy.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = DockBottomLegacy.pdf; path = Resources/DockBottomLegacy.pdf; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C8AE7601992F62F00ABF6EC /* DockRightLegacy.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = DockRightLegacy.pdf; path = Resources/DockRightLegacy.pdf; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                1C8E256A1270DE3800BC7BD0 /* WebInspectorFrontendClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorFrontendClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                1C8E256B1270DE3800BC7BD0 /* WebInspectorFrontendClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspectorFrontendClient.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 1C8E281E1275D15400BC7BD0 /* WebInspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspector.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C8E281F1275D15400BC7BD0 /* WebInspector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspector.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C8E28321275D73800BC7BD0 /* WebInspectorProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorProxy.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -2488,11 +2491,13 @@
</span><span class="cx">                 1C8E2A1C1277833F00BC7BD0 /* WebInspector.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebInspector.messages.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C8E2A311277852400BC7BD0 /* WebInspectorMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspectorMessageReceiver.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C8E2A321277852400BC7BD0 /* WebInspectorMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorMessages.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                1C8E2DAD1278C5B200BC7BD0 /* WebInspectorMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebInspectorMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                1C8E2DAD1278C5B200BC7BD0 /* WebInspectorUIMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebInspectorUIMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1CA8B935127C774E00576C2B /* WebInspectorProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebInspectorProxyMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1CA8B943127C882A00576C2B /* WebInspectorProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspectorProxyMessageReceiver.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1CA8B944127C882A00576C2B /* WebInspectorProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorProxyMessages.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1CB75C931701E880009F809F /* DockRight.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = DockRight.pdf; path = Resources/DockRight.pdf; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1CBBE49E19B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspectorUIMessageReceiver.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1CBBE49F19B66C53006B7D81 /* WebInspectorUIMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorUIMessages.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1CBC945D16515ED200D68AAE /* DockBottom.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = DockBottom.pdf; path = Resources/DockBottom.pdf; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1CC417C912C00CCA002BE67B /* TextCheckerCompletion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextCheckerCompletion.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1F0181691858DC1500F92884 /* WKWebProcessPlugInFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebProcessPlugInFrame.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -5662,8 +5667,6 @@
</span><span class="cx">                                 BC1BE1DE12D54A410004A228 /* WebGeolocationClient.h */,
</span><span class="cx">                                 BC111A59112F4FBB00337BAB /* WebInspectorClient.cpp */,
</span><span class="cx">                                 BC032D6D10F4378D0058C15A /* WebInspectorClient.h */,
</span><del>-                                1C8E256B1270DE3800BC7BD0 /* WebInspectorFrontendClient.cpp */,
-                                1C8E256A1270DE3800BC7BD0 /* WebInspectorFrontendClient.h */,
</del><span class="cx">                                 31099971146C759B0029DEB9 /* WebNotificationClient.cpp */,
</span><span class="cx">                                 31099968146C71F50029DEB9 /* WebNotificationClient.h */,
</span><span class="cx">                                 512127C11908239A00DAF35C /* WebPasteboardOverrides.cpp */,
</span><span class="lines">@@ -5723,6 +5726,9 @@
</span><span class="cx">                                 1C8E281F1275D15400BC7BD0 /* WebInspector.cpp */,
</span><span class="cx">                                 1C8E281E1275D15400BC7BD0 /* WebInspector.h */,
</span><span class="cx">                                 1C8E2A1C1277833F00BC7BD0 /* WebInspector.messages.in */,
</span><ins>+                                1C891D6219B124FF00BA79DD /* WebInspectorUI.cpp */,
+                                1C891D6319B124FF00BA79DD /* WebInspectorUI.h */,
+                                1C891D6419B124FF00BA79DD /* WebInspectorUI.messages.in */,
</ins><span class="cx">                                 BC857F8412B82D0B00EDEB2E /* WebOpenPanelResultListener.cpp */,
</span><span class="cx">                                 BC857F8312B82D0B00EDEB2E /* WebOpenPanelResultListener.h */,
</span><span class="cx">                                 BC963D6A113DD19200574BE2 /* WebPage.cpp */,
</span><span class="lines">@@ -6471,7 +6477,7 @@
</span><span class="cx">                                 5192D5751961FD0300CD19AA /* ServicesOverlayController.mm */,
</span><span class="cx">                                 1AAF263714687C39004A1E8A /* TiledCoreAnimationDrawingArea.h */,
</span><span class="cx">                                 1AAF263614687C39004A1E8A /* TiledCoreAnimationDrawingArea.mm */,
</span><del>-                                1C8E2DAD1278C5B200BC7BD0 /* WebInspectorMac.mm */,
</del><ins>+                                1C8E2DAD1278C5B200BC7BD0 /* WebInspectorUIMac.mm */,
</ins><span class="cx">                                 BC963D6D113DD1A500574BE2 /* WebPageMac.mm */,
</span><span class="cx">                                 29CD55A8128E294F00133C85 /* WKAccessibilityWebPageObjectBase.h */,
</span><span class="cx">                                 29CD55A9128E294F00133C85 /* WKAccessibilityWebPageObjectBase.mm */,
</span><span class="lines">@@ -6827,6 +6833,8 @@
</span><span class="cx">                                 1C8E2A321277852400BC7BD0 /* WebInspectorMessages.h */,
</span><span class="cx">                                 1CA8B943127C882A00576C2B /* WebInspectorProxyMessageReceiver.cpp */,
</span><span class="cx">                                 1CA8B944127C882A00576C2B /* WebInspectorProxyMessages.h */,
</span><ins>+                                1CBBE49E19B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp */,
+                                1CBBE49F19B66C53006B7D81 /* WebInspectorUIMessages.h */,
</ins><span class="cx">                                 33D3A3C41339617900709BE4 /* WebMediaCacheManagerMessageReceiver.cpp */,
</span><span class="cx">                                 33D3A3C51339617900709BE4 /* WebMediaCacheManagerMessages.h */,
</span><span class="cx">                                 33D3A3C61339617900709BE4 /* WebMediaCacheManagerProxyMessageReceiver.cpp */,
</span><span class="lines">@@ -7438,6 +7446,7 @@
</span><span class="cx">                                 2DACE64E18ADBFF000E4CA76 /* _WKThumbnailViewInternal.h in Headers */,
</span><span class="cx">                                 51578B831209ECEF00A37C4A /* APIData.h in Headers */,
</span><span class="cx">                                 F6A25FDD12ADC6CC00DC40CC /* WebDatabaseManager.h in Headers */,
</span><ins>+                                1C891D6619B124FF00BA79DD /* WebInspectorUI.h in Headers */,
</ins><span class="cx">                                 F62A76B712B1B25F0005F1B6 /* WebDatabaseManagerMessages.h in Headers */,
</span><span class="cx">                                 F62A765D12B1ABC30005F1B6 /* WebDatabaseManagerProxy.h in Headers */,
</span><span class="cx">                                 2D6AB541192B1C4A003A9FD1 /* WKPDFPageNumberIndicator.h in Headers */,
</span><span class="lines">@@ -7494,7 +7503,6 @@
</span><span class="cx">                                 1C8E28201275D15400BC7BD0 /* WebInspector.h in Headers */,
</span><span class="cx">                                 1A3CC16718906ACF001E6ED8 /* WKWebView.h in Headers */,
</span><span class="cx">                                 BC032D8210F4378D0058C15A /* WebInspectorClient.h in Headers */,
</span><del>-                                1C8E25A91270E3BC00BC7BD0 /* WebInspectorFrontendClient.h in Headers */,
</del><span class="cx">                                 1C8E2A361277852400BC7BD0 /* WebInspectorMessages.h in Headers */,
</span><span class="cx">                                 1C8E28341275D73800BC7BD0 /* WebInspectorProxy.h in Headers */,
</span><span class="cx">                                 1CA8B946127C882A00576C2B /* WebInspectorProxyMessages.h in Headers */,
</span><span class="lines">@@ -7762,6 +7770,7 @@
</span><span class="cx">                                 F634445D12A885E9000612D8 /* WKSecurityOrigin.h in Headers */,
</span><span class="cx">                                 1AAF08B819269E6D00B6390C /* WebUserContentControllerMessages.h in Headers */,
</span><span class="cx">                                 BC407604124FF0270068F20A /* WKSerializedScriptValue.h in Headers */,
</span><ins>+                                1CBBE4A119B66C53006B7D81 /* WebInspectorUIMessages.h in Headers */,
</ins><span class="cx">                                 0FCB4E4C18BBE044000FCFC9 /* WKContentView.h in Headers */,
</span><span class="cx">                                 37A64E5718F38F4600EB30F1 /* _WKFormInputSession.h in Headers */,
</span><span class="cx">                                 1F604BAA1889FBB800EE0395 /* WKRenderingProgressEventsInternal.h in Headers */,
</span><span class="lines">@@ -8865,6 +8874,7 @@
</span><span class="cx">                                 00B9661918E25AE100CE1F88 /* FindClient.mm in Sources */,
</span><span class="cx">                                 1AE5B7FB11E7AED200BA6767 /* NetscapePluginMac.mm in Sources */,
</span><span class="cx">                                 7C361D721927FA360036A59D /* WebScriptMessageHandler.cpp in Sources */,
</span><ins>+                                1C891D6519B124FF00BA79DD /* WebInspectorUI.cpp in Sources */,
</ins><span class="cx">                                 1A4A9C5512B816CF008FE984 /* NetscapePluginModule.cpp in Sources */,
</span><span class="cx">                                 1A4A9C9A12B821CD008FE984 /* NetscapePluginModuleMac.mm in Sources */,
</span><span class="cx">                                 1AA5889311EE70400061B882 /* NetscapePluginStream.cpp in Sources */,
</span><span class="lines">@@ -8903,6 +8913,7 @@
</span><span class="cx">                                 1A2D8439127F65D5001EB962 /* NPObjectMessageReceiverMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 1AAF08AD1926936700B6390C /* WebUserContentController.cpp in Sources */,
</span><span class="cx">                                 1A2D82A6127F4EAB001EB962 /* NPObjectProxy.cpp in Sources */,
</span><ins>+                                1CBBE4A019B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp in Sources */,
</ins><span class="cx">                                 1A2D82A8127F4EAB001EB962 /* NPRemoteObjectMap.cpp in Sources */,
</span><span class="cx">                                 1A2161B111F37664008AD0F5 /* NPRuntimeObjectMap.cpp in Sources */,
</span><span class="cx">                                 1A2162B011F38971008AD0F5 /* NPRuntimeUtilities.cpp in Sources */,
</span><span class="lines">@@ -9162,8 +9173,7 @@
</span><span class="cx">                                 BCCF6ABC12C91EF9008F9C35 /* WebImage.cpp in Sources */,
</span><span class="cx">                                 1C8E28211275D15400BC7BD0 /* WebInspector.cpp in Sources */,
</span><span class="cx">                                 BC111A60112F4FBB00337BAB /* WebInspectorClient.cpp in Sources */,
</span><del>-                                1C8E25A81270E3BB00BC7BD0 /* WebInspectorFrontendClient.cpp in Sources */,
-                                1CA8B954127C891500576C2B /* WebInspectorMac.mm in Sources */,
</del><ins>+                                1CA8B954127C891500576C2B /* WebInspectorUIMac.mm in Sources */,
</ins><span class="cx">                                 1C8E2A351277852400BC7BD0 /* WebInspectorMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 1C8E28351275D73800BC7BD0 /* WebInspectorProxy.cpp in Sources */,
</span><span class="cx">                                 1CA8B936127C774E00576C2B /* WebInspectorProxyMac.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebInspectorClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -84,20 +84,21 @@
</span><span class="cx"> 
</span><span class="cx"> WebCore::InspectorFrontendChannel* WebInspectorClient::openInspectorFrontend(InspectorController* controller)
</span><span class="cx"> {
</span><del>-    WebPage* inspectorPage = controller-&gt;isUnderTest() ? m_page-&gt;inspector()-&gt;createInspectorPageForTest() : m_page-&gt;inspector()-&gt;createInspectorPage();
-    ASSERT_UNUSED(inspectorPage, inspectorPage);
-    return this;
</del><ins>+    m_page-&gt;inspector()-&gt;createInspectorPage(controller-&gt;isUnderTest());
+
+    return m_page-&gt;inspector();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorClient::closeInspectorFrontend()
</span><span class="cx"> {
</span><span class="cx">     if (m_page-&gt;inspector())
</span><del>-        m_page-&gt;inspector()-&gt;didClose();
</del><ins>+        m_page-&gt;inspector()-&gt;closeFrontend();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorClient::bringFrontendToFront()
</span><span class="cx"> {
</span><del>-    m_page-&gt;inspector()-&gt;bringToFront();
</del><ins>+    if (m_page-&gt;inspector())
+        m_page-&gt;inspector()-&gt;bringToFront();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorClient::didResizeMainFrame(Frame*)
</span><span class="lines">@@ -197,34 +198,6 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-bool WebInspectorClient::sendMessageToFrontend(const String&amp; message)
-{
-    WebInspector* inspector = m_page-&gt;inspector();
-    if (!inspector)
-        return false;
-
-#if ENABLE(INSPECTOR_SERVER)
-    if (inspector-&gt;hasRemoteFrontendConnected()) {
-        inspector-&gt;sendMessageToRemoteFrontend(message);
-        return true;
-    }
-#endif
-
-    WebPage* inspectorPage = inspector-&gt;inspectorPage();
-    if (inspectorPage)
-        return doDispatchMessageOnFrontendPage(inspectorPage-&gt;corePage(), message);
-
-    return false;
-}
-
-bool WebInspectorClient::supportsFrameInstrumentation()
-{
-#if USE(COORDINATED_GRAPHICS)
-    return true;
-#endif
-    return false;
-}
-
</del><span class="cx"> void WebInspectorClient::pageOverlayDestroyed(PageOverlay*)
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebInspectorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -45,22 +45,23 @@
</span><span class="cx"> class WebPage;
</span><span class="cx"> class RepaintIndicatorLayerClient;
</span><span class="cx"> 
</span><del>-class WebInspectorClient : public WebCore::InspectorClient, public WebCore::InspectorFrontendChannel, private PageOverlay::Client {
</del><ins>+class WebInspectorClient : public WebCore::InspectorClient, private PageOverlay::Client {
</ins><span class="cx"> friend class RepaintIndicatorLayerClient;
</span><span class="cx"> public:
</span><span class="cx">     WebInspectorClient(WebPage*);
</span><span class="cx">     virtual ~WebInspectorClient();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    virtual void inspectorDestroyed() override;
</del><ins>+    // WebCore::InspectorClient
+    void inspectorDestroyed() override;
</ins><span class="cx"> 
</span><del>-    virtual InspectorFrontendChannel* openInspectorFrontend(WebCore::InspectorController*) override;
-    virtual void closeInspectorFrontend() override;
-    virtual void bringFrontendToFront() override;
-    virtual void didResizeMainFrame(WebCore::Frame*) override;
</del><ins>+    WebCore::InspectorFrontendChannel* openInspectorFrontend(WebCore::InspectorController*) override;
+    void closeInspectorFrontend() override;
+    void bringFrontendToFront() override;
+    void didResizeMainFrame(WebCore::Frame*) override;
</ins><span class="cx"> 
</span><del>-    virtual void highlight() override;
-    virtual void hideHighlight() override;
</del><ins>+    void highlight() override;
+    void hideHighlight() override;
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     virtual void showInspectorIndication() override;
</span><span class="lines">@@ -72,10 +73,6 @@
</span><span class="cx">     virtual bool overridesShowPaintRects() const override { return true; }
</span><span class="cx">     virtual void showPaintRect(const WebCore::FloatRect&amp;) override;
</span><span class="cx"> 
</span><del>-    virtual bool sendMessageToFrontend(const String&amp;) override;
-
-    virtual bool supportsFrameInstrumentation();
-
</del><span class="cx">     // PageOverlay::Client
</span><span class="cx">     virtual void pageOverlayDestroyed(PageOverlay*) override;
</span><span class="cx">     virtual void willMoveToWebPage(PageOverlay*, WebPage*) override;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebInspectorFrontendClientcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1,121 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WebInspectorFrontendClient.h&quot;
-
-#if ENABLE(INSPECTOR)
-
-#include &quot;WebInspector.h&quot;
-#include &quot;WebPage.h&quot;
-#include &lt;WebCore/InspectorController.h&gt;
-#include &lt;WebCore/Page.h&gt;
-#include &lt;inspector/InspectorAgentBase.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-using namespace WebCore;
-
-namespace WebKit {
-
-WebInspectorFrontendClient::WebInspectorFrontendClient(WebPage* page, WebPage* inspectorPage)
-    : InspectorFrontendClientLocal(&amp;page-&gt;corePage()-&gt;inspectorController(), inspectorPage-&gt;corePage(), std::make_unique&lt;Settings&gt;())
-    , m_page(page)
-{
-}
-
-String WebInspectorFrontendClient::localizedStringsURL()
-{
-    return m_page-&gt;inspector()-&gt;localizedStringsURL();
-}
-
-void WebInspectorFrontendClient::bringToFront()
-{
-    m_page-&gt;inspector()-&gt;bringToFront();
-}
-
-void WebInspectorFrontendClient::closeWindow()
-{
-    m_page-&gt;corePage()-&gt;inspectorController().disconnectFrontend(Inspector::InspectorDisconnectReason::InspectorDestroyed);
-    m_page-&gt;inspector()-&gt;didClose();
-}
-
-bool WebInspectorFrontendClient::canSave()
-{
-    return m_page-&gt;inspector()-&gt;canSave();
-}
-
-void WebInspectorFrontendClient::save(const String&amp; filename, const String&amp; content, bool base64Encoded, bool forceSaveAs)
-{
-    m_page-&gt;inspector()-&gt;save(filename, content, base64Encoded, forceSaveAs);
-}
-
-void WebInspectorFrontendClient::append(const String&amp; filename, const String&amp; content)
-{
-    m_page-&gt;inspector()-&gt;append(filename, content);
-}
-
-void WebInspectorFrontendClient::attachWindow(DockSide dockSide)
-{
-    switch (dockSide) {
-    case InspectorFrontendClient::DockSide::Undocked:
-        ASSERT_NOT_REACHED();
-        break;
-    case InspectorFrontendClient::DockSide::Bottom:
-        m_page-&gt;inspector()-&gt;attachBottom();
-        break;
-    case InspectorFrontendClient::DockSide::Right:
-        m_page-&gt;inspector()-&gt;attachRight();
-        break;
-    }
-}
-
-void WebInspectorFrontendClient::detachWindow()
-{
-    m_page-&gt;inspector()-&gt;detach();
-}
-
-void WebInspectorFrontendClient::setAttachedWindowHeight(unsigned height)
-{
-    m_page-&gt;inspector()-&gt;setAttachedWindowHeight(height);
-}
-
-void WebInspectorFrontendClient::setAttachedWindowWidth(unsigned width)
-{
-    m_page-&gt;inspector()-&gt;setAttachedWindowWidth(width);
-}
-
-void WebInspectorFrontendClient::setToolbarHeight(unsigned height)
-{
-    m_page-&gt;inspector()-&gt;setToolbarHeight(height);
-}
-
-void WebInspectorFrontendClient::inspectedURLChanged(const String&amp; urlString)
-{
-    m_page-&gt;inspector()-&gt;inspectedURLChanged(urlString);
-}
-
-} // namespace WebKit
-
-#endif // ENABLE(INSPECTOR)
</del></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebInspectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -27,169 +27,89 @@
</span><span class="cx"> #include &quot;WebInspector.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><ins>+
</ins><span class="cx"> #include &quot;WebFrame.h&quot;
</span><del>-#include &quot;WebInspectorFrontendClient.h&quot;
</del><ins>+#include &quot;WebInspectorMessages.h&quot;
</ins><span class="cx"> #include &quot;WebInspectorProxyMessages.h&quot;
</span><ins>+#include &quot;WebInspectorUIMessages.h&quot;
</ins><span class="cx"> #include &quot;WebPage.h&quot;
</span><del>-#include &quot;WebPageCreationParameters.h&quot;
</del><span class="cx"> #include &quot;WebProcess.h&quot;
</span><ins>+#include &lt;WebCore/Chrome.h&gt;
+#include &lt;WebCore/Document.h&gt;
+#include &lt;WebCore/FrameLoadRequest.h&gt;
+#include &lt;WebCore/FrameView.h&gt;
</ins><span class="cx"> #include &lt;WebCore/InspectorController.h&gt;
</span><span class="cx"> #include &lt;WebCore/InspectorFrontendClient.h&gt;
</span><ins>+#include &lt;WebCore/InspectorPageAgent.h&gt;
</ins><span class="cx"> #include &lt;WebCore/MainFrame.h&gt;
</span><ins>+#include &lt;WebCore/NotImplemented.h&gt;
</ins><span class="cx"> #include &lt;WebCore/Page.h&gt;
</span><span class="cx"> #include &lt;WebCore/ScriptController.h&gt;
</span><del>-#include &lt;inspector/InspectorAgentBase.h&gt;
-#include &lt;bindings/ScriptValue.h&gt;
-#include &lt;wtf/text/StringConcatenate.h&gt;
</del><ins>+#include &lt;WebCore/WindowFeatures.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><ins>+static const float minimumAttachedHeight = 250;
+static const float maximumAttachedHeightRatio = 0.75;
+static const float minimumAttachedWidth = 750;
+
</ins><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;WebInspector&gt; WebInspector::create(WebPage* page, InspectorFrontendChannel* frontendChannel)
</del><ins>+PassRefPtr&lt;WebInspector&gt; WebInspector::create(WebPage* page)
</ins><span class="cx"> {
</span><del>-    return adoptRef(new WebInspector(page, frontendChannel));
</del><ins>+    return adoptRef(new WebInspector(page));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebInspector::WebInspector(WebPage* page, InspectorFrontendChannel* frontendChannel)
</del><ins>+WebInspector::WebInspector(WebPage* page)
</ins><span class="cx">     : m_page(page)
</span><del>-    , m_inspectorPage(nullptr)
-    , m_frontendClient(nullptr)
-    , m_frontendChannel(frontendChannel)
-#if PLATFORM(COCOA)
-    , m_hasLocalizedStringsURL(false)
-#endif
-#if ENABLE(INSPECTOR_SERVER)
-    , m_remoteFrontendConnected(false)
-#endif
</del><ins>+    , m_attached(false)
+    , m_previousCanAttach(false)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // Called from WebInspectorClient
</span><del>-WebPage* WebInspector::createInspectorPage()
</del><ins>+void WebInspector::createInspectorPage(bool underTest)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_page)
</span><del>-        return nullptr;
</del><ins>+        return;
</ins><span class="cx"> 
</span><del>-    ASSERT(!m_inspectorPage);
-    ASSERT(!m_frontendClient);
</del><ins>+#if OS(DARWIN)
+    mach_port_t listeningPort;
+    mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &amp;listeningPort);
</ins><span class="cx"> 
</span><del>-    uint64_t inspectorPageID = 0;
-    WebPageCreationParameters parameters;
</del><ins>+    IPC::Connection::Identifier connectionIdentifer(listeningPort);
+    IPC::Attachment connectionClientPort(listeningPort, MACH_MSG_TYPE_MAKE_SEND);
+#elif USE(UNIX_DOMAIN_SOCKETS)
+    IPC::Connection::SocketPair socketPair = IPC::Connection::createPlatformConnection();
+    IPC::Connection::Identifier connectionIdentifer(socketPair.server);
+    IPC::Attachment connectionClientPort(socketPair.client);
+#else
+    notImplemented();
+    return;
+#endif
</ins><span class="cx"> 
</span><del>-    if (!WebProcess::shared().parentProcessConnection()-&gt;sendSync(Messages::WebInspectorProxy::CreateInspectorPage(),
-            Messages::WebInspectorProxy::CreateInspectorPage::Reply(inspectorPageID, parameters),
-            m_page-&gt;pageID(), std::chrono::milliseconds::max())) {
-        return nullptr;
-    }
</del><ins>+    m_frontendConnection = IPC::Connection::createServerConnection(connectionIdentifer, this, RunLoop::main());
+    m_frontendConnection-&gt;open();
</ins><span class="cx"> 
</span><del>-    if (!inspectorPageID)
-        return nullptr;
-
-    WebProcess::shared().createWebPage(inspectorPageID, parameters);
-    m_inspectorPage = WebProcess::shared().webPage(inspectorPageID);
-    ASSERT(m_inspectorPage);
-
-    auto frontendClient = std::make_unique&lt;WebInspectorFrontendClient&gt;(m_page, m_inspectorPage);
-    m_frontendClient = frontendClient.get();
-    m_inspectorPage-&gt;corePage()-&gt;inspectorController().setInspectorFrontendClient(WTF::move(frontendClient));
-    return m_inspectorPage;
</del><ins>+    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::CreateInspectorPage(connectionClientPort, canAttachWindow(), underTest), m_page-&gt;pageID());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebPage* WebInspector::createInspectorPageForTest()
</del><ins>+void WebInspector::closeFrontend()
</ins><span class="cx"> {
</span><del>-    if (!m_page)
-        return nullptr;
</del><ins>+    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::DidClose(), m_page-&gt;pageID());
</ins><span class="cx"> 
</span><del>-    ASSERT(!m_inspectorPage);
-    ASSERT(!m_frontendClient);
</del><ins>+    m_frontendConnection-&gt;invalidate();
+    m_frontendConnection = nullptr;
</ins><span class="cx"> 
</span><del>-    uint64_t inspectorPageID = 0;
-    WebPageCreationParameters parameters;
-
-    if (!WebProcess::shared().parentProcessConnection()-&gt;sendSync(Messages::WebInspectorProxy::CreateInspectorPageForTest(),
-            Messages::WebInspectorProxy::CreateInspectorPageForTest::Reply(inspectorPageID, parameters),
-            m_page-&gt;pageID(), std::chrono::milliseconds::max())) {
-        return nullptr;
-    }
-
-    if (!inspectorPageID)
-        return nullptr;
-
-    WebProcess::shared().createWebPage(inspectorPageID, parameters);
-    m_inspectorPage = WebProcess::shared().webPage(inspectorPageID);
-    ASSERT(m_inspectorPage);
-
-    auto frontendClient = std::make_unique&lt;WebInspectorFrontendClient&gt;(m_page, m_inspectorPage);
-    m_frontendClient = frontendClient.get();
-    m_inspectorPage-&gt;corePage()-&gt;inspectorController().setInspectorFrontendClient(WTF::move(frontendClient));
-    return m_inspectorPage;
</del><ins>+    m_attached = false;
+    m_previousCanAttach = false;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebInspector::destroyInspectorPage()
-{
-    m_inspectorPage = nullptr;
-    m_frontendClient = nullptr;
-    m_frontendChannel = nullptr;
-}
-
-// Called from WebInspectorFrontendClient
-void WebInspector::didClose()
-{
-    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::DidClose(), m_page-&gt;pageID());
-    destroyInspectorPage();
-}
-
</del><span class="cx"> void WebInspector::bringToFront()
</span><span class="cx"> {
</span><span class="cx">     WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::BringToFront(), m_page-&gt;pageID());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebInspector::inspectedURLChanged(const String&amp; urlString)
-{
-    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::InspectedURLChanged(urlString), m_page-&gt;pageID());
-}
-
-void WebInspector::save(const String&amp; filename, const String&amp; content, bool base64Encoded, bool forceSaveAs)
-{
-    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::Save(filename, content, base64Encoded, forceSaveAs), m_page-&gt;pageID());
-}
-
-void WebInspector::append(const String&amp; filename, const String&amp; content)
-{
-    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::Append(filename, content), m_page-&gt;pageID());
-}
-
-void WebInspector::attachBottom()
-{
-    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::AttachBottom(), m_page-&gt;pageID());
-}
-
-void WebInspector::attachRight()
-{
-    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::AttachRight(), m_page-&gt;pageID());
-}
-
-void WebInspector::detach()
-{
-    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::Detach(), m_page-&gt;pageID());
-}
-
-void WebInspector::setAttachedWindowHeight(unsigned height)
-{
-    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::SetAttachedWindowHeight(height), m_page-&gt;pageID());
-}
-
-void WebInspector::setAttachedWindowWidth(unsigned width)
-{
-    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::SetAttachedWindowWidth(width), m_page-&gt;pageID());
-}
-
-void WebInspector::setToolbarHeight(unsigned height)
-{
-    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::SetToolbarHeight(height), m_page-&gt;pageID());
-}
-
</del><span class="cx"> // Called by WebInspector messages
</span><span class="cx"> void WebInspector::show()
</span><span class="cx"> {
</span><span class="lines">@@ -201,36 +121,19 @@
</span><span class="cx">     m_page-&gt;corePage()-&gt;inspectorController().close();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebInspector::didSave(const String&amp; url)
</del><ins>+void WebInspector::openInNewTab(const String&amp; urlString)
</ins><span class="cx"> {
</span><del>-    ASSERT(m_inspectorPage);
-    m_inspectorPage-&gt;corePage()-&gt;mainFrame().script().executeScript(makeString(&quot;InspectorFrontendAPI.savedURL(\&quot;&quot;, url, &quot;\&quot;)&quot;));
-}
</del><ins>+    Page* inspectedPage = m_page-&gt;corePage();
+    Frame&amp; inspectedMainFrame = inspectedPage-&gt;mainFrame();
+    FrameLoadRequest request(inspectedMainFrame.document()-&gt;securityOrigin(), ResourceRequest(urlString), &quot;_blank&quot;);
</ins><span class="cx"> 
</span><del>-void WebInspector::didAppend(const String&amp; url)
-{
-    ASSERT(m_inspectorPage);
-    m_inspectorPage-&gt;corePage()-&gt;mainFrame().script().executeScript(makeString(&quot;InspectorFrontendAPI.appendedToURL(\&quot;&quot;, url, &quot;\&quot;)&quot;));
-}
</del><ins>+    Page* newPage = inspectedPage-&gt;chrome().createWindow(&amp;inspectedMainFrame, request, WindowFeatures(), NavigationAction(request.resourceRequest(), NavigationTypeLinkClicked));
+    if (!newPage)
+        return;
</ins><span class="cx"> 
</span><del>-void WebInspector::attachedBottom()
-{
-    if (m_frontendClient)
-        m_frontendClient-&gt;setAttachedWindow(InspectorFrontendClient::DockSide::Bottom);
</del><ins>+    newPage-&gt;mainFrame().loader().load(request);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebInspector::attachedRight()
-{
-    if (m_frontendClient)
-        m_frontendClient-&gt;setAttachedWindow(InspectorFrontendClient::DockSide::Right);
-}
-
-void WebInspector::detached()
-{
-    if (m_frontendClient)
-        m_frontendClient-&gt;setAttachedWindow(InspectorFrontendClient::DockSide::Undocked);
-}
-
</del><span class="cx"> void WebInspector::evaluateScriptForTest(const String&amp; script)
</span><span class="cx"> {
</span><span class="cx">     m_page-&gt;corePage()-&gt;inspectorController().evaluateForTestInFrontend(script);
</span><span class="lines">@@ -239,109 +142,95 @@
</span><span class="cx"> void WebInspector::showConsole()
</span><span class="cx"> {
</span><span class="cx">     m_page-&gt;corePage()-&gt;inspectorController().show();
</span><del>-    if (m_frontendClient)
-        m_frontendClient-&gt;showConsole();
</del><ins>+    m_frontendConnection-&gt;send(Messages::WebInspectorUI::ShowConsole(), 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebInspector::showResources()
</span><span class="cx"> {
</span><span class="cx">     m_page-&gt;corePage()-&gt;inspectorController().show();
</span><del>-    if (m_frontendClient)
-        m_frontendClient-&gt;showResources();
</del><ins>+    m_frontendConnection-&gt;send(Messages::WebInspectorUI::ShowResources(), 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebInspector::showMainResourceForFrame(uint64_t frameID)
</del><ins>+void WebInspector::showMainResourceForFrame(uint64_t frameIdentifier)
</ins><span class="cx"> {
</span><del>-    WebFrame* frame = WebProcess::shared().webFrame(frameID);
</del><ins>+    WebFrame* frame = WebProcess::shared().webFrame(frameIdentifier);
</ins><span class="cx">     if (!frame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     m_page-&gt;corePage()-&gt;inspectorController().show();
</span><del>-    if (m_frontendClient)
-        m_frontendClient-&gt;showMainResourceForFrame(frame-&gt;coreFrame());
</del><ins>+
+    String inspectorFrameIdentifier = m_page-&gt;corePage()-&gt;inspectorController().pageAgent()-&gt;frameId(frame-&gt;coreFrame());
+    m_frontendConnection-&gt;send(Messages::WebInspectorUI::ShowMainResourceForFrame(inspectorFrameIdentifier), 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebInspector::startJavaScriptDebugging()
</del><ins>+void WebInspector::startPageProfiling()
</ins><span class="cx"> {
</span><span class="cx">     m_page-&gt;corePage()-&gt;inspectorController().show();
</span><del>-    if (m_frontendClient)
-        m_frontendClient-&gt;setDebuggingEnabled(true);
</del><ins>+    m_frontendConnection-&gt;send(Messages::WebInspectorUI::StartPageProfiling(), 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebInspector::stopJavaScriptDebugging()
</del><ins>+void WebInspector::stopPageProfiling()
</ins><span class="cx"> {
</span><span class="cx">     m_page-&gt;corePage()-&gt;inspectorController().show();
</span><del>-    if (m_frontendClient)
-        m_frontendClient-&gt;setDebuggingEnabled(false);
</del><ins>+    m_frontendConnection-&gt;send(Messages::WebInspectorUI::StopPageProfiling(), 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebInspector::setJavaScriptProfilingEnabled(bool)
</del><ins>+bool WebInspector::canAttachWindow()
</ins><span class="cx"> {
</span><del>-    // No longer supported.
-}
</del><ins>+    // Don't allow attaching to another inspector -- two inspectors in one window is too much!
+    if (m_page-&gt;isInspectorPage())
+        return false;
</ins><span class="cx"> 
</span><del>-void WebInspector::startJavaScriptProfiling()
-{
-    // No longer supported.
-}
</del><ins>+    // If we are already attached, allow attaching again to allow switching sides.
+    if (m_attached)
+        return true;
</ins><span class="cx"> 
</span><del>-void WebInspector::stopJavaScriptProfiling()
-{
-    // No longer supported.
</del><ins>+    // Don't allow the attach if the window would be too small to accommodate the minimum inspector size.
+    unsigned inspectedPageHeight = m_page-&gt;corePage()-&gt;mainFrame().view()-&gt;visibleHeight();
+    unsigned inspectedPageWidth = m_page-&gt;corePage()-&gt;mainFrame().view()-&gt;visibleWidth();
+    unsigned maximumAttachedHeight = inspectedPageHeight * maximumAttachedHeightRatio;
+    return minimumAttachedHeight &lt;= maximumAttachedHeight &amp;&amp; minimumAttachedWidth &lt;= inspectedPageWidth;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebInspector::startPageProfiling()
-{
-    m_page-&gt;corePage()-&gt;inspectorController().show();
-    if (m_frontendClient)
-        m_frontendClient-&gt;setTimelineProfilingEnabled(true);
-}
-
-void WebInspector::stopPageProfiling()
-{
-    m_page-&gt;corePage()-&gt;inspectorController().show();
-    if (m_frontendClient)
-        m_frontendClient-&gt;setTimelineProfilingEnabled(false);
-}
-
</del><span class="cx"> void WebInspector::updateDockingAvailability()
</span><span class="cx"> {
</span><del>-    if (!m_frontendClient)
</del><ins>+    if (m_attached)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    bool canAttachWindow = m_frontendClient-&gt;canAttachWindow();
</del><ins>+    bool canAttachWindow = this-&gt;canAttachWindow();
+    if (m_previousCanAttach == canAttachWindow)
+        return;
+
+    m_previousCanAttach = canAttachWindow;
+
</ins><span class="cx">     WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::AttachAvailabilityChanged(canAttachWindow), m_page-&gt;pageID());
</span><del>-    m_frontendClient-&gt;setDockingUnavailable(!canAttachWindow);
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if ENABLE(INSPECTOR_SERVER)
-void WebInspector::sendMessageToRemoteFrontend(const String&amp; message)
</del><ins>+void WebInspector::sendMessageToBackend(const String&amp; message)
</ins><span class="cx"> {
</span><del>-    ASSERT(m_remoteFrontendConnected);
-    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::SendMessageToRemoteFrontend(message), m_page-&gt;pageID());
</del><ins>+    m_page-&gt;corePage()-&gt;inspectorController().dispatchMessageFromFrontend(message);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebInspector::dispatchMessageFromRemoteFrontend(const String&amp; message)
</del><ins>+bool WebInspector::sendMessageToFrontend(const String&amp; message)
</ins><span class="cx"> {
</span><del>-    m_page-&gt;corePage()-&gt;inspectorController().dispatchMessageFromFrontend(message);
</del><ins>+#if !ENABLE(INSPECTOR_SERVER)
+    m_frontendConnection-&gt;send(Messages::WebInspectorUI::SendMessageToFrontend(message), 0);
+#else
+    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::SendMessageToRemoteFrontend(message), m_page-&gt;pageID());
+#endif
+    return true;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(INSPECTOR_SERVER)
</ins><span class="cx"> void WebInspector::remoteFrontendConnected()
</span><span class="cx"> {
</span><del>-    ASSERT(!m_remoteFrontendConnected);
-    // Switching between in-process and remote inspectors isn't supported yet.
-    ASSERT(!m_inspectorPage);
-
</del><span class="cx">     bool isAutomaticInspection = false;
</span><del>-    m_page-&gt;corePage()-&gt;inspectorController().connectFrontend(m_frontendChannel, isAutomaticInspection);
-    m_remoteFrontendConnected = true;
</del><ins>+    m_page-&gt;corePage()-&gt;inspectorController().connectFrontend(this, isAutomaticInspection);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebInspector::remoteFrontendDisconnected()
</span><span class="cx"> {
</span><del>-    ASSERT(m_remoteFrontendConnected);
</del><span class="cx">     m_page-&gt;corePage()-&gt;inspectorController().disconnectFrontend(Inspector::InspectorDisconnectReason::InspectorDestroyed);
</span><del>-    m_remoteFrontendConnected = false;
</del><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebInspectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.h (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.h        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.h        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -30,106 +30,80 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;APIObject.h&quot;
</span><span class="cx"> #include &quot;Connection.h&quot;
</span><ins>+#include &quot;MessageReceiver.h&quot;
</ins><span class="cx"> #include &lt;WebCore/InspectorForwarding.h&gt;
</span><span class="cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-class WebInspectorFrontendClient;
</del><span class="cx"> class WebPage;
</span><span class="cx"> 
</span><del>-class WebInspector : public API::ObjectImpl&lt;API::Object::Type::BundleInspector&gt; {
</del><ins>+class WebInspector : public API::ObjectImpl&lt;API::Object::Type::BundleInspector&gt;, public IPC::Connection::Client, public WebCore::InspectorFrontendChannel {
</ins><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;WebInspector&gt; create(WebPage*, WebCore::InspectorFrontendChannel*);
</del><ins>+    static PassRefPtr&lt;WebInspector&gt; create(WebPage*);
</ins><span class="cx"> 
</span><span class="cx">     WebPage* page() const { return m_page; }
</span><del>-    WebPage* inspectorPage() const { return m_inspectorPage; }
</del><span class="cx"> 
</span><ins>+    void updateDockingAvailability();
+
+    virtual bool sendMessageToFrontend(const String&amp; message) override;
+
</ins><span class="cx">     // Implemented in generated WebInspectorMessageReceiver.cpp
</span><del>-    void didReceiveWebInspectorMessage(IPC::Connection*, IPC::MessageDecoder&amp;);
</del><ins>+    void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&amp;);
</ins><span class="cx"> 
</span><ins>+    // IPC::Connection::Client
+    void didClose(IPC::Connection*) { close(); }
+    void didReceiveInvalidMessage(IPC::Connection*, IPC::StringReference messageReceiverName, IPC::StringReference messageName) { close(); }
+
</ins><span class="cx">     // Called by WebInspector messages
</span><ins>+    void connectionEstablished();
+
</ins><span class="cx">     void show();
</span><span class="cx">     void close();
</span><span class="cx"> 
</span><del>-    void didSave(const String&amp; url);
-    void didAppend(const String&amp; url);
</del><ins>+    void openInNewTab(const String&amp; urlString);
</ins><span class="cx"> 
</span><del>-    void attachedBottom();
-    void attachedRight();
-    void detached();
</del><ins>+    void canAttachWindow(bool&amp; result);
</ins><span class="cx"> 
</span><ins>+    void showConsole();
+    void showResources();
+
+    void showMainResourceForFrame(uint64_t frameIdentifier);
+
+    void setAttached(bool attached) { m_attached = attached; }
+
</ins><span class="cx">     void evaluateScriptForTest(const String&amp; script);
</span><span class="cx"> 
</span><del>-    void setJavaScriptProfilingEnabled(bool);
</del><span class="cx">     void startPageProfiling();
</span><span class="cx">     void stopPageProfiling();
</span><span class="cx"> 
</span><ins>+    void sendMessageToBackend(const String&amp;);
+
</ins><span class="cx"> #if ENABLE(INSPECTOR_SERVER)
</span><del>-    bool hasRemoteFrontendConnected() const { return m_remoteFrontendConnected; }
-    void sendMessageToRemoteFrontend(const String&amp; message);
-    void dispatchMessageFromRemoteFrontend(const String&amp; message);
</del><span class="cx">     void remoteFrontendConnected();
</span><span class="cx">     void remoteFrontendDisconnected();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     friend class WebInspectorClient;
</span><del>-    friend class WebInspectorFrontendClient;
</del><span class="cx"> 
</span><del>-    explicit WebInspector(WebPage*, WebCore::InspectorFrontendChannel*);
</del><ins>+    explicit WebInspector(WebPage*);
</ins><span class="cx"> 
</span><ins>+    bool canAttachWindow();
+
</ins><span class="cx">     // Called from WebInspectorClient
</span><del>-    WebPage* createInspectorPage();
-    WebPage* createInspectorPageForTest();
-    void destroyInspectorPage();
</del><ins>+    void createInspectorPage(bool underTest);
</ins><span class="cx"> 
</span><del>-    // Called from WebInspectorFrontendClient
-    void didClose();
</del><ins>+    void closeFrontend();
</ins><span class="cx">     void bringToFront();
</span><del>-    void inspectedURLChanged(const String&amp;);
</del><span class="cx"> 
</span><del>-    bool canSave() const;
-    void save(const String&amp; filename, const String&amp; content, bool base64Encoded, bool forceSaveAs);
-    void append(const String&amp; filename, const String&amp; content);
</del><ins>+    WebPage* m_page;
</ins><span class="cx"> 
</span><del>-    void attachBottom();
-    void attachRight();
-    void detach();
</del><ins>+    RefPtr&lt;IPC::Connection&gt; m_frontendConnection;
</ins><span class="cx"> 
</span><del>-    void setAttachedWindowHeight(unsigned);
-    void setAttachedWindowWidth(unsigned);
-    void setToolbarHeight(unsigned);
-
-    // Implemented in platform WebInspector file
-    String localizedStringsURL() const;
-
-    void showConsole();
-
-    void showResources();
-
-    void showMainResourceForFrame(uint64_t frameID);
-
-    void startJavaScriptDebugging();
-    void stopJavaScriptDebugging();
-
-    void startJavaScriptProfiling();
-    void stopJavaScriptProfiling();
-
-    void updateDockingAvailability();
-
-    WebPage* m_page;
-    WebPage* m_inspectorPage;
-    WebInspectorFrontendClient* m_frontendClient;
-    WebCore::InspectorFrontendChannel* m_frontendChannel;
-#if PLATFORM(COCOA)
-    mutable String m_localizedStringsURL;
-    mutable bool m_hasLocalizedStringsURL;
-#endif
-#if ENABLE(INSPECTOR_SERVER)
-    bool m_remoteFrontendConnected;
-#endif
</del><ins>+    bool m_attached;
+    bool m_previousCanAttach;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebInspectormessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.messages.in (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.messages.in        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.messages.in        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-# Copyright (C) 2010 Apple Inc. All rights reserved.
</del><ins>+# Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> #
</span><span class="cx"> # Redistribution and use in source and binary forms, with or without
</span><span class="cx"> # modification, are permitted provided that the following conditions
</span><span class="lines">@@ -22,26 +22,25 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx"> 
</span><del>-messages -&gt; WebInspector LegacyReceiver {
</del><ins>+messages -&gt; WebInspector {
</ins><span class="cx">     Show()
</span><span class="cx">     Close()
</span><del>-    AttachedBottom()
-    AttachedRight()
-    Detached()
-    DidSave(String url)
-    DidAppend(String url)
</del><ins>+
+    SetAttached(bool attached)
+
</ins><span class="cx">     ShowConsole()
</span><span class="cx">     ShowResources()
</span><del>-    ShowMainResourceForFrame(uint64_t frameID)
-    StartJavaScriptDebugging()
-    StopJavaScriptDebugging()
-    StartJavaScriptProfiling()
-    StopJavaScriptProfiling()
</del><ins>+
+    ShowMainResourceForFrame(uint64_t frameIdentifier)
+
+    OpenInNewTab(String url)
+
</ins><span class="cx">     StartPageProfiling()
</span><span class="cx">     StopPageProfiling()
</span><span class="cx"> 
</span><ins>+    SendMessageToBackend(String message)
+
</ins><span class="cx"> #if ENABLE(INSPECTOR_SERVER)
</span><del>-    DispatchMessageFromRemoteFrontend(String message)
</del><span class="cx">     RemoteFrontendConnected()
</span><span class="cx">     RemoteFrontendDisconnected()
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebInspectorUIcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp (0 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -0,0 +1,286 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebInspectorUI.h&quot;
+
+#if ENABLE(INSPECTOR)
+
+#include &quot;WebInspectorMessages.h&quot;
+#include &quot;WebInspectorProxyMessages.h&quot;
+#include &quot;WebPage.h&quot;
+#include &quot;WebProcess.h&quot;
+#include &lt;JavaScriptCore/ScriptValue.h&gt;
+#include &lt;WebCore/Chrome.h&gt;
+#include &lt;WebCore/DOMWrapperWorld.h&gt;
+#include &lt;WebCore/InspectorController.h&gt;
+#include &lt;WebCore/MainFrame.h&gt;
+#include &lt;WebCore/NotImplemented.h&gt;
+#include &lt;WebCore/ScriptController.h&gt;
+#include &lt;WebCore/ScriptGlobalObject.h&gt;
+#include &lt;WebCore/ScriptState.h&gt;
+
+using namespace WebCore;
+
+namespace WebKit {
+
+PassRefPtr&lt;WebInspectorUI&gt; WebInspectorUI::create(WebPage* page)
+{
+    return adoptRef(new WebInspectorUI(page));
+}
+
+WebInspectorUI::WebInspectorUI(WebPage* page)
+    : m_page(page)
+    , m_inspectedPageIdentifier(0)
+    , m_underTest(false)
+    , m_frontendLoaded(false)
+    , m_dockSide(DockSide::Undocked)
+#if PLATFORM(COCOA)
+    , m_hasLocalizedStringsURL(false)
+#endif
+{
+}
+
+void WebInspectorUI::establishConnection(IPC::Attachment encodedConnectionIdentifier, uint64_t inspectedPageIdentifier, bool underTest)
+{
+#if OS(DARWIN)
+    IPC::Connection::Identifier connectionIdentifier(encodedConnectionIdentifier.port());
+#elif USE(UNIX_DOMAIN_SOCKETS)
+    IPC::Connection::Identifier connectionIdentifier(encodedConnectionIdentifier.releaseFileDescriptor());
+#else
+    notImplemented();
+    return;
+#endif
+
+    if (IPC::Connection::identifierIsNull(connectionIdentifier))
+        return;
+
+    m_inspectedPageIdentifier = inspectedPageIdentifier;
+    m_frontendLoaded = false;
+    m_underTest = underTest;
+
+    m_page-&gt;corePage()-&gt;inspectorController().setInspectorFrontendClient(this);
+
+    m_backendConnection = IPC::Connection::createClientConnection(connectionIdentifier, this, RunLoop::main());
+    m_backendConnection-&gt;open();
+}
+
+void WebInspectorUI::windowObjectCleared()
+{
+    if (m_frontendHost)
+        m_frontendHost-&gt;disconnectClient();
+
+    m_frontendHost = InspectorFrontendHost::create(this, m_page-&gt;corePage());
+    ScriptGlobalObject::set(execStateFromPage(mainThreadNormalWorld(), m_page-&gt;corePage()), ASCIILiteral(&quot;InspectorFrontendHost&quot;), m_frontendHost.get());
+}
+
+void WebInspectorUI::frontendLoaded()
+{
+    m_frontendLoaded = true;
+
+    evaluatePendingExpressions();
+    bringToFront();
+}
+
+void WebInspectorUI::moveWindowBy(float x, float y)
+{
+    FloatRect frameRect = m_page-&gt;corePage()-&gt;chrome().windowRect();
+    frameRect.move(x, y);
+    m_page-&gt;corePage()-&gt;chrome().setWindowRect(frameRect);
+}
+
+void WebInspectorUI::bringToFront()
+{
+    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::BringToFront(), m_inspectedPageIdentifier);
+}
+
+void WebInspectorUI::closeWindow()
+{
+    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::DidClose(), m_inspectedPageIdentifier);
+
+    m_backendConnection-&gt;invalidate();
+    m_backendConnection = nullptr;
+
+    m_inspectedPageIdentifier = 0;
+    m_underTest = false;
+}
+
+void WebInspectorUI::requestSetDockSide(DockSide side)
+{
+    switch (side) {
+    case DockSide::Undocked:
+        WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::Detach(), m_inspectedPageIdentifier);
+        break;
+
+    case DockSide::Right:
+        WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::AttachRight(), m_inspectedPageIdentifier);
+        break;
+
+    case DockSide::Bottom:
+        WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::AttachBottom(), m_inspectedPageIdentifier);
+        break;
+    }
+}
+
+void WebInspectorUI::setDockSide(DockSide side)
+{
+    const char* sideString;
+
+    switch (side) {
+    case DockSide::Undocked:
+        sideString = &quot;undocked&quot;;
+        break;
+
+    case DockSide::Right:
+        sideString = &quot;right&quot;;
+        break;
+
+    case DockSide::Bottom:
+        sideString = &quot;bottom&quot;;
+        break;
+    }
+
+    m_dockSide = side;
+
+    evaluateCommandOnLoad(ASCIILiteral(&quot;setDockSide&quot;), ASCIILiteral(sideString));
+}
+
+void WebInspectorUI::changeAttachedWindowHeight(unsigned height)
+{
+    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::SetAttachedWindowHeight(height), m_inspectedPageIdentifier);
+}
+
+void WebInspectorUI::changeAttachedWindowWidth(unsigned width)
+{
+    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::SetAttachedWindowWidth(width), m_inspectedPageIdentifier);
+}
+
+void WebInspectorUI::setToolbarHeight(unsigned height)
+{
+    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::SetToolbarHeight(height), m_inspectedPageIdentifier);
+}
+
+void WebInspectorUI::openInNewTab(const String&amp; url)
+{
+    m_backendConnection-&gt;send(Messages::WebInspector::OpenInNewTab(url), 0);
+}
+
+void WebInspectorUI::save(const WTF::String&amp; filename, const WTF::String&amp; content, bool base64Encoded, bool forceSaveAs)
+{
+    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::Save(filename, content, base64Encoded, forceSaveAs), m_inspectedPageIdentifier);
+}
+
+void WebInspectorUI::append(const WTF::String&amp; filename, const WTF::String&amp; content)
+{
+    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::Append(filename, content), m_inspectedPageIdentifier);
+}
+
+void WebInspectorUI::inspectedURLChanged(const String&amp; urlString)
+{
+    WebProcess::shared().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::InspectedURLChanged(urlString), m_inspectedPageIdentifier);
+}
+
+void WebInspectorUI::showConsole()
+{
+    evaluateCommandOnLoad(ASCIILiteral(&quot;showConsole&quot;));
+}
+
+void WebInspectorUI::showResources()
+{
+    evaluateCommandOnLoad(ASCIILiteral(&quot;showResources&quot;));
+}
+
+void WebInspectorUI::showMainResourceForFrame(String frameIdentifier)
+{
+    evaluateCommandOnLoad(ASCIILiteral(&quot;showMainResourceForFrame&quot;), frameIdentifier);
+}
+
+void WebInspectorUI::startPageProfiling()
+{
+    evaluateCommandOnLoad(ASCIILiteral(&quot;setTimelineProfilingEnabled&quot;), true);
+}
+
+void WebInspectorUI::stopPageProfiling()
+{
+    evaluateCommandOnLoad(ASCIILiteral(&quot;setTimelineProfilingEnabled&quot;), false);
+}
+
+void WebInspectorUI::didSave(const String&amp; url)
+{
+    evaluateCommandOnLoad(ASCIILiteral(&quot;savedURL&quot;), url);
+}
+
+void WebInspectorUI::didAppend(const String&amp; url)
+{
+    evaluateCommandOnLoad(ASCIILiteral(&quot;appendedToURL&quot;), url);
+}
+
+void WebInspectorUI::sendMessageToFrontend(const String&amp; message)
+{
+    evaluateExpressionOnLoad(makeString(&quot;InspectorFrontendAPI.dispatchMessageAsync(&quot;, message, &quot;)&quot;));
+}
+
+void WebInspectorUI::sendMessageToBackend(const String&amp; message)
+{
+    m_backendConnection-&gt;send(Messages::WebInspector::SendMessageToBackend(message), 0);
+}
+
+void WebInspectorUI::evaluateCommandOnLoad(const String&amp; command, const String&amp; argument)
+{
+    if (argument.isNull())
+        evaluateExpressionOnLoad(makeString(&quot;InspectorFrontendAPI.dispatch([\&quot;&quot;, command, &quot;\&quot;])&quot;));
+    else
+        evaluateExpressionOnLoad(makeString(&quot;InspectorFrontendAPI.dispatch([\&quot;&quot;, command, &quot;\&quot;, \&quot;&quot;, argument, &quot;\&quot;])&quot;));
+}
+
+void WebInspectorUI::evaluateCommandOnLoad(const String&amp; command, bool argument)
+{
+    evaluateCommandOnLoad(command, ASCIILiteral(argument ? &quot;true&quot; : &quot;false&quot;));
+}
+
+void WebInspectorUI::evaluateExpressionOnLoad(const String&amp; expression)
+{
+    if (m_frontendLoaded) {
+        ASSERT(m_queue.isEmpty());
+        m_page-&gt;corePage()-&gt;mainFrame().script().executeScript(expression);
+        return;
+    }
+
+    m_queue.append(expression);
+}
+
+void WebInspectorUI::evaluatePendingExpressions()
+{
+    ASSERT(m_frontendLoaded);
+
+    for (const String&amp; expression : m_queue)
+        m_page-&gt;corePage()-&gt;mainFrame().script().executeScript(expression);
+
+    m_queue.clear();
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(INSPECTOR)
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebInspectorUIh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.h (0 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.h                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.h        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -0,0 +1,137 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebInspectorUI_h
+#define WebInspectorUI_h
+
+#if ENABLE(INSPECTOR)
+
+#include &quot;APIObject.h&quot;
+#include &quot;Connection.h&quot;
+#include &lt;WebCore/InspectorForwarding.h&gt;
+#include &lt;WebCore/InspectorFrontendClient.h&gt;
+#include &lt;WebCore/InspectorFrontendHost.h&gt;
+
+namespace WebKit {
+
+class WebPage;
+
+class WebInspectorUI : public API::ObjectImpl&lt;API::Object::Type::BundleInspectorUI&gt;, public IPC::Connection::Client, public WebCore::InspectorFrontendClient {
+public:
+    static PassRefPtr&lt;WebInspectorUI&gt; create(WebPage*);
+
+    WebPage* page() const { return m_page; }
+
+    // Implemented in generated WebInspectorUIMessageReceiver.cpp
+    void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&amp;);
+
+    // IPC::Connection::Client
+    void didClose(IPC::Connection*) { closeWindow(); }
+    void didReceiveInvalidMessage(IPC::Connection*, IPC::StringReference messageReceiverName, IPC::StringReference messageName) { closeWindow(); }
+
+    // Called by WebInspectorUI messages
+    void establishConnection(IPC::Attachment connectionIdentifier, uint64_t inspectedPageIdentifier, bool underTest);
+
+    void showConsole();
+    void showResources();
+
+    void showMainResourceForFrame(String frameIdentifier);
+
+    void startPageProfiling();
+    void stopPageProfiling();
+
+    void attachedBottom() { setDockSide(DockSide::Bottom); }
+    void attachedRight() { setDockSide(DockSide::Right); }
+    void detached() { setDockSide(DockSide::Undocked); }
+
+    void setDockSide(DockSide);
+
+    void didSave(const String&amp; url);
+    void didAppend(const String&amp; url);
+
+    void sendMessageToFrontend(const String&amp;);
+
+    // WebCore::InspectorFrontendClient
+    void windowObjectCleared() override;
+    void frontendLoaded() override;
+
+    void moveWindowBy(float x, float y) override;
+
+    String localizedStringsURL() override;
+
+    void bringToFront() override;
+    void closeWindow() override;
+
+    void requestSetDockSide(DockSide) override;
+    void changeAttachedWindowHeight(unsigned) override;
+    void changeAttachedWindowWidth(unsigned) override;
+
+    void setToolbarHeight(unsigned) override;
+
+    void openInNewTab(const String&amp; url) override;
+
+    bool canSave() override;
+    void save(const WTF::String&amp; url, const WTF::String&amp; content, bool base64Encoded, bool forceSaveAs) override;
+    void append(const WTF::String&amp; url, const WTF::String&amp; content) override;
+
+    void inspectedURLChanged(const String&amp;) override;
+
+    void sendMessageToBackend(const String&amp;) override;
+
+    bool isUnderTest() override { return m_underTest; }
+
+private:
+    explicit WebInspectorUI(WebPage*);
+
+    void evaluateCommandOnLoad(const String&amp; command, const String&amp; argument = String());
+    void evaluateCommandOnLoad(const String&amp; command, const ASCIILiteral&amp; argument) { evaluateCommandOnLoad(command, String(argument)); }
+    void evaluateCommandOnLoad(const String&amp; command, bool argument);
+    void evaluateExpressionOnLoad(const String&amp; expression);
+    void evaluatePendingExpressions();
+
+    WebPage* m_page;
+
+    RefPtr&lt;IPC::Connection&gt; m_backendConnection;
+    uint64_t m_inspectedPageIdentifier;
+
+    bool m_underTest;
+    bool m_frontendLoaded;
+    Deque&lt;String&gt; m_queue;
+
+    RefPtr&lt;WebCore::InspectorFrontendHost&gt; m_frontendHost;
+
+    DockSide m_dockSide;
+
+#if PLATFORM(COCOA)
+    mutable String m_localizedStringsURL;
+    mutable bool m_hasLocalizedStringsURL;
+#endif
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(INSPECTOR)
+
+#endif // WebInspectorUI_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebInspectorUImessagesinfromrev173928trunkSourceWebKit2WebProcessWebPageWebInspectormessagesin"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.messages.in (from rev 173928, trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.messages.in) (0 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.messages.in                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.messages.in        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+# Copyright (C) 2014 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#if ENABLE(INSPECTOR)
+
+messages -&gt; WebInspectorUI {
+    EstablishConnection(IPC::Attachment connectionIdentifier, uint64_t inspectedPageIdentifier, bool underTest)
+
+    AttachedBottom()
+    AttachedRight()
+    Detached()
+
+    ShowConsole()
+    ShowResources()
+
+    ShowMainResourceForFrame(String frameIdentifier)
+
+    StartPageProfiling()
+    StopPageProfiling()
+
+    DidSave(String url)
+    DidAppend(String url)
+
+    SendMessageToFrontend(String message)
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -80,6 +80,8 @@
</span><span class="cx"> #include &quot;WebInspector.h&quot;
</span><span class="cx"> #include &quot;WebInspectorClient.h&quot;
</span><span class="cx"> #include &quot;WebInspectorMessages.h&quot;
</span><ins>+#include &quot;WebInspectorUI.h&quot;
+#include &quot;WebInspectorUIMessages.h&quot;
</ins><span class="cx"> #include &quot;WebNotificationClient.h&quot;
</span><span class="cx"> #include &quot;WebOpenPanelResultListener.h&quot;
</span><span class="cx"> #include &quot;WebPageCreationParameters.h&quot;
</span><span class="lines">@@ -460,6 +462,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     WebProcess::shared().addMessageReceiver(Messages::WebInspector::messageReceiverName(), m_pageID, *this);
</span><ins>+    WebProcess::shared().addMessageReceiver(Messages::WebInspectorUI::messageReceiverName(), m_pageID, *this);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span><span class="cx">     WebProcess::shared().addMessageReceiver(Messages::WebFullScreenManager::messageReceiverName(), m_pageID, *this);
</span><span class="lines">@@ -520,6 +523,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     WebProcess::shared().removeMessageReceiver(Messages::WebInspector::messageReceiverName(), m_pageID);
</span><ins>+    WebProcess::shared().removeMessageReceiver(Messages::WebInspectorUI::messageReceiverName(), m_pageID);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span><span class="cx">     WebProcess::shared().removeMessageReceiver(Messages::WebFullScreenManager::messageReceiverName(), m_pageID);
</span><span class="lines">@@ -2886,18 +2890,26 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    
</del><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx"> WebInspector* WebPage::inspector()
</span><span class="cx"> {
</span><span class="cx">     if (m_isClosed)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     if (!m_inspector)
</span><del>-        m_inspector = WebInspector::create(this, m_inspectorClient);
</del><ins>+        m_inspector = WebInspector::create(this);
</ins><span class="cx">     return m_inspector.get();
</span><span class="cx"> }
</span><ins>+
+WebInspectorUI* WebPage::inspectorUI()
+{
+    if (m_isClosed)
+        return nullptr;
+    if (!m_inspectorUI)
+        m_inspectorUI = WebInspectorUI::create(this);
+    return m_inspectorUI.get();
+}
</ins><span class="cx"> #endif
</span><del>-    
</del><ins>+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> WebVideoFullscreenManager* WebPage::videoFullscreenManager()
</span><span class="cx"> {
</span><span class="lines">@@ -3479,9 +3491,15 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (decoder.messageReceiverName() == Messages::WebInspector::messageReceiverName()) {
</span><span class="cx">         if (WebInspector* inspector = this-&gt;inspector())
</span><del>-            inspector-&gt;didReceiveWebInspectorMessage(connection, decoder);
</del><ins>+            inspector-&gt;didReceiveMessage(connection, decoder);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><ins>+
+    if (decoder.messageReceiverName() == Messages::WebInspectorUI::messageReceiverName()) {
+        if (WebInspectorUI* inspectorUI = this-&gt;inspectorUI())
+            inspectorUI-&gt;didReceiveMessage(connection, decoder);
+        return;
+    }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -153,6 +153,7 @@
</span><span class="cx"> class WebImage;
</span><span class="cx"> class WebInspector;
</span><span class="cx"> class WebInspectorClient;
</span><ins>+class WebInspectorUI;
</ins><span class="cx"> class WebKeyboardEvent;
</span><span class="cx"> class WebMouseEvent;
</span><span class="cx"> class WebNotificationClient;
</span><span class="lines">@@ -226,8 +227,10 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     WebInspector* inspector();
</span><ins>+    WebInspectorUI* inspectorUI();
+    bool isInspectorPage() { return !!m_inspectorUI; }
</ins><span class="cx"> #endif
</span><del>-    
</del><ins>+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     WebVideoFullscreenManager* videoFullscreenManager();
</span><span class="cx"> #endif
</span><span class="lines">@@ -1159,6 +1162,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     RefPtr&lt;WebInspector&gt; m_inspector;
</span><ins>+    RefPtr&lt;WebInspectorUI&gt; m_inspectorUI;
</ins><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     RefPtr&lt;WebVideoFullscreenManager&gt; m_videoFullscreenManager;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageeflWebInspectorUIEflcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/WebPage/efl/WebInspectorUIEfl.cpp (0 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/efl/WebInspectorUIEfl.cpp                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/efl/WebInspectorUIEfl.cpp        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2011 Samsung Electronics
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebInspectorUI.h&quot;
+
+#if ENABLE(INSPECTOR)
+
+#include &lt;WebCore/EflInspectorUtilities.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebKit {
+
+bool WebInspectorUI::canSave()
+{
+    return false;
+}
+
+String WebInspectorUI::localizedStringsURL()
+{
+    return &quot;file://&quot; + WebCore::inspectorResourcePath() + &quot;/localizedStrings.js&quot;;
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(INSPECTOR)
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagegtkWebInspectorUIGtkcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp (0 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Portions Copyright (c) 2010 Motorola Mobility, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebInspectorUI.h&quot;
+
+#if ENABLE(INSPECTOR)
+
+#include &lt;WebCore/FileSystem.h&gt;
+#include &lt;glib.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebKit {
+
+bool WebInspectorUI::canSave()
+{
+    return false;
+}
+
+String WebInspectorUI::localizedStringsURL()
+{
+    return String(&quot;resource:///org/webkitgtk/inspector/Localizations/en.lproj/localizedStrings.js&quot;);
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(INSPECTOR)
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacWebInspectorUIMacmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebInspectorUIMac.mm (0 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebInspectorUIMac.mm                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebInspectorUIMac.mm        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+/*
+ * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;config.h&quot;
+#import &quot;WebInspectorUI.h&quot;
+
+#if ENABLE(INSPECTOR)
+
+#import &lt;WebCore/SoftLinking.h&gt;
+
+SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)
+
+namespace WebKit {
+
+bool WebInspectorUI::canSave()
+{
+    return true;
+}
+
+String WebInspectorUI::localizedStringsURL()
+{
+    if (!m_hasLocalizedStringsURL) {
+        // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
+        WebInspectorUILibrary();
+
+        NSString *path = [[NSBundle bundleWithIdentifier:@&quot;com.apple.WebInspectorUI&quot;] pathForResource:@&quot;localizedStrings&quot; ofType:@&quot;js&quot;];
+        if ([path length])
+            m_localizedStringsURL = [[NSURL fileURLWithPath:path] absoluteString];
+        else
+            m_localizedStringsURL = String();
+        m_hasLocalizedStringsURL = true;
+    }
+
+    return m_localizedStringsURL;
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(INSPECTOR)
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcesscocoaWebProcessCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (173928 => 173929)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm        2014-09-24 19:57:12 UTC (rev 173928)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm        2014-09-24 19:58:08 UTC (rev 173929)
</span><span class="lines">@@ -205,7 +205,11 @@
</span><span class="cx"> void WebProcess::initializeProcessName(const ChildProcessInitializationParameters&amp; parameters)
</span><span class="cx"> {
</span><span class="cx"> #if !PLATFORM(IOS)
</span><del>-    NSString *applicationName = [NSString stringWithFormat:WEB_UI_STRING(&quot;%@ Web Content&quot;, &quot;Visible name of the web process. The argument is the application name.&quot;), (NSString *)parameters.uiProcessName];
</del><ins>+    NSString *applicationName;
+    if (parameters.extraInitializationData.get(ASCIILiteral(&quot;inspector-process&quot;)) == &quot;1&quot;)
+        applicationName = [NSString stringWithFormat:WEB_UI_STRING(&quot;%@ Web Inspector&quot;, &quot;Visible name of Web Inspector's web process. The argument is the application name.&quot;), (NSString *)parameters.uiProcessName];
+    else
+        applicationName = [NSString stringWithFormat:WEB_UI_STRING(&quot;%@ Web Content&quot;, &quot;Visible name of the web process. The argument is the application name.&quot;), (NSString *)parameters.uiProcessName];
</ins><span class="cx">     WKSetVisibleApplicationName((CFStringRef)applicationName);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>