Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / devtools / front_end / StylesSidebarPane.js
index 46fa726..15a9aed 100644 (file)
@@ -733,7 +733,7 @@ WebInspector.StylesSidebarPane.prototype = {
      */
     addBlankSection: function()
     {
-        var blankSection = new WebInspector.BlankStylePropertiesSection(this, this.node ? WebInspector.DOMPresentationUtils.appropriateSelectorFor(this.node, true) : "");
+        var blankSection = new WebInspector.BlankStylePropertiesSection(this, this.node ? WebInspector.DOMPresentationUtils.simpleSelector(this.node) : "");
 
         var elementStyleSection = this.sections[0][1];
         this._sectionsContainer.insertBefore(blankSection.element, elementStyleSection.element.nextSibling);
@@ -970,7 +970,6 @@ WebInspector.StylePropertiesSection = function(parentPane, styleRule, editable,
                     // The "linkedStylesheet" case.
                     anchor = WebInspector.linkifyResourceAsNode(media.sourceURL, undefined, "subtitle", media.sourceURL);
                 }
-                anchor.preferredPanel = "sources";
                 anchor.style.float = "right";
                 refElement.appendChild(anchor);
             }
@@ -1042,6 +1041,11 @@ WebInspector.StylePropertiesSection.prototype = {
         // Overriding with empty body.
     },
 
+    handleClick: function()
+    {
+        // Avoid consuming events.
+    },
+
     /**
      * @param {string} propertyName
      * @return {boolean}
@@ -1296,7 +1300,6 @@ WebInspector.StylePropertiesSection.prototype = {
         function linkifyUncopyable(url, line)
         {
             var link = WebInspector.linkifyResourceAsNode(url, line, "", url + ":" + (line + 1));
-            link.preferredPanel = "sources";
             link.classList.add("webkit-html-resource-link");
             link.setAttribute("data-uncopyable", link.textContent);
             link.textContent = "";
@@ -1351,8 +1354,7 @@ WebInspector.StylePropertiesSection.prototype = {
             var index = event.target._selectorIndex;
             var styleSheetHeader = WebInspector.cssModel.styleSheetHeaderForId(this.rule.id.styleSheetId);
             var uiLocation = styleSheetHeader.rawLocationToUILocation(this.rule.lineNumberInSource(index), this.rule.columnNumberInSource(index));
-            if (uiLocation)
-                uiLocation.reveal();
+            WebInspector.Revealer.reveal(uiLocation);
             return;
         }
         this._startEditingOnMouseEvent();
@@ -1385,8 +1387,8 @@ WebInspector.StylePropertiesSection.prototype = {
         element.scrollIntoViewIfNeeded(false);
         element.textContent = element.textContent; // Reset selector marks in group.
 
-        var config = new WebInspector.EditingConfig(this.editingSelectorCommitted.bind(this), this.editingSelectorCancelled.bind(this));
-        WebInspector.startEditing(this._selectorElement, config);
+        var config = new WebInspector.InplaceEditor.Config(this.editingSelectorCommitted.bind(this), this.editingSelectorCancelled.bind(this));
+        WebInspector.InplaceEditor.startEditing(this._selectorElement, config);
 
         window.getSelection().setBaseAndExtent(element, 0, element, 1);
         this._parentPane._isEditingStyle = true;
@@ -2380,9 +2382,7 @@ WebInspector.StylePropertyTreeElement.prototype = {
     {
         console.assert(this.section().navigable);
         var propertyNameClicked = element === this.nameElement;
-        var uiLocation = this.property.uiLocation(propertyNameClicked);
-        if (uiLocation)
-            uiLocation.reveal();
+        WebInspector.Revealer.reveal(this.property.uiLocation(propertyNameClicked));
     },
 
     /**