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

Side by Side Diff: Source/devtools/front_end/elements/Spectrum.js

Issue 731093002: DevTools: Use View.registerRequiredCSS() in View-based web components (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
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 15 matching lines...) Expand all
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 /** 29 /**
30 * @constructor 30 * @constructor
31 * @extends {WebInspector.VBox} 31 * @extends {WebInspector.VBox}
32 */ 32 */
33 WebInspector.Spectrum = function() 33 WebInspector.Spectrum = function()
34 { 34 {
35 WebInspector.VBox.call(this, true); 35 WebInspector.VBox.call(this, true);
36 this.contentElement.appendChild(WebInspector.View.createStyleElement("elemen ts/spectrum.css")); 36 this.registerRequiredCSS("elements/spectrum.css");
37 this.contentElement.tabIndex = 0; 37 this.contentElement.tabIndex = 0;
38 38
39 this._draggerElement = this.contentElement.createChild("div", "spectrum-colo r"); 39 this._draggerElement = this.contentElement.createChild("div", "spectrum-colo r");
40 this._dragHelperElement = this._draggerElement.createChild("div", "spectrum- sat fill").createChild("div", "spectrum-val fill").createChild("div", "spectrum- dragger"); 40 this._dragHelperElement = this._draggerElement.createChild("div", "spectrum- sat fill").createChild("div", "spectrum-val fill").createChild("div", "spectrum- dragger");
41 41
42 this._sliderElement = this.contentElement.createChild("div", "spectrum-hue") ; 42 this._sliderElement = this.contentElement.createChild("div", "spectrum-hue") ;
43 this.slideHelper = this._sliderElement.createChild("div", "spectrum-slider") ; 43 this.slideHelper = this._sliderElement.createChild("div", "spectrum-slider") ;
44 44
45 var rangeContainer = this.contentElement.createChild("div", "spectrum-range- container"); 45 var rangeContainer = this.contentElement.createChild("div", "spectrum-range- container");
46 var alphaLabel = rangeContainer.createChild("label"); 46 var alphaLabel = rangeContainer.createChild("label");
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 455
456 WebInspector.ColorSwatch.prototype = { 456 WebInspector.ColorSwatch.prototype = {
457 /** 457 /**
458 * @param {string} colorString 458 * @param {string} colorString
459 */ 459 */
460 setColorString: function(colorString) 460 setColorString: function(colorString)
461 { 461 {
462 this._swatchInnerElement.style.backgroundColor = colorString; 462 this._swatchInnerElement.style.backgroundColor = colorString;
463 } 463 }
464 } 464 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/elements/ElementsBreadcrumbs.js ('k') | Source/devtools/front_end/ui/FlameChart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698