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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.js

Issue 2252913002: DevTools: Box-shadow editor initial implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shadowIcon
Patch Set: Merge 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/ui/ColorSwatch.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.js b/third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.js
index cc5cad449795b4f6488b8634ad8df35dba86ccac..903183a7c3c5097d94e06b268e328d553d2568e2 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.js
@@ -200,14 +200,22 @@ WebInspector.CSSShadowSwatch.create = function()
WebInspector.CSSShadowSwatch.prototype = {
/**
- * @param {!WebInspector.CSSShadowModel} cssShadowModel
+ * @return {!WebInspector.CSSShadowModel} cssShadowModel
*/
- setCSSShadow: function(cssShadowModel)
+ model: function()
{
- this._cssShadowModel = cssShadowModel;
+ return this._model;
+ },
+
+ /**
+ * @param {!WebInspector.CSSShadowModel} model
+ */
+ setCSSShadow: function(model)
+ {
+ this._model = model;
this._colorSwatch = null;
this._contentElement.removeChildren();
- var results = WebInspector.TextUtils.splitStringByRegexes(cssShadowModel.asCSSText(), [/inset/g, WebInspector.Color.Regex]);
+ var results = WebInspector.TextUtils.splitStringByRegexes(model.asCSSText(), [/inset/g, WebInspector.Color.Regex]);
for (var i = 0; i < results.length; i++) {
var result = results[i];
if (result.regexIndex === 1) {

Powered by Google App Engine
This is Rietveld 408576698