[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

pfeldman at chromium.org pfeldman at chromium.org
Thu Apr 8 02:08:02 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 6ad218369660970d7676d902b7d438137768a3b3
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Mar 3 17:24:38 2010 +0000

    2010-03-03  Pavel Feldman  <pfeldman at chromium.org>
    
            Reviewed by Timothy Hatcher.
    
            Web Inspector: Get rid of synchronous debuggerEnabled, profilerEnabled calls.
    
            https://bugs.webkit.org/show_bug.cgi?id=32331
    
            * inspector/InspectorBackend.cpp:
            * inspector/InspectorBackend.h:
            * inspector/InspectorBackend.idl:
            * inspector/front-end/BreakpointsSidebarPane.js:
            (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint):
            (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint):
            (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged):
            * inspector/front-end/ProfilesPanel.js:
            (WebInspector.ProfilesPanel):
            (WebInspector.ProfilesPanel.prototype.profilerWasEnabled):
            (WebInspector.ProfilesPanel.prototype.profilerWasDisabled):
            (WebInspector.ProfilesPanel.prototype._updateInterface):
            (WebInspector.ProfilesPanel.prototype._enableProfiling):
            (WebInspector.ProfilesPanel.prototype._toggleProfiling):
            * inspector/front-end/ScriptsPanel.js:
            (WebInspector.ScriptsPanel):
            (WebInspector.ScriptsPanel.prototype.debuggerWasEnabled):
            (WebInspector.ScriptsPanel.prototype.debuggerWasDisabled):
            (WebInspector.ScriptsPanel.prototype.reset):
            (WebInspector.ScriptsPanel.prototype.canShowSourceLine):
            (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons):
            (WebInspector.ScriptsPanel.prototype._enableDebugging):
            (WebInspector.ScriptsPanel.prototype._toggleDebugging):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55464 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9db0fa5..14d518d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,35 @@
+2010-03-03  Pavel Feldman  <pfeldman at chromium.org>
+
+        Reviewed by Timothy Hatcher.
+
+        Web Inspector: Get rid of synchronous debuggerEnabled, profilerEnabled calls.
+
+        https://bugs.webkit.org/show_bug.cgi?id=32331
+
+        * inspector/InspectorBackend.cpp:
+        * inspector/InspectorBackend.h:
+        * inspector/InspectorBackend.idl:
+        * inspector/front-end/BreakpointsSidebarPane.js:
+        (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint):
+        (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint):
+        (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged):
+        * inspector/front-end/ProfilesPanel.js:
+        (WebInspector.ProfilesPanel):
+        (WebInspector.ProfilesPanel.prototype.profilerWasEnabled):
+        (WebInspector.ProfilesPanel.prototype.profilerWasDisabled):
+        (WebInspector.ProfilesPanel.prototype._updateInterface):
+        (WebInspector.ProfilesPanel.prototype._enableProfiling):
+        (WebInspector.ProfilesPanel.prototype._toggleProfiling):
+        * inspector/front-end/ScriptsPanel.js:
+        (WebInspector.ScriptsPanel):
+        (WebInspector.ScriptsPanel.prototype.debuggerWasEnabled):
+        (WebInspector.ScriptsPanel.prototype.debuggerWasDisabled):
+        (WebInspector.ScriptsPanel.prototype.reset):
+        (WebInspector.ScriptsPanel.prototype.canShowSourceLine):
+        (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons):
+        (WebInspector.ScriptsPanel.prototype._enableDebugging):
+        (WebInspector.ScriptsPanel.prototype._toggleDebugging):
+
 2010-03-03  Eric Carlson  <eric.carlson at apple.com>
 
         Reviewed by Adele Peterson.
diff --git a/WebCore/inspector/InspectorBackend.cpp b/WebCore/inspector/InspectorBackend.cpp
index 9ed9741..4313542 100644
--- a/WebCore/inspector/InspectorBackend.cpp
+++ b/WebCore/inspector/InspectorBackend.cpp
@@ -155,12 +155,6 @@ void InspectorBackend::stopTimelineProfiler()
 }
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
-bool InspectorBackend::debuggerEnabled() const
-{
-    if (m_inspectorController)
-        return m_inspectorController->debuggerEnabled();
-    return false;
-}
 
 void InspectorBackend::enableDebugger(bool always)
 {
@@ -235,12 +229,6 @@ void InspectorBackend::setPauseOnExceptionsState(long pauseState)
 #endif
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
-bool InspectorBackend::profilerEnabled()
-{
-    if (m_inspectorController)
-        return m_inspectorController->profilerEnabled();
-    return false;
-}
 
 void InspectorBackend::enableProfiler(bool always)
 {
diff --git a/WebCore/inspector/InspectorBackend.h b/WebCore/inspector/InspectorBackend.h
index 2f0be74..b6b984a 100644
--- a/WebCore/inspector/InspectorBackend.h
+++ b/WebCore/inspector/InspectorBackend.h
@@ -74,7 +74,6 @@ public:
     void stopTimelineProfiler();
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
-    bool debuggerEnabled() const;
     void enableDebugger(bool always);
     void disableDebugger(bool always);
 
@@ -93,7 +92,6 @@ public:
     void stepIntoStatementInDebugger();
     void stepOutOfFunctionInDebugger();
 
-    bool profilerEnabled();
     void enableProfiler(bool always);
     void disableProfiler(bool always);
 
diff --git a/WebCore/inspector/InspectorBackend.idl b/WebCore/inspector/InspectorBackend.idl
index 240ff7f..6a36d1b 100644
--- a/WebCore/inspector/InspectorBackend.idl
+++ b/WebCore/inspector/InspectorBackend.idl
@@ -49,7 +49,6 @@ module core {
         void stopTimelineProfiler();
 
 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
-        boolean debuggerEnabled();
         void enableDebugger(in boolean always);
         void disableDebugger(in boolean always);
 
@@ -68,7 +67,6 @@ module core {
         long pauseOnExceptionsState();
         void setPauseOnExceptionsState(in long pauseOnExceptionsState);
 
-        boolean profilerEnabled();
         void enableProfiler(in boolean always);
         void disableProfiler(in boolean always);
 
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index 440176e..0f03610 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -690,6 +690,9 @@ void InspectorController::populateScriptObjects()
         it->second->bind(m_frontend.get());
 #endif
 
+    if (m_profilerEnabled)
+        m_frontend->profilerWasEnabled();
+
     m_frontend->populateInterface();
 
     // Dispatch pending frontend commands
diff --git a/WebCore/inspector/front-end/BreakpointsSidebarPane.js b/WebCore/inspector/front-end/BreakpointsSidebarPane.js
index 0bca05b..690d091 100644
--- a/WebCore/inspector/front-end/BreakpointsSidebarPane.js
+++ b/WebCore/inspector/front-end/BreakpointsSidebarPane.js
@@ -68,11 +68,7 @@ WebInspector.BreakpointsSidebarPane.prototype = {
             this.bodyElement.appendChild(this.listElement);
         }
 
-        if (!InspectorBackend.debuggerEnabled() || !breakpoint.sourceID)
-            return;
-
-        if (breakpoint.enabled)
-            InspectorBackend.setBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.enabled, breakpoint.condition);
+        InspectorBackend.setBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.enabled, breakpoint.condition);
     },
 
     _appendBreakpointElement: function(breakpoint)
@@ -145,9 +141,6 @@ WebInspector.BreakpointsSidebarPane.prototype = {
             this.bodyElement.appendChild(this.emptyElement);
         }
 
-        if (!InspectorBackend.debuggerEnabled() || !breakpoint.sourceID)
-            return;
-
         InspectorBackend.removeBreakpoint(breakpoint.sourceID, breakpoint.line);
     },
 
@@ -157,10 +150,6 @@ WebInspector.BreakpointsSidebarPane.prototype = {
 
         var checkbox = breakpoint._breakpointListElement.firstChild;
         checkbox.checked = breakpoint.enabled;
-
-        if (!InspectorBackend.debuggerEnabled() || !breakpoint.sourceID)
-            return;
-
         InspectorBackend.setBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.enabled, breakpoint.condition);
     },
 
diff --git a/WebCore/inspector/front-end/ProfilesPanel.js b/WebCore/inspector/front-end/ProfilesPanel.js
index dd049a1..ca0b8d9 100644
--- a/WebCore/inspector/front-end/ProfilesPanel.js
+++ b/WebCore/inspector/front-end/ProfilesPanel.js
@@ -120,6 +120,7 @@ WebInspector.ProfilesPanel = function()
     this.element.appendChild(this.welcomeView.element);
 
     this._profiles = [];
+    this._profilerEnabled = Preferences.profilerAlwaysEnabled;
     this.reset();
 }
 
@@ -171,12 +172,20 @@ WebInspector.ProfilesPanel.prototype = {
 
     profilerWasEnabled: function()
     {
+        if (this._profilerEnabled)
+            return;
+
+        this._profilerEnabled = true;
         this.reset();
         this.populateInterface();
     },
 
     profilerWasDisabled: function()
     {
+        if (!this._profilerEnabled)
+            return;
+
+        this._profilerEnabled = false;
         this.reset();
     },
 
@@ -429,7 +438,7 @@ WebInspector.ProfilesPanel.prototype = {
     _updateInterface: function()
     {
         // FIXME: Replace ProfileType-specific button visibility changes by a single ProfileType-agnostic "combo-button" visibility change.
-        if (InspectorBackend.profilerEnabled()) {
+        if (this._profilerEnabled) {
             this.enableToggleButton.title = WebInspector.UIString("Profiling enabled. Click to disable.");
             this.enableToggleButton.toggled = true;
             for (var typeId in this._profileTypeButtonsByIdMap)
@@ -448,14 +457,14 @@ WebInspector.ProfilesPanel.prototype = {
 
     _enableProfiling: function()
     {
-        if (InspectorBackend.profilerEnabled())
+        if (this._profilerEnabled)
             return;
         this._toggleProfiling(this.panelEnablerView.alwaysEnabled);
     },
 
     _toggleProfiling: function(optionalAlways)
     {
-        if (InspectorBackend.profilerEnabled())
+        if (this._profilerEnabled)
             InspectorBackend.disableProfiler(true);
         else
             InspectorBackend.enableProfiler(!!optionalAlways);
diff --git a/WebCore/inspector/front-end/ScriptsPanel.js b/WebCore/inspector/front-end/ScriptsPanel.js
index e2336ee..c5e5276 100644
--- a/WebCore/inspector/front-end/ScriptsPanel.js
+++ b/WebCore/inspector/front-end/ScriptsPanel.js
@@ -195,6 +195,7 @@ WebInspector.ScriptsPanel = function()
     shortcut = WebInspector.KeyboardShortcut.makeKey(WebInspector.KeyboardShortcut.KeyCodes.Semicolon, WebInspector.KeyboardShortcut.Modifiers.Shift, platformSpecificModifier);
     this._shortcuts[shortcut] = handler;
 
+    this._debuggerEnabled = Preferences.debuggerAlwaysEnabled;
     this.reset();
 }
 
@@ -418,11 +419,19 @@ WebInspector.ScriptsPanel.prototype = {
 
     debuggerWasEnabled: function()
     {
+        if (this._debuggerEnabled)
+            return;
+
+        this._debuggerEnabled = true;
         this.reset();
     },
 
     debuggerWasDisabled: function()
     {
+        if (!this._debuggerEnabled)
+            return;
+
+        this._debuggerEnabled = false;
         this.reset();
     },
 
@@ -433,7 +442,7 @@ WebInspector.ScriptsPanel.prototype = {
         delete this.currentQuery;
         this.searchCanceled();
 
-        if (!InspectorBackend.debuggerEnabled()) {
+        if (!this._debuggerEnabled) {
             this._paused = false;
             this._waitingToPause = false;
             this._stepping = false;
@@ -491,7 +500,7 @@ WebInspector.ScriptsPanel.prototype = {
 
     canShowSourceLine: function(url, line)
     {
-        if (!InspectorBackend.debuggerEnabled())
+        if (!this._debuggerEnabled)
             return false;
         return !!this._scriptOrResourceForURLAndLine(url, line);
     },
@@ -797,7 +806,7 @@ WebInspector.ScriptsPanel.prototype = {
 
     _updateDebuggerButtons: function()
     {
-        if (InspectorBackend.debuggerEnabled()) {
+        if (this._debuggerEnabled) {
             this.enableToggleButton.title = WebInspector.UIString("Debugging enabled. Click to disable.");
             this.enableToggleButton.toggled = true;
             this.pauseOnExceptionButton.visible = true;
@@ -876,7 +885,7 @@ WebInspector.ScriptsPanel.prototype = {
 
     _enableDebugging: function()
     {
-        if (InspectorBackend.debuggerEnabled())
+        if (this._debuggerEnabled)
             return;
         this._toggleDebugging(this.panelEnablerView.alwaysEnabled);
     },
@@ -887,7 +896,7 @@ WebInspector.ScriptsPanel.prototype = {
         this._waitingToPause = false;
         this._stepping = false;
 
-        if (InspectorBackend.debuggerEnabled())
+        if (this._debuggerEnabled)
             InspectorBackend.disableDebugger(true);
         else
             InspectorBackend.enableDebugger(!!optionalAlways);
diff --git a/WebCore/inspector/front-end/Settings.js b/WebCore/inspector/front-end/Settings.js
index e6fc0c3..a057777 100644
--- a/WebCore/inspector/front-end/Settings.js
+++ b/WebCore/inspector/front-end/Settings.js
@@ -38,7 +38,9 @@ var Preferences = {
     styleRulesExpandedState: {},
     showMissingLocalizedStrings: false,
     samplingCPUProfiler: false,
-    showColorNicknames: true
+    showColorNicknames: true,
+    debuggerAlwaysEnabled: false,
+    profilerAlwaysEnabled: false
 }
 
 WebInspector.populateFrontendSettings = function(settingsString)
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index fd6d270..9f43537 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -632,7 +632,7 @@ WebInspector.documentClick = function(event)
         } else {
             var profileString = WebInspector.ProfileType.URLRegExp.exec(anchor.href);
             if (profileString)
-                WebInspector.showProfile(anchor.href, anchor.lineNumber);
+                WebInspector.showProfileForURL(anchor.href);
         }
     }
 
diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js
index c871820..9696681 100644
--- a/WebKit/chromium/src/js/DevTools.js
+++ b/WebKit/chromium/src/js/DevTools.js
@@ -200,6 +200,8 @@ WebInspector.loaded = function()
     Preferences.ignoreWhitespace = false;
     Preferences.samplingCPUProfiler = true;
     Preferences.heapProfilerPresent = true;
+    Preferences.debuggerAlwaysEnabled = true;
+    Preferences.profilerAlwaysEnabled = true;
     oldLoaded.call(this);
 
     InspectorFrontendHost.loaded();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list