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

Side by Side Diff: tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_view.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/extras/chrome/cc/picture_ops_chart_view .css"> 8 <link rel="stylesheet" href="/tracing/ui/extras/chrome/cc/picture_ops_chart_view .css">
9 9
10 <link rel="import" href="/tracing/ui/base/dom_helpers.html"> 10 <link rel="import" href="/tracing/ui/base/dom_helpers.html">
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 decorate: function() { 43 decorate: function() {
44 this.picture_ = undefined; 44 this.picture_ = undefined;
45 this.pictureOps_ = undefined; 45 this.pictureOps_ = undefined;
46 this.opCosts_ = undefined; 46 this.opCosts_ = undefined;
47 47
48 this.chartScale_ = window.devicePixelRatio; 48 this.chartScale_ = window.devicePixelRatio;
49 49
50 this.chart_ = document.createElement('canvas'); 50 this.chart_ = document.createElement('canvas');
51 this.chartCtx_ = this.chart_.getContext('2d'); 51 this.chartCtx_ = this.chart_.getContext('2d');
52 this.appendChild(this.chart_); 52 Polymer.dom(this).appendChild(this.chart_);
53 53
54 this.selectedOpIndex_ = undefined; 54 this.selectedOpIndex_ = undefined;
55 this.chartWidth_ = 0; 55 this.chartWidth_ = 0;
56 this.chartHeight_ = 0; 56 this.chartHeight_ = 0;
57 this.dimensionsHaveChanged_ = true; 57 this.dimensionsHaveChanged_ = true;
58 58
59 this.currentBarMouseOverTarget_ = undefined; 59 this.currentBarMouseOverTarget_ = undefined;
60 60
61 this.ninetyFifthPercentileCost_ = 0; 61 this.ninetyFifthPercentileCost_ = 0;
62 this.totalOpCost_ = 0; 62 this.totalOpCost_ = 0;
63 63
64 this.chart_.addEventListener('click', this.onClick_.bind(this)); 64 this.chart_.addEventListener('click', this.onClick_.bind(this));
65 this.chart_.addEventListener('mousemove', this.onMouseMove_.bind(this)); 65 this.chart_.addEventListener('mousemove', this.onMouseMove_.bind(this));
66 66
67 this.usePercentileScale_ = false; 67 this.usePercentileScale_ = false;
68 this.usePercentileScaleCheckbox_ = tr.ui.b.createCheckBox( 68 this.usePercentileScaleCheckbox_ = tr.ui.b.createCheckBox(
69 this, 'usePercentileScale', 69 this, 'usePercentileScale',
70 'PictureOpsChartView.usePercentileScale', false, 70 'PictureOpsChartView.usePercentileScale', false,
71 'Limit to 95%-ile'); 71 'Limit to 95%-ile');
72 this.usePercentileScaleCheckbox_.classList.add('use-percentile-scale'); 72 this.usePercentileScaleCheckbox_.classList.add('use-percentile-scale');
73 this.appendChild(this.usePercentileScaleCheckbox_); 73 Polymer.dom(this).appendChild(this.usePercentileScaleCheckbox_);
74 }, 74 },
75 75
76 get dimensionsHaveChanged() { 76 get dimensionsHaveChanged() {
77 return this.dimensionsHaveChanged_; 77 return this.dimensionsHaveChanged_;
78 }, 78 },
79 79
80 set dimensionsHaveChanged(dimensionsHaveChanged) { 80 set dimensionsHaveChanged(dimensionsHaveChanged) {
81 this.dimensionsHaveChanged_ = dimensionsHaveChanged; 81 this.dimensionsHaveChanged_ = dimensionsHaveChanged;
82 }, 82 },
83 83
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 this.chartCtx_.fillText('No timing data available.', 491 this.chartCtx_.fillText('No timing data available.',
492 this.chartWidth_ * 0.5, this.chartHeight_ * 0.5); 492 this.chartWidth_ * 0.5, this.chartHeight_ * 0.5);
493 } 493 }
494 }; 494 };
495 495
496 return { 496 return {
497 PictureOpsChartView: PictureOpsChartView 497 PictureOpsChartView: PictureOpsChartView
498 }; 498 };
499 }); 499 });
500 </script> 500 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698