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

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

Issue 2237663002: DevTools: Use png icon for bezier editor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Inline _createDOM function 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 ccc42c2023cafe7731b82ba5e7bb0857eacda85f..49b4b8ce769dc0fc5e45958819c4eade78b5c7ec 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/ColorSwatchPopoverIcon.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/ColorSwatchPopoverIcon.js
@@ -12,7 +12,14 @@ WebInspector.BezierPopoverIcon = function(treeElement, swatchPopoverHelper, text
{
this._treeElement = treeElement;
this._swatchPopoverHelper = swatchPopoverHelper;
- this._createDOM(text);
+
+ this._element = createElement("span");
+ this._iconElement = WebInspector.BezierSwatch.create();
+ this._iconElement.title = WebInspector.UIString("Open cubic bezier editor");
+ this._iconElement.addEventListener("click", this._iconClick.bind(this), false);
+ this._element.appendChild(this._iconElement);
+ this._bezierValueElement = this._element.createChild("span");
+ this._bezierValueElement.textContent = text;
this._boundBezierChanged = this._bezierChanged.bind(this);
this._boundOnScroll = this._onScroll.bind(this);
@@ -28,27 +35,6 @@ WebInspector.BezierPopoverIcon.prototype = {
},
/**
- * @param {string} text
- */
- _createDOM: function(text)
- {
- this._element = createElement("nobr");
-
- this._iconElement = this._element.createChild("div", "popover-icon bezier-icon");
- this._iconElement.title = WebInspector.UIString("Open cubic bezier editor");
- var svg = this._iconElement.createSVGChild("svg");
- svg.setAttribute("height", 10);
- svg.setAttribute("width", 10);
- this._iconElement.addEventListener("click", this._iconClick.bind(this), false);
- var g = svg.createSVGChild("g");
- var path = g.createSVGChild("path");
- path.setAttribute("d", "M2,8 C2,3 8,7 8,2");
-
- this._bezierValueElement = this._element.createChild("span");
- this._bezierValueElement.textContent = text;
- },
-
- /**
* @param {!Event} event
*/
_iconClick: function(event)

Powered by Google App Engine
This is Rietveld 408576698