Web Inspector: Page: don't allow the domain to be disabled
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Aug 2019 01:10:41 +0000 (01:10 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Aug 2019 01:10:41 +0000 (01:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=200109

Reviewed by Brian Burg.

Source/JavaScriptCore:

The `PageAgent` is relied on by many of the other agents, so much so that it doesn't make
sense to support the ability to "disable" (as well as "enable") the agent.

When the first frontend connects, we should treat the `PageAgent` as active and available.

* inspector/protocol/Page.json:
Remove `enable`/`disable`.

Source/WebCore:

The `PageAgent` is relied on by many of the other agents, so much so that it doesn't make
sense to support the ability to "disable" (as well as "enable") the agent.

When the first frontend connects, we should treat the `PageAgent` as active and available.

* inspector/agents/InspectorPageAgent.h:
* inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
(WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorPageAgent::timestamp):
(WebCore::InspectorPageAgent::enable): Deleted.
(WebCore::InspectorPageAgent::disable): Deleted.

* inspector/agents/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
(WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
* inspector/agents/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::createStyleSheet):
* inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::highlightSelector):
(WebCore::InspectorDOMAgent::highlightFrame):
(WebCore::InspectorDOMAgent::buildObjectForNode):
* inspector/agents/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::setFrameIdentifier):
* inspector/agents/page/PageNetworkAgent.cpp:
(WebCore::PageNetworkAgent::loaderIdentifier):
(WebCore::PageNetworkAgent::frameIdentifier):
(WebCore::PageNetworkAgent::scriptExecutionContext):
* inspector/agents/page/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::didCreateMainWorldContext):
(WebCore::PageRuntimeAgent::reportExecutionContextCreation):

* testing/Internals.cpp:
(WebCore::InspectorStubFrontend::InspectorStubFrontend):
(WebCore::InspectorStubFrontend::frontendLoaded): Added.
(WebCore::InspectorStubFrontend::closeWindow):
(WebCore::InspectorStubFrontend::sendMessageToFrontend):
(WebCore::InspectorStubFrontend::frontendPage): Deleted.
Ensure that the backend always gets notified via `InspectorFrontendHost.loaded` so that
messages being sent to the frontend are batched.

Source/WebInspectorUI:

The `PageAgent` is relied on by many of the other agents, so much so that it doesn't make
sense to support the ability to "disable" (as well as "enable") the agent.

When the first frontend connects, we should treat the `PageAgent` as active and available.

* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.initializeTarget):

* Test/Test.js:
(WI.loaded):
(WI.initializeBackendTarget):
(WI.contentLoaded):
(WI.targetsAvailable): Added.
(WI.whenTargetsAvailable): Added.
* Test/TestStub.js:
Ensure that the backend always gets notified via `InspectorFrontendHost.loaded` so that
messages being sent to the frontend are batched.

LayoutTests:

* http/tests/inspector/page/loading-iframe-document-node.html:
* inspector/page/archive.html:
* inspector/page/frameScheduledNavigation.html:
* inspector/page/frameScheduledNavigation-async-delegates.html:
* inspector/page/frameStartedLoading.html:
* inspector/page/media-query-list-listener-exception.html:
* inspector/timeline/line-column.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248454 268f45cc-cd09-0410-ab3c-d52691b4dbfc


No differences found