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 49b4b8ce769dc0fc5e45958819c4eade78b5c7ec..dd06c0d676f5cf86e633f9a7ba8b0d032b067ce0 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/elements/ColorSwatchPopoverIcon.js |
+++ b/third_party/WebKit/Source/devtools/front_end/elements/ColorSwatchPopoverIcon.js |
@@ -100,17 +100,15 @@ WebInspector.BezierPopoverIcon.prototype = { |
* @constructor |
* @param {!WebInspector.StylePropertyTreeElement} treeElement |
* @param {!WebInspector.SwatchPopoverHelper} swatchPopoverHelper |
- * @param {string} colorText |
+ * @param {!WebInspector.ColorSwatch} colorSwatch |
*/ |
-WebInspector.ColorSwatchPopoverIcon = function(treeElement, swatchPopoverHelper, colorText) |
+WebInspector.ColorSwatchPopoverIcon = function(treeElement, swatchPopoverHelper, colorSwatch) |
{ |
this._treeElement = treeElement; |
this._treeElement[WebInspector.ColorSwatchPopoverIcon._treeElementSymbol] = this; |
this._swatchPopoverHelper = swatchPopoverHelper; |
- this._swatch = WebInspector.ColorSwatch.create(); |
- this._swatch.setColorText(colorText); |
- this._swatch.setFormat(WebInspector.Color.detectColorFormat(this._swatch.color())); |
+ this._swatch = colorSwatch; |
var shiftClickMessage = WebInspector.UIString("Shift + Click to change color format."); |
this._swatch.iconElement().title = WebInspector.UIString("Open color picker. %s", shiftClickMessage); |
this._swatch.iconElement().addEventListener("click", this._iconClick.bind(this)); |
@@ -133,14 +131,6 @@ WebInspector.ColorSwatchPopoverIcon.forTreeElement = function(treeElement) |
WebInspector.ColorSwatchPopoverIcon.prototype = { |
/** |
- * @return {!Element} |
- */ |
- element: function() |
- { |
- return this._swatch; |
- }, |
- |
- /** |
* @param {!WebInspector.Color} color |
*/ |
setContrastColor: function(color) |