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

Unified Diff: Source/devtools/front_end/common/Color.js

Issue 1307063005: DevTools: edit SASS through SourceMaps. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: improvements Created 5 years, 3 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 | « Source/devtools/front_end/bindings/module.json ('k') | Source/devtools/front_end/common/TextRange.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/common/Color.js
diff --git a/Source/devtools/front_end/common/Color.js b/Source/devtools/front_end/common/Color.js
index 2be3c2589303442c4f6b555f40d7ed3f5edc4338..564d11ec17b3a07c8f32e2b6c54deed0cca6c734 100644
--- a/Source/devtools/front_end/common/Color.js
+++ b/Source/devtools/front_end/common/Color.js
@@ -412,7 +412,17 @@ WebInspector.Color.prototype = {
var rgba = this._rgba.slice();
rgba[3] = alpha;
return new WebInspector.Color(rgba, WebInspector.Color.Format.RGBA);
- }
+ },
+
+ equals: function(other)
+ {
+ var myRGBA = this.canonicalRGBA();
+ var otherRGBA = other.canonicalRGBA();
+ var result = true;
+ for (var i = 0; i < myRGBA.length; ++i)
+ result = result && (myRGBA[i] === otherRGBA[i]);
+ return result;
+ },
}
/**
« no previous file with comments | « Source/devtools/front_end/bindings/module.json ('k') | Source/devtools/front_end/common/TextRange.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698