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 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 var size = /** @type {!Size} */ (event.data); |
605 if (size.width !== this.settings.deviceWidth.get()) | 605 if (size.width >= 0 && size.width !== this.settings.deviceWidth.get()) |
606 this.settings.deviceWidth.set(size.width); | 606 this.settings.deviceWidth.set(size.width); |
607 if (size.height !== this.settings.deviceHeight.get()) | 607 if (size.height >= 0 && size.height !== this.settings.deviceHeight.get()
) |
608 this.settings.deviceHeight.set(size.height); | 608 this.settings.deviceHeight.set(size.height); |
609 }, | 609 }, |
610 | 610 |
611 _deviceMetricsChanged: function() | 611 _deviceMetricsChanged: function() |
612 { | 612 { |
613 this._showRulersChanged(); | 613 this._showRulersChanged(); |
614 | 614 |
615 if (this._deviceMetricsChangedListenerMuted) | 615 if (this._deviceMetricsChangedListenerMuted) |
616 return; | 616 return; |
617 var responsiveDesignAvailableAndDisabled = this._responsiveDesignAvailab
le && (!WebInspector.settings.responsiveDesign.enabled.get() || !this._pageResiz
er); | 617 var responsiveDesignAvailableAndDisabled = this._responsiveDesignAvailab
le && (!WebInspector.settings.responsiveDesign.enabled.get() || !this._pageResiz
er); |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1084 }, | 1084 }, |
1085 | 1085 |
1086 __proto__: WebInspector.Object.prototype | 1086 __proto__: WebInspector.Object.prototype |
1087 } | 1087 } |
1088 | 1088 |
1089 | 1089 |
1090 /** | 1090 /** |
1091 * @type {!WebInspector.OverridesSupport} | 1091 * @type {!WebInspector.OverridesSupport} |
1092 */ | 1092 */ |
1093 WebInspector.overridesSupport; | 1093 WebInspector.overridesSupport; |
OLD | NEW |