[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

loislo at chromium.org loislo at chromium.org
Wed Dec 22 18:30:22 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 21577ea9200a18a3f7c7e70c2e57662f3c1c2f94
Author: loislo at chromium.org <loislo at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Dec 13 11:21:05 2010 +0000

    2010-12-13  Ilya Tikhonovsky  <loislo at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.
    
            Debugger and Resources related notification functions of Inspector.idl were
            marked as such with help of "domain" attribute. The other changes in js files
            are reflecting this change. Some wrappers in WebInspector namespace were dropped,
            the others were moved to DebuggerModel class.
    
            https://bugs.webkit.org/show_bug.cgi?id=50906
    
            * inspector/Inspector.idl:
            * inspector/InspectorDebuggerAgent.cpp:
            (WebCore::InspectorDebuggerAgent::didParseSource):
            * inspector/InspectorProfilerAgent.cpp:
            (WebCore::InspectorProfilerAgent::resetState):
            * inspector/front-end/DOMAgent.js:
            (WebInspector.DOMAgent.prototype.didCommitLoad):
            * inspector/front-end/DebuggerModel.js:
            (WebInspector.DebuggerModel):
            (WebInspector.DebuggerModel.prototype.pausedScript):
            (WebInspector.DebuggerModel.prototype.resumedScript):
            (WebInspector.DebuggerModel.prototype.attachDebuggerWhenShown):
            (WebInspector.DebuggerModel.prototype.debuggerWasEnabled):
            (WebInspector.DebuggerModel.prototype.debuggerWasDisabled):
            (WebInspector.DebuggerModel.prototype.parsedScriptSource):
            (WebInspector.DebuggerModel.prototype.failedToParseScriptSource):
            * inspector/front-end/ProfilesPanel.js:
            (WebInspector.ProfilesPanel):
            (WebInspector.ProfilesPanel.prototype.addHeapSnapshots):
            (WebInspector.ProfilesPanel.prototype.updateMainViewWidth):
            (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
            * inspector/front-end/ResourceManager.js:
            (WebInspector.ResourceManager):
            (WebInspector.ResourceManager.prototype._unbindResourceURL):
            (WebInspector.ResourceManager.prototype.updateDOMStorage):
            (WebInspector.ResourceManager.prototype.updateApplicationCacheStatus):
            (WebInspector.ResourceManager.prototype.didGetFileSystemPath):
            (WebInspector.ResourceManager.prototype.didGetFileSystemError):
            (WebInspector.ResourceManager.prototype.didGetFileSystemDisabled):
            (WebInspector.ResourceManager.prototype.updateNetworkState):
            (WebInspector.ResourceManager.prototype.addDatabase):
            (WebInspector.ResourceManager.prototype.addDOMStorage):
            * inspector/front-end/inspector.js:
    
    2010-12-13  Ilya Tikhonovsky  <loislo at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.
    
            Debugger and Resources related notification functions of Inspector.idl were
            marked as such with help of "domain" attribute. The other changes in js files
            are reflecting this change. Some wrappers in WebInspector namespace were dropped,
            the others were moved to DebuggerModel class.
    
            https://bugs.webkit.org/show_bug.cgi?id=50906
    
            * src/js/Tests.js:
            (.TestSuite.prototype._waitForScriptPause):
    
    2010-12-13  Ilya Tikhonovsky  <loislo at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.
    
            Debugger and Resources related notification functions of Inspector.idl were
            marked as such with help of "domain" attribute. The other changes in js files
            are reflecting this change. Some wrappers in WebInspector namespace were dropped,
            the others were moved to DebuggerModel class.
    
            https://bugs.webkit.org/show_bug.cgi?id=50906
    
            * http/tests/inspector/debugger-test2.js:
            (initialize_DebuggerTest.InspectorTest.startDebuggerTest.startTest):
            (initialize_DebuggerTest.InspectorTest.startDebuggerTest):
            (initialize_DebuggerTest.InspectorTest.completeDebuggerTest.disableDebugger):
            (initialize_DebuggerTest.InspectorTest.showScriptSource):
            * platform/chromium/test_expectations.txt:
    
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73898 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 950952c..8607d7a 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,23 @@
+2010-12-13  Ilya Tikhonovsky  <loislo at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.
+
+        Debugger and Resources related notification functions of Inspector.idl were
+        marked as such with help of "domain" attribute. The other changes in js files
+        are reflecting this change. Some wrappers in WebInspector namespace were dropped,
+        the others were moved to DebuggerModel class.
+
+        https://bugs.webkit.org/show_bug.cgi?id=50906
+
+        * http/tests/inspector/debugger-test2.js:
+        (initialize_DebuggerTest.InspectorTest.startDebuggerTest.startTest):
+        (initialize_DebuggerTest.InspectorTest.startDebuggerTest):
+        (initialize_DebuggerTest.InspectorTest.completeDebuggerTest.disableDebugger):
+        (initialize_DebuggerTest.InspectorTest.showScriptSource):
+        * platform/chromium/test_expectations.txt:
+
 2010-12-13  Pavel Feldman  <pfeldman at chromium.org>
 
         Not reviewed. Updated chromium test expectations.
diff --git a/LayoutTests/http/tests/inspector/debugger-test2.js b/LayoutTests/http/tests/inspector/debugger-test2.js
index 6c19ff9..9931d41 100644
--- a/LayoutTests/http/tests/inspector/debugger-test2.js
+++ b/LayoutTests/http/tests/inspector/debugger-test2.js
@@ -7,15 +7,15 @@ InspectorTest.startDebuggerTest = function(callback)
     if (WebInspector.panels.scripts._debuggerEnabled)
         startTest();
     else {
-        InspectorTest._addSniffer(WebInspector, "debuggerWasEnabled", startTest);
+        InspectorTest._addSniffer(WebInspector.debuggerModel, "debuggerWasEnabled", startTest);
         WebInspector.panels.scripts._toggleDebugging(false);
     }
 
     function startTest()
     {
         InspectorTest.addResult("Debugger was enabled.");
-        InspectorTest._addSniffer(WebInspector, "pausedScript", InspectorTest._pausedScript, true);
-        InspectorTest._addSniffer(WebInspector, "resumedScript", InspectorTest._resumedScript, true);
+        InspectorTest._addSniffer(WebInspector.debuggerModel, "pausedScript", InspectorTest._pausedScript, true);
+        InspectorTest._addSniffer(WebInspector.debuggerModel, "resumedScript", InspectorTest._resumedScript, true);
         callback();
     }
 };
@@ -34,7 +34,7 @@ InspectorTest.completeDebuggerTest = function()
         if (!scriptsPanel._debuggerEnabled)
             completeTest();
         else {
-            InspectorTest._addSniffer(WebInspector, "debuggerWasDisabled", completeTest);
+            InspectorTest._addSniffer(WebInspector.debuggerModel, "debuggerWasDisabled", completeTest);
             scriptsPanel._toggleDebugging(false);
         }
     }
