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/extras/chrome/cc/layer_view.css"> | 8 <link rel="stylesheet" href="/tracing/ui/extras/chrome/cc/layer_view.css"> |
9 | 9 |
10 <link rel="import" href="/tracing/base/raf.html"> | 10 <link rel="import" href="/tracing/base/raf.html"> |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 layerTreeQuadStackViewSelectionChanged_: function() { | 82 layerTreeQuadStackViewSelectionChanged_: function() { |
83 var selection = this.layerTreeQuadStackView_.selection; | 83 var selection = this.layerTreeQuadStackView_.selection; |
84 if (selection) { | 84 if (selection) { |
85 this.dragBar_.style.display = ''; | 85 this.dragBar_.style.display = ''; |
86 this.analysisEl_.style.display = ''; | 86 this.analysisEl_.style.display = ''; |
87 this.analysisEl_.textContent = ''; | 87 this.analysisEl_.textContent = ''; |
88 | 88 |
89 var layer = selection.layer; | 89 var layer = selection.layer; |
90 if (layer && layer.args && layer.args.pictures) { | 90 if (layer && layer.args && layer.args.pictures) { |
91 this.analysisEl_.appendChild( | 91 Polymer.dom(this.analysisEl_).appendChild( |
92 this.createPictureBtn_(layer.args.pictures)); | 92 this.createPictureBtn_(layer.args.pictures)); |
93 } | 93 } |
94 | 94 |
95 var analysis = selection.createAnalysis(); | 95 var analysis = selection.createAnalysis(); |
96 this.analysisEl_.appendChild(analysis); | 96 Polymer.dom(this.analysisEl_).appendChild(analysis); |
97 } else { | 97 } else { |
98 this.dragBar_.style.display = 'none'; | 98 this.dragBar_.style.display = 'none'; |
99 this.analysisEl_.style.display = 'none'; | 99 this.analysisEl_.style.display = 'none'; |
100 var analysis = this.analysisEl_.firstChild; | 100 var analysis = this.analysisEl_.firstChild; |
101 if (analysis) | 101 if (analysis) |
102 this.analysisEl_.removeChild(analysis); | 102 this.analysisEl_.removeChild(analysis); |
103 this.layerTreeQuadStackView_.style.height = | 103 this.layerTreeQuadStackView_.style.height = |
104 window.getComputedStyle(this).height; | 104 window.getComputedStyle(this).height; |
105 } | 105 } |
106 tr.b.dispatchSimpleEvent(this, 'selection-change'); | 106 tr.b.dispatchSimpleEvent(this, 'selection-change'); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 this.layerTreeQuadStackView_.extraHighlightsByLayerId = | 140 this.layerTreeQuadStackView_.extraHighlightsByLayerId = |
141 extraHighlightsByLayerId; | 141 extraHighlightsByLayerId; |
142 } | 142 } |
143 }; | 143 }; |
144 | 144 |
145 return { | 145 return { |
146 LayerView: LayerView | 146 LayerView: LayerView |
147 }; | 147 }; |
148 }); | 148 }); |
149 </script> | 149 </script> |
OLD | NEW |