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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/Spectrum.js

Issue 2466123002: DevTools: reformat front-end code to match chromium style. (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Brian Grinstead All rights reserved. 2 * Copyright (C) 2011 Brian Grinstead All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 844
845 var color = WebInspector.Color.parse(colorString); 845 var color = WebInspector.Color.parse(colorString);
846 if (!color) 846 if (!color)
847 return; 847 return;
848 var hsv = color.hsva(); 848 var hsv = color.hsva();
849 if (this._colorFormat === cf.HEX || this._colorFormat === cf.ShortHEX) 849 if (this._colorFormat === cf.HEX || this._colorFormat === cf.ShortHEX)
850 this._colorFormat = color.canBeShortHex() ? cf.ShortHEX : cf.HEX; 850 this._colorFormat = color.canBeShortHex() ? cf.ShortHEX : cf.HEX;
851 this._innerSetColor(hsv, colorString, undefined, WebInspector.Spectrum._ ChangeSource.Input); 851 this._innerSetColor(hsv, colorString, undefined, WebInspector.Spectrum._ ChangeSource.Input);
852 }, 852 },
853 853
854 /**
855 * @override
856 */
854 wasShown: function() 857 wasShown: function()
855 { 858 {
856 this._hueAlphaWidth = this._hueElement.offsetWidth; 859 this._hueAlphaWidth = this._hueElement.offsetWidth;
857 this.slideHelperWidth = this._hueSlider.offsetWidth / 2; 860 this.slideHelperWidth = this._hueSlider.offsetWidth / 2;
858 this.dragWidth = this._colorElement.offsetWidth; 861 this.dragWidth = this._colorElement.offsetWidth;
859 this.dragHeight = this._colorElement.offsetHeight; 862 this.dragHeight = this._colorElement.offsetHeight;
860 this._colorDragElementHeight = this._colorDragElement.offsetHeight / 2; 863 this._colorDragElementHeight = this._colorDragElement.offsetHeight / 2;
861 this._innerSetColor(undefined, undefined, undefined, WebInspector.Spectr um._ChangeSource.Model); 864 this._innerSetColor(undefined, undefined, undefined, WebInspector.Spectr um._ChangeSource.Model);
862 this._toggleColorPicker(true); 865 this._toggleColorPicker(true);
863 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeMod el, WebInspector.ResourceTreeModel.Events.ColorPicked, this._colorPicked, this); 866 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeMod el, WebInspector.ResourceTreeModel.Events.ColorPicked, this._colorPicked, this);
864 }, 867 },
865 868
869 /**
870 * @override
871 */
866 willHide: function() 872 willHide: function()
867 { 873 {
868 this._toggleColorPicker(false); 874 this._toggleColorPicker(false);
869 WebInspector.targetManager.removeModelListener(WebInspector.ResourceTree Model, WebInspector.ResourceTreeModel.Events.ColorPicked, this._colorPicked, thi s); 875 WebInspector.targetManager.removeModelListener(WebInspector.ResourceTree Model, WebInspector.ResourceTreeModel.Events.ColorPicked, this._colorPicked, thi s);
870 }, 876 },
871 877
872 /** 878 /**
873 * @param {boolean=} enabled 879 * @param {boolean=} enabled
874 * @param {!WebInspector.Event=} event 880 * @param {!WebInspector.Event=} event
875 */ 881 */
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 "#FFEB3B": ["#FFFDE7", "#FFF9C4", "#FFF59D", "#FFF176", "#FFEE58", "#FFEB3B" , "#FDD835", "#FBC02D", "#F9A825", "#F57F17"], 1024 "#FFEB3B": ["#FFFDE7", "#FFF9C4", "#FFF59D", "#FFF176", "#FFEE58", "#FFEB3B" , "#FDD835", "#FBC02D", "#F9A825", "#F57F17"],
1019 "#FFC107": ["#FFF8E1", "#FFECB3", "#FFE082", "#FFD54F", "#FFCA28", "#FFC107" , "#FFB300", "#FFA000", "#FF8F00", "#FF6F00"], 1025 "#FFC107": ["#FFF8E1", "#FFECB3", "#FFE082", "#FFD54F", "#FFCA28", "#FFC107" , "#FFB300", "#FFA000", "#FF8F00", "#FF6F00"],
1020 "#FF9800": ["#FFF3E0", "#FFE0B2", "#FFCC80", "#FFB74D", "#FFA726", "#FF9800" , "#FB8C00", "#F57C00", "#EF6C00", "#E65100"], 1026 "#FF9800": ["#FFF3E0", "#FFE0B2", "#FFCC80", "#FFB74D", "#FFA726", "#FF9800" , "#FB8C00", "#F57C00", "#EF6C00", "#E65100"],
1021 "#FF5722": ["#FBE9E7", "#FFCCBC", "#FFAB91", "#FF8A65", "#FF7043", "#FF5722" , "#F4511E", "#E64A19", "#D84315", "#BF360C"], 1027 "#FF5722": ["#FBE9E7", "#FFCCBC", "#FFAB91", "#FF8A65", "#FF7043", "#FF5722" , "#F4511E", "#E64A19", "#D84315", "#BF360C"],
1022 "#795548": ["#EFEBE9", "#D7CCC8", "#BCAAA4", "#A1887F", "#8D6E63", "#795548" , "#6D4C41", "#5D4037", "#4E342E", "#3E2723"], 1028 "#795548": ["#EFEBE9", "#D7CCC8", "#BCAAA4", "#A1887F", "#8D6E63", "#795548" , "#6D4C41", "#5D4037", "#4E342E", "#3E2723"],
1023 "#9E9E9E": ["#FAFAFA", "#F5F5F5", "#EEEEEE", "#E0E0E0", "#BDBDBD", "#9E9E9E" , "#757575", "#616161", "#424242", "#212121"], 1029 "#9E9E9E": ["#FAFAFA", "#F5F5F5", "#EEEEEE", "#E0E0E0", "#BDBDBD", "#9E9E9E" , "#757575", "#616161", "#424242", "#212121"],
1024 "#607D8B": ["#ECEFF1", "#CFD8DC", "#B0BEC5", "#90A4AE", "#78909C", "#607D8B" , "#546E7A", "#455A64", "#37474F", "#263238"] 1030 "#607D8B": ["#ECEFF1", "#CFD8DC", "#B0BEC5", "#90A4AE", "#78909C", "#607D8B" , "#546E7A", "#455A64", "#37474F", "#263238"]
1025 }; 1031 };
1026 1032
1027 WebInspector.Spectrum.MaterialPalette = { title: "Material", mutable: false, mat chUserFormat: true, colors: Object.keys(WebInspector.Spectrum.MaterialPaletteSha des) }; 1033 WebInspector.Spectrum.MaterialPalette = { title: "Material", mutable: false, mat chUserFormat: true, colors: Object.keys(WebInspector.Spectrum.MaterialPaletteSha des) };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698