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

Side by Side Diff: Source/devtools/front_end/ResponsiveDesignView.js

Issue 308633003: DevTools: do not update ui on every warning update. (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.VBox} 7 * @extends {WebInspector.VBox}
8 * @implements {WebInspector.OverridesSupport.PageResizer} 8 * @implements {WebInspector.OverridesSupport.PageResizer}
9 * @param {!WebInspector.InspectedPagePlaceholder} inspectedPagePlaceholder 9 * @param {!WebInspector.InspectedPagePlaceholder} inspectedPagePlaceholder
10 */ 10 */
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 447
448 fieldsetElement.createChild("div", "responsive-design-icon responsive-de sign-icon-dpr").title = WebInspector.UIString("Device pixel ratio"); 448 fieldsetElement.createChild("div", "responsive-design-icon responsive-de sign-icon-dpr").title = WebInspector.UIString("Device pixel ratio");
449 fieldsetElement.appendChild(WebInspector.SettingsUI.createSettingInputFi eld("", WebInspector.overridesSupport.settings.deviceScaleFactor, true, 2, "2em" , WebInspector.OverridesSupport.inputValidator, true)); 449 fieldsetElement.appendChild(WebInspector.SettingsUI.createSettingInputFi eld("", WebInspector.overridesSupport.settings.deviceScaleFactor, true, 2, "2em" , WebInspector.OverridesSupport.inputValidator, true));
450 450
451 // Touch and viewport 451 // Touch and viewport
452 fieldsetElement = this._toolbarElement.createChild("fieldset", "responsi ve-design-section"); 452 fieldsetElement = this._toolbarElement.createChild("fieldset", "responsi ve-design-section");
453 fieldsetElement.appendChild(WebInspector.SettingsUI.createSettingCheckbo x(WebInspector.UIString("Touch"), WebInspector.overridesSupport.settings.emulate TouchEvents, true)); 453 fieldsetElement.appendChild(WebInspector.SettingsUI.createSettingCheckbo x(WebInspector.UIString("Touch"), WebInspector.overridesSupport.settings.emulate TouchEvents, true));
454 fieldsetElement.appendChild(WebInspector.SettingsUI.createSettingCheckbo x(WebInspector.UIString("Viewport"), WebInspector.overridesSupport.settings.emul ateViewport, true)); 454 fieldsetElement.appendChild(WebInspector.SettingsUI.createSettingCheckbo x(WebInspector.UIString("Viewport"), WebInspector.overridesSupport.settings.emul ateViewport, true));
455 455
456 // Warning 456 // Warning
457 this._warningMessage = this._responsiveDesignContainer.element.createChi ld("div", "responsive-design-warning"); 457 this._warningMessage = this._responsiveDesignContainer.element.createChi ld("div", "responsive-design-warning hidden");
458 WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSup port.Events.OverridesWarningUpdated, this._overridesWarningUpdated, this); 458 WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSup port.Events.OverridesWarningUpdated, this._overridesWarningUpdated, this);
459 }, 459 },
460 460
461 _overridesWarningUpdated: function() 461 _overridesWarningUpdated: function()
462 { 462 {
463 var message = WebInspector.overridesSupport.warningMessage(); 463 var message = WebInspector.overridesSupport.warningMessage();
464 if (this._warningMessage.textContent === message)
465 return;
464 this._warningMessage.classList.toggle("hidden", !message); 466 this._warningMessage.classList.toggle("hidden", !message);
465 this._warningMessage.textContent = message; 467 this._warningMessage.textContent = message;
466 this._responsiveDesignModeChanged(); 468 this._responsiveDesignModeChanged();
467 this.onResize(); 469 this.onResize();
468 }, 470 },
469 471
470 __proto__: WebInspector.VBox.prototype 472 __proto__: WebInspector.VBox.prototype
471 }; 473 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698