OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2013 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 | 7 |
8 <link rel="stylesheet" href="/tracing/ui/tracks/drawing_container.css"> | 8 <link rel="stylesheet" href="/tracing/ui/tracks/drawing_container.css"> |
9 | 9 |
10 <link rel="import" href="/tracing/base/raf.html"> | 10 <link rel="import" href="/tracing/base/raf.html"> |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 newOffset = Math.max(0, Math.min(newOffset, maxOffset)); | 147 newOffset = Math.max(0, Math.min(newOffset, maxOffset)); |
148 if (newOffset !== this.offsetY_) { | 148 if (newOffset !== this.offsetY_) { |
149 this.offsetY_ = newOffset; | 149 this.offsetY_ = newOffset; |
150 return true; | 150 return true; |
151 } | 151 } |
152 return false; | 152 return false; |
153 }, | 153 }, |
154 | 154 |
155 updateCanvasSizeIfNeeded_() { | 155 updateCanvasSizeIfNeeded_() { |
156 const visibleChildTracks = | 156 const visibleChildTracks = |
157 tr.b.asArray(this.children).filter(this.visibleFilter_); | 157 Array.from(this.children).filter(this.visibleFilter_); |
158 | 158 |
159 if (visibleChildTracks.length === 0) { | 159 if (visibleChildTracks.length === 0) { |
160 return; | 160 return; |
161 } | 161 } |
162 | 162 |
163 const thisBounds = this.getBoundingClientRect(); | 163 const thisBounds = this.getBoundingClientRect(); |
164 | 164 |
165 const firstChildTrackBounds = | 165 const firstChildTrackBounds = |
166 visibleChildTracks[0].getBoundingClientRect(); | 166 visibleChildTracks[0].getBoundingClientRect(); |
167 const lastChildTrackBounds = | 167 const lastChildTrackBounds = |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 } | 225 } |
226 } | 226 } |
227 }; | 227 }; |
228 | 228 |
229 return { | 229 return { |
230 DrawingContainer, | 230 DrawingContainer, |
231 DrawType, | 231 DrawType, |
232 }; | 232 }; |
233 }); | 233 }); |
234 </script> | 234 </script> |
OLD | NEW |