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

Unified Diff: Source/devtools/front_end/elements/StylesPopoverHelper.js

Issue 1155773002: Devtools Animations: Add cubic bezier easing editor for animations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove empty line Created 5 years, 7 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: Source/devtools/front_end/elements/StylesPopoverHelper.js
diff --git a/Source/devtools/front_end/elements/StylesPopoverHelper.js b/Source/devtools/front_end/elements/StylesPopoverHelper.js
index a99fb29622d24596fc36ffaec75c6df68da01cd4..93a18bbd514a8f8ae2228ca6c54a6467ee76185d 100644
--- a/Source/devtools/front_end/elements/StylesPopoverHelper.js
+++ b/Source/devtools/front_end/elements/StylesPopoverHelper.js
@@ -148,6 +148,20 @@ WebInspector.BezierPopoverIcon = function(treeElement, stylesPopoverHelper, text
this._boundBezierChanged = this._bezierChanged.bind(this);
}
+/**
+ * @param {!Element} parentElement
+ * @return {!Element}
+ */
+WebInspector.BezierPopoverIcon.createIcon = function(parentElement)
+{
+ var element = parentElement.createSVGChild("svg", "popover-icon bezier-icon");
+ element.setAttribute("height", 10);
+ element.setAttribute("width", 10);
+ var path = element.createSVGChild("path");
+ path.setAttribute("d", "M2,8 C2,3 8,7 8,2");
+ return element;
+}
+
WebInspector.BezierPopoverIcon.prototype = {
/**
* @return {!Element}
@@ -163,15 +177,8 @@ WebInspector.BezierPopoverIcon.prototype = {
_createDOM: function(text)
{
this._element = createElement("nobr");
-
- this._iconElement = this._element.createSVGChild("svg", "popover-icon bezier-icon");
- this._iconElement.setAttribute("height", 10);
- this._iconElement.setAttribute("width", 10);
+ this._iconElement = WebInspector.BezierPopoverIcon.createIcon(this._element);
this._iconElement.addEventListener("click", this._iconClick.bind(this), false);
- var g = this._iconElement.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;
},

Powered by Google App Engine
This is Rietveld 408576698