| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 blockElement.appendChild(contentElements[i]); | 68 blockElement.appendChild(contentElements[i]); |
| 69 } | 69 } |
| 70 | 70 |
| 71 this.containerElement = topContainer; | 71 this.containerElement = topContainer; |
| 72 appendBlock([this._createUserAgentControl()]); | 72 appendBlock([this._createUserAgentControl()]); |
| 73 appendBlock([this._createDeviceMetricsControl()]); | 73 appendBlock([this._createDeviceMetricsControl()]); |
| 74 appendBlock([this._createGeolocationOverrideControl()]); | 74 appendBlock([this._createGeolocationOverrideControl()]); |
| 75 appendBlock([this._createDeviceOrientationOverrideControl()]); | 75 appendBlock([this._createDeviceOrientationOverrideControl()]); |
| 76 appendBlock([WebInspector.SettingsTab.createSettingCheckbox(WebInspector.UIS
tring("Emulate touch events"), WebInspector.settings.emulateTouchEvents)]); | 76 appendBlock([WebInspector.SettingsTab.createSettingCheckbox(WebInspector.UIS
tring("Emulate touch events"), WebInspector.settings.emulateTouchEvents)]); |
| 77 appendBlock([this._createMediaEmulationElement()]); | 77 appendBlock([this._createMediaEmulationElement()]); |
| 78 appendBlock([this._createTextAutosizingOverrideControl()]); |
| 78 this._setOverridesActive(enableCheckbox.checked); | 79 this._setOverridesActive(enableCheckbox.checked); |
| 79 | 80 |
| 80 this._statusElement = document.createElement("span"); | 81 this._statusElement = document.createElement("span"); |
| 81 this._statusElement.textContent = WebInspector.UIString("Overrides"); | 82 this._statusElement.textContent = WebInspector.UIString("Overrides"); |
| 82 } | 83 } |
| 83 | 84 |
| 84 WebInspector.OverridesView.showInDrawer = function() | 85 WebInspector.OverridesView.showInDrawer = function() |
| 85 { | 86 { |
| 86 if (!WebInspector.OverridesView._view) | 87 if (!WebInspector.OverridesView._view) |
| 87 WebInspector.OverridesView._view = new WebInspector.OverridesView(); | 88 WebInspector.OverridesView._view = new WebInspector.OverridesView(); |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 mediaSelectElement.addEventListener("change", this._emulateMediaChanged.
bind(this, mediaSelectElement), false); | 581 mediaSelectElement.addEventListener("change", this._emulateMediaChanged.
bind(this, mediaSelectElement), false); |
| 581 return checkbox; | 582 return checkbox; |
| 582 }, | 583 }, |
| 583 | 584 |
| 584 _emulateMediaChanged: function(select) | 585 _emulateMediaChanged: function(select) |
| 585 { | 586 { |
| 586 var media = select.options[select.selectedIndex].value; | 587 var media = select.options[select.selectedIndex].value; |
| 587 WebInspector.settings.emulatedCSSMedia.set(media); | 588 WebInspector.settings.emulatedCSSMedia.set(media); |
| 588 }, | 589 }, |
| 589 | 590 |
| 591 _createTextAutosizingOverrideControl: function() |
| 592 { |
| 593 var overrideCheckbox = WebInspector.SettingsTab.createSettingCheckbox(We
bInspector.UIString("Override text autosizing"), WebInspector.settings.overrideT
extAutosizing); |
| 594 var fieldsetElement = WebInspector.SettingsTab.createSettingFieldset(Web
Inspector.settings.overrideTextAutosizing); |
| 595 overrideCheckbox.appendChild(fieldsetElement); |
| 596 |
| 597 var enableTextAutosizingCheckbox = WebInspector.SettingsTab.createSettin
gCheckbox(WebInspector.UIString("Enable text autosizing"), WebInspector.settings
.enableTextAutosizing); |
| 598 fieldsetElement.appendChild(enableTextAutosizingCheckbox); |
| 599 |
| 600 enableTextAutosizingCheckbox.addEventListener("change", this._enableText
AutosizingChanged.bind(this, enableTextAutosizingCheckbox.checked), false); |
| 601 return overrideCheckbox; |
| 602 }, |
| 603 |
| 604 _enableTextAutosizingChanged: function(enable) |
| 605 { |
| 606 WebInspector.settings.enableTextAutosizing.set(enable); |
| 607 }, |
| 608 |
| 590 __proto__: WebInspector.View.prototype | 609 __proto__: WebInspector.View.prototype |
| 591 } | 610 } |
| OLD | NEW |