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

Side by Side Diff: tracing/tracing/ui/tracks/drawing_container.html

Issue 1922193002: [polymer] Replaces this.appendChild with Polymer.dom(this).appendChild (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Created 4 years, 7 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
OLDNEW
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 22 matching lines...) Expand all
33 DrawingContainer.prototype = { 33 DrawingContainer.prototype = {
34 __proto__: tr.ui.tracks.Track.prototype, 34 __proto__: tr.ui.tracks.Track.prototype,
35 35
36 decorate: function(viewport) { 36 decorate: function(viewport) {
37 tr.ui.tracks.Track.prototype.decorate.call(this, viewport); 37 tr.ui.tracks.Track.prototype.decorate.call(this, viewport);
38 this.classList.add('drawing-container'); 38 this.classList.add('drawing-container');
39 39
40 this.canvas_ = document.createElement('canvas'); 40 this.canvas_ = document.createElement('canvas');
41 this.canvas_.className = 'drawing-container-canvas'; 41 this.canvas_.className = 'drawing-container-canvas';
42 this.canvas_.style.left = tr.ui.b.constants.HEADING_WIDTH + 'px'; 42 this.canvas_.style.left = tr.ui.b.constants.HEADING_WIDTH + 'px';
43 this.appendChild(this.canvas_); 43 Polymer.dom(this).appendChild(this.canvas_);
44 44
45 this.ctx_ = this.canvas_.getContext('2d'); 45 this.ctx_ = this.canvas_.getContext('2d');
46 46
47 this.viewportChange_ = this.viewportChange_.bind(this); 47 this.viewportChange_ = this.viewportChange_.bind(this);
48 this.viewport.addEventListener('change', this.viewportChange_); 48 this.viewport.addEventListener('change', this.viewportChange_);
49 }, 49 },
50 50
51 // Needed to support the calls in TimelineTrackView. 51 // Needed to support the calls in TimelineTrackView.
52 get canvas() { 52 get canvas() {
53 return this.canvas_; 53 return this.canvas_;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 167 }
168 } 168 }
169 }; 169 };
170 170
171 return { 171 return {
172 DrawingContainer: DrawingContainer, 172 DrawingContainer: DrawingContainer,
173 DrawType: DrawType 173 DrawType: DrawType
174 }; 174 };
175 }); 175 });
176 </script> 176 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/ui/tracks/device_track.html ('k') | tracing/tracing/ui/tracks/global_memory_dump_track.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698