Diff
Modified: trunk/LayoutTests/ChangeLog (135715 => 135716)
--- trunk/LayoutTests/ChangeLog 2012-11-26 14:36:05 UTC (rev 135715)
+++ trunk/LayoutTests/ChangeLog 2012-11-26 14:46:14 UTC (rev 135716)
@@ -1,5 +1,21 @@
2012-11-26 'Pavel Feldman' <pfeld...@chromium.org>
+ Not reviewed: rolling out r135714 and r135712 for breaking debug tests.
+
+ * inspector/console/command-line-api-expected.txt:
+ * inspector/console/command-line-api-inspect-expected.txt:
+ * inspector/console/console-dir-expected.txt:
+ * inspector/console/console-format-collections-expected.txt:
+ * inspector/console/console-format-expected.txt:
+ * inspector/elements/event-listener-sidebar-expected.txt:
+ * inspector/elements/event-listeners-about-blank-expected.txt:
+ * platform/chromium-linux/inspector/console/console-format-collections-expected.txt: Copied from LayoutTests/platform/chromium/inspector/console/console-format-collections-expected.txt.
+ * platform/chromium/inspector/console/command-line-api-inspect-expected.txt:
+ * platform/chromium/inspector/console/console-dir-expected.txt:
+ * platform/chromium/inspector/console/console-format-collections-expected.txt:
+
+2012-11-26 'Pavel Feldman' <pfeld...@chromium.org>
+
Not reviewed: rolling out accidental TestExpectations change.
* platform/chromium/TestExpectations:
Modified: trunk/LayoutTests/inspector/console/command-line-api-expected.txt (135715 => 135716)
--- trunk/LayoutTests/inspector/console/command-line-api-expected.txt 2012-11-26 14:36:05 UTC (rev 135715)
+++ trunk/LayoutTests/inspector/console/command-line-api-expected.txt 2012-11-26 14:46:14 UTC (rev 135716)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 1054: The console function $() has changed from $=getElementById(id) to $=querySelector(selector). You might try $("#%s")
+CONSOLE MESSAGE: line 1040: The console function $() has changed from $=getElementById(id) to $=querySelector(selector). You might try $("#%s")
Tests that command line api works.
Modified: trunk/LayoutTests/inspector/console/command-line-api-inspect-expected.txt (135715 => 135716)
--- trunk/LayoutTests/inspector/console/command-line-api-inspect-expected.txt 2012-11-26 14:36:05 UTC (rev 135715)
+++ trunk/LayoutTests/inspector/console/command-line-api-inspect-expected.txt 2012-11-26 14:46:14 UTC (rev 135716)
@@ -4,7 +4,7 @@
Running: testRevealElement
-WebInspector.inspect called with: p#p1
+WebInspector.inspect called with: <p>
WebInspector.inspect's hints are: []
inspect($('#p1')) =
Selected node id: 'p1'.
Modified: trunk/LayoutTests/inspector/console/console-dir-expected.txt (135715 => 135716)
--- trunk/LayoutTests/inspector/console/console-dir-expected.txt 2012-11-26 14:36:05 UTC (rev 135715)
+++ trunk/LayoutTests/inspector/console/console-dir-expected.txt 2012-11-26 14:46:14 UTC (rev 135716)
@@ -12,7 +12,7 @@
__proto__: Array[0] console-dir.html:9
NodeList[1]
- 0: html
+ 0: <html>
constructor: NodeListConstructor
length: 1
__proto__: NodeListPrototype console-dir.html:10
Modified: trunk/LayoutTests/inspector/console/console-format-collections-expected.txt (135715 => 135716)
--- trunk/LayoutTests/inspector/console/console-format-collections-expected.txt 2012-11-26 14:36:05 UTC (rev 135715)
+++ trunk/LayoutTests/inspector/console/console-format-collections-expected.txt 2012-11-26 14:46:14 UTC (rev 135716)
@@ -27,12 +27,12 @@
Array[2] console-format-collections.html:41
NonArrayWithLength console-format-collections.html:44
Arguments[2] console-format-collections.html:51
-[select#sel, item: function] console-format-collections.html:15
-[script, script, script, item: function, namedItem: function] console-format-collections.html:19
-[option, option, selectedIndex: 0, remove: function, namedItem: function, add: function, item: function…] console-format-collections.html:23
-[html, head, script, script, script, body, p, div, form#f, select#sel, option, option, input, input, namedItem: function, tags: function, item: function] console-format-collections.html:27
-[select#sel, input, input, namedItem: function, item: function, namedItem: function] console-format-collections.html:31
-[input, input, item: function] console-format-collections.html:35
+[<select>, item: function] console-format-collections.html:15
+[<script>, <script>, <script>, item: function, namedItem: function] console-format-collections.html:19
+[<option>, <option>, selectedIndex: 0, remove: function, namedItem: function, add: function, item: function, namedItem: function] console-format-collections.html:23
+[<html>, <head>, <script>, <script>, <script>, <body>, <p>, <div>, <form>, <select>, <option>, <option>, <input>, <input>, namedItem: function, tags: function, item: function] console-format-collections.html:27
+[<select>, <input>, <input>, namedItem: function, item: function, namedItem: function] console-format-collections.html:31
+[<input>, <input>, item: function] console-format-collections.html:35
[1, Array[2]] console-format-collections.html:41
NonArrayWithLength {keys: Array[0]} console-format-collections.html:44
[1, "2"] console-format-collections.html:51
Modified: trunk/LayoutTests/inspector/console/console-format-expected.txt (135715 => 135716)
--- trunk/LayoutTests/inspector/console/console-format-expected.txt 2012-11-26 14:36:05 UTC (rev 135715)
+++ trunk/LayoutTests/inspector/console/console-format-expected.txt 2012-11-26 14:46:14 UTC (rev 135716)
@@ -77,7 +77,7 @@
globals[4]
Error {}
<p id="p">Tests that console logging dumps proper messages.</p> console-format.html:54
-[p#p] console-format.html:55
+[<p>] console-format.html:55
globals[5]
<p id="p">Tests that console logging dumps proper messages.</p>
function () { return 1; } console-format.html:54
Modified: trunk/LayoutTests/inspector/elements/event-listener-sidebar-expected.txt (135715 => 135716)
--- trunk/LayoutTests/inspector/elements/event-listener-sidebar-expected.txt 2012-11-26 14:36:05 UTC (rev 135715)
+++ trunk/LayoutTests/inspector/elements/event-listener-sidebar-expected.txt 2012-11-26 14:46:14 UTC (rev 135716)
@@ -21,7 +21,7 @@
isAttribute: false
lineNumber: 15
listenerBody: function (event) { console.log("click - button - capturing"); }
- node: button#node
+ node: <button>
sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html
type: click
useCapture: true
@@ -29,7 +29,7 @@
isAttribute: false
lineNumber: 12
listenerBody: function clickHandler(event) { console.log("click - button - bubbling (registered before attribute)"); }
- node: button#node
+ node: <button>
sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html
type: click
useCapture: false
@@ -37,7 +37,7 @@
isAttribute: true
lineNumber: 16
listenerBody: function (event) { console.log("click - button - attribute"); }
- node: button#node
+ node: <button>
sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html
type: click
useCapture: false
@@ -45,7 +45,7 @@
isAttribute: false
lineNumber: 17
listenerBody: function (event) { console.log("click - button - bubbling (registered after attribute)"); }
- node: button#node
+ node: <button>
sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html
type: click
useCapture: false
@@ -63,7 +63,7 @@
isAttribute: false
lineNumber: 10
listenerBody: function f() {}
- node: body
+ node: <body>
sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html
type: custom event
useCapture: true
@@ -73,7 +73,7 @@
isAttribute: false
lineNumber: 14
listenerBody: function hoverHandler(event) { console.log("hover - button - bubbling"); }
- node: button#node
+ node: <button>
sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html
type: hover
useCapture: false
@@ -107,7 +107,7 @@
isAttribute: false
lineNumber: 10
listenerBody: function f() {}
- node: body
+ node: <body>
sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listener-sidebar.html
type: custom event
useCapture: true
Modified: trunk/LayoutTests/inspector/elements/event-listeners-about-blank-expected.txt (135715 => 135716)
--- trunk/LayoutTests/inspector/elements/event-listeners-about-blank-expected.txt 2012-11-26 14:36:05 UTC (rev 135715)
+++ trunk/LayoutTests/inspector/elements/event-listeners-about-blank-expected.txt 2012-11-26 14:46:14 UTC (rev 135716)
@@ -7,7 +7,7 @@
isAttribute: false
lineNumber: 9
listenerBody: function f() {}
- node: body
+ node: <body>
sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listeners-about-blank.html
type: click
useCapture: true
@@ -17,7 +17,7 @@
isAttribute: false
lineNumber: 9
listenerBody: function f() {}
- node: div#div-in-iframe
+ node: <div>
sourceName: [clipped-for-test]/LayoutTests/inspector/elements/event-listeners-about-blank.html
type: hover
useCapture: true
Modified: trunk/LayoutTests/platform/chromium/inspector/console/command-line-api-inspect-expected.txt (135715 => 135716)
--- trunk/LayoutTests/platform/chromium/inspector/console/command-line-api-inspect-expected.txt 2012-11-26 14:36:05 UTC (rev 135715)
+++ trunk/LayoutTests/platform/chromium/inspector/console/command-line-api-inspect-expected.txt 2012-11-26 14:46:14 UTC (rev 135716)
@@ -4,7 +4,7 @@
Running: testRevealElement
-WebInspector.inspect called with: p#p1
+WebInspector.inspect called with: <p>
WebInspector.inspect's hints are: []
inspect($('#p1')) =
Selected node id: 'p1'.
Modified: trunk/LayoutTests/platform/chromium/inspector/console/console-dir-expected.txt (135715 => 135716)
--- trunk/LayoutTests/platform/chromium/inspector/console/console-dir-expected.txt 2012-11-26 14:36:05 UTC (rev 135715)
+++ trunk/LayoutTests/platform/chromium/inspector/console/console-dir-expected.txt 2012-11-26 14:46:14 UTC (rev 135716)
@@ -12,7 +12,7 @@
__proto__: Array[0] console-dir.html:9
NodeList[1]
- 0: html
+ 0: <html>
length: 1
__proto__: NodeList console-dir.html:10
Modified: trunk/LayoutTests/platform/chromium/inspector/console/console-format-collections-expected.txt (135715 => 135716)
--- trunk/LayoutTests/platform/chromium/inspector/console/console-format-collections-expected.txt 2012-11-26 14:36:05 UTC (rev 135715)
+++ trunk/LayoutTests/platform/chromium/inspector/console/console-format-collections-expected.txt 2012-11-26 14:46:14 UTC (rev 135716)
@@ -2,7 +2,7 @@
CONSOLE MESSAGE: line 19: [object HTMLCollection]
CONSOLE MESSAGE: line 23: [object HTMLOptionsCollection]
CONSOLE MESSAGE: line 27: undefined
-CONSOLE MESSAGE: line 31: [object HTMLFormControlsCollection]
+CONSOLE MESSAGE: line 31: [object HTMLCollection]
CONSOLE MESSAGE: line 35: [object NodeList]
CONSOLE MESSAGE: line 41: 1,2,
CONSOLE MESSAGE: line 44: [object Object]
@@ -11,7 +11,7 @@
CONSOLE MESSAGE: line 19: [object HTMLCollection]
CONSOLE MESSAGE: line 23: [object HTMLOptionsCollection]
CONSOLE MESSAGE: line 27: undefined
-CONSOLE MESSAGE: line 31: [object HTMLFormControlsCollection]
+CONSOLE MESSAGE: line 31: [object HTMLCollection]
CONSOLE MESSAGE: line 35: [object NodeList]
CONSOLE MESSAGE: line 41: 1,2,
CONSOLE MESSAGE: line 44: [object Object]
@@ -22,17 +22,17 @@
HTMLCollection[3] console-format-collections.html:19
HTMLOptionsCollection[2] console-format-collections.html:23
HTMLAllCollection[14] console-format-collections.html:27
-HTMLFormControlsCollection[3] console-format-collections.html:31
+HTMLCollection[3] console-format-collections.html:31
NodeList[2] console-format-collections.html:35
Array[2] console-format-collections.html:41
NonArrayWithLength console-format-collections.html:44
Arguments[2] console-format-collections.html:51
-[select#sel, item: function] console-format-collections.html:15
-[script, script, script, item: function, namedItem: function] console-format-collections.html:19
-[option, option, selectedIndex: 0, namedItem: function, add: function, remove: function, item: function…] console-format-collections.html:23
-[html, head, script, script, script, body, p, div, form#f, select#sel, option, option, input, input, item: function, namedItem: function, tags: function] console-format-collections.html:27
-[select#sel, input, input, namedItem: function, item: function, namedItem: function] console-format-collections.html:31
-[input, input, item: function] console-format-collections.html:35
+[<select>, item: function] console-format-collections.html:15
+[<script>, <script>, <script>, item: function, namedItem: function] console-format-collections.html:19
+[<option>, <option>, selectedIndex: 0, add: function, remove: function, item: function, namedItem: function] console-format-collections.html:23
+[<html>, <head>, <script>, <script>, <script>, <body>, <p>, <div>, <form>, <select>, <option>, <option>, <input>, <input>, item: function, namedItem: function, tags: function] console-format-collections.html:27
+[<select>, <input>, <input>, item: function, namedItem: function] console-format-collections.html:31
+[<input>, <input>, item: function] console-format-collections.html:35
[1, Array[2]] console-format-collections.html:41
NonArrayWithLength {keys: Array[0]} console-format-collections.html:44
[1, "2"] console-format-collections.html:51
Copied: trunk/LayoutTests/platform/chromium-linux/inspector/console/console-format-collections-expected.txt (from rev 135715, trunk/LayoutTests/platform/chromium/inspector/console/console-format-collections-expected.txt) (0 => 135716)
--- trunk/LayoutTests/platform/chromium-linux/inspector/console/console-format-collections-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/chromium-linux/inspector/console/console-format-collections-expected.txt 2012-11-26 14:46:14 UTC (rev 135716)
@@ -0,0 +1,39 @@
+CONSOLE MESSAGE: line 15: [object NodeList]
+CONSOLE MESSAGE: line 19: [object HTMLCollection]
+CONSOLE MESSAGE: line 23: [object HTMLOptionsCollection]
+CONSOLE MESSAGE: line 27: undefined
+CONSOLE MESSAGE: line 31: [object HTMLFormControlsCollection]
+CONSOLE MESSAGE: line 35: [object NodeList]
+CONSOLE MESSAGE: line 41: 1,2,
+CONSOLE MESSAGE: line 44: [object Object]
+CONSOLE MESSAGE: line 51: [object Arguments]
+CONSOLE MESSAGE: line 15: [object NodeList]
+CONSOLE MESSAGE: line 19: [object HTMLCollection]
+CONSOLE MESSAGE: line 23: [object HTMLOptionsCollection]
+CONSOLE MESSAGE: line 27: undefined
+CONSOLE MESSAGE: line 31: [object HTMLFormControlsCollection]
+CONSOLE MESSAGE: line 35: [object NodeList]
+CONSOLE MESSAGE: line 41: 1,2,
+CONSOLE MESSAGE: line 44: [object Object]
+CONSOLE MESSAGE: line 51: [object Arguments]
+Tests that console nicely formats HTML Collections and NodeLists.
+
+NodeList[1] console-format-collections.html:15
+HTMLCollection[3] console-format-collections.html:19
+HTMLOptionsCollection[2] console-format-collections.html:23
+HTMLAllCollection[14] console-format-collections.html:27
+HTMLFormControlsCollection[3] console-format-collections.html:31
+NodeList[2] console-format-collections.html:35
+Array[2] console-format-collections.html:41
+NonArrayWithLength console-format-collections.html:44
+Arguments[2] console-format-collections.html:51
+[<select>, item: function] console-format-collections.html:15
+[<script>, <script>, <script>, item: function, namedItem: function] console-format-collections.html:19
+[<option>, <option>, selectedIndex: 0, namedItem: function, add: function, remove: function, item: function, namedItem: function] console-format-collections.html:23
+[<html>, <head>, <script>, <script>, <script>, <body>, <p>, <div>, <form>, <select>, <option>, <option>, <input>, <input>, item: function, namedItem: function, tags: function] console-format-collections.html:27
+[<select>, <input>, <input>, namedItem: function, item: function, namedItem: function] console-format-collections.html:31
+[<input>, <input>, item: function] console-format-collections.html:35
+[1, Array[2]] console-format-collections.html:41
+NonArrayWithLength {keys: Array[0]} console-format-collections.html:44
+[1, "2"] console-format-collections.html:51
+
Modified: trunk/Source/WebCore/ChangeLog (135715 => 135716)
--- trunk/Source/WebCore/ChangeLog 2012-11-26 14:36:05 UTC (rev 135715)
+++ trunk/Source/WebCore/ChangeLog 2012-11-26 14:46:14 UTC (rev 135716)
@@ -1,3 +1,13 @@
+2012-11-26 'Pavel Feldman' <pfeld...@chromium.org>
+
+ Not reviewed: rolling out r135714 and r135712 for breaking debug tests.
+
+ * inspector/InjectedScriptSource.js:
+ (.):
+ * inspector/InspectorOverlayPage.html:
+ * inspector/front-end/ConsoleMessage.js:
+ (WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
+
2012-11-26 Zeno Albisser <z...@webkit.org>
[Qt][Win] buildfix after r135706.
Modified: trunk/Source/WebCore/inspector/InjectedScriptSource.js (135715 => 135716)
--- trunk/Source/WebCore/inspector/InjectedScriptSource.js 2012-11-26 14:36:05 UTC (rev 135715)
+++ trunk/Source/WebCore/inspector/InjectedScriptSource.js 2012-11-26 14:46:14 UTC (rev 135716)
@@ -723,9 +723,7 @@
var description = obj.nodeName.toLowerCase();
switch (obj.nodeType) {
case 1 /* Node.ELEMENT_NODE */:
- description += obj.id ? "#" + obj.id : "";
- var className = obj.className;
- description += className ? "." + className : "";
+ description = "<" + description + ">";
break;
case 10 /*Node.DOCUMENT_TYPE_NODE */:
description = "<!DOCTYPE " + description + ">";
@@ -822,22 +820,22 @@
this.preview.properties = [];
var isArray = this.subtype === "array";
- this._propertiesToDump = 5;
- this._indexesToDump = 100;
+ var elementsToDump = isArray ? 100 : 5;
for (var o = object; injectedScript._isDefined(o); o = o.__proto__)
- this._generateProtoPreview(o);
+ this._generateProtoPreview(o, elementsToDump);
},
/**
* @param {Object} object
+ * @param {number} elementsToDump
*/
- _generateProtoPreview: function(object)
+ _generateProtoPreview: function(object, elementsToDump)
{
var propertyNames = Object.keys(/** @type {!Object} */(object));
try {
for (var i = 0; i < propertyNames.length; ++i) {
- if (!this._propertiesToDump || !this._indexesToDump) {
+ if (this.preview.properties.length >= elementsToDump) {
this.preview.overflow = true;
this.preview.lossless = false;
break;
@@ -854,7 +852,7 @@
var value = descriptor.value;
if (value === null) {
- this._appendPropertyPreview({ name: name, type: "object", value: "null" });
+ this.preview.properties.push({ name: name, type: "object", value: "null" });
continue;
}
@@ -869,7 +867,7 @@
}
value = "\"" + value.replace(/\n/g, "\u21B5") + "\"";
}
- this._appendPropertyPreview({ name: name, type: type, value: value + "" });
+ this.preview.properties.push({ name: name, type: type, value: value + "" });
continue;
}
@@ -883,25 +881,13 @@
var property = { name: name, type: type, value: description };
if (subtype)
property.subtype = subtype;
- this._appendPropertyPreview(property);
+ this.preview.properties.push(property);
}
} catch (e) {
}
},
/**
- * @param {Object} property
- */
- _appendPropertyPreview: function(property)
- {
- if (isNaN(property.name))
- this._propertiesToDump--;
- else
- this._indexesToDump--;
- this.preview.properties.push(property);
- },
-
- /**
* @param {string} string
* @param {number} maxLength
* @param {boolean=} middle
Modified: trunk/Source/WebCore/inspector/InspectorOverlayPage.html (135715 => 135716)
--- trunk/Source/WebCore/inspector/InspectorOverlayPage.html 2012-11-26 14:36:05 UTC (rev 135715)
+++ trunk/Source/WebCore/inspector/InspectorOverlayPage.html 2012-11-26 14:46:14 UTC (rev 135716)
@@ -83,20 +83,13 @@
}
#tag-name {
- /* Keep this in sync with view-source.css (.webkit-html-tag-name) */
color: rgb(136, 18, 128);
}
#node-id {
- /* Keep this in sync with view-source.css (.webkit-html-attribute-value) */
color: rgb(26, 26, 166);
}
-#class-name {
- /* Keep this in sync with view-source.css (.webkit-html-attribute-name) */
- color: rgb(153, 69, 0);
-}
-
#right-gutter {
display: none;
right: 0;
@@ -342,11 +335,8 @@
return;
document.getElementById("tag-name").textContent = elementInfo.tagName;
- document.getElementById("node-id").textContent = elementInfo.idValue ? "#" + elementInfo.idValue : "";
- var className = elementInfo.className;
- if (className.length > 50)
- className = className.substring(0, 50) + "\u2026";
- document.getElementById("class-name").textContent = className;
+ document.getElementById("node-id").textContent = elementInfo.nodeId ? "#" + elementInfo.nodeId : "";
+ document.getElementById("class-name").textContent = elementInfo.className || "";
document.getElementById("node-width").textContent = elementInfo.nodeWidth;
document.getElementById("node-height").textContent = elementInfo.nodeHeight;
var elementTitle = document.getElementById("element-title");
Modified: trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js (135715 => 135716)
--- trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js 2012-11-26 14:36:05 UTC (rev 135715)
+++ trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js 2012-11-26 14:46:14 UTC (rev 135716)
@@ -322,7 +322,17 @@
titleElement.createTextChild(": ");
}
- this._appendPropertyPreview(titleElement, property);
+ var span = titleElement.createChild("span", "console-formatted-" + property.type);
+ if (property.type === "object") {
+ if (property.subtype === "node")
+ span.addStyleClass("console-formatted-preview-node");
+ else if (property.subtype === "regexp")
+ span.addStyleClass("console-formatted-string");
+ span.textContent = property.value;
+ } else if (property.type === "function")
+ span.textContent = "function";
+ else
+ span.textContent = property.value;
}
if (preview.overflow)
titleElement.createChild("span").textContent = "\u2026";
@@ -330,39 +340,6 @@
return preview.lossless;
},
- /**
- * @param {Element} titleElement
- * @param {RuntimeAgent.PropertyPreview} property
- */
- _appendPropertyPreview: function(titleElement, property)
- {
- var span = titleElement.createChild("span", "console-formatted-" + property.type);
-
- if (property.type === "function") {
- span.textContent = "function";
- return;
- }
-
- if (property.type === "object" && property.subtype === "regexp") {
- span.addStyleClass("console-formatted-string");
- span.textContent = property.value;
- return;
- }
-
- if (property.type === "object" && property.subtype === "node") {
- span.addStyleClass("console-formatted-preview-node");
- var match = property.value.match(/([^#.]+)(#[^.]+)?(\..*)?/);
- span.createChild("span", "webkit-html-tag-name").textContent = match[1];
- if (match[2])
- span.createChild("span", "webkit-html-attribute-value").textContent = match[2];
- if (match[3])
- span.createChild("span", "webkit-html-attribute-name").textContent = match[3];
- return;
- }
-
- span.textContent = property.value;
- },
-
_formatParameterAsNode: function(object, elem)
{
function printNode(nodeId)