Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(741)

Unified Diff: third_party/WebKit/Source/devtools/front_end/elements/ColorSwatchPopoverIcon.js

Issue 2230183004: DevTools: Add shadow-editor swatch/icon before box-shadows and text-shadows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update model Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)

Powered by Google App Engine
This is Rietveld 408576698