Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.js b/third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.js |
| index 7fe3f201d98d9d66835626677f29eae88589621a..bef2973fe27b9e1dda3b2d3a193676007ac801cd 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.js |
| @@ -93,7 +93,7 @@ WebInspector.ColorSwatch.prototype = { |
| this._swatchInner = this._iconElement.createChild("span", "color-swatch-inner"); |
| this._swatchInner.addEventListener("dblclick", consumeEvent, false); |
| this._swatchInner.addEventListener("mousedown", consumeEvent, false); |
| - this._swatchInner.addEventListener("click", this._handleClick.bind(this), true); |
| + this._swatchInner.addEventListener("click", this._onClick.bind(this), true); |
| root.createChild("content"); |
| this._colorValueElement = this.createChild("span"); |
| @@ -104,6 +104,14 @@ WebInspector.ColorSwatch.prototype = { |
| /** |
| * @param {!Event} event |
| */ |
| + _onClick: function(event) |
| + { |
| + this._handleClick(event); |
| + }, |
| + |
| + /** |
| + * @param {!Event} event |
| + */ |
| _handleClick: function(event) |
| { |
| if (!event.shiftKey) |
| @@ -112,6 +120,14 @@ WebInspector.ColorSwatch.prototype = { |
| event.consume(true); |
| }, |
| + /** |
| + * @param {function(!Event)} clickHandler |
| + */ |
| + setClickHandler: function(clickHandler) |
|
lushnikov
2016/07/19 21:12:16
let's just not handle clicks in the WI.ColorSwatch
flandy
2016/07/19 22:58:15
Removed for now since I have removed support for s
lushnikov
2016/07/20 00:49:23
Sounds good for me
|
| + { |
| + this._handleClick = clickHandler; |
| + }, |
| + |
| __proto__: HTMLSpanElement.prototype |
| } |