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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 405
406 /** 406 /**
407 * @param {number} alpha 407 * @param {number} alpha
408 * @return {!WebInspector.Color} 408 * @return {!WebInspector.Color}
409 */ 409 */
410 setAlpha: function(alpha) 410 setAlpha: function(alpha)
411 { 411 {
412 var rgba = this._rgba.slice(); 412 var rgba = this._rgba.slice();
413 rgba[3] = alpha; 413 rgba[3] = alpha;
414 return new WebInspector.Color(rgba, WebInspector.Color.Format.RGBA); 414 return new WebInspector.Color(rgba, WebInspector.Color.Format.RGBA);
415 } 415 },
416
417 equals: function(other)
418 {
419 var myRGBA = this.canonicalRGBA();
420 var otherRGBA = other.canonicalRGBA();
421 var result = true;
422 for (var i = 0; i < myRGBA.length; ++i)
423 result = result && (myRGBA[i] === otherRGBA[i]);
424 return result;
425 },
416 } 426 }
417 427
418 /** 428 /**
419 * @param {string} value 429 * @param {string} value
420 * return {number} 430 * return {number}
421 */ 431 */
422 WebInspector.Color._parseRgbNumeric = function(value) 432 WebInspector.Color._parseRgbNumeric = function(value)
423 { 433 {
424 var parsed = parseInt(value, 10); 434 var parsed = parseInt(value, 10);
425 if (value.indexOf("%") !== -1) 435 if (value.indexOf("%") !== -1)
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 Padding: WebInspector.Color.fromRGBA([147, 196, 125, .55]), 771 Padding: WebInspector.Color.fromRGBA([147, 196, 125, .55]),
762 PaddingLight: WebInspector.Color.fromRGBA([147, 196, 125, .4]), 772 PaddingLight: WebInspector.Color.fromRGBA([147, 196, 125, .4]),
763 Border: WebInspector.Color.fromRGBA([255, 229, 153, .66]), 773 Border: WebInspector.Color.fromRGBA([255, 229, 153, .66]),
764 BorderLight: WebInspector.Color.fromRGBA([255, 229, 153, .5]), 774 BorderLight: WebInspector.Color.fromRGBA([255, 229, 153, .5]),
765 Margin: WebInspector.Color.fromRGBA([246, 178, 107, .66]), 775 Margin: WebInspector.Color.fromRGBA([246, 178, 107, .66]),
766 MarginLight: WebInspector.Color.fromRGBA([246, 178, 107, .5]), 776 MarginLight: WebInspector.Color.fromRGBA([246, 178, 107, .5]),
767 EventTarget: WebInspector.Color.fromRGBA([255, 196, 196, .66]), 777 EventTarget: WebInspector.Color.fromRGBA([255, 196, 196, .66]),
768 Shape: WebInspector.Color.fromRGBA([96, 82, 177, 0.8]), 778 Shape: WebInspector.Color.fromRGBA([96, 82, 177, 0.8]),
769 ShapeMargin: WebInspector.Color.fromRGBA([96, 82, 127, .6]) 779 ShapeMargin: WebInspector.Color.fromRGBA([96, 82, 127, .6])
770 } 780 }
OLDNEW
« 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