OLD | NEW |
---|---|
1 /** | 1 /** |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
650 | 650 |
651 onResize: function() | 651 onResize: function() |
652 { | 652 { |
653 this._scheduleUpdate(); | 653 this._scheduleUpdate(); |
654 }, | 654 }, |
655 | 655 |
656 _scheduleUpdate: function() | 656 _scheduleUpdate: function() |
657 { | 657 { |
658 if (this._updateTimerId) | 658 if (this._updateTimerId) |
659 return; | 659 return; |
660 this._updateTimerId = requestAnimationFrame(this.update.bind(this)); | 660 this._updateTimerId = this.element.window().requestAnimationFrame(this.u pdate.bind(this)); |
apavlov
2014/11/15 09:57:18
Can we define this as a shortcut on WI.View, too?
dgozman
2014/11/15 11:46:25
The less thoughtful the shortcut, the easier it wo
| |
661 }, | 661 }, |
662 | 662 |
663 update: function() | 663 update: function() |
664 { | 664 { |
665 this._updateTimerId = 0; | 665 this._updateTimerId = 0; |
666 var timelineData = this._timelineData(); | 666 var timelineData = this._timelineData(); |
667 if (!timelineData) | 667 if (!timelineData) |
668 return; | 668 return; |
669 this._resetCanvas(this._overviewContainer.clientWidth, this._overviewCon tainer.clientHeight - WebInspector.FlameChart.DividersBarHeight); | 669 this._resetCanvas(this._overviewContainer.clientWidth, this._overviewCon tainer.clientHeight - WebInspector.FlameChart.DividersBarHeight); |
670 this._overviewCalculator._updateBoundaries(this); | 670 this._overviewCalculator._updateBoundaries(this); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
734 { | 734 { |
735 var ratio = window.devicePixelRatio; | 735 var ratio = window.devicePixelRatio; |
736 this._overviewCanvas.width = width * ratio; | 736 this._overviewCanvas.width = width * ratio; |
737 this._overviewCanvas.height = height * ratio; | 737 this._overviewCanvas.height = height * ratio; |
738 this._overviewCanvas.style.width = width + "px"; | 738 this._overviewCanvas.style.width = width + "px"; |
739 this._overviewCanvas.style.height = height + "px"; | 739 this._overviewCanvas.style.height = height + "px"; |
740 }, | 740 }, |
741 | 741 |
742 __proto__: WebInspector.VBox.prototype | 742 __proto__: WebInspector.VBox.prototype |
743 } | 743 } |
OLD | NEW |