Skip to content
Permalink
Browse files
2011-01-27 Yury Semikhatsky <yurys@chromium.org>
        Reviewed by Pavel Feldman.

        Web Inspector: store all settings related to the agents on the frontend side
        https://bugs.webkit.org/show_bug.cgi?id=53174

        * http/tests/inspector/console-xhr-logging.html: since the setting doesn't change on the front-end
        side there is no need to check it after modifying backend's value.
        * inspector/report-protocol-errors.html: use the new signature of disableDebugger method.
2011-01-27  Yury Semikhatsky  <yurys@chromium.org>

        Reviewed by Pavel Feldman.

        Web Inspector: store all settings related to the agents on the frontend side
        https://bugs.webkit.org/show_bug.cgi?id=53174

        * CMakeLists.txt:
        * GNUmakefile.am:
        * WebCore.exp.in:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/ScriptDebugServer.cpp:
        * bindings/js/ScriptDebugServer.h:
        * bindings/js/ScriptProfiler.cpp:
        * bindings/js/ScriptProfiler.h:
        * bindings/v8/ScriptDebugServer.cpp:
        * bindings/v8/ScriptDebugServer.h:
        * bindings/v8/ScriptProfiler.cpp:
        * bindings/v8/ScriptProfiler.h:
        * inspector/Inspector.idl:
        * inspector/InspectorAgent.cpp: profiler and debugger enablement state is now stored
        on the front-end side and will be pushed to the backend when the frontend is loaded.
        (WebCore::InspectorAgent::InspectorAgent):
        (WebCore::InspectorAgent::disconnectFrontend):
        (WebCore::InspectorAgent::restoreDebugger):
        (WebCore::InspectorAgent::restoreProfiler):
        (WebCore::InspectorAgent::enableProfiler):
        (WebCore::InspectorAgent::disableProfiler):
        (WebCore::InspectorAgent::showAndEnableDebugger):
        (WebCore::InspectorAgent::enableDebugger):
        (WebCore::InspectorAgent::disableDebugger):
        * inspector/InspectorAgent.h:
        * inspector/InspectorConsoleAgent.cpp: XHR failures will be logged to the console only
        if the front-end was opened during current browser session and XHR logging is turned on
        there.
        (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
        (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
        * inspector/InspectorDebuggerAgent.cpp:
        * inspector/InspectorDebuggerAgent.h:
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
        (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
        * inspector/InspectorProfilerAgent.cpp:
        (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
        (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
        * inspector/InspectorSettings.cpp: Removed.
        * inspector/InspectorSettings.h: Removed.
        * inspector/InspectorState.cpp:
        (WebCore::InspectorState::InspectorState):
        * inspector/InspectorState.h:
        * inspector/front-end/ConsoleView.js:
        (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.consoleMessagesCleared):
        (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
        (WebInspector.ConsoleView.prototype._handleContextMenuEvent.itemAction):
        (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
        * inspector/front-end/ProfilesPanel.js:
        (WebInspector.ProfilesPanel.prototype._toggleProfiling):
        * inspector/front-end/ScriptsPanel.js:
        (WebInspector.ScriptsPanel.prototype._toggleDebugging):
        * inspector/front-end/Settings.js:
        (WebInspector.Settings):
        * inspector/front-end/inspector.js:

Canonical link: https://commits.webkit.org/67010@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@76792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
yury-s committed Jan 27, 2011
1 parent 3e952f9 commit b438495752dc7eaf44b65837b9d3bced2b04232b
Showing 36 changed files with 147 additions and 311 deletions.
@@ -1,3 +1,14 @@
2011-01-27 Yury Semikhatsky <yurys@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: store all settings related to the agents on the frontend side
https://bugs.webkit.org/show_bug.cgi?id=53174

* http/tests/inspector/console-xhr-logging.html: since the setting doesn't change on the front-end
side there is no need to check it after modifying backend's value.
* inspector/report-protocol-errors.html: use the new signature of disableDebugger method.

2011-01-27 Philippe Normand <pnormand@igalia.com>

Unreviewed, new GTK baselines for fast/multicol tests as follow-up
@@ -46,26 +46,18 @@
function frontend_enableXMLHttpRequestLogging(testController)
{
InspectorBackend.setMonitoringXHREnabled(true, function() {
if (WebInspector.console._monitoringXHREnabled)
testController.notifyDone("enabled");
testController.notifyDone("enabled");
});

if (WebInspector.console._monitoringXHREnabled)
return "enabled";

testController.waitUntilDone();
}

function frontend_disableXMLHttpRequestLogging(testController)
{
InspectorBackend.setMonitoringXHREnabled(false, function() {
if (!WebInspector.console._monitoringXHREnabled)
testController.notifyDone("disabled");
testController.notifyDone("disabled");
});

if (!WebInspector.console._monitoringXHREnabled)
return "disabled";

testController.waitUntilDone();
}

@@ -18,7 +18,6 @@
'{"seq":5,"command":"resourceContent","arguments":{"identifier":"not a number"}}',
'{"seq":6,"command":"removeBreakpoint","arguments":{}}',
'{"seq":7,"command":"removeBreakpoint","arguments":{"breakpointId":"someBreakpointId"}}',

];
var numberOfReports = 0;

@@ -36,7 +35,7 @@
InspectorFrontendHost.sendMessageToBackend(messages[i]);
}

InspectorBackend.disableDebugger(true, fire);
InspectorBackend.disableDebugger(fire);
}

</script>
@@ -1173,7 +1173,6 @@ SET(WebCore_SOURCES
inspector/InspectorProfilerAgent.cpp
inspector/InspectorResourceAgent.cpp
inspector/InspectorRuntimeAgent.cpp
inspector/InspectorSettings.cpp
inspector/InspectorState.cpp
inspector/InspectorStyleSheet.cpp
inspector/InspectorTimelineAgent.cpp
@@ -1,3 +1,69 @@
2011-01-27 Yury Semikhatsky <yurys@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: store all settings related to the agents on the frontend side
https://bugs.webkit.org/show_bug.cgi?id=53174

* CMakeLists.txt:
* GNUmakefile.am:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptDebugServer.cpp:
* bindings/js/ScriptDebugServer.h:
* bindings/js/ScriptProfiler.cpp:
* bindings/js/ScriptProfiler.h:
* bindings/v8/ScriptDebugServer.cpp:
* bindings/v8/ScriptDebugServer.h:
* bindings/v8/ScriptProfiler.cpp:
* bindings/v8/ScriptProfiler.h:
* inspector/Inspector.idl:
* inspector/InspectorAgent.cpp: profiler and debugger enablement state is now stored
on the front-end side and will be pushed to the backend when the frontend is loaded.
(WebCore::InspectorAgent::InspectorAgent):
(WebCore::InspectorAgent::disconnectFrontend):
(WebCore::InspectorAgent::restoreDebugger):
(WebCore::InspectorAgent::restoreProfiler):
(WebCore::InspectorAgent::enableProfiler):
(WebCore::InspectorAgent::disableProfiler):
(WebCore::InspectorAgent::showAndEnableDebugger):
(WebCore::InspectorAgent::enableDebugger):
(WebCore::InspectorAgent::disableDebugger):
* inspector/InspectorAgent.h:
* inspector/InspectorConsoleAgent.cpp: XHR failures will be logged to the console only
if the front-end was opened during current browser session and XHR logging is turned on
there.
(WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
(WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
* inspector/InspectorDebuggerAgent.cpp:
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
(WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
* inspector/InspectorSettings.cpp: Removed.
* inspector/InspectorSettings.h: Removed.
* inspector/InspectorState.cpp:
(WebCore::InspectorState::InspectorState):
* inspector/InspectorState.h:
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.consoleMessagesCleared):
(WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
(WebInspector.ConsoleView.prototype._handleContextMenuEvent.itemAction):
(WebInspector.ConsoleView.prototype._handleContextMenuEvent):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype._toggleProfiling):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._toggleDebugging):
* inspector/front-end/Settings.js:
(WebInspector.Settings):
* inspector/front-end/inspector.js:

2011-01-27 Pavel Podivilov <podivilov@chromium.org>

Reviewed by Pavel Feldman.
@@ -1994,8 +1994,6 @@ webcore_sources += \
Source/WebCore/inspector/InspectorResourceAgent.h \
Source/WebCore/inspector/InspectorRuntimeAgent.cpp \
Source/WebCore/inspector/InspectorRuntimeAgent.h \
Source/WebCore/inspector/InspectorSettings.cpp \
Source/WebCore/inspector/InspectorSettings.h \
Source/WebCore/inspector/InspectorState.cpp \
Source/WebCore/inspector/InspectorState.h \
Source/WebCore/inspector/InspectorStyleSheet.cpp \
@@ -1368,9 +1368,9 @@ __ZN7WebCore14InspectorAgent5closeEv
__ZN7WebCore14InspectorAgent9showPanelERKN3WTF6StringE
__ZN7WebCore14InspectorAgent12ConsolePanelE
__ZN7WebCore14InspectorAgent13ProfilesPanelE
__ZN7WebCore14InspectorAgent14enableProfilerEbb
__ZN7WebCore14InspectorAgent15disableDebuggerEb
__ZN7WebCore14InspectorAgent15disableProfilerEb
__ZN7WebCore14InspectorAgent14enableProfilerEv
__ZN7WebCore14InspectorAgent15disableDebuggerEv
__ZN7WebCore14InspectorAgent15disableProfilerEv
__ZN7WebCore14InspectorAgent18disconnectFrontendEv
__ZN7WebCore14InspectorAgent20stopTimelineProfilerEv
__ZN7WebCore14InspectorAgent21showAndEnableDebuggerEv
@@ -2049,8 +2049,6 @@
'inspector/InspectorRuntimeAgent.cpp',
'inspector/InspectorRuntimeAgent.h',
'inspector/InspectorState.cpp',
'inspector/InspectorSettings.h',
'inspector/InspectorSettings.cpp',
'inspector/InspectorState.h',
'inspector/InspectorStyleSheet.cpp',
'inspector/InspectorStyleSheet.h',
@@ -1062,7 +1062,6 @@ SOURCES += \
inspector/InspectorProfilerAgent.cpp \
inspector/InspectorResourceAgent.cpp \
inspector/InspectorRuntimeAgent.cpp \
inspector/InspectorSettings.cpp \
inspector/InspectorState.cpp \
inspector/InspectorStyleSheet.cpp \
inspector/InspectorTimelineAgent.cpp \
@@ -1962,7 +1961,6 @@ HEADERS += \
inspector/InspectorProfilerAgent.h \
inspector/InspectorResourceAgent.h \
inspector/InspectorRuntimeAgent.h \
inspector/InspectorSettings.h \
inspector/InspectorState.h \
inspector/InspectorStyleSheet.h \
inspector/InspectorTimelineAgent.h \
@@ -65253,14 +65253,6 @@
RelativePath="..\inspector\InspectorRuntimeAgent.h"
>
</File>
<File
RelativePath="..\inspector\InspectorSettings.cpp"
>
</File>
<File
RelativePath="..\inspector\InspectorSettings.h"
>
</File>
<File
RelativePath="..\inspector\InspectorState.cpp"
>
@@ -1659,8 +1659,6 @@
7A1F2B52126C61B20006A7E6 /* InspectorClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A1F2B51126C61B20006A7E6 /* InspectorClient.cpp */; };
7A24587B1021EAF4000A00AA /* InspectorDOMAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A2458791021EAF4000A00AA /* InspectorDOMAgent.cpp */; };
7A24587C1021EAF4000A00AA /* InspectorDOMAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A24587A1021EAF4000A00AA /* InspectorDOMAgent.h */; settings = {ATTRIBUTES = (Private, ); }; };
7A5640BF12DF9E5E00F4536D /* InspectorSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A5640BD12DF9E5E00F4536D /* InspectorSettings.cpp */; };
7A5640C012DF9E5E00F4536D /* InspectorSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A5640BE12DF9E5E00F4536D /* InspectorSettings.h */; };
7A674BDB0F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A674BD90F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp */; };
7A674BDC0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A674BDA0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h */; };
7A74ECBA101839A600BF939E /* InspectorDOMStorageAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A74ECB8101839A500BF939E /* InspectorDOMStorageAgent.cpp */; };
@@ -8103,8 +8101,6 @@
7A24587A1021EAF4000A00AA /* InspectorDOMAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDOMAgent.h; sourceTree = "<group>"; };
7A563E5412DE32B000F4536D /* InjectedScriptSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedScriptSource.h; sourceTree = "<group>"; };
7A563F9512DF5C9100F4536D /* InjectedScriptSource.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = InjectedScriptSource.js; sourceTree = "<group>"; };
7A5640BD12DF9E5E00F4536D /* InspectorSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorSettings.cpp; sourceTree = "<group>"; };
7A5640BE12DF9E5E00F4536D /* InspectorSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorSettings.h; sourceTree = "<group>"; };
7A674BD90F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageGroupLoadDeferrer.cpp; sourceTree = "<group>"; };
7A674BDA0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageGroupLoadDeferrer.h; sourceTree = "<group>"; };
7A74ECB8101839A500BF939E /* InspectorDOMStorageAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorDOMStorageAgent.cpp; sourceTree = "<group>"; };
@@ -13026,8 +13022,6 @@
82AB1772125C826700C5069D /* InspectorResourceAgent.h */,
7AA365ED12E7265400DCA242 /* InspectorRuntimeAgent.cpp */,
7AF11A5912E727490061F23C /* InspectorRuntimeAgent.h */,
7A5640BD12DF9E5E00F4536D /* InspectorSettings.cpp */,
7A5640BE12DF9E5E00F4536D /* InspectorSettings.h */,
4FA3B908125CD12100300BAD /* InspectorState.cpp */,
4FA3B909125CD12200300BAD /* InspectorState.h */,
82AB176F125C826700C5069D /* InspectorStyleSheet.cpp */,
@@ -20928,7 +20922,6 @@
9F0D6B2F121BFEBA006C0288 /* InspectorProfilerAgent.h in Headers */,
82AB1776125C826700C5069D /* InspectorResourceAgent.h in Headers */,
7AF11A5A12E727490061F23C /* InspectorRuntimeAgent.h in Headers */,
7A5640C012DF9E5E00F4536D /* InspectorSettings.h in Headers */,
4FA3B90B125CD12200300BAD /* InspectorState.h in Headers */,
82AB1774125C826700C5069D /* InspectorStyleSheet.h in Headers */,
754133A8102E00E800075D00 /* InspectorTimelineAgent.h in Headers */,
@@ -23672,7 +23665,6 @@
9F0D6B2E121BFEBA006C0288 /* InspectorProfilerAgent.cpp in Sources */,
82AB1775125C826700C5069D /* InspectorResourceAgent.cpp in Sources */,
7AA365EE12E7265400DCA242 /* InspectorRuntimeAgent.cpp in Sources */,
7A5640BF12DF9E5E00F4536D /* InspectorSettings.cpp in Sources */,
4FA3B90A125CD12200300BAD /* InspectorState.cpp in Sources */,
82AB1773125C826700C5069D /* InspectorStyleSheet.cpp in Sources */,
754133AA102E00F400075D00 /* InspectorTimelineAgent.cpp in Sources */,
@@ -117,11 +117,6 @@ void ScriptDebugServer::removeListener(ScriptDebugListener* listener, Page* page
didRemoveListener(page);
}

