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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/perf_ui/ChartViewport.js

Issue 2690603003: Timeline: streamline flame chart views update logic (Closed)
Patch Set: moar fixes Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 PerfUI.ChartViewport = class extends UI.VBox { 7 PerfUI.ChartViewport = class extends UI.VBox {
8 constructor() { 8 constructor() {
9 super(true); 9 super(true);
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 this._dragStartPointX = 0; 79 this._dragStartPointX = 0;
80 this._dragStartPointY = 0; 80 this._dragStartPointY = 0;
81 this._dragStartScrollTop = 0; 81 this._dragStartScrollTop = 0;
82 this._timeWindowLeft = 0; 82 this._timeWindowLeft = 0;
83 this._timeWindowRight = 0; 83 this._timeWindowRight = 0;
84 this._offsetWidth = 0; 84 this._offsetWidth = 0;
85 this._offsetHeight = 0; 85 this._offsetHeight = 0;
86 this._totalHeight = 0; 86 this._totalHeight = 0;
87 this._pendingAnimationTimeLeft = 0; 87 this._pendingAnimationTimeLeft = 0;
88 this._pendingAnimationTimeRight = 0; 88 this._pendingAnimationTimeRight = 0;
89 this._updateContentElementSize();
89 } 90 }
90 91
91 /** 92 /**
92 * @private 93 * @private
93 */ 94 */
94 _updateContentElementSize() { 95 _updateContentElementSize() {
95 var offsetWidth = this._vScrollElement.offsetLeft; 96 var offsetWidth = this._vScrollElement.offsetLeft;
96 if (!offsetWidth) 97 if (!offsetWidth)
97 offsetWidth = this.contentElement.offsetWidth; 98 offsetWidth = this.contentElement.offsetWidth;
98 this._offsetWidth = offsetWidth; 99 this._offsetWidth = offsetWidth;
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 } 437 }
437 this._cancelAnimation(); 438 this._cancelAnimation();
438 this._cancelWindowTimesAnimation = UI.animateFunction( 439 this._cancelWindowTimesAnimation = UI.animateFunction(
439 this.element.window(), this._animateWindowTimes.bind(this), 440 this.element.window(), this._animateWindowTimes.bind(this),
440 [{from: this._timeWindowLeft, to: startTime}, {from: this._timeWindowRig ht, to: endTime}], 5, 441 [{from: this._timeWindowLeft, to: startTime}, {from: this._timeWindowRig ht, to: endTime}], 5,
441 this._animationCompleted.bind(this)); 442 this._animationCompleted.bind(this));
442 this._pendingAnimationTimeLeft = startTime; 443 this._pendingAnimationTimeLeft = startTime;
443 this._pendingAnimationTimeRight = endTime; 444 this._pendingAnimationTimeRight = endTime;
444 } 445 }
445 }; 446 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698