[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 00:48:32 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 66730fada90bc71c3d29f4c918375771fb13ce97
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 24 11:05:58 2009 +0000

    2009-12-23  Pavel Feldman  <pfeldman at chromium.org>
    
            Reviewed by Timothy Hatcher.
    
            Web Inspector: [REGRESSION] console's clear command does not work.
    
            https://bugs.webkit.org/show_bug.cgi?id=32897
    
            Test: inspector/console-clear.html
    
    WebCore:
            * inspector/InjectedScriptHost.cpp:
            (WebCore::InjectedScriptHost::clearConsoleMessages):
            * inspector/InjectedScriptHost.h:
            * inspector/InjectedScriptHost.idl:
            * inspector/InspectorBackend.cpp:
            * inspector/InspectorBackend.h:
            * inspector/InspectorBackend.idl:
            * inspector/InspectorController.cpp:
            (WebCore::InspectorController::clearConsoleMessages):
            (WebCore::InspectorController::didCommitLoad):
            * inspector/InspectorController.h:
            * inspector/front-end/ConsoleView.js:
            (WebInspector.ConsoleView):
            (WebInspector.ConsoleView.prototype.requestClearConsoleMessages):
            (WebInspector.ConsoleView.prototype.clearConsoleMessages):
            (WebInspector.ConsoleView.prototype._clearButtonClicked):
            * inspector/front-end/InjectedScript.js:
            (InjectedScript.clearConsoleMessages):
            (InjectedScript._ensureCommandLineAPIInstalled):
            * inspector/front-end/InjectedScriptAccess.js:
            * inspector/front-end/inspector.js:
            (WebInspector.clearConsoleMessages):
            (WebInspector.reset):
    LayoutTests:
            * inspector/console-clear-expected.txt: Added.
            * inspector/console-clear.html: Added.
            * inspector/console-tests.js:
            (dumpConsoleMessages.callback):
            (dumpConsoleMessages):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52545 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 0bc756c..4d71931 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -2,6 +2,20 @@
 
         Reviewed by Timothy Hatcher.
 
+        Web Inspector: [REGRESSION] console's clear command does not work.
+
+        https://bugs.webkit.org/show_bug.cgi?id=32897
+
+        * inspector/console-clear-expected.txt: Added.
+        * inspector/console-clear.html: Added.
+        * inspector/console-tests.js:
+        (dumpConsoleMessages.callback):
+        (dumpConsoleMessages):
+
+2009-12-23  Pavel Feldman  <pfeldman at chromium.org>
+
+        Reviewed by Timothy Hatcher.
+
         Web Inspector: Console dumps strings in escaped form.
 
         https://bugs.webkit.org/show_bug.cgi?id=32488
diff --git a/LayoutTests/inspector/console-tests.js b/LayoutTests/inspector/console-tests.js
index bc5d2e9..666fa8b 100755
--- a/LayoutTests/inspector/console-tests.js
+++ b/LayoutTests/inspector/console-tests.js
@@ -1,11 +1,12 @@
 // Inspected Page functions.
 
-function dumpConsoleMessages() {
+function dumpConsoleMessages(noNotifyDone) {
     function callback(result)
     {
         for (var i = 0; i < result.length; ++i)
             output(result[i].text);
-        notifyDone();
+        if (!noNotifyDone)
+            notifyDone();
     }
     evaluateInWebInspector("frontend_dumpConsoleMessages", callback);
 }
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 91630bd..bdfd82a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,40 @@
 
         Reviewed by Timothy Hatcher.
 
+        Web Inspector: [REGRESSION] console's clear command does not work.
+
+        https://bugs.webkit.org/show_bug.cgi?id=32897
+
+        Test: inspector/console-clear.html
+
+        * inspector/InjectedScriptHost.cpp:
+        (WebCore::InjectedScriptHost::clearConsoleMessages):
+        * inspector/InjectedScriptHost.h:
+        * inspector/InjectedScriptHost.idl:
+        * inspector/InspectorBackend.cpp:
+        * inspector/InspectorBackend.h:
+        * inspector/InspectorBackend.idl:
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::clearConsoleMessages):
+        (WebCore::InspectorController::didCommitLoad):
+        * inspector/InspectorController.h:
+        * inspector/front-end/ConsoleView.js:
+        (WebInspector.ConsoleView):
+        (WebInspector.ConsoleView.prototype.requestClearConsoleMessages):
+        (WebInspector.ConsoleView.prototype.clearConsoleMessages):
+        (WebInspector.ConsoleView.prototype._clearButtonClicked):
+        * inspector/front-end/InjectedScript.js:
+        (InjectedScript.clearConsoleMessages):
+        (InjectedScript._ensureCommandLineAPIInstalled):
+        * inspector/front-end/InjectedScriptAccess.js:
+        * inspector/front-end/inspector.js:
+        (WebInspector.clearConsoleMessages):
+        (WebInspector.reset):
+
+2009-12-23  Pavel Feldman  <pfeldman at chromium.org>
+
+        Reviewed by Timothy Hatcher.
+
         Web Inspector: Console dumps strings in escaped form.
 
         https://bugs.webkit.org/show_bug.cgi?id=32488
diff --git a/WebCore/inspector/InjectedScriptHost.cpp b/WebCore/inspector/InjectedScriptHost.cpp
index f326f52..a33a1aa 100644
--- a/WebCore/inspector/InjectedScriptHost.cpp
+++ b/WebCore/inspector/InjectedScriptHost.cpp
@@ -79,6 +79,12 @@ InjectedScriptHost::~InjectedScriptHost()
 {
 }
 
+void InjectedScriptHost::clearConsoleMessages()
+{
+    if (m_inspectorController)
+        m_inspectorController->clearConsoleMessages();
+}
+
 void InjectedScriptHost::copyText(const String& text)
 {
     Pasteboard::generalPasteboard()->writePlainText(text);
diff --git a/WebCore/inspector/InjectedScriptHost.h b/WebCore/inspector/InjectedScriptHost.h
index aa2fd76..49b5d20 100644
--- a/WebCore/inspector/InjectedScriptHost.h
+++ b/WebCore/inspector/InjectedScriptHost.h
@@ -58,6 +58,8 @@ public:
     InspectorController* inspectorController() { return m_inspectorController; }
     void disconnectController() { m_inspectorController = 0; }
 
+    void clearConsoleMessages();
+
     void copyText(const String& text);
     Node* nodeForId(long nodeId);
     ScriptValue wrapObject(const ScriptValue& object, const String& objectGroup);
diff --git a/WebCore/inspector/InjectedScriptHost.idl b/WebCore/inspector/InjectedScriptHost.idl
index a38dc80..a7e111c 100644
--- a/WebCore/inspector/InjectedScriptHost.idl
+++ b/WebCore/inspector/InjectedScriptHost.idl
@@ -34,6 +34,8 @@ module core {
     interface InjectedScriptHost {
         [Custom] DOMWindow inspectedWindow();
         [Custom] DOMObject wrapCallback(in DOMObject callback);
+        void clearConsoleMessages();
+
         void copyText(in DOMString text);
         [Custom] DOMObject nodeForId(in long nodeId);
         [Custom] long wrapObject(in DOMObject object, in DOMString objectGroup);
diff --git a/WebCore/inspector/InspectorBackend.cpp b/WebCore/inspector/InspectorBackend.cpp
index 11f58c7..47c3a03 100644
--- a/WebCore/inspector/InspectorBackend.cpp
+++ b/WebCore/inspector/InspectorBackend.cpp
@@ -77,12 +77,6 @@ InspectorBackend::~InspectorBackend()
 {
 }
 
-void InspectorBackend::clearMessages(bool clearUI)
-{
-    if (m_inspectorController)
-        m_inspectorController->clearConsoleMessages(clearUI);
-}
-
 void InspectorBackend::storeLastActivePanel(const String& panelName)
 {
     if (m_inspectorController)
diff --git a/WebCore/inspector/InspectorBackend.h b/WebCore/inspector/InspectorBackend.h
index d6e89fa..937c026 100644
--- a/WebCore/inspector/InspectorBackend.h
+++ b/WebCore/inspector/InspectorBackend.h
@@ -58,7 +58,6 @@ public:
     InspectorController* inspectorController() { return m_inspectorController; }
     void disconnectController() { m_inspectorController = 0; }
 
-    void clearMessages(bool clearUI);
     void storeLastActivePanel(const String& panelName);
 
     void toggleNodeSearch();
diff --git a/WebCore/inspector/InspectorBackend.idl b/WebCore/inspector/InspectorBackend.idl
index 1724515..2e2a3f5 100644
--- a/WebCore/inspector/InspectorBackend.idl
+++ b/WebCore/inspector/InspectorBackend.idl
@@ -32,7 +32,6 @@
 
 module core {
     interface InspectorBackend {
-        void clearMessages(in boolean clearUI);
         void storeLastActivePanel(in DOMString panelName);
 
         void toggleNodeSearch();
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index 9ab1f7f..d1e9e12 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -367,7 +367,7 @@ void InspectorController::addConsoleMessage(ScriptState* scriptState, ConsoleMes
     }
 }
 
-void InspectorController::clearConsoleMessages(bool clearUI)
+void InspectorController::clearConsoleMessages()
 {
     deleteAllValues(m_consoleMessages);
     m_consoleMessages.clear();
@@ -377,7 +377,7 @@ void InspectorController::clearConsoleMessages(bool clearUI)
     releaseWrapperObjectGroup("console");
     if (m_domAgent)
         m_domAgent->releaseDanglingNodes();
-    if (clearUI && m_frontend)
+    if (m_frontend)
         m_frontend->clearConsoleMessages();
 }
 
@@ -746,7 +746,7 @@ void InspectorController::didCommitLoad(DocumentLoader* loader)
     if (loader->frame() == m_inspectedPage->mainFrame()) {
         m_client->inspectedURLChanged(loader->url().string());
 
-        clearConsoleMessages(false);
+        clearConsoleMessages();
 
         m_times.clear();
         m_counts.clear();
diff --git a/WebCore/inspector/InspectorController.h b/WebCore/inspector/InspectorController.h
index cf2415a..1abd933 100644
--- a/WebCore/inspector/InspectorController.h
+++ b/WebCore/inspector/InspectorController.h
@@ -142,7 +142,7 @@ public:
 
     void addMessageToConsole(MessageSource, MessageType, MessageLevel, ScriptCallStack*);
     void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID);
-    void clearConsoleMessages(bool clearUI);
+    void clearConsoleMessages();
     const Vector<ConsoleMessage*>& consoleMessages() const { return m_consoleMessages; }
 
     void attachWindow();
diff --git a/WebCore/inspector/front-end/ConsoleView.js b/WebCore/inspector/front-end/ConsoleView.js
index 14be255..ee56812 100644
--- a/WebCore/inspector/front-end/ConsoleView.js
+++ b/WebCore/inspector/front-end/ConsoleView.js
@@ -92,7 +92,7 @@ WebInspector.ConsoleView = function(drawer)
     this._shortcuts = {};
 
     var shortcut;
-    var clearConsoleHandler = this.clearMessages.bind(this, true);
+    var clearConsoleHandler = this.requestClearMessages.bind(this);
 
     shortcut = WebInspector.KeyboardShortcut.makeKey("k", WebInspector.KeyboardShortcut.Modifiers.Meta);
     this._shortcuts[shortcut] = clearConsoleHandler;
@@ -290,10 +290,13 @@ WebInspector.ConsoleView.prototype = {
         }
     },
 
-    clearMessages: function(clearInspectorController)
+    requestClearMessages: function()
+    {
+        InjectedScriptAccess.clearConsoleMessages(function() {});
+    },
+
+    clearMessages: function()
     {
-        if (clearInspectorController)
-            InspectorBackend.clearMessages(false);
         if (WebInspector.panels.resources)
             WebInspector.panels.resources.clearMessages();
 
@@ -376,9 +379,9 @@ WebInspector.ConsoleView.prototype = {
 
     _clearButtonClicked: function()
     {
-        this.clearMessages(true);
+        this.requestClearMessages();
     },
-    
+
     _handleContextMenuEvent: function(event)
     {
         if (!window.getSelection().isCollapsed) {
diff --git a/WebCore/inspector/front-end/InjectedScript.js b/WebCore/inspector/front-end/InjectedScript.js
index 6ad3289..330af9d 100644
--- a/WebCore/inspector/front-end/InjectedScript.js
+++ b/WebCore/inspector/front-end/InjectedScript.js
@@ -877,9 +877,10 @@ InjectedScript._callFrameForId = function(id)
     return callFrame;
 }
 
-InjectedScript._clearConsoleMessages = function()
+InjectedScript.clearConsoleMessages = function()
 {
-    InjectedScriptHost.clearMessages(true);
+    InjectedScriptHost.clearConsoleMessages();
+    return true;
 }
 
 InjectedScript._inspectObject = function(o)
@@ -986,7 +987,7 @@ InjectedScript._ensureCommandLineAPIInstalled = function(evalFunction, evalObjec
         get $4() { return console._inspectorCommandLineAPI._inspectedNodes[4] }, \n\
     };");
 
-    inspectorCommandLineAPI.clear = InjectedScriptHost.wrapCallback(InjectedScript._clearConsoleMessages);
+    inspectorCommandLineAPI.clear = InjectedScriptHost.wrapCallback(InjectedScript.clearConsoleMessages);
     inspectorCommandLineAPI.inspect = InjectedScriptHost.wrapCallback(InjectedScript._inspectObject);
     inspectorCommandLineAPI.copy = InjectedScriptHost.wrapCallback(InjectedScript._copy);
 }
diff --git a/WebCore/inspector/front-end/InjectedScriptAccess.js b/WebCore/inspector/front-end/InjectedScriptAccess.js
index e1f2a36..4c04fb9 100644
--- a/WebCore/inspector/front-end/InjectedScriptAccess.js
+++ b/WebCore/inspector/front-end/InjectedScriptAccess.js
@@ -59,6 +59,7 @@ InjectedScriptAccess._installHandler("addInspectedNode");
 InjectedScriptAccess._installHandler("addStyleSelector");
 InjectedScriptAccess._installHandler("applyStyleRuleText");
 InjectedScriptAccess._installHandler("applyStyleText");
+InjectedScriptAccess._installHandler("clearConsoleMessages");
 InjectedScriptAccess._installHandler("evaluate");
 InjectedScriptAccess._installHandler("evaluateInCallFrame");
 InjectedScriptAccess._installHandler("getCompletions");
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index fbf4701..8097ff6 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -973,7 +973,7 @@ WebInspector.showConsolePanel = function()
 
 WebInspector.clearConsoleMessages = function()
 {
-    WebInspector.console.clearMessages(false);
+    WebInspector.console.clearMessages();
 }
 
 WebInspector.selectDatabase = function(o)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list