@@ -116,7 +116,7 @@ InspectorTest.showScriptSource = function(scriptName, callback)
     if (InspectorTest._scriptsAreParsed([scriptName]))
         InspectorTest._showScriptSource(scriptName, callback);
     else
-        InspectorTest._addSniffer(WebInspector, "parsedScriptSource", InspectorTest.showScriptSource.bind(InspectorTest, scriptName, callback));
+        InspectorTest._addSniffer(WebInspector.debuggerModel, "parsedScriptSource", InspectorTest.showScriptSource.bind(InspectorTest, scriptName, callback));
 };
 
 InspectorTest.waitUntilCurrentSourceFrameIsLoaded = function(callback)
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index eee6c4f..6bed479 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,50 @@
+2010-12-13  Ilya Tikhonovsky  <loislo at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.
+
+        Debugger and Resources related notification functions of Inspector.idl were
+        marked as such with help of "domain" attribute. The other changes in js files
+        are reflecting this change. Some wrappers in WebInspector namespace were dropped,
+        the others were moved to DebuggerModel class.
+
+        https://bugs.webkit.org/show_bug.cgi?id=50906
+
+        * inspector/Inspector.idl:
+        * inspector/InspectorDebuggerAgent.cpp:
+        (WebCore::InspectorDebuggerAgent::didParseSource):
+        * inspector/InspectorProfilerAgent.cpp:
+        (WebCore::InspectorProfilerAgent::resetState):
+        * inspector/front-end/DOMAgent.js:
+        (WebInspector.DOMAgent.prototype.didCommitLoad):
+        * inspector/front-end/DebuggerModel.js:
+        (WebInspector.DebuggerModel):
+        (WebInspector.DebuggerModel.prototype.pausedScript):
+        (WebInspector.DebuggerModel.prototype.resumedScript):
+        (WebInspector.DebuggerModel.prototype.attachDebuggerWhenShown):
+        (WebInspector.DebuggerModel.prototype.debuggerWasEnabled):
+        (WebInspector.DebuggerModel.prototype.debuggerWasDisabled):
+        (WebInspector.DebuggerModel.prototype.parsedScriptSource):
+        (WebInspector.DebuggerModel.prototype.failedToParseScriptSource):
+        * inspector/front-end/ProfilesPanel.js:
+        (WebInspector.ProfilesPanel):
+        (WebInspector.ProfilesPanel.prototype.addHeapSnapshots):
+        (WebInspector.ProfilesPanel.prototype.updateMainViewWidth):
+        (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
+        * inspector/front-end/ResourceManager.js:
+        (WebInspector.ResourceManager):
+        (WebInspector.ResourceManager.prototype._unbindResourceURL):
+        (WebInspector.ResourceManager.prototype.updateDOMStorage):
+        (WebInspector.ResourceManager.prototype.updateApplicationCacheStatus):
+        (WebInspector.ResourceManager.prototype.didGetFileSystemPath):
+        (WebInspector.ResourceManager.prototype.didGetFileSystemError):
+        (WebInspector.ResourceManager.prototype.didGetFileSystemDisabled):
+        (WebInspector.ResourceManager.prototype.updateNetworkState):
+        (WebInspector.ResourceManager.prototype.addDatabase):
+        (WebInspector.ResourceManager.prototype.addDOMStorage):
+        * inspector/front-end/inspector.js:
+
 2010-12-13  Zoltan Herczeg  <zherczeg at webkit.org>
 
         Reviewed by Dirk Schulze.
diff --git a/WebCore/inspector/Inspector.idl b/WebCore/inspector/Inspector.idl
index c214f74..7506184 100644
--- a/WebCore/inspector/Inspector.idl
+++ b/WebCore/inspector/Inspector.idl
@@ -33,44 +33,44 @@
 module core {
     interface [Conditional=INSPECTOR] Inspector {
         [notify, domain=Timeline] void addRecordToTimeline(out Object record);
-        [notify] void addNodesToSearchResult(out Array nodeIds);
+        [notify, domain=Inspector] void addNodesToSearchResult(out Array nodeIds);
         [notify, domain=DOM] void attributesUpdated(out long id, out Array attributes);
-        [notify] void bringToFront();
+        [notify, domain=Inspector] void bringToFront();
         [notify, domain=DOM] void characterDataModified(out long id, out String newValue);
         [notify, domain=DOM] void childNodeCountUpdated(out long id, out int newValue);
         [notify, domain=DOM] void childNodeInserted(out long parentId, out long prevId, out Object node);
         [notify, domain=DOM] void childNodeRemoved(out long parentId, out long id);
-        [notify] void didCommitLoad();
-        [notify] void evaluateForTestInFrontend(out long testCallId, out String script);
-        [notify] void disconnectFromBackend();
-        [notify] void domContentEventFired(out double time);
-        [notify] void inspectedURLChanged(out String url);
-        [notify] void loadEventFired(out double time);
-        [notify] void reset();
-        [notify] void resetProfilesPanel();
+        [notify, domain=DOM] void didCommitLoad();
+        [notify, domain=Inspector] void evaluateForTestInFrontend(out long testCallId, out String script);
+        [notify, domain=Inspector] void disconnectFromBackend();
+        [notify, domain=Inspector] void domContentEventFired(out double time);
+        [notify, domain=Inspector] void inspectedURLChanged(out String url);
+        [notify, domain=Inspector] void loadEventFired(out double time);
+        [notify, domain=Inspector] void reset();
+        [notify, domain=Profiler] void resetProfiles();
         [notify, domain=DOM] void setChildNodes(out long parentId, out Array nodes);
         [notify, domain=DOM] void setDetachedRoot(out Object root);
         [notify, domain=DOM] void setDocument(out Value root);
-        [notify] void showPanel(out String panel);
+        [notify, domain=Inspector] void showPanel(out String panel);
         [notify, domain=Timeline] void timelineProfilerWasStarted();
         [notify, domain=Timeline] void timelineProfilerWasStopped();
         [notify] void updateFocusedNode(out long nodeId);
 
 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
-        [notify] void addProfileHeader(out Object header);
-        [notify] void addHeapSnapshotChunk(out unsigned long uid, out String chunk);
-        [notify] void attachDebuggerWhenShown();
-        [notify] void debuggerWasEnabled();
-        [notify] void debuggerWasDisabled();
-        [notify] void failedToParseScriptSource(out String url, out String data, out int firstLine, out int errorLine, out String errorMessage);
-        [notify] void finishHeapSnapshot(out unsigned long uid);
-        [notify] void parsedScriptSource(out String sourceID, out String url, out String data, out int firstLine, out int scriptWorldType);
-        [notify] void pausedScript(out Object details);
-        [notify] void profilerWasEnabled();
-        [notify] void profilerWasDisabled();
-        [notify] void restoredBreakpoint(out String sourceID, out String url, out int line, out boolean enabled, out String condition);
-        [notify] void resumedScript();
-        [notify] void setRecordingProfile(out boolean isProfiling);
+        [notify, domain=Profiler] void addProfileHeader(out Object header);
+        [notify, domain=Profiler] void addHeapSnapshotChunk(out unsigned long uid, out String chunk);
+        [notify, domain=Debugger] void attachDebuggerWhenShown();
+        [notify, domain=Debugger] void debuggerWasEnabled();
+        [notify, domain=Debugger] void debuggerWasDisabled();
+        [notify, domain=Debugger] void failedToParseScriptSource(out String url, out String data, out int firstLine, out int errorLine, out String errorMessage);
+        [notify, domain=Profiler] void finishHeapSnapshot(out unsigned long uid);
+        [notify, domain=Debugger] void parsedScriptSource(out String sourceID, out String url, out String data, out int firstLine, out int scriptWorldType);
+        [notify, domain=Debugger] void pausedScript(out Object details);
+        [notify, domain=Profiler] void profilerWasEnabled();
+        [notify, domain=Profiler] void profilerWasDisabled();
+        [notify, domain=Debugger] void breakpointRestored(out String sourceID, out String url, out int line, out boolean enabled, out String condition);
+        [notify, domain=Debugger] void resumedScript();
+        [notify, domain=Profiler] void setRecordingProfile(out boolean isProfiling);
         [notify] void updatePauseOnExceptionsState(out long state);
 #endif
 #if defined(ENABLE_DATABASE) && ENABLE_DATABASE
@@ -78,9 +78,9 @@ module core {
         [notify] void selectDatabase(out int databaseId);
 #endif
 #if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE
-        [notify] void addDOMStorage(out Object storage);
-        [notify] void updateDOMStorage(out int storageId);
-        [notify] void selectDOMStorage(out int storageId);
+        [notify, domain=Resources] void addDOMStorage(out Object storage);
+        [notify, domain=Resources] void updateDOMStorage(out int storageId);
+        [notify, domain=Resources] void selectDOMStorage(out int storageId);
 #endif
 #if defined(ENABLE_OFFLINE_WEB_APPLICATIONS) && ENABLE_OFFLINE_WEB_APPLICATIONS
         [notify] void updateApplicationCacheStatus(out int status);
@@ -107,22 +107,22 @@ module core {
 
         [domain=Resources] void cachedResources(out Object resources);
         [domain=Resources] void resourceContent(in unsigned long frameId, in String url, in boolean base64Encode, out String content);
-        [notify] void identifierForInitialRequest(out long identifier, out String url, out Object loader, out Value callStack);
-        [notify] void willSendRequest(out long identifier, out double time, out Object request, out Object redirectResponse);
-        [notify] void markResourceAsCached(out long identifier);
-        [notify] void didReceiveResponse(out long identifier, out double time, out String resourceType, out Object response);
-        [notify] void didReceiveContentLength(out long identifier, out double time, out long lengthReceived);
-        [notify] void didFinishLoading(out long identifier, out double finishTime);
-        [notify] void didFailLoading(out long identifier, out double time, out String localizedDescription);
-        [notify] void didLoadResourceFromMemoryCache(out double time, out Object resource);
-        [notify] void setInitialContent(out long identifier, out String sourceString, out String type);
-        [notify] void didCommitLoadForFrame(out Object frame, out Object loader);
-        [notify] void frameDetachedFromParent(out unsigned long frameId);
-
-        [notify] void didCreateWebSocket(out unsigned long identifier, out String requestURL);
-        [notify] void willSendWebSocketHandshakeRequest(out unsigned long identifier, out double time, out Object request);
-        [notify] void didReceiveWebSocketHandshakeResponse(out unsigned long identifier, out double time, out Object response);
-        [notify] void didCloseWebSocket(out unsigned long identifier, out double time);
+        [notify, domain=Resources] void identifierForInitialRequest(out long identifier, out String url, out Object loader, out Value callStack);
+        [notify, domain=Resources] void willSendRequest(out long identifier, out double time, out Object request, out Object redirectResponse);
+        [notify, domain=Resources] void markResourceAsCached(out long identifier);
+        [notify, domain=Resources] void didReceiveResponse(out long identifier, out double time, out String resourceType, out Object response);
+        [notify, domain=Resources] void didReceiveContentLength(out long identifier, out double time, out long lengthReceived);
+        [notify, domain=Resources] void didFinishLoading(out long identifier, out double finishTime);
+        [notify, domain=Resources] void didFailLoading(out long identifier, out double time, out String localizedDescription);
+        [notify, domain=Resources] void didLoadResourceFromMemoryCache(out double time, out Object resource);
+        [notify, domain=Resources] void setInitialContent(out long identifier, out String sourceString, out String type);
+        [notify, domain=Resources] void didCommitLoadForFrame(out Object frame, out Object loader);
+        [notify, domain=Resources] void frameDetachedFromParent(out unsigned long frameId);
+
+        [notify, domain=Resources] void didCreateWebSocket(out unsigned long identifier, out String requestURL);
+        [notify, domain=Resources] void willSendWebSocketHandshakeRequest(out unsigned long identifier, out double time, out Object request);
+        [notify, domain=Resources] void didReceiveWebSocketHandshakeResponse(out unsigned long identifier, out double time, out Object response);
+        [notify, domain=Resources] void didCloseWebSocket(out unsigned long identifier, out double time);
 
 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
         [domain=Backend] void enableDebugger(in boolean always);
diff --git a/WebCore/inspector/InspectorDebuggerAgent.cpp b/WebCore/inspector/InspectorDebuggerAgent.cpp
index b3caa2e..0b18b0c 100644
--- a/WebCore/inspector/InspectorDebuggerAgent.cpp
+++ b/WebCore/inspector/InspectorDebuggerAgent.cpp
@@ -292,7 +292,7 @@ void InspectorDebuggerAgent::didParseSource(const String& sourceID, const String
             bool success = ScriptDebugServer::shared().setBreakpoint(sourceID, breakpointIt->second, lineNumber, &actualLineNumber);
             if (!success)
                 continue;
-            m_frontend->restoredBreakpoint(sourceID, url, actualLineNumber, breakpointIt->second.enabled, breakpointIt->second.condition);
+            m_frontend->breakpointRestored(sourceID, url, actualLineNumber, breakpointIt->second.enabled, breakpointIt->second.condition);
             String breakpointId = formatBreakpointId(sourceID, actualLineNumber);
             m_breakpointsMapping.set(breakpointId, lineNumber);
         }
diff --git a/WebCore/inspector/InspectorProfilerAgent.cpp b/WebCore/inspector/InspectorProfilerAgent.cpp
index 6d5364f..ac67a1a 100644
--- a/WebCore/inspector/InspectorProfilerAgent.cpp
+++ b/WebCore/inspector/InspectorProfilerAgent.cpp
@@ -211,7 +211,7 @@ void InspectorProfilerAgent::resetState()
     m_nextUserInitiatedProfileNumber = 1;
     m_nextUserInitiatedHeapSnapshotNumber = 1;
     if (m_frontend)
-        m_frontend->resetProfilesPanel();
+        m_frontend->resetProfiles();
 }
 
 void InspectorProfilerAgent::startUserInitiatedProfiling()
diff --git a/WebCore/inspector/front-end/DOMAgent.js b/WebCore/inspector/front-end/DOMAgent.js
index 9ce08f9..432ac3f 100644
--- a/WebCore/inspector/front-end/DOMAgent.js
+++ b/WebCore/inspector/front-end/DOMAgent.js
@@ -373,6 +373,12 @@ WebInspector.DOMAgent.prototype = {
         return this._idToDOMNode[nodeId];
     },
 
+    didCommitLoad: function()
+    {
+        // Cleanup elements panel early on inspected page refresh.
+        this.setDocument(null);
+    },
+
     setDocument: function(payload)
     {
         this._idToDOMNode = {};
diff --git a/WebCore/inspector/front-end/DebuggerModel.js b/WebCore/inspector/front-end/DebuggerModel.js
index a337f5c..8103d05 100644
--- a/WebCore/inspector/front-end/DebuggerModel.js
+++ b/WebCore/inspector/front-end/DebuggerModel.js
@@ -31,6 +31,7 @@
 WebInspector.DebuggerModel = function()
 {
     this._breakpoints = {};
+    InspectorBackend.registerDomainDispatcher("Debugger", this);
 }
 
 WebInspector.DebuggerModel.prototype = {
@@ -127,7 +128,7 @@ WebInspector.DebuggerModel.prototype = {
         InspectorBackend.setBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.enabled, breakpoint.condition, didSetBreakpoint.bind(this));
     },
 
-    debuggerPaused: function(details)
+    pausedScript: function(details)
     {
         this.dispatchEventToListeners("debugger-paused", details.callFrames);
 
@@ -147,7 +148,7 @@ WebInspector.DebuggerModel.prototype = {
         this.dispatchEventToListeners("script-breakpoint-hit", breakpoint);
     },
 
-    debuggerResumed: function()
+    resumedScript: function()
     {
         this.dispatchEventToListeners("debugger-resumed");
 
@@ -155,6 +156,31 @@ WebInspector.DebuggerModel.prototype = {
             return;
         this._lastHitBreakpoint.hit = false;
         delete this._lastHitBreakpoint;
+    },
+
+    attachDebuggerWhenShown: function()
+    {
+        WebInspector.panels.scripts.attachDebuggerWhenShown();
+    },
+
+    debuggerWasEnabled: function()
+    {
+        WebInspector.panels.scripts.debuggerWasEnabled();
+    },
+
+    debuggerWasDisabled: function()
+    {
+        WebInspector.panels.scripts.debuggerWasDisabled();
+    },
+
+    parsedScriptSource: function(sourceID, sourceURL, source, startingLine, scriptWorldType)
+    {
+        WebInspector.panels.scripts.addScript(sourceID, sourceURL, source, startingLine, undefined, undefined, scriptWorldType);
+    },
+
+    failedToParseScriptSource: function(sourceURL, source, startingLine, errorLine, errorMessage)
+    {
+        WebInspector.panels.scripts.addScript(null, sourceURL, source, startingLine, errorLine, errorMessage);
     }
 }
 
diff --git a/WebCore/inspector/front-end/ProfilesPanel.js b/WebCore/inspector/front-end/ProfilesPanel.js
index 86d8d90..3e31ba5 100644
--- a/WebCore/inspector/front-end/ProfilesPanel.js
+++ b/WebCore/inspector/front-end/ProfilesPanel.js
@@ -124,6 +124,7 @@ WebInspector.ProfilesPanel = function()
     this._profiles = [];
     this._profilerEnabled = Preferences.profilerAlwaysEnabled;
     this._reset();
+    InspectorBackend.registerDomainDispatcher("Profiler", this);
 }
 
 WebInspector.ProfilesPanel.prototype = {
@@ -597,7 +598,7 @@ WebInspector.ProfilesPanel.prototype = {
             var profileHeadersLength = profileHeaders.length;
             for (var i = 0; i < profileHeadersLength; ++i)
                 if (!this.hasProfile(profileHeaders[i]))
-                    WebInspector.addProfileHeader(profileHeaders[i]);
+                    WebInspector.panels.profiles.addProfileHeader(profileHeaders[i]);
         }
 
         InspectorBackend.getProfileHeaders(populateCallback.bind(this));
@@ -611,6 +612,26 @@ WebInspector.ProfilesPanel.prototype = {
         this.profileViews.style.left = width + "px";
         this.profileViewStatusBarItemsContainer.style.left = Math.max(155, width) + "px";
         this.resize();
+    },
+
+    setRecordingProfile: function(isProfiling)
+    {
+        this.getProfileType(WebInspector.CPUProfileType.TypeId).setRecordingProfile(isProfiling);
+        if (this.hasTemporaryProfile(WebInspector.CPUProfileType.TypeId) !== isProfiling) {
+            if (!this._temporaryRecordingProfile) {
+                this._temporaryRecordingProfile = {
+                    typeId: WebInspector.CPUProfileType.TypeId,
+                    title: WebInspector.UIString("Recording"),
+                    uid: -1,
+                    isTemporary: true
+                };
+            }
+            if (isProfiling)
+                this.addProfileHeader(this._temporaryRecordingProfile);
+            else
+                this.removeProfileHeader(this._temporaryRecordingProfile);
+        }
+        this.updateProfileTypeButtons();
     }
 }
 
diff --git a/WebCore/inspector/front-end/ResourceManager.js b/WebCore/inspector/front-end/ResourceManager.js
index 9f35ed2..b4f4114 100644
--- a/WebCore/inspector/front-end/ResourceManager.js
+++ b/WebCore/inspector/front-end/ResourceManager.js
@@ -30,36 +30,14 @@
 
 WebInspector.ResourceManager = function()
 {
-    this._registerNotifyHandlers(
-        "identifierForInitialRequest",
-        "willSendRequest",
-        "markResourceAsCached",
-        "didReceiveResponse",
-        "didReceiveContentLength",
-        "didFinishLoading",
-        "didFailLoading",
-        "didLoadResourceFromMemoryCache",
-        "setInitialContent",
-        "didCommitLoadForFrame",
-        "frameDetachedFromParent",
-        "didCreateWebSocket",
-        "willSendWebSocketHandshakeRequest",
-        "didReceiveWebSocketHandshakeResponse",
-        "didCloseWebSocket");
-
     this._resourcesById = {};
     this._resourcesByURL = {};
     this._resourceTreeModel = new WebInspector.ResourceTreeModel();
     InspectorBackend.cachedResources(this._processCachedResources.bind(this));
+    InspectorBackend.registerDomainDispatcher("Resources", this);
 }
 
 WebInspector.ResourceManager.prototype = {
-    _registerNotifyHandlers: function()
-    {
-        for (var i = 0; i < arguments.length; ++i)
-            WebInspector[arguments[i]] = this[arguments[i]].bind(this);
-    },
-
     identifierForInitialRequest: function(identifier, url, loader, callStack)
     {
         var resource = this._createResource(identifier, url, loader, callStack);
@@ -428,6 +406,59 @@ WebInspector.ResourceManager.prototype = {
         }
 
         delete this._resourcesByURL[resource.url];
+    },
+
+    updateDOMStorage: function(storageId)
+    {
+        WebInspector.panels.resources.updateDOMStorage(storageId);
+    },
+
+    updateApplicationCacheStatus: function(status)
+    {
+        WebInspector.panels.resources.updateApplicationCacheStatus(status);
+    },
+
+    didGetFileSystemPath: function(root, type, origin)
+    {
+        WebInspector.panels.resources.updateFileSystemPath(root, type, origin);
+    },
+
+    didGetFileSystemError: function(type, origin)
+    {
+        WebInspector.panels.resources.updateFileSystemError(type, origin);
+    },
+
+    didGetFileSystemDisabled: function()
+    {
+        WebInspector.panels.resources.setFileSystemDisabled();
+    },
+
+    updateNetworkState: function(isNowOnline)
+    {
+        WebInspector.panels.resources.updateNetworkState(isNowOnline);
+    },
+
+    addDatabase: function(payload)
+    {
+        if (!WebInspector.panels.resources)
+            return;
+        var database = new WebInspector.Database(
+            payload.id,
+            payload.domain,
+            payload.name,
+            payload.version);
+        WebInspector.panels.resources.addDatabase(database);
+    },
+
+    addDOMStorage: function(payload)
+    {
+        if (!WebInspector.panels.resources)
+            return;
+        var domStorage = new WebInspector.DOMStorage(
+            payload.id,
+            payload.host,
+            payload.isLocalStorage);
+        WebInspector.panels.resources.addDOMStorage(domStorage);
     }
 }
 
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index 8e165dc..78c73da 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -1208,59 +1208,6 @@ WebInspector.loadEventFired = function(time)
     this.mainResourceLoadTime = time;
 }
 
-WebInspector.addDatabase = function(payload)
-{
-    if (!this.panels.resources)
-        return;
-    var database = new WebInspector.Database(
-        payload.id,
-        payload.domain,
-        payload.name,
-        payload.version);
-    this.panels.resources.addDatabase(database);
-}
-
-WebInspector.addDOMStorage = function(payload)
-{
-    if (!this.panels.resources)
-        return;
-    var domStorage = new WebInspector.DOMStorage(
-        payload.id,
-        payload.host,
-        payload.isLocalStorage);
-    this.panels.resources.addDOMStorage(domStorage);
-}
-
-WebInspector.updateDOMStorage = function(storageId)
-{
-    this.panels.resources.updateDOMStorage(storageId);
-}
-
-WebInspector.updateApplicationCacheStatus = function(status)
-{
-    this.panels.resources.updateApplicationCacheStatus(status);
-}
-
-WebInspector.didGetFileSystemPath = function(root, type, origin)
-{
-    this.panels.resources.updateFileSystemPath(root, type, origin);
-}
-
-WebInspector.didGetFileSystemError = function(type, origin)
-{
-    this.panels.resources.updateFileSystemError(type, origin);
-}
-
-WebInspector.didGetFileSystemDisabled = function()
-{
-    this.panels.resources.setFileSystemDisabled();
-}
-
-WebInspector.updateNetworkState = function(isNowOnline)
-{
-    this.panels.resources.updateNetworkState(isNowOnline);
-}
-
 WebInspector.searchingForNodeWasEnabled = function()
 {
     this.panels.elements.searchingForNodeWasEnabled();
@@ -1271,56 +1218,6 @@ WebInspector.searchingForNodeWasDisabled = function()
     this.panels.elements.searchingForNodeWasDisabled();
 }
 
-WebInspector.attachDebuggerWhenShown = function()
-{
-    this.panels.scripts.attachDebuggerWhenShown();
-}
-
-WebInspector.debuggerWasEnabled = function()
-{
-    this.panels.scripts.debuggerWasEnabled();
-}
-
-WebInspector.debuggerWasDisabled = function()
-{
-    this.panels.scripts.debuggerWasDisabled();
-}
-
-WebInspector.profilerWasEnabled = function()
-{
-    this.panels.profiles.profilerWasEnabled();
-}
-
-WebInspector.profilerWasDisabled = function()
-{
-    this.panels.profiles.profilerWasDisabled();
-}
-
-WebInspector.parsedScriptSource = function(sourceID, sourceURL, source, startingLine, scriptWorldType)
-{
-    this.panels.scripts.addScript(sourceID, sourceURL, source, startingLine, undefined, undefined, scriptWorldType);
-}
-
-WebInspector.restoredBreakpoint = function(sourceID, sourceURL, line, enabled, condition)
-{
-    this.debuggerModel.breakpointRestored(sourceID, sourceURL, line, enabled, condition);
-}
-
-WebInspector.failedToParseScriptSource = function(sourceURL, source, startingLine, errorLine, errorMessage)
-{
-    this.panels.scripts.addScript(null, sourceURL, source, startingLine, errorLine, errorMessage);
-}
-
-WebInspector.pausedScript = function(details)
-{
-    this.debuggerModel.debuggerPaused(details);
-}
-
-WebInspector.resumedScript = function()
-{
-    this.debuggerModel.debuggerResumed();
-}
-
 WebInspector.reset = function()
 {
     this.debuggerModel.reset();
@@ -1341,12 +1238,6 @@ WebInspector.reset = function()
     this.breakpointManager.restoreBreakpoints();
 }
 
-WebInspector.resetProfilesPanel = function()
-{
-    if (WebInspector.panels.profiles)
-        WebInspector.panels.profiles.resetProfiles();
-}
-
 WebInspector.bringToFront = function()
 {
     InspectorFrontendHost.bringToFront();
@@ -1363,12 +1254,6 @@ WebInspector.inspectedURLChanged = function(url)
     }
 }
 
-WebInspector.didCommitLoad = function()
-{
-    // Cleanup elements panel early on inspected page refresh.
-    WebInspector.domAgent.setDocument(null);
-}
-
 WebInspector.updateConsoleMessageExpiredCount = function(count)
 {
     var message = String.sprintf(WebInspector.UIString("%d console messages are not shown."), count);
@@ -1481,41 +1366,6 @@ WebInspector.log = function(message, messageLevel)
     logMessage(message);
 }
 
-WebInspector.addProfileHeader = function(profile)
-{
-    this.panels.profiles.addProfileHeader(profile);
-}
-
-WebInspector.setRecordingProfile = function(isProfiling)
-{
-    this.panels.profiles.getProfileType(WebInspector.CPUProfileType.TypeId).setRecordingProfile(isProfiling);
-    if (this.panels.profiles.hasTemporaryProfile(WebInspector.CPUProfileType.TypeId) !== isProfiling) {
-        if (!this._temporaryRecordingProfile) {
-            this._temporaryRecordingProfile = {
-                typeId: WebInspector.CPUProfileType.TypeId,
-                title: WebInspector.UIString("Recording…"),
-                uid: -1,
-                isTemporary: true
-            };
-        }
-        if (isProfiling)
-            this.panels.profiles.addProfileHeader(this._temporaryRecordingProfile);
-        else
-            this.panels.profiles.removeProfileHeader(this._temporaryRecordingProfile);
-    }
-    this.panels.profiles.updateProfileTypeButtons();
-}
-
-WebInspector.addHeapSnapshotChunk = function(uid, chunk)
-{
-    this.panels.profiles.addHeapSnapshotChunk(uid, chunk);
-}
-
-WebInspector.finishHeapSnapshot = function(uid)
-{
-    this.panels.profiles.finishHeapSnapshot(uid);
-}
-
 WebInspector.drawLoadingPieChart = function(canvas, percent) {
     var g = canvas.getContext("2d");
     var darkColor = "rgb(122, 168, 218)";
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 27e695e..695d80c 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,19 @@
+2010-12-13  Ilya Tikhonovsky  <loislo at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.
+
+        Debugger and Resources related notification functions of Inspector.idl were
+        marked as such with help of "domain" attribute. The other changes in js files
+        are reflecting this change. Some wrappers in WebInspector namespace were dropped,
+        the others were moved to DebuggerModel class.
+
+        https://bugs.webkit.org/show_bug.cgi?id=50906
+
+        * src/js/Tests.js:
+        (.TestSuite.prototype._waitForScriptPause):
+
 2010-10-28  MORITA Hajime  <morrita at google.com>
 
         Reviewed by Ojan Vafai.
diff --git a/WebKit/chromium/src/js/Tests.js b/WebKit/chromium/src/js/Tests.js
index 2b264ee..b8dc189 100644
--- a/WebKit/chromium/src/js/Tests.js
+++ b/WebKit/chromium/src/js/Tests.js
@@ -730,7 +730,7 @@ TestSuite.prototype._waitForScriptPause = function(expectations, callback)
     var test = this;
     // Wait until script is paused.
     test.addSniffer(
-        WebInspector,
+        WebInspector.debuggerModel,
         "pausedScript",
         function(details) {
             var callFrames = details.callFrames;
@@ -852,7 +852,7 @@ TestSuite.prototype.testPauseInEval = function()
 
     devtools.tools.evaluateJavaScript("fib(10)");
 
-    this.addSniffer(WebInspector, "pausedScript",
+    this.addSniffer(WebInspector.debuggerModel, "pausedScript",
         function() {
             test.releaseControl();
         });

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list