OLD | NEW |
1 <!-- | 1 <!-- |
2 Copyright (C) 2012 Google Inc. All rights reserved. | 2 Copyright (C) 2012 Google Inc. All rights reserved. |
3 | 3 |
4 Redistribution and use in source and binary forms, with or without | 4 Redistribution and use in source and binary forms, with or without |
5 modification, are permitted provided that the following conditions | 5 modification, are permitted provided that the following conditions |
6 are met: | 6 are met: |
7 | 7 |
8 1. Redistributions of source code must retain the above copyright | 8 1. Redistributions of source code must retain the above copyright |
9 notice, this list of conditions and the following disclaimer. | 9 notice, this list of conditions and the following disclaimer. |
10 2. Redistributions in binary form must reproduce the above copyright | 10 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 var drawGridBoolean = drawViewSizeWithGrid === "true"; | 362 var drawGridBoolean = drawViewSizeWithGrid === "true"; |
363 var text = viewportSize.width + "px \u00D7 " + viewportSize.height + "px"; | 363 var text = viewportSize.width + "px \u00D7 " + viewportSize.height + "px"; |
364 context.save(); | 364 context.save(); |
365 context.font = "20px "; | 365 context.font = "20px "; |
366 switch (platform) { | 366 switch (platform) { |
367 case "windows": context.font = "14px Consolas"; break; | 367 case "windows": context.font = "14px Consolas"; break; |
368 case "mac": context.font = "14px Menlo"; break; | 368 case "mac": context.font = "14px Menlo"; break; |
369 case "linux": context.font = "14px dejavu sans mono"; break; | 369 case "linux": context.font = "14px dejavu sans mono"; break; |
370 } | 370 } |
371 | 371 |
372 var frameWidth = frameViewFullSize.width || canvasWidth; | 372 var frameWidth = canvasWidth; |
373 var textWidth = context.measureText(text).width; | 373 var textWidth = context.measureText(text).width; |
374 context.fillStyle = gridBackgroundColor; | 374 context.fillStyle = gridBackgroundColor; |
375 context.fillRect(frameWidth - textWidth - 12, drawGridBoolean ? 15 : 0, fram
eWidth, 25); | 375 context.fillRect(frameWidth - textWidth - 12, drawGridBoolean ? 15 : 0, fram
eWidth, 25); |
376 context.fillStyle = darkGridColor; | 376 context.fillStyle = darkGridColor; |
377 context.fillText(text, frameWidth - textWidth - 6, drawGridBoolean ? 33 : 18
); | 377 context.fillText(text, frameWidth - textWidth - 6, drawGridBoolean ? 33 : 18
); |
378 context.restore(); | 378 context.restore(); |
379 if (drawGridBoolean) | 379 if (drawGridBoolean) |
380 _drawGrid(); | 380 _drawGrid(); |
381 } | 381 } |
382 | 382 |
383 function reset(resetData) | 383 function reset(resetData) |
384 { | 384 { |
385 window.viewportSize = resetData.viewportSize; | 385 window.viewportSize = resetData.viewportSize; |
386 window.frameViewFullSize = resetData.frameViewFullSize; | |
387 window.deviceScaleFactor = resetData.deviceScaleFactor; | 386 window.deviceScaleFactor = resetData.deviceScaleFactor; |
388 window.pageZoomFactor = resetData.pageZoomFactor; | 387 window.pageZoomFactor = resetData.pageZoomFactor; |
389 window.pageScaleFactor = resetData.pageScaleFactor; | 388 window.pageScaleFactor = resetData.pageScaleFactor; |
390 window.scrollX = Math.round(resetData.scrollX * pageScaleFactor); | 389 window.scrollX = Math.round(resetData.scrollX * pageScaleFactor); |
391 window.scrollY = Math.round(resetData.scrollY * pageScaleFactor); | 390 window.scrollY = Math.round(resetData.scrollY * pageScaleFactor); |
392 | 391 |
393 window.canvas = document.getElementById("canvas"); | 392 window.canvas = document.getElementById("canvas"); |
394 window.context = canvas.getContext("2d"); | 393 window.context = canvas.getContext("2d"); |
395 | 394 |
396 canvas.width = deviceScaleFactor * viewportSize.width; | 395 canvas.width = deviceScaleFactor * viewportSize.width; |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 <div class="button" id="step-over-button" title="Step over next function cal
l (F10)."><div class="glyph"></div></div> | 741 <div class="button" id="step-over-button" title="Step over next function cal
l (F10)."><div class="glyph"></div></div> |
743 </div> | 742 </div> |
744 </body> | 743 </body> |
745 <canvas id="canvas" class="fill"></canvas> | 744 <canvas id="canvas" class="fill"></canvas> |
746 <div id="element-title"> | 745 <div id="element-title"> |
747 <span id="tag-name"></span><span id="node-id"></span><span id="class-name"></s
pan> | 746 <span id="tag-name"></span><span id="node-id"></span><span id="class-name"></s
pan> |
748 <span id="node-width"></span><span class="px">px</span><span class="px"> ×
; </span><span id="node-height"></span><span class="px">px</span> | 747 <span id="node-width"></span><span class="px">px</span><span class="px"> ×
; </span><span id="node-height"></span><span class="px">px</span> |
749 </div> | 748 </div> |
750 <div id="log"></div> | 749 <div id="log"></div> |
751 </html> | 750 </html> |
OLD | NEW |