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

joepeck at webkit.org joepeck at webkit.org
Wed Dec 22 12:44:18 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ef12d0dd9760b8bee4e3b7e04957da5b565350a0
Author: joepeck at webkit.org <joepeck at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Aug 28 00:08:32 2010 +0000

    2010-08-26  Joseph Pecoraro  <joepeck at webkit.org>
    
    Reviewed by Pavel Feldman.
    
    LayoutTests:
    
        2010-08-26  Joseph Pecoraro  <joepeck at webkit.org>
    
                Web Inspector: attribute nodes don't get rendered in the console
                https://bugs.webkit.org/show_bug.cgi?id=44736
    
                Add formatting tests for attribute nodes.
    
                * inspector/console-format-expected.txt:
                * inspector/console-format.html:
    
    WebCore:
    
        2010-08-26  Joseph Pecoraro  <joepeck at webkit.org>
    
                Web Inspector: attribute nodes don't get rendered in the console
                https://bugs.webkit.org/show_bug.cgi?id=44736
    
                Extended Test: inspector/console-format.html
    
                * inspector/InspectorDOMAgent.cpp:
                (WebCore::InspectorDOMAgent::buildObjectForNode): add "name" and "value" properties for Attribute nodes.
                * inspector/front-end/DOMAgent.js:
                (WebInspector.DOMNode): add "name" and "value" properties for Attribute nodes.
                * inspector/front-end/ElementsTreeOutline.js: display html for Attribute nodes.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66282 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 32eddc8..1473abb 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-26  Joseph Pecoraro  <joepeck at webkit.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: attribute nodes don't get rendered in the console
+        https://bugs.webkit.org/show_bug.cgi?id=44736
+
+        Add formatting tests for attribute nodes.
+
+        * inspector/console-format-expected.txt:
+        * inspector/console-format.html:
+
 2010-08-27  Ryosuke Niwa  <rniwa at webkit.org>
 
         Unreviewed; chromium rebaseline for r66247.
diff --git a/LayoutTests/inspector/console-format-expected.txt b/LayoutTests/inspector/console-format-expected.txt
index c3d0593..648134c 100644
--- a/LayoutTests/inspector/console-format-expected.txt
+++ b/LayoutTests/inspector/console-format-expected.txt
@@ -4,34 +4,40 @@ CONSOLE MESSAGE: line 14: Object %o
 CONSOLE MESSAGE: line 20: test,test2,,,test4
 CONSOLE MESSAGE: line 21: %o
 CONSOLE MESSAGE: line 22: %O
-CONSOLE MESSAGE: line 52: /^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i
-CONSOLE MESSAGE: line 53: /^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i
-CONSOLE MESSAGE: line 52: /foo\\bar\sbaz/i
-CONSOLE MESSAGE: line 53: /foo\\bar\sbaz/i
-CONSOLE MESSAGE: line 52: test
-CONSOLE MESSAGE: line 53: test
-CONSOLE MESSAGE: line 52: test named "test"
-CONSOLE MESSAGE: line 53: test named "test"
-CONSOLE MESSAGE: line 52: Error: Unknown error
-CONSOLE MESSAGE: line 53: Error: Unknown error
-CONSOLE MESSAGE: line 52: [object HTMLBodyElement]
-CONSOLE MESSAGE: line 53: [object HTMLBodyElement]
-CONSOLE MESSAGE: line 52: function () { return 1; }
-CONSOLE MESSAGE: line 53: function () { return 1; }
-CONSOLE MESSAGE: line 52: function () {
+CONSOLE MESSAGE: line 60: /^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i
+CONSOLE MESSAGE: line 61: /^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i
+CONSOLE MESSAGE: line 60: /foo\\bar\sbaz/i
+CONSOLE MESSAGE: line 61: /foo\\bar\sbaz/i
+CONSOLE MESSAGE: line 60: test
+CONSOLE MESSAGE: line 61: test
+CONSOLE MESSAGE: line 60: test named "test"
+CONSOLE MESSAGE: line 61: test named "test"
+CONSOLE MESSAGE: line 60: Error: Unknown error
+CONSOLE MESSAGE: line 61: Error: Unknown error
+CONSOLE MESSAGE: line 60: [object HTMLBodyElement]
+CONSOLE MESSAGE: line 61: [object HTMLBodyElement]
+CONSOLE MESSAGE: line 60: function () { return 1; }
+CONSOLE MESSAGE: line 61: function () { return 1; }
+CONSOLE MESSAGE: line 60: function () {
         return 2;
     }
-CONSOLE MESSAGE: line 53: function () {
+CONSOLE MESSAGE: line 61: function () {
         return 2;
     }
-CONSOLE MESSAGE: line 52: 0.12
-CONSOLE MESSAGE: line 53: 0.12
-CONSOLE MESSAGE: line 52: http://webkit.org/
-CONSOLE MESSAGE: line 53: http://webkit.org/
-CONSOLE MESSAGE: line 52: null
-CONSOLE MESSAGE: line 53: 
-CONSOLE MESSAGE: line 52: undefined
-CONSOLE MESSAGE: line 53: 
+CONSOLE MESSAGE: line 60: 0.12
+CONSOLE MESSAGE: line 61: 0.12
+CONSOLE MESSAGE: line 60: http://webkit.org/
+CONSOLE MESSAGE: line 61: http://webkit.org/
+CONSOLE MESSAGE: line 60: null
+CONSOLE MESSAGE: line 61: 
+CONSOLE MESSAGE: line 60: undefined
+CONSOLE MESSAGE: line 61: 
+CONSOLE MESSAGE: line 60: [object Attr]
+CONSOLE MESSAGE: line 61: [object Attr]
+CONSOLE MESSAGE: line 60: [object Attr]
+CONSOLE MESSAGE: line 61: [object Attr]
+CONSOLE MESSAGE: line 60: [object Attr]
+CONSOLE MESSAGE: line 61: [object Attr]
 Tests that console logging dumps proper messages.
 
 console-format.html:12Message format number 1, 2 and 3.5
@@ -40,46 +46,55 @@ console-format.html:14Object Object
 console-format.html:20["test", "test2", undefined, undefined, "test4"]
 console-format.html:21["test", "test2", undefined, undefined, "test4"]
 console-format.html:22Array[5]
-console-format.html:52/^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i
-console-format.html:53[/^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i]
+console-format.html:60/^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i
+console-format.html:61[/^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i]
 /^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i
-console-format.html:52/foo\\bar\sbaz/i
-console-format.html:53[/foo\\bar\sbaz/i]
+console-format.html:60/foo\\bar\sbaz/i
+console-format.html:61[/foo\\bar\sbaz/i]
 /foo\\bar\sbaz/i
-console-format.html:52test
-console-format.html:53["test"]
+console-format.html:60test
+console-format.html:61["test"]
 "test"
-console-format.html:52test named "test"
-console-format.html:53["test named "test""]
+console-format.html:60test named "test"
+console-format.html:61["test named "test""]
 "test named "test""
-console-format.html:52Error: Unknown error
-console-format.html:53[Error: Unknown error]
+console-format.html:60Error: Unknown error
+console-format.html:61[Error: Unknown error]
 Error: Unknown error
-console-format.html:52<body onload="onload()">…</body>
-console-format.html:53[<body onload="onload()">…</body>]
+console-format.html:60<body onload="onload()">…</body>
+console-format.html:61[<body onload="onload()">…</body>]
 <body onload="onload()">…</body>
-console-format.html:52function () { return 1; }
-console-format.html:53[function () { return 1; }]
+console-format.html:60function () { return 1; }
+console-format.html:61[function () { return 1; }]
 function () { return 1; }
-console-format.html:52function () {
+console-format.html:60function () {
         return 2;
     }
-console-format.html:53[function () {
+console-format.html:61[function () {
         return 2;
     }]
 function () {
         return 2;
     }
-console-format.html:520.12
-console-format.html:53[0.12]
+console-format.html:600.12
+console-format.html:61[0.12]
 0.12
-console-format.html:52http://webkit.org/
-console-format.html:53["http://webkit.org/"]
+console-format.html:60http://webkit.org/
+console-format.html:61["http://webkit.org/"]
 "http://webkit.org/"
-console-format.html:52null
-console-format.html:53[null]
+console-format.html:60null
+console-format.html:61[null]
 null
-console-format.html:52undefined
-console-format.html:53[undefined]
+console-format.html:60undefined
+console-format.html:61[undefined]
 undefined
+console-format.html:60attr=""
+console-format.html:61[attr=""]
+attr=""
+console-format.html:60attr="value"
+console-format.html:61[attr="value"]
+attr="value"
+console-format.html:60id="x"
+console-format.html:61[id="x"]
+id="x"
 
diff --git a/LayoutTests/inspector/console-format.html b/LayoutTests/inspector/console-format.html
index f06a3c0..c34eecb 100755
--- a/LayoutTests/inspector/console-format.html
+++ b/LayoutTests/inspector/console-format.html
@@ -35,7 +35,15 @@ function doit()
     var num = 1.2e-1;
     var linkify = "http://webkit.org/";
 
-    globals = [regex1, regex2, str, str2, error, node, func, multilinefunc, num, linkify, null, undefined];
+    var valuelessAttribute = document.createAttribute("attr");
+    var valuedAttribute = document.createAttribute("attr");
+    valuedAttribute.value = "value";
+    var existingAttribute = document.getElementById("x").attributes[0];
+
+    globals = [
+        regex1, regex2, str, str2, error, node, func, multilinefunc, num, linkify,
+        null, undefined, valuelessAttribute, valuedAttribute, existingAttribute
+    ];
     loopOverGlobals(0);
 }
 
@@ -79,6 +87,7 @@ function frontend_evalExpression(expression)
 </head>
 
 <body onload="onload()">
+<div id="x"></div>
 <p>
 Tests that console logging dumps proper messages.
 </p>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d52239d..f9fd20a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-26  Joseph Pecoraro  <joepeck at webkit.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: attribute nodes don't get rendered in the console
+        https://bugs.webkit.org/show_bug.cgi?id=44736
+
+        Extended Test: inspector/console-format.html
+
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::buildObjectForNode): add "name" and "value" properties for Attribute nodes.
+        * inspector/front-end/DOMAgent.js:
+        (WebInspector.DOMNode): add "name" and "value" properties for Attribute nodes.
+        * inspector/front-end/ElementsTreeOutline.js: display html for Attribute nodes.
+
 2010-08-27  Adam Barth  <abarth at webkit.org>
 
         Rubber-stamped by Eric Seidel.
diff --git a/WebCore/inspector/InspectorDOMAgent.cpp b/WebCore/inspector/InspectorDOMAgent.cpp
index ef7cf8e..82827bd 100644
--- a/WebCore/inspector/InspectorDOMAgent.cpp
+++ b/WebCore/inspector/InspectorDOMAgent.cpp
@@ -33,6 +33,7 @@
 
 #if ENABLE(INSPECTOR)
 
+#include "Attr.h"
 #include "CSSComputedStyleDeclaration.h"
 #include "CSSMutableStyleDeclaration.h"
 #include "CSSPropertyNames.h"
@@ -843,6 +844,10 @@ PassRefPtr<InspectorObject> InspectorDOMAgent::buildObjectForNode(Node* node, in
         value->setString("publicId", docType->publicId());
         value->setString("systemId", docType->systemId());
         value->setString("internalSubset", docType->internalSubset());
+    } else if (node->nodeType() == Node::ATTRIBUTE_NODE) {
+        Attr* attribute = static_cast<Attr*>(node);
+        value->setString("name", attribute->name());
+        value->setString("value", attribute->value());
     }
     return value.release();
 }
diff --git a/WebCore/inspector/front-end/DOMAgent.js b/WebCore/inspector/front-end/DOMAgent.js
index 83dc892..5aaa0d3 100644
--- a/WebCore/inspector/front-end/DOMAgent.js
+++ b/WebCore/inspector/front-end/DOMAgent.js
@@ -72,8 +72,12 @@ WebInspector.DOMNode = function(doc, payload) {
         this.publicId = payload.publicId;
         this.systemId = payload.systemId;
         this.internalSubset = payload.internalSubset;
-    } else if (this.nodeType === Node.DOCUMENT_NODE)
+    } else if (this.nodeType === Node.DOCUMENT_NODE) {
         this.documentURL = payload.documentURL;
+    } else if (this.nodeType === Node.ATTRIBUTE_NODE) {
+        this.name = payload.name;
+        this.value = payload.value;
+    }
 }
 
 WebInspector.DOMNode.prototype = {
diff --git a/WebCore/inspector/front-end/ElementsTreeOutline.js b/WebCore/inspector/front-end/ElementsTreeOutline.js
index 69c1d28..ba3b320 100644
--- a/WebCore/inspector/front-end/ElementsTreeOutline.js
+++ b/WebCore/inspector/front-end/ElementsTreeOutline.js
@@ -1264,6 +1264,11 @@ WebInspector.ElementsTreeElement.prototype = {
                 info.title = "Document Fragment";
                 break;
 
+            case Node.ATTRIBUTE_NODE:
+                var value = node.value || "\u200B"; // Zero width space to force showing an empty value.
+                info.title = this._attributeHTML(node.name, value);
+                break;
+
             case Node.ELEMENT_NODE:
                 var tagName = this.treeOutline.nodeNameToCorrectCase(node.nodeName).escapeHTML();
                 if (this._elementCloseTag) {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list