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 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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 }, | 594 }, |
595 | 595 |
596 _onPageResizerAvailableSizeChanged: function() | 596 _onPageResizerAvailableSizeChanged: function() |
597 { | 597 { |
598 if (this._initialized) | 598 if (this._initialized) |
599 this._deviceMetricsChanged(); | 599 this._deviceMetricsChanged(); |
600 }, | 600 }, |
601 | 601 |
602 _onPageResizerResizeRequested: function(event) | 602 _onPageResizerResizeRequested: function(event) |
603 { | 603 { |
604 var size = /** @type {!Size} */ (event.data); | 604 if (typeof event.data.width !== "undefined") { |
605 if (size.width !== this.settings.deviceWidth.get()) | 605 var width = /** @type {number} */ (event.data.width); |
606 this.settings.deviceWidth.set(size.width); | 606 if (width !== this.settings.deviceWidth.get()) |
607 if (size.height !== this.settings.deviceHeight.get()) | 607 this.settings.deviceWidth.set(width); |
608 this.settings.deviceHeight.set(size.height); | 608 } |
| 609 if (typeof event.data.height !== "undefined") { |
| 610 var height = /** @type {number} */ (event.data.height); |
| 611 if (height !== this.settings.deviceHeight.get()) |
| 612 this.settings.deviceHeight.set(height); |
| 613 } |
609 }, | 614 }, |
610 | 615 |
611 _deviceMetricsChanged: function() | 616 _deviceMetricsChanged: function() |
612 { | 617 { |
613 this._showRulersChanged(); | 618 this._showRulersChanged(); |
614 | 619 |
615 if (this._deviceMetricsChangedListenerMuted) | 620 if (this._deviceMetricsChangedListenerMuted) |
616 return; | 621 return; |
617 var responsiveDesignAvailableAndDisabled = this._responsiveDesignAvailab
le && (!WebInspector.settings.responsiveDesign.enabled.get() || !this._pageResiz
er); | 622 var responsiveDesignAvailableAndDisabled = this._responsiveDesignAvailab
le && (!WebInspector.settings.responsiveDesign.enabled.get() || !this._pageResiz
er); |
618 var overrideDeviceResolution = this.settings.overrideDeviceResolution.ge
t(); | 623 var overrideDeviceResolution = this.settings.overrideDeviceResolution.ge
t(); |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1084 }, | 1089 }, |
1085 | 1090 |
1086 __proto__: WebInspector.Object.prototype | 1091 __proto__: WebInspector.Object.prototype |
1087 } | 1092 } |
1088 | 1093 |
1089 | 1094 |
1090 /** | 1095 /** |
1091 * @type {!WebInspector.OverridesSupport} | 1096 * @type {!WebInspector.OverridesSupport} |
1092 */ | 1097 */ |
1093 WebInspector.overridesSupport; | 1098 WebInspector.overridesSupport; |
OLD | NEW |