| Index: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
|
| index 4fb7c8672b331160dc287ae63362fefc69718e98..114aea4843ea7602a792872ebcfc7abd8da6e9c4 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
|
| @@ -710,6 +710,15 @@ WebInspector.StylePropertiesSection.prototype = {
|
| if (!this.editable)
|
| return;
|
| var items = [];
|
| +
|
| + var textShadowButton = new WebInspector.ToolbarButton(WebInspector.UIString("Add text-shadow"), "text-shadow-toolbar-item");
|
| + textShadowButton.addEventListener("click", this._onInsertShadowPropertyClick.bind(this, "text-shadow"));
|
| + items.push(textShadowButton);
|
| +
|
| + var boxShadowButton = new WebInspector.ToolbarButton(WebInspector.UIString("Add box-shadow"), "box-shadow-toolbar-item");
|
| + boxShadowButton.addEventListener("click", this._onInsertShadowPropertyClick.bind(this, "box-shadow"));
|
| + items.push(boxShadowButton);
|
| +
|
| var colorButton = new WebInspector.ToolbarButton(WebInspector.UIString("Add color"), "foreground-color-toolbar-item");
|
| colorButton.addEventListener("click", this._onInsertColorPropertyClick.bind(this));
|
| items.push(colorButton);
|
| @@ -882,6 +891,22 @@ WebInspector.StylePropertiesSection.prototype = {
|
| },
|
|
|
| /**
|
| + * @param {string} propertyName
|
| + * @param {!WebInspector.Event} event
|
| + */
|
| + _onInsertShadowPropertyClick: function(propertyName, event)
|
| + {
|
| + event.consume(true);
|
| + var treeElement = this.addNewBlankProperty();
|
| + treeElement.property.name = propertyName;
|
| + treeElement.property.value = "0 0 black";
|
| + treeElement.updateTitle();
|
| + var shadowSwatchPopoverHelper = WebInspector.ShadowSwatchPopoverHelper.forTreeElement(treeElement);
|
| + if (shadowSwatchPopoverHelper)
|
| + shadowSwatchPopoverHelper.showPopover();
|
| + },
|
| +
|
| + /**
|
| * @param {!WebInspector.Event} event
|
| */
|
| _onInsertColorPropertyClick: function(event)
|
|
|