bool ScriptDebugServer::isDebuggerAlwaysEnabled()
{
return false;
}

bool ScriptDebugServer::hasListenersInterestedInPage(Page* page)
{
ASSERT_ARG(page, page);
@@ -93,8 +93,6 @@ class ScriptDebugServer : JSC::Debugger {

JavaScriptCallFrame* currentCallFrame();

bool isDebuggerAlwaysEnabled();

private:
typedef HashSet<ScriptDebugListener*> ListenerSet;
typedef void (ScriptDebugServer::*JavaScriptExecutionCallback)(ScriptDebugListener*);
@@ -46,11 +46,6 @@ PassRefPtr<ScriptProfile> ScriptProfiler::stop(ScriptState* state, const String&
return ScriptProfile::create(profile);
}

bool ScriptProfiler::isProfilerAlwaysEnabled()
{
return false;
}

} // namespace WebCore

#endif // ENABLE(JAVASCRIPT_DEBUGGER)
@@ -50,7 +50,6 @@ class ScriptProfiler {
static void start(ScriptState* state, const String& title);
static PassRefPtr<ScriptProfile> stop(ScriptState* state, const String& title);
static PassRefPtr<ScriptHeapSnapshot> takeHeapSnapshot(const String&, HeapSnapshotProgress*) { return 0; }
static bool isProfilerAlwaysEnabled();
};

} // namespace WebCore
@@ -342,11 +342,6 @@ void ScriptDebugServer::setEnabled(bool value)
m_enabled = value;
}

bool ScriptDebugServer::isDebuggerAlwaysEnabled()
{
return m_enabled;
}

void ScriptDebugServer::interruptAndRun(PassOwnPtr<Task> task)
{
v8::Debug::DebugBreakForCommand(new ClientDataImpl(task));
@@ -99,7 +99,6 @@ class ScriptDebugServer {
PassRefPtr<JavaScriptCallFrame> currentCallFrame();

void setEnabled(bool);
bool isDebuggerAlwaysEnabled();

class Task {
public:
@@ -90,9 +90,4 @@ PassRefPtr<ScriptHeapSnapshot> ScriptProfiler::takeHeapSnapshot(const String& ti
return snapshot ? ScriptHeapSnapshot::create(snapshot) : 0;
}

bool ScriptProfiler::isProfilerAlwaysEnabled()
{
return true;
}

} // namespace WebCore
@@ -56,7 +56,6 @@ class ScriptProfiler {
static void start(ScriptState* state, const String& title);
static PassRefPtr<ScriptProfile> stop(ScriptState* state, const String& title);
static PassRefPtr<ScriptHeapSnapshot> takeHeapSnapshot(const String& title, HeapSnapshotProgress*);
static bool isProfilerAlwaysEnabled();
};

} // namespace WebCore
@@ -94,7 +94,6 @@ module core {
[domain=Console] void clearConsoleMessages();
[notify, domain=Console] void consoleMessagesCleared();
[domain=Console] void setMonitoringXHREnabled(in boolean enabled);
[notify, domain=Console] void monitoringXHRStateChanged(out boolean enabled);

///////////////////////////////////////////////////////////////////////
// Network API
@@ -239,8 +238,8 @@ module core {
// Debugger API
///////////////////////////////////////////////////////////////////////

[domain=Inspector] void enableDebugger(in boolean always);
[domain=Inspector] void disableDebugger(in boolean always);
[domain=Inspector] void enableDebugger();
[domain=Inspector] void disableDebugger();

[notify, domain=Debugger] void debuggerWasEnabled();
[notify, domain=Debugger] void debuggerWasDisabled();
@@ -290,8 +289,8 @@ module core {
// Profiler API
///////////////////////////////////////////////////////////////////////

[domain=Inspector] void enableProfiler(in boolean always);
[domain=Inspector] void disableProfiler(in boolean always);
[domain=Inspector] void enableProfiler();
[domain=Inspector] void disableProfiler();
[notify, domain=Profiler] void profilerWasEnabled();
[notify, domain=Profiler] void profilerWasDisabled();

0 comments on commit b438495

Please sign in to comment.