Title: [90360] trunk/Source/WebCore
- Revision
- 90360
- Author
- [email protected]
- Date
- 2011-07-04 04:55:59 -0700 (Mon, 04 Jul 2011)
Log Message
2011-07-04 Alexander Pavlov <[email protected]>
Reviewed by Pavel Feldman.
Web Inspector: Adding new CSS rules should be more discoverable in the UI
https://bugs.webkit.org/show_bug.cgi?id=63803
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane.prototype._createNewRule):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (90359 => 90360)
--- trunk/Source/WebCore/ChangeLog 2011-07-04 10:56:47 UTC (rev 90359)
+++ trunk/Source/WebCore/ChangeLog 2011-07-04 11:55:59 UTC (rev 90360)
@@ -1,3 +1,13 @@
+2011-07-04 Alexander Pavlov <[email protected]>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Adding new CSS rules should be more discoverable in the UI
+ https://bugs.webkit.org/show_bug.cgi?id=63803
+
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylesSidebarPane.prototype._createNewRule):
+
2011-07-04 Danilo Cesar Lemes de Paula <[email protected]>
[Qt] Fixing build with --media-stream flag enabled
Modified: trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js (90359 => 90360)
--- trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js 2011-07-04 10:56:47 UTC (rev 90359)
+++ trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js 2011-07-04 11:55:59 UTC (rev 90360)
@@ -58,13 +58,6 @@
option.label = WebInspector.UIString("HSL Colors");
this.settingsSelectElement.appendChild(option);
- this.settingsSelectElement.appendChild(document.createElement("hr"));
-
- option = document.createElement("option");
- option.action = ""
- option.label = WebInspector.UIString("New Style Rule");
- this.settingsSelectElement.appendChild(option);
-
this.settingsSelectElement.addEventListener("click", function(event) { event.stopPropagation() }, false);
this.settingsSelectElement.addEventListener("change", this._changeSetting.bind(this), false);
var format = WebInspector.settings.colorFormat;
@@ -78,6 +71,13 @@
this.settingsSelectElement[3].selected = true;
this.titleElement.appendChild(this.settingsSelectElement);
+
+ var addButton = document.createElement("button");
+ addButton.className = "pane-title-button add";
+ addButton.title = WebInspector.UIString("New Style Rule");
+ addButton.addEventListener("click", this._createNewRule.bind(this), false);
+ this.titleElement.appendChild(addButton);
+
this._computedStylePane = computedStylePane;
this.element.addEventListener("contextmenu", this._contextMenuEventFired.bind(this), true);
}
@@ -578,6 +578,10 @@
_createNewRule: function(event)
{
+ event.stopPropagation();
+ if (WebInspector.isEditingAnyField())
+ return;
+
this.expanded = true;
this.addBlankSection().startEditingSelector();
},
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes