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

Side by Side Diff: Source/devtools/front_end/ResponsiveDesignView.js

Issue 343563003: DevTools: beautify the responsive design warning message. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 6 years, 6 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
« no previous file with comments | « no previous file | Source/devtools/front_end/responsiveDesignView.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.VBox} 7 * @extends {WebInspector.VBox}
8 * @implements {WebInspector.OverridesSupport.PageResizer} 8 * @implements {WebInspector.OverridesSupport.PageResizer}
9 * @param {!WebInspector.InspectedPagePlaceholder} inspectedPagePlaceholder 9 * @param {!WebInspector.InspectedPagePlaceholder} inspectedPagePlaceholder
10 */ 10 */
11 WebInspector.ResponsiveDesignView = function(inspectedPagePlaceholder) 11 WebInspector.ResponsiveDesignView = function(inspectedPagePlaceholder)
12 { 12 {
13 WebInspector.VBox.call(this); 13 WebInspector.VBox.call(this);
14 this.setMinimumSize(150, 150); 14 this.setMinimumSize(150, 150);
15 this.registerRequiredCSS("responsiveDesignView.css"); 15 this.registerRequiredCSS("responsiveDesignView.css");
16 this.element.classList.add("overflow-hidden"); 16 this.element.classList.add("overflow-hidden");
17 17
18 this._responsiveDesignContainer = new WebInspector.VBox(); 18 this._responsiveDesignContainer = new WebInspector.VBox();
19 19
20 this._createToolbar(); 20 this._createToolbar();
21 21
22 this._canvasContainer = new WebInspector.View(); 22 this._canvasContainer = new WebInspector.View();
23 this._canvasContainer.element.classList.add("responsive-design"); 23 this._canvasContainer.element.classList.add("responsive-design");
24 this._canvasContainer.show(this._responsiveDesignContainer.element); 24 this._canvasContainer.show(this._responsiveDesignContainer.element);
25 25
26 this._canvas = this._canvasContainer.element.createChild("canvas", "fill"); 26 this._canvas = this._canvasContainer.element.createChild("canvas", "fill");
27 27
28 this._warningMessage = this._canvasContainer.element.createChild("div", "res ponsive-design-warning hidden"); 28 this._warningMessage = this._canvasContainer.element.createChild("div", "res ponsive-design-warning hidden");
29 this._warningMessage.createChild("div", "warning-icon-small");
29 this._warningMessage.createChild("span"); 30 this._warningMessage.createChild("span");
30 var warningCloseButton = this._warningMessage.createChild("div", "responsive -design-warning-close"); 31 var warningCloseButton = this._warningMessage.createChild("div", "close-butt on");
31 warningCloseButton.addEventListener("click", this._closeOverridesWarning.bin d(this), false); 32 warningCloseButton.addEventListener("click", this._closeOverridesWarning.bin d(this), false);
32 WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSupport .Events.OverridesWarningUpdated, this._overridesWarningUpdated, this); 33 WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSupport .Events.OverridesWarningUpdated, this._overridesWarningUpdated, this);
33 34
34 this._slidersContainer = this._canvasContainer.element.createChild("div", "v box responsive-design-sliders-container"); 35 this._slidersContainer = this._canvasContainer.element.createChild("div", "v box responsive-design-sliders-container");
35 var hbox = this._slidersContainer.createChild("div", "hbox flex-auto"); 36 var hbox = this._slidersContainer.createChild("div", "hbox flex-auto");
36 this._heightSliderContainer = this._slidersContainer.createChild("div", "hbo x responsive-design-slider-height"); 37 this._heightSliderContainer = this._slidersContainer.createChild("div", "hbo x responsive-design-slider-height");
37 this._resolutionHeightLabel = this._heightSliderContainer.createChild("div", "responsive-design-resolution-label responsive-design-resolution-height"); 38 this._resolutionHeightLabel = this._heightSliderContainer.createChild("div", "responsive-design-resolution-label responsive-design-resolution-height");
38 this._pageContainer = hbox.createChild("div", "vbox flex-auto"); 39 this._pageContainer = hbox.createChild("div", "vbox flex-auto");
39 this._widthSliderContainer = hbox.createChild("div", "vbox responsive-design -slider-width"); 40 this._widthSliderContainer = hbox.createChild("div", "vbox responsive-design -slider-width");
40 this._resolutionWidthLabel = this._widthSliderContainer.createChild("div", " responsive-design-resolution-label responsive-design-resolution-width"); 41 this._resolutionWidthLabel = this._widthSliderContainer.createChild("div", " responsive-design-resolution-label responsive-design-resolution-width");
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 }, 517 },
517 518
518 _closeOverridesWarning: function() 519 _closeOverridesWarning: function()
519 { 520 {
520 this._warningMessage.querySelector("span").textContent = ""; 521 this._warningMessage.querySelector("span").textContent = "";
521 this._warningMessage.classList.add("hidden"); 522 this._warningMessage.classList.add("hidden");
522 }, 523 },
523 524
524 __proto__: WebInspector.VBox.prototype 525 __proto__: WebInspector.VBox.prototype
525 }; 526 };
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/responsiveDesignView.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698