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

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 12:58:19 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f884e24be6ab384c02764eec99340e443e410d77
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 3 05:05:44 2010 +0000

    2010-09-02  Pavel Podivilov  <podivilov at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            Web Inspector: add page reload test to dom-breakpoints.html
            https://bugs.webkit.org/show_bug.cgi?id=44837
    
            * inspector/dom-breakpoints-expected.txt:
            * inspector/dom-breakpoints.html:
    2010-09-02  Pavel Podivilov  <podivilov at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            Web Inspector: persist DOM breakpoints between page reloads
            https://bugs.webkit.org/show_bug.cgi?id=44837
    
            * inspector/front-end/BreakpointsSidebarPane.js:
            (WebInspector.DOMBreakpointItem):
            * inspector/front-end/DOMAgent.js:
            (WebInspector.DOMNode.prototype.path):
            (WebInspector.DOMNode.prototype.setBreakpoint):
            (WebInspector.DOMNode.prototype.hasBreakpoint):
            (WebInspector.DOMNode.prototype.removeBreakpoint):
            (WebInspector.DOMNode.prototype.removeBreakpoints):
            (WebInspector.DOMAgent.prototype._setDocument):
            (WebInspector.DOMAgent.prototype._childNodeRemoved):
            (WebInspector.DOMAgent.prototype._removeBreakpoints):
            (WebInspector.DOMBreakpointManager):
            (WebInspector.DOMBreakpointManager.prototype.setBreakpoint):
            (WebInspector.DOMBreakpointManager.prototype.removeBreakpointsForNode):
            (WebInspector.DOMBreakpointManager.prototype._breakpointRemoved):
            (WebInspector.DOMBreakpointManager.prototype.restoreBreakpoints.restoreBreakpointsForNode):
            (WebInspector.DOMBreakpointManager.prototype.restoreBreakpoints):
            (WebInspector.DOMBreakpoint):
            (WebInspector.DOMBreakpoint.prototype.get nodeId):
            (WebInspector.DOMBreakpoint.prototype.get type):
            (WebInspector.DOMBreakpoint.prototype.set enabled):
            (WebInspector.DOMBreakpoint.prototype.remove):
            * inspector/front-end/ElementsPanel.js:
            (WebInspector.ElementsPanel.prototype.reset):
            (WebInspector.ElementsPanel.prototype.setDocument):
            * inspector/front-end/ElementsTreeOutline.js:
            (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
            * inspector/front-end/SourceFrame.js:
            (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66712 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d8489e7..0d87652 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-09-02  Pavel Podivilov  <podivilov at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: add page reload test to dom-breakpoints.html
+        https://bugs.webkit.org/show_bug.cgi?id=44837
+
+        * inspector/dom-breakpoints-expected.txt:
+        * inspector/dom-breakpoints.html:
+
 2010-09-02  François Sausset  <sausset at gmail.com>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/inspector/dom-breakpoints-expected.txt b/LayoutTests/inspector/dom-breakpoints-expected.txt
index c85b71e..2d875ec 100644
--- a/LayoutTests/inspector/dom-breakpoints-expected.txt
+++ b/LayoutTests/inspector/dom-breakpoints-expected.txt
@@ -1,20 +1,30 @@
 Tests DOM breakpoints. Bug 42886
 
 Debugger was enabled.
-Found dom node d0.
+Test that 'Subtree Modified' breakpoint is hit when appending child.
 Set subtree modified DOM breakpoint on d0.
+Append d1 to d0.
 Script execution paused.
 line: 11, function: appendElement
 Script execution resumed.
-Found dom node d1.
+Test that 'Attribute Modified' breakpoint is hit when modifying attribute.
 Set attribute modified DOM breakpoint on d1.
+Modify d1 className.
 Script execution paused.
 line: 17, function: modifyAttribute
 Script execution resumed.
-Found dom node d1.
+Test that 'Node Removed' breakpoint is hit when removing a node.
 Set node removed DOM breakpoint on d1.
+Remove d1.
 Script execution paused.
 line: 23, function: removeElement
 Script execution resumed.
+Test that DOM breakpoints are persisted between page reloads.
+Set subtree modified DOM breakpoint on d0.
+Page reloaded.
+Append d1 to d0.
+Script execution paused.
+line: 11, function: appendElement
+Script execution resumed.
 Debugger was disabled.
 
diff --git a/LayoutTests/inspector/dom-breakpoints.html b/LayoutTests/inspector/dom-breakpoints.html
index 1ae30d7..7625a47 100644
--- a/LayoutTests/inspector/dom-breakpoints.html
+++ b/LayoutTests/inspector/dom-breakpoints.html
@@ -27,6 +27,8 @@ var test = function()
 {
     InspectorTest.startDebuggerTest(step1);
 
+    var d0, d1;
+
     function step1()
     {
         findDOMNodeById("d0", step2);
@@ -34,49 +36,74 @@ var test = function()
 
     function step2(node)
     {
-        InspectorTest.addResult("Found dom node d0.");
-        WebInspector.domBreakpointManager.setBreakpoint(node, WebInspector.DOMBreakpoint.Types.SubtreeModified);
+        d0 = node;
+        InspectorTest.addResult("Test that 'Subtree Modified' breakpoint is hit when appending child.");
+        d0.setBreakpoint(WebInspector.DOMBreakpoint.Types.SubtreeModified);
         InspectorTest.addResult("Set subtree modified DOM breakpoint on d0.");
         InspectorTest.evaluateInConsole("appendElement('d0', 'd1')");
-        InspectorTest.waitUntilPaused(step3.bind(null, node));
+        InspectorTest.addResult("Append d1 to d0.");
+        InspectorTest.waitUntilPaused(step3);
     }
 
-    function step3(node, callFrames)
+    function step3(callFrames)
     {
         InspectorTest.addResult("line: " + callFrames[0].line + ", function: " + callFrames[0].functionName);
-        WebInspector.domBreakpointManager.removeBreakpointsForNode(node);
+        d0.removeBreakpoint(WebInspector.DOMBreakpoint.Types.SubtreeModified);
         InspectorTest.resumeExecution(findDOMNodeById.bind(null, "d1", step4));
     }
 
     function step4(node)
     {
-        InspectorTest.addResult("Found dom node d1.");
-        WebInspector.domBreakpointManager.setBreakpoint(node, WebInspector.DOMBreakpoint.Types.AttributeModified);
+        d1 = node;
+        InspectorTest.addResult("Test that 'Attribute Modified' breakpoint is hit when modifying attribute.");
+        d1.setBreakpoint(WebInspector.DOMBreakpoint.Types.AttributeModified);
         InspectorTest.addResult("Set attribute modified DOM breakpoint on d1.");
         InspectorTest.evaluateInConsole("modifyAttribute('d1', 'className', 'foo')");
-        InspectorTest.waitUntilPaused(step5.bind(null, node));
+        InspectorTest.addResult("Modify d1 className.");
+        InspectorTest.waitUntilPaused(step5);
     }
 
-    function step5(node, callFrames)
+    function step5(callFrames)
     {
         InspectorTest.addResult("line: " + callFrames[0].line + ", function: " + callFrames[0].functionName);
-        WebInspector.domBreakpointManager.removeBreakpointsForNode(node);
-        InspectorTest.resumeExecution(findDOMNodeById.bind(null, "d1", step6));
+        d1.removeBreakpoint(WebInspector.DOMBreakpoint.Types.AttributeModified);
+        InspectorTest.resumeExecution(step6);
     }
 
-    function step6(node)
+    function step6()
     {
-        InspectorTest.addResult("Found dom node d1.");
-        WebInspector.domBreakpointManager.setBreakpoint(node, WebInspector.DOMBreakpoint.Types.NodeRemoved);
+        InspectorTest.addResult("Test that 'Node Removed' breakpoint is hit when removing a node.");
+        d1.setBreakpoint(WebInspector.DOMBreakpoint.Types.NodeRemoved);
         InspectorTest.addResult("Set node removed DOM breakpoint on d1.");
         InspectorTest.evaluateInConsole("removeElement('d1')");
-        InspectorTest.waitUntilPaused(step7.bind(null, node));
+        InspectorTest.addResult("Remove d1.");
+        InspectorTest.waitUntilPaused(step7);
+    }
+
+    function step7(callFrames)
+    {
+        InspectorTest.addResult("line: " + callFrames[0].line + ", function: " + callFrames[0].functionName);
+        InspectorTest.resumeExecution(step8);
+    }
+
+    function step8()
+    {
+        InspectorTest.addResult("Test that DOM breakpoints are persisted between page reloads.");
+        d0.setBreakpoint(WebInspector.DOMBreakpoint.Types.SubtreeModified);
+        InspectorTest.addResult("Set subtree modified DOM breakpoint on d0.");
+        InspectorTest.reloadPage(step9);
+    }
+
+    function step9()
+    {
+        InspectorTest.evaluateInConsole("appendElement('d0', 'd1')");
+        InspectorTest.addResult("Append d1 to d0.");
+        InspectorTest.waitUntilPaused(step10);
     }
 
-    function step7(node, callFrames)
+    function step10(callFrames)
     {
         InspectorTest.addResult("line: " + callFrames[0].line + ", function: " + callFrames[0].functionName);
-        WebInspector.domBreakpointManager.removeBreakpointsForNode(node);
         InspectorTest.completeDebuggerTest();
     }
 
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f4c33ca..98a0dbe 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,40 @@
+2010-09-02  Pavel Podivilov  <podivilov at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: persist DOM breakpoints between page reloads
+        https://bugs.webkit.org/show_bug.cgi?id=44837
+
+        * inspector/front-end/BreakpointsSidebarPane.js:
+        (WebInspector.DOMBreakpointItem):
+        * inspector/front-end/DOMAgent.js:
+        (WebInspector.DOMNode.prototype.path):
+        (WebInspector.DOMNode.prototype.setBreakpoint):
+        (WebInspector.DOMNode.prototype.hasBreakpoint):
+        (WebInspector.DOMNode.prototype.removeBreakpoint):
+        (WebInspector.DOMNode.prototype.removeBreakpoints):
+        (WebInspector.DOMAgent.prototype._setDocument):
+        (WebInspector.DOMAgent.prototype._childNodeRemoved):
+        (WebInspector.DOMAgent.prototype._removeBreakpoints):
+        (WebInspector.DOMBreakpointManager):
+        (WebInspector.DOMBreakpointManager.prototype.setBreakpoint):
+        (WebInspector.DOMBreakpointManager.prototype.removeBreakpointsForNode):
+        (WebInspector.DOMBreakpointManager.prototype._breakpointRemoved):
+        (WebInspector.DOMBreakpointManager.prototype.restoreBreakpoints.restoreBreakpointsForNode):
+        (WebInspector.DOMBreakpointManager.prototype.restoreBreakpoints):
+        (WebInspector.DOMBreakpoint):
+        (WebInspector.DOMBreakpoint.prototype.get nodeId):
+        (WebInspector.DOMBreakpoint.prototype.get type):
+        (WebInspector.DOMBreakpoint.prototype.set enabled):
+        (WebInspector.DOMBreakpoint.prototype.remove):
+        * inspector/front-end/ElementsPanel.js:
+        (WebInspector.ElementsPanel.prototype.reset):
+        (WebInspector.ElementsPanel.prototype.setDocument):
+        * inspector/front-end/ElementsTreeOutline.js:
+        (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
+        * inspector/front-end/SourceFrame.js:
+        (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup):
+
 2010-09-02  Eric Seidel  <eric at webkit.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebCore/inspector/front-end/BreakpointsSidebarPane.js b/WebCore/inspector/front-end/BreakpointsSidebarPane.js
index 3a0860f..408829d 100644
--- a/WebCore/inspector/front-end/BreakpointsSidebarPane.js
+++ b/WebCore/inspector/front-end/BreakpointsSidebarPane.js
@@ -188,7 +188,8 @@ WebInspector.DOMBreakpointItem = function(breakpoint)
 {
     WebInspector.BreakpointItem.call(this, breakpoint);
 
-    var link = WebInspector.panels.elements.linkifyNodeReference(this._breakpoint.node);
+    var node = WebInspector.domAgent.nodeForId(this._breakpoint.nodeId);
+    var link = WebInspector.panels.elements.linkifyNodeReference(node);
     this._element.appendChild(link);
 
     var type = WebInspector.DOMBreakpoint.labelForType(this._breakpoint.type);
diff --git a/WebCore/inspector/front-end/DOMAgent.js b/WebCore/inspector/front-end/DOMAgent.js
index 5aaa0d3..9b386c3 100644
--- a/WebCore/inspector/front-end/DOMAgent.js
+++ b/WebCore/inspector/front-end/DOMAgent.js
@@ -143,6 +143,40 @@ WebInspector.DOMNode.prototype = {
         this.ownerDocument._domAgent.removeAttributeAsync(this, name, callback);
     },
 
+    path: function()
+    {
+        var path = [];
+        var node = this;
+        while (node && "index" in node && node.nodeName.length) {
+            path.push([node.index, node.nodeName]);
+            node = node.parentNode;
+        }
+        path.reverse();
+        return path.join(",");
+    },
+
+    setBreakpoint: function(type)
+    {
+        return WebInspector.domBreakpointManager.setBreakpoint(this.id, type, true, this.path());
+    },
+
+    hasBreakpoint: function(type)
+    {
+        return !!WebInspector.domBreakpointManager.findBreakpoint(this.id, type);
+    },
+
+    removeBreakpoint: function(type)
+    {
+        var breakpoint = WebInspector.domBreakpointManager.findBreakpoint(this.id, type);
+        if (breakpoint)
+            breakpoint.remove();
+    },
+
+    removeBreakpoints: function()
+    {
+        WebInspector.domBreakpointManager.removeBreakpointsForNode(this.id);
+    },
+
     _setAttributesPayload: function(attrs)
     {
         this.attributes = [];
@@ -362,6 +396,7 @@ WebInspector.DOMAgent.prototype = {
             this.document = new WebInspector.DOMDocument(this, this._window, payload);
             this._idToDOMNode[payload.id] = this.document;
             this._bindNodes(this.document.children);
+            WebInspector.domBreakpointManager.restoreBreakpoints();
         } else
             this.document = null;
         WebInspector.panels.elements.setDocument(this.document);
@@ -418,7 +453,17 @@ WebInspector.DOMAgent.prototype = {
         var event = { target : node, relatedNode : parent };
         this.document._fireDomEvent("DOMNodeRemoved", event);
         delete this._idToDOMNode[nodeId];
-    }
+        this._removeBreakpoints(node);
+    },
+
+    _removeBreakpoints: function(node)
+    {
+        node.removeBreakpoints();
+        if (!node.children)
+            return;
+        for (var i = 0; i < node.children.length; ++i)
+            this._removeBreakpoints(node.children[i]);
+     }
 }
 
 WebInspector.ApplicationCache = {}
@@ -679,20 +724,24 @@ WebInspector.childNodeRemoved = function()
 WebInspector.DOMBreakpointManager = function()
 {
     this._breakpoints = {};
+    this._pathCache = {};
 }
 
 WebInspector.DOMBreakpointManager.prototype = {
-    setBreakpoint: function(node, type)
+    setBreakpoint: function(nodeId, type, enabled, path)
     {
-        if (!(node.id in this._breakpoints))
-            this._breakpoints[node.id] = {};
-        else if (type in this._breakpoints[node.id])
+        if (!(nodeId in this._breakpoints))
+            this._breakpoints[nodeId] = {};
+        else if (type in this._breakpoints[nodeId])
             return;
 
-        var breakpoint = new WebInspector.DOMBreakpoint(node, type);
-        this._breakpoints[node.id][type] = breakpoint;
+        var breakpoint = new WebInspector.DOMBreakpoint(nodeId, type, enabled);
+        this._breakpoints[nodeId][type] = breakpoint;
         breakpoint.addEventListener("removed", this._breakpointRemoved, this);
 
+        if (!(nodeId in this._pathCache))
+            this._pathCache[nodeId] = path;
+
         this.dispatchEventToListeners("dom-breakpoint-added", breakpoint);
     },
 
@@ -703,9 +752,9 @@ WebInspector.DOMBreakpointManager.prototype = {
             return nodeBreakpoints[type];
     },
 
-    removeBreakpointsForNode: function(node)
+    removeBreakpointsForNode: function(nodeId)
     {
-        var nodeBreakpoints = this._breakpoints[node.id];
+        var nodeBreakpoints = this._breakpoints[nodeId];
         for (var type in nodeBreakpoints)
             nodeBreakpoints[type].remove();
     },
@@ -714,23 +763,49 @@ WebInspector.DOMBreakpointManager.prototype = {
     {
         var breakpoint = event.target;
 
-        var nodeBreakpoints = this._breakpoints[breakpoint.node.id];
+        var nodeBreakpoints = this._breakpoints[breakpoint.nodeId];
         delete nodeBreakpoints[breakpoint.type];
         for (var type in nodeBreakpoints)
             return;
-        delete this._breakpoints[breakpoint.node.id];
+
+        delete this._breakpoints[breakpoint.nodeId];
+        delete this._pathCache[breakpoint.nodeId];
+    },
+
+    restoreBreakpoints: function()
+    {
+        var breakpoints = this._breakpoints;
+        this._breakpoints = {};
+        var pathCache = this._pathCache;
+        this._pathCache = {};
+
+        for (var oldNodeId in breakpoints) {
+            var path = pathCache[oldNodeId];
+            InspectorBackend.pushNodeByPathToFrontend(path, restoreBreakpointsForNode.bind(this, breakpoints[oldNodeId], path));
+        }
+
+        function restoreBreakpointsForNode(nodeBreakpoints, path, nodeId)
+        {
+            if (!nodeId)
+                return;
+            for (var type in nodeBreakpoints) {
+                var breakpoint = nodeBreakpoints[type];
+                this.setBreakpoint(nodeId, breakpoint.type, breakpoint.enabled, path);
+            }
+        }
     }
 }
 
 WebInspector.DOMBreakpointManager.prototype.__proto__ = WebInspector.Object.prototype;
 
-WebInspector.DOMBreakpoint = function(node, type)
+WebInspector.DOMBreakpoint = function(nodeId, type, enabled)
 {
-    this.node = node;
-    this.type = type;
-    this._enabled = true;
+    this._nodeId = nodeId;
+    this._type = type;
+    this._enabled = enabled;
 
-    InspectorBackend.setDOMBreakpoint(this.node.id, this.type);
+    if (this.enabled)
+        InspectorBackend.setDOMBreakpoint(this.nodeId, this.type);
 }
 
 WebInspector.DOMBreakpoint.Types = {
@@ -762,6 +837,16 @@ WebInspector.DOMBreakpoint.contextMenuLabelForType = function(type)
 }
 
 WebInspector.DOMBreakpoint.prototype = {
+    get nodeId()
+    {
+        return this._nodeId;
+    },
+
+    get type()
+    {
+        return this._type;
+    },
+
     get enabled()
     {
         return this._enabled;
@@ -773,18 +858,18 @@ WebInspector.DOMBreakpoint.prototype = {
             return;
 
         this._enabled = enabled;
-        if (this._enabled)
-            InspectorBackend.setDOMBreakpoint(this.node.id, this.type);
+        if (this.enabled)
+            InspectorBackend.setDOMBreakpoint(this.nodeId, this.type);
         else
-            InspectorBackend.removeDOMBreakpoint(this.node.id, this.type);
+            InspectorBackend.removeDOMBreakpoint(this.nodeId, this.type);
 
         this.dispatchEventToListeners("enable-changed");
     },
 
     remove: function()
     {
-        if (this._enabled)
-            InspectorBackend.removeDOMBreakpoint(this.node.id, this.type);
+        if (this.enabled)
+            InspectorBackend.removeDOMBreakpoint(this.nodeId, this.type);
         this.dispatchEventToListeners("removed");
     }
 }
diff --git a/WebCore/inspector/front-end/ElementsPanel.js b/WebCore/inspector/front-end/ElementsPanel.js
index e1bc637..c60d4b1 100644
--- a/WebCore/inspector/front-end/ElementsPanel.js
+++ b/WebCore/inspector/front-end/ElementsPanel.js
@@ -159,16 +159,8 @@ WebInspector.ElementsPanel.prototype = {
 
     reset: function()
     {
-        if (this.focusedDOMNode) {
-            this._selectedPathOnReset = [];
-            var node = this.focusedDOMNode;
-            while ("index" in node && node.nodeName && node.nodeName.length) {
-                this._selectedPathOnReset.push(node.nodeName);
-                this._selectedPathOnReset.push(node.index);
-                node = node.parentNode;
-            }
-            this._selectedPathOnReset.reverse();
-        }
+        if (this.focusedDOMNode)
+            this._selectedPathOnReset = this.focusedDOMNode.path();
 
         this.rootDOMNode = null;
         this.focusedDOMNode = null;
@@ -225,7 +217,7 @@ WebInspector.ElementsPanel.prototype = {
         }
 
         if (this._selectedPathOnReset)
-            InspectorBackend.pushNodeByPathToFrontend(this._selectedPathOnReset.join(","), selectLastSelectedNode.bind(this));
+            InspectorBackend.pushNodeByPathToFrontend(this._selectedPathOnReset, selectLastSelectedNode.bind(this));
         else
             selectNode.call(this);
         delete this._selectedPathOnReset;
diff --git a/WebCore/inspector/front-end/ElementsTreeOutline.js b/WebCore/inspector/front-end/ElementsTreeOutline.js
index ba3b320..10131f4 100644
--- a/WebCore/inspector/front-end/ElementsTreeOutline.js
+++ b/WebCore/inspector/front-end/ElementsTreeOutline.js
@@ -765,15 +765,17 @@ WebInspector.ElementsTreeElement.prototype = {
         if (Preferences.domBreakpointsEnabled) {
             // Add debbuging-related actions
             contextMenu.appendSeparator();
-            for (var type in WebInspector.DOMBreakpoint.Types) {
-                var typeId = WebInspector.DOMBreakpoint.Types[type];
-                var label = WebInspector.DOMBreakpoint.contextMenuLabelForType(typeId);
-                var breakpoint = WebInspector.domBreakpointManager.findBreakpoint(this.representedObject.id, typeId);
-                if (!breakpoint)
-                    var handler = WebInspector.domBreakpointManager.setBreakpoint.bind(WebInspector.domBreakpointManager, this.representedObject, typeId);
+
+            var node = this.representedObject;
+            for (var key in WebInspector.DOMBreakpoint.Types) {
+                var type = WebInspector.DOMBreakpoint.Types[key];
+                var label = WebInspector.DOMBreakpoint.contextMenuLabelForType(type);
+                var hasBreakpoint = node.hasBreakpoint(type);
+                if (!hasBreakpoint)
+                    var handler = node.setBreakpoint.bind(node, type);
                 else
-                    var handler = breakpoint.remove.bind(breakpoint);
-                contextMenu.appendCheckboxItem(label, handler, !!breakpoint);
+                    var handler = node.removeBreakpoint.bind(node, type);
+                contextMenu.appendCheckboxItem(label, handler, hasBreakpoint);
             }
         }
     },
diff --git a/WebCore/inspector/front-end/SourceFrame.js b/WebCore/inspector/front-end/SourceFrame.js
index 16b8e8d..a9033f2 100644
--- a/WebCore/inspector/front-end/SourceFrame.js
+++ b/WebCore/inspector/front-end/SourceFrame.js
@@ -598,9 +598,11 @@ WebInspector.SourceFrame.prototype = {
             var popupContentElement = null;
             if (result.type !== "object" && result.type !== "node" && result.type !== "array") {
                 popupContentElement = document.createElement("span");
-                popupContentElement.className = "monospace";
+                popupContentElement.className = "monospace console-formatted-" + result.type;
                 popupContentElement.style.whiteSpace = "pre";
                 popupContentElement.textContent = result.description;
+                if (result.type === "string")
+                    popupContentElement.textContent = "\"" + popupContentElement.textContent + "\"";
                 this._popup = new WebInspector.Popover(popupContentElement);
                 this._popup.show(element);
             } else {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list