[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

joepeck at webkit.org joepeck at webkit.org
Thu Oct 29 20:49:34 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit ae1ceb6deddee1b19adefde64424e0cc7051dc83
Author: joepeck at webkit.org <joepeck at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 21 13:45:12 2009 +0000

    2009-10-20  Joseph Pecoraro  <joepeck at webkit.org>
    
            Reviewed by Timothy Hatcher.
    
            Web Inspector: Selectors in the Styles pane should trigger a search for that selector when clicked
            https://bugs.webkit.org/show_bug.cgi?id=17126
    
            * inspector/front-end/ElementsPanel.js:
            (WebInspector.ElementsPanel.prototype.addNodesToSearchResult): only change focusedDOMNode on a manual search
            * inspector/front-end/StylesSidebarPane.js:
            (WebInspector.StylePropertiesSection.prototype._clickSelector): trigger a search
            * inspector/front-end/ElementsTreeOutline.js:
            (WebInspector.ElementsTreeElement.prototype._startEditing): correctly start editing attribute value instead of name
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49904 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index fd08746..2deab4a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2009-10-20  Joseph Pecoraro  <joepeck at webkit.org>
+
+        Reviewed by Timothy Hatcher.
+
+        Web Inspector: Selectors in the Styles pane should trigger a search for that selector when clicked
+        https://bugs.webkit.org/show_bug.cgi?id=17126
+
+        * inspector/front-end/ElementsPanel.js:
+        (WebInspector.ElementsPanel.prototype.addNodesToSearchResult): only change focusedDOMNode on a manual search
+        * inspector/front-end/StylesSidebarPane.js:
+        (WebInspector.StylePropertiesSection.prototype._clickSelector): trigger a search
+        * inspector/front-end/ElementsTreeOutline.js:
+        (WebInspector.ElementsTreeElement.prototype._startEditing): correctly start editing attribute value instead of name
+
 2009-10-20  Pavel Feldman  <pfeldman at chromium.org>
 
         Reviewed by Timothy Hatcher.
diff --git a/WebCore/inspector/front-end/ElementsPanel.js b/WebCore/inspector/front-end/ElementsPanel.js
index 5d0e6d7..aa6319c 100644
--- a/WebCore/inspector/front-end/ElementsPanel.js
+++ b/WebCore/inspector/front-end/ElementsPanel.js
@@ -268,7 +268,12 @@ WebInspector.ElementsPanel.prototype = {
 
             if (!this._searchResults.length) {
                 this._currentSearchResultIndex = 0;
-                this.focusedDOMNode = node;
+
+                // Only change the focusedDOMNode if the search was manually performed, because
+                // the search may have been performed programmatically and we wouldn't want to
+                // change the current focusedDOMNode.
+                if (WebInspector.currentFocusElement === document.getElementById("search"))
+                    this.focusedDOMNode = node;
             }
 
             this._searchResults.push(node);
diff --git a/WebCore/inspector/front-end/ElementsTreeOutline.js b/WebCore/inspector/front-end/ElementsTreeOutline.js
index c4bd372..6e7e088 100644
--- a/WebCore/inspector/front-end/ElementsTreeOutline.js
+++ b/WebCore/inspector/front-end/ElementsTreeOutline.js
@@ -578,7 +578,7 @@ WebInspector.ElementsTreeElement.prototype = {
             this.toggleNewAttributeButton(false);
             var attribute = listItem.getElementsByClassName("webkit-html-attribute")[0];
             if (attribute)
-                return this._startEditingAttribute(attribute, attribute.getElementsByClassName("webkit-html-attribute-name")[0]);
+                return this._startEditingAttribute(attribute, attribute.getElementsByClassName("webkit-html-attribute-value")[0]);
 
             return this._addNewAttribute(listItem);
         }
diff --git a/WebCore/inspector/front-end/StylesSidebarPane.js b/WebCore/inspector/front-end/StylesSidebarPane.js
index 3582f96..a95dae3 100644
--- a/WebCore/inspector/front-end/StylesSidebarPane.js
+++ b/WebCore/inspector/front-end/StylesSidebarPane.js
@@ -376,7 +376,7 @@ WebInspector.StylePropertiesSection = function(styleRule, subtitle, computedStyl
 {
     WebInspector.PropertiesSection.call(this, styleRule.selectorText);
 
-    this.titleElement.addEventListener("click", function(e) { e.stopPropagation(); }, false);
+    this.titleElement.addEventListener("click", this._clickSelector.bind(this), false);
     this.titleElement.addEventListener("dblclick", this._dblclickSelector.bind(this), false);
     this.element.addEventListener("dblclick", this._dblclickEmptySpace.bind(this), false);
 
@@ -591,6 +591,19 @@ WebInspector.StylePropertiesSection.prototype = {
         return item;
     },
 
+    _clickSelector: function(event)
+    {
+        event.stopPropagation();
+
+        // Don't search "Computed Styles", "Style Attribute", or Mapped Attributes.
+        if (this.computedStyle || !this.rule || this.rule.isUser)
+            return;
+
+        var searchElement = document.getElementById("search");
+        searchElement.value = this.styleRule.selectorText;
+        WebInspector.performSearch({ target: searchElement });
+    },
+
     _dblclickEmptySpace: function(event)
     {
         this.expand();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list