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

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

Issue 2274223003: DevTools: [shadow-editor] Make color swatches clickable for shadow properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9bee5b23b7c0f560838579f3b5a999b240c0c49f 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} swatch
*/
-WebInspector.ColorSwatchPopoverIcon = function(treeElement, swatchPopoverHelper, colorText)
+WebInspector.ColorSwatchPopoverIcon = function(treeElement, swatchPopoverHelper, swatch)
{
this._treeElement = treeElement;
this._treeElement[WebInspector.ColorSwatchPopoverIcon._treeElementSymbol] = this;
this._swatchPopoverHelper = swatchPopoverHelper;
+ this._swatch = swatch;
- this._swatch = WebInspector.ColorSwatch.create();
- this._swatch.setColorText(colorText);
- this._swatch.setFormat(WebInspector.Color.detectColorFormat(this._swatch.color()));
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)
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698