| Index: third_party/WebKit/Source/devtools/front_end/elements/ColorSwatchPopoverIcon.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/elements/ColorSwatchPopoverIcon.js b/third_party/WebKit/Source/devtools/front_end/elements/ColorSwatchPopoverIcon.js
|
| index 2694eb9b48235335f6fb5896ff70a02fefd4a354..111707f9bc5ce33aa783a76926aea2b30b2fb0ba 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/elements/ColorSwatchPopoverIcon.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/elements/ColorSwatchPopoverIcon.js
|
| @@ -224,6 +224,7 @@ WebInspector.ColorSwatchPopoverIcon.prototype = {
|
| WebInspector.ShadowSwatchPopoverHelper = function(treeElement, swatchPopoverHelper, shadowSwatch)
|
| {
|
| this._treeElement = treeElement;
|
| + this._treeElement[WebInspector.ShadowSwatchPopoverHelper._treeElementSymbol] = this;
|
| this._swatchPopoverHelper = swatchPopoverHelper;
|
| this._shadowSwatch = shadowSwatch;
|
| this._iconElement = shadowSwatch.iconElement();
|
| @@ -235,6 +236,17 @@ WebInspector.ShadowSwatchPopoverHelper = function(treeElement, swatchPopoverHelp
|
| this._boundOnScroll = this._onScroll.bind(this);
|
| }
|
|
|
| +WebInspector.ShadowSwatchPopoverHelper._treeElementSymbol = Symbol("WebInspector.ShadowSwatchPopoverHelper._treeElementSymbol");
|
| +
|
| +/**
|
| + * @param {!WebInspector.StylePropertyTreeElement} treeElement
|
| + * @return {?WebInspector.ShadowSwatchPopoverHelper}
|
| + */
|
| +WebInspector.ShadowSwatchPopoverHelper.forTreeElement = function(treeElement)
|
| +{
|
| + return treeElement[WebInspector.ShadowSwatchPopoverHelper._treeElementSymbol] || null;
|
| +}
|
| +
|
| WebInspector.ShadowSwatchPopoverHelper.prototype = {
|
| /**
|
| * @param {!Event} event
|
| @@ -242,6 +254,11 @@ WebInspector.ShadowSwatchPopoverHelper.prototype = {
|
| _iconClick: function(event)
|
| {
|
| event.consume(true);
|
| + this.showPopover();
|
| + },
|
| +
|
| + showPopover: function()
|
| + {
|
| if (this._swatchPopoverHelper.isShowing()) {
|
| this._swatchPopoverHelper.hide(true);
|
| return;
|
|
|