Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2)

Side by Side Diff: trace_viewer/cc/picture_debugger.html

Issue 131000044: Fix skia-debugger display bug. Base URL: http://trace-viewer.googlecode.com/svn/trunk
Patch Set: Created 11 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | trace_viewer/tracing/analysis/analysis_view.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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="import" href="/cc/picture.html"> 8 <link rel="import" href="/cc/picture.html">
9 <link rel="import" href="/cc/picture_ops_chart_summary_view.html"> 9 <link rel="import" href="/cc/picture_ops_chart_summary_view.html">
10 <link rel="import" href="/cc/picture_ops_chart_view.html"> 10 <link rel="import" href="/cc/picture_ops_chart_view.html">
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 y: bounds.top 272 y: bounds.top
273 }; 273 };
274 274
275 this.rasterize_(); 275 this.rasterize_();
276 276
277 this.scheduleUpdateContents_(); 277 this.scheduleUpdateContents_();
278 }, 278 },
279 279
280 getRasterCanvasSize_: function() { 280 getRasterCanvasSize_: function() {
281 var style = window.getComputedStyle(this.rasterArea_); 281 var style = window.getComputedStyle(this.rasterArea_);
282
283 var styleWidth = parseInt(style.width);
284 var styleHeight = parseInt(style.height);
285 // In case the width or height are a NaN (such as auto), convert it to 0.
286 if (isNaN(styleWidth))
287 styleWidth = 0;
288 if (isNaN(styleHeight))
289 styleHeight = 0;
290
282 var width = 291 var width =
283 Math.max(parseInt(style.width), this.picture_.layerRect.width); 292 Math.max(styleWidth, this.picture_.layerRect.width);
284 var height = 293 var height =
285 Math.max(parseInt(style.height), this.picture_.layerRect.height); 294 Math.max(styleHeight, this.picture_.layerRect.height);
286 295
287 return { 296 return {
288 width: width, 297 width: width,
289 height: height 298 height: height
290 }; 299 };
291 }, 300 },
292 301
293 scheduleUpdateContents_: function() { 302 scheduleUpdateContents_: function() {
294 if (this.updateContentsPending_) 303 if (this.updateContentsPending_)
295 return; 304 return;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 y: e.clientY - this.rasterArea_.offsetTop 481 y: e.clientY - this.rasterArea_.offsetTop
473 }; 482 };
474 } 483 }
475 }; 484 };
476 485
477 return { 486 return {
478 PictureDebugger: PictureDebugger 487 PictureDebugger: PictureDebugger
479 }; 488 };
480 }); 489 });
481 </script> 490 </script>
OLDNEW
« no previous file with comments | « no previous file | trace_viewer/tracing/analysis/analysis_view.html » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b