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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelinePaintProfilerView.js

Issue 2440953003: DevTools: use semicolons after each statement. (Closed)
Patch Set: rebaseline 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 // 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 * @param {!WebInspector.TimelineFrameModel} frameModel 7 * @param {!WebInspector.TimelineFrameModel} frameModel
8 * @extends {WebInspector.SplitWidget} 8 * @extends {WebInspector.SplitWidget}
9 */ 9 */
10 WebInspector.TimelinePaintProfilerView = function(frameModel) 10 WebInspector.TimelinePaintProfilerView = function(frameModel)
11 { 11 {
12 WebInspector.SplitWidget.call(this, false, false); 12 WebInspector.SplitWidget.call(this, false, false);
13 this.element.classList.add("timeline-paint-profiler-view"); 13 this.element.classList.add("timeline-paint-profiler-view");
14 this.setSidebarSize(60); 14 this.setSidebarSize(60);
15 this.setResizable(false); 15 this.setResizable(false);
16 16
17 this._frameModel = frameModel; 17 this._frameModel = frameModel;
18 this._logAndImageSplitWidget = new WebInspector.SplitWidget(true, false); 18 this._logAndImageSplitWidget = new WebInspector.SplitWidget(true, false);
19 this._logAndImageSplitWidget.element.classList.add("timeline-paint-profiler- log-split"); 19 this._logAndImageSplitWidget.element.classList.add("timeline-paint-profiler- log-split");
20 this.setMainWidget(this._logAndImageSplitWidget); 20 this.setMainWidget(this._logAndImageSplitWidget);
21 this._imageView = new WebInspector.TimelinePaintImageView(); 21 this._imageView = new WebInspector.TimelinePaintImageView();
22 this._logAndImageSplitWidget.setMainWidget(this._imageView); 22 this._logAndImageSplitWidget.setMainWidget(this._imageView);
23 23
24 this._paintProfilerView = new WebInspector.PaintProfilerView(this._imageView .showImage.bind(this._imageView)); 24 this._paintProfilerView = new WebInspector.PaintProfilerView(this._imageView .showImage.bind(this._imageView));
25 this._paintProfilerView.addEventListener(WebInspector.PaintProfilerView.Even ts.WindowChanged, this._onWindowChanged, this); 25 this._paintProfilerView.addEventListener(WebInspector.PaintProfilerView.Even ts.WindowChanged, this._onWindowChanged, this);
26 this.setSidebarWidget(this._paintProfilerView); 26 this.setSidebarWidget(this._paintProfilerView);
27 27
28 this._logTreeView = new WebInspector.PaintProfilerCommandLogView(); 28 this._logTreeView = new WebInspector.PaintProfilerCommandLogView();
29 this._logAndImageSplitWidget.setSidebarWidget(this._logTreeView); 29 this._logAndImageSplitWidget.setSidebarWidget(this._logTreeView);
30 } 30 };
31 31
32 WebInspector.TimelinePaintProfilerView.prototype = { 32 WebInspector.TimelinePaintProfilerView.prototype = {
33 wasShown: function() 33 wasShown: function()
34 { 34 {
35 if (this._updateWhenVisible) { 35 if (this._updateWhenVisible) {
36 this._updateWhenVisible = false; 36 this._updateWhenVisible = false;
37 this._update(); 37 this._update();
38 } 38 }
39 }, 39 },
40 40
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 WebInspector.Widget.call(this, true); 127 WebInspector.Widget.call(this, true);
128 this.registerRequiredCSS("timeline/timelinePaintProfiler.css"); 128 this.registerRequiredCSS("timeline/timelinePaintProfiler.css");
129 this.contentElement.classList.add("fill", "paint-profiler-image-view"); 129 this.contentElement.classList.add("fill", "paint-profiler-image-view");
130 this._imageContainer = this.contentElement.createChild("div", "paint-profile r-image-container"); 130 this._imageContainer = this.contentElement.createChild("div", "paint-profile r-image-container");
131 this._imageElement = this._imageContainer.createChild("img"); 131 this._imageElement = this._imageContainer.createChild("img");
132 this._maskElement = this._imageContainer.createChild("div"); 132 this._maskElement = this._imageContainer.createChild("div");
133 this._imageElement.addEventListener("load", this._updateImagePosition.bind(t his), false); 133 this._imageElement.addEventListener("load", this._updateImagePosition.bind(t his), false);
134 134
135 this._transformController = new WebInspector.TransformController(this.conten tElement, true); 135 this._transformController = new WebInspector.TransformController(this.conten tElement, true);
136 this._transformController.addEventListener(WebInspector.TransformController. Events.TransformChanged, this._updateImagePosition, this); 136 this._transformController.addEventListener(WebInspector.TransformController. Events.TransformChanged, this._updateImagePosition, this);
137 } 137 };
138 138
139 WebInspector.TimelinePaintImageView.prototype = { 139 WebInspector.TimelinePaintImageView.prototype = {
140 onResize: function() 140 onResize: function()
141 { 141 {
142 if (this._imageElement.src) 142 if (this._imageElement.src)
143 this._updateImagePosition(); 143 this._updateImagePosition();
144 }, 144 },
145 145
146 _updateImagePosition: function() 146 _updateImagePosition: function()
147 { 147 {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 * @param {?DOMAgent.Rect} maskRectangle 193 * @param {?DOMAgent.Rect} maskRectangle
194 */ 194 */
195 setMask: function(maskRectangle) 195 setMask: function(maskRectangle)
196 { 196 {
197 this._maskRectangle = maskRectangle; 197 this._maskRectangle = maskRectangle;
198 this._maskElement.classList.toggle("hidden", !maskRectangle); 198 this._maskElement.classList.toggle("hidden", !maskRectangle);
199 }, 199 },
200 200
201 __proto__: WebInspector.Widget.prototype 201 __proto__: WebInspector.Widget.prototype
202 }; 202 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698