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

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

Issue 1162223002: DevTools: properly update paint profiler upon new event being set (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: skip the test under virtual/deferred Created 5 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 | « LayoutTests/inspector/tracing/paint-profiler-update-expected.txt ('k') | no next file » | 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 * @param {!WebInspector.TracingTimelineFrameModel} frameModel 7 * @param {!WebInspector.TracingTimelineFrameModel} frameModel
8 * @extends {WebInspector.SplitWidget} 8 * @extends {WebInspector.SplitWidget}
9 */ 9 */
10 WebInspector.TimelinePaintProfilerView = function(frameModel) 10 WebInspector.TimelinePaintProfilerView = function(frameModel)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 * @param {!WebInspector.Target} target 42 * @param {!WebInspector.Target} target
43 * @param {!WebInspector.TracingModel.Event} event 43 * @param {!WebInspector.TracingModel.Event} event
44 * @return {boolean} 44 * @return {boolean}
45 */ 45 */
46 setEvent: function(target, event) 46 setEvent: function(target, event)
47 { 47 {
48 this._disposeSnapshot(); 48 this._disposeSnapshot();
49 this._target = target; 49 this._target = target;
50 this._event = event; 50 this._event = event;
51 51
52 this._updateWhenVisible = true; 52 if (this.isShowing())
53 this._update();
54 else
55 this._updateWhenVisible = true;
53 56
54 if (this._event.name === WebInspector.TimelineModel.RecordType.Paint) 57 if (this._event.name === WebInspector.TimelineModel.RecordType.Paint)
55 return !!event.picture; 58 return !!event.picture;
56 if (this._event.name === WebInspector.TimelineModel.RecordType.RasterTas k) 59 if (this._event.name === WebInspector.TimelineModel.RecordType.RasterTas k)
57 return this._frameModel.hasRasterTile(this._event); 60 return this._frameModel.hasRasterTile(this._event);
58 return false; 61 return false;
59 }, 62 },
60 63
61 _update: function() 64 _update: function()
62 { 65 {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 * @param {?DOMAgent.Rect} maskRectangle 200 * @param {?DOMAgent.Rect} maskRectangle
198 */ 201 */
199 setMask: function(maskRectangle) 202 setMask: function(maskRectangle)
200 { 203 {
201 this._maskRectangle = maskRectangle; 204 this._maskRectangle = maskRectangle;
202 this._maskElement.classList.toggle("hidden", !maskRectangle); 205 this._maskElement.classList.toggle("hidden", !maskRectangle);
203 }, 206 },
204 207
205 __proto__: WebInspector.Widget.prototype 208 __proto__: WebInspector.Widget.prototype
206 }; 209 };
OLDNEW
« no previous file with comments | « LayoutTests/inspector/tracing/paint-profiler-update-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698