Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: Source/devtools/front_end/sdk/OverridesSupport.js

Issue 321513004: [DevTools] Limit responsive design resize request to width/height only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698