-
bburg@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=127068 Reviewed by Joseph Pecoraro. Source/WebCore: Make Page and WorkerGlobalScope keep a std::unique_ptr to InspectorController and WorkerInspectorController. Store page references and return controller references where possible. Convert call sites to use an InspectorController reference. Convert instantiations of InspectorFrontendClient to use std::unique_ptr. Convert InspectorOverlay to keep Page references. * WebCore.exp.in: * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::supportsProfiling): (WebCore::JSDOMWindowBase::supportsRichSourceInfo): * dom/Node.cpp: (WebCore::Node::inspect): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::inspectedPageDestroyed): (WebCore::InspectorController::setInspectorFrontendClient): (WebCore::InspectorController::hasInspectorFrontendClient): (WebCore::InspectorController::connectFrontend): (WebCore::InspectorController::disconnectFrontend): (WebCore::InspectorController::inspectedPage): (WebCore::InspectorController::developerExtrasEnabled): * inspector/InspectorController.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::canAttachWindow): (WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight): (WebCore::InspectorFrontendClientLocal::changeAttachedWindowWidth): (WebCore::InspectorFrontendClientLocal::openInNewTab): (WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight): * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::InspectorOverlay): (WebCore::InspectorOverlay::getHighlight): (WebCore::InspectorOverlay::highlightQuad): (WebCore::InspectorOverlay::update): (WebCore::InspectorOverlay::buildObjectForHighlightedNode): (WebCore::InspectorOverlay::drawQuadHighlight): (WebCore::InspectorOverlay::overlayPage): (WebCore::InspectorOverlay::reset): * inspector/InspectorOverlay.h: * inspector/InstrumentingAgents.cpp: (WebCore::instrumentationForPage): remove null checks. (WebCore::instrumentationForWorkerGlobalScope): remove null checks. * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): (WebCore::WorkerInspectorController::connectFrontend): (WebCore::WorkerInspectorController::disconnectFrontend): * inspector/WorkerInspectorController.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld): * page/ContextMenuController.cpp: (WebCore::ContextMenuController::showContextMenu): (WebCore::ContextMenuController::contextMenuItemSelected): (WebCore::ContextMenuController::populate): (WebCore::ContextMenuController::addInspectElementItem): * page/FrameView.cpp: (WebCore::FrameView::sendResizeEventIfNeeded): * page/Page.cpp: (WebCore::Page::Page): * page/Page.h: (WebCore::Page::inspectorController): * page/PageDebuggable.cpp: (WebCore::PageDebuggable::hasLocalDebugger): (WebCore::PageDebuggable::parentProcessIdentifier): (WebCore::PageDebuggable::connect): (WebCore::PageDebuggable::disconnect): (WebCore::PageDebuggable::dispatchMessageFromRemoteFrontend): (WebCore::PageDebuggable::setIndicating): * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: (WebCore::CompositingCoordinator::syncDisplayState): * testing/Internals.cpp: (WebCore::Internals::resetToConsistentState): (WebCore::Internals::inspectorHighlightRects): (WebCore::Internals::inspectorHighlightObject): (WebCore::Internals::emitInspectorDidBeginFrame): (WebCore::Internals::emitInspectorDidCancelFrame): (WebCore::Internals::openDummyInspectorFrontend): (WebCore::Internals::closeDummyInspectorFrontend): (WebCore::Internals::setInspectorResourcesDataSizeLimits): (WebCore::Internals::setJavaScriptProfilingEnabled): * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::WorkerGlobalScope): * workers/WorkerGlobalScope.h: remove clearInspector(). (WebCore::WorkerGlobalScope::workerInspectorController): * workers/WorkerMessagingProxy.cpp: (WebCore::connectToWorkerGlobalScopeInspectorTask): (WebCore::disconnectFromWorkerGlobalScopeInspectorTask): (WebCore::dispatchOnInspectorBackendTask): * workers/WorkerThread.cpp: (WebCore::WorkerThreadShutdownFinishTask::performTask): Source/WebKit/efl: Convert call sites to use a InspectorController reference. Convert instantiations of InspectorFrontendClient to use std::unique_ptr. * WebCoreSupport/DumpRenderTreeSupportEfl.cpp: (DumpRenderTreeSupportEfl::evaluateInWebInspector): * WebCoreSupport/InspectorClientEfl.cpp: (WebCore::InspectorClientEfl::openInspectorFrontend): * ewk/ewk_view.cpp: (ewk_view_inspector_show): (ewk_view_inspector_close): Source/WebKit/gtk: Convert call sites to use a InspectorController reference. Convert instantiations of InspectorFrontendClient to use std::unique_ptr. * WebCoreSupport/ChromeClientGtk.cpp: (WebKit::paintWebView): * WebCoreSupport/InspectorClientGtk.cpp: (WebKit::InspectorClient::openInspectorFrontend): * webkit/webkitwebinspector.cpp: (webkit_web_inspector_set_property): (webkit_web_inspector_get_property): (webkit_web_inspector_show): (webkit_web_inspector_inspect_node): (webkit_web_inspector_inspect_coordinates): (webkit_web_inspector_close): (webkit_web_inspector_execute_script): Source/WebKit/mac: Convert call sites to use a InspectorController reference. Convert instantiations of InspectorFrontendClient to use std::unique_ptr. * WebCoreSupport/WebInspectorClient.mm: (WebInspectorClient::openInspectorFrontend): (-[WebInspectorWindowController destroyInspectorView:]): * WebInspector/WebInspector.mm: (-[WebInspector showWindow]): (-[WebInspector isJavaScriptProfilingEnabled]): (-[WebInspector setJavaScriptProfilingEnabled:]): (-[WebInspector close:]): (-[WebInspector evaluateInFrontend:callId:script:]): * WebInspector/WebNodeHighlighter.mm: (-[WebNodeHighlighter highlight]): Source/WebKit/win: Convert call sites to use a InspectorController reference. * WebCoreSupport/WebInspectorClient.cpp: (WebInspectorClient::openInspectorFrontend): (WebInspectorFrontendClient::destroyInspectorView): (WebInspectorFrontendClient::onClose): * WebInspector.cpp: (WebInspector::show): (WebInspector::close): (WebInspector::isJavaScriptProfilingEnabled): (WebInspector::setJavaScriptProfilingEnabled): (WebInspector::evaluateInFrontend): * WebNodeHighlight.cpp: (WebNodeHighlight::update): Source/WebKit2: Convert call sites to use a InspectorController reference. * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::WebInspectorClient::drawRect): * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: (WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient): (WebKit::WebInspectorFrontendClient::closeWindow): * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::createInspectorPage): (WebKit::WebInspector::show): (WebKit::WebInspector::close): (WebKit::WebInspector::evaluateScriptForTest): (WebKit::WebInspector::showConsole): (WebKit::WebInspector::showResources): (WebKit::WebInspector::showMainResourceForFrame): (WebKit::WebInspector::startJavaScriptDebugging): (WebKit::WebInspector::stopJavaScriptDebugging): (WebKit::WebInspector::setJavaScriptProfilingEnabled): (WebKit::WebInspector::startJavaScriptProfiling): (WebKit::WebInspector::stopJavaScriptProfiling): (WebKit::WebInspector::startPageProfiling): (WebKit::WebInspector::stopPageProfiling): (WebKit::WebInspector::dispatchMessageFromRemoteFrontend): (WebKit::WebInspector::remoteFrontendConnected): (WebKit::WebInspector::remoteFrontendDisconnected): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
9efd2cdf