2010-12-20 Pavel Feldman <pfeldman@chromium.org>
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Dec 2010 07:11:50 +0000 (07:11 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Dec 2010 07:11:50 +0000 (07:11 +0000)
        Reviewed by Joseph Pecoraro.

        Web Inspector: cycle through tag name / attributes / new attribute on Tab.

        https://bugs.webkit.org/show_bug.cgi?id=38429

        * inspector/front-end/ElementsTreeOutline.js:
        (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.moveToNextAttributeIfNeeded):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@74397 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/inspector/front-end/ElementsTreeOutline.js

index 9851d678bc3bd66a216bae9c0c11fe3ec62a6216..8a22663ae4d6cd62fafa498e25d5d63b1db6345b 100644 (file)
@@ -1,3 +1,14 @@
+2010-12-20  Pavel Feldman  <pfeldman@chromium.org>
+
+        Reviewed by Joseph Pecoraro.
+
+        Web Inspector: cycle through tag name / attributes / new attribute on Tab.
+
+        https://bugs.webkit.org/show_bug.cgi?id=38429
+
+        * inspector/front-end/ElementsTreeOutline.js:
+        (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.moveToNextAttributeIfNeeded):
+
 2010-12-20  Yuta Kitamura  <yutak@chromium.org>
 
         Reviewed by Alexey Proskuryakov.
index 919c8f68902e83808c0765b9c7df6c227d1cc259..f25f858859a4c9aa0e41713c218d615f4724a0f6 100644 (file)
@@ -1033,8 +1033,12 @@ WebInspector.ElementsTreeElement.prototype = {
             if (!found) {
                 if (moveDirection === "backward" && attributes.length > 0)
                     moveToAttribute = attributes[attributes.length - 1].name;
-                else if (moveDirection === "forward" && !/^\s*$/.test(newText))
-                    moveToNewAttribute = true;
+                else if (moveDirection === "forward") {
+                    if (!/^\s*$/.test(newText))
+                        moveToNewAttribute = true;
+                    else
+                        moveToTagName = true;
+                }
             }
         }
 
@@ -1112,8 +1116,10 @@ WebInspector.ElementsTreeElement.prototype = {
 
         function moveToNextAttributeIfNeeded()
         {
-            if (moveDirection !== "forward")
+            if (moveDirection !== "forward") {
+                this._addNewAttribute();
                 return;
+            }
 
             var attributes = this.representedObject.attributes;
             if (attributes.length > 0)