OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 /** | 172 /** |
173 * @constructor | 173 * @constructor |
174 * @extends {WebInspector.OverridesView.Tab} | 174 * @extends {WebInspector.OverridesView.Tab} |
175 */ | 175 */ |
176 WebInspector.OverridesView.DeviceTab = function() | 176 WebInspector.OverridesView.DeviceTab = function() |
177 { | 177 { |
178 WebInspector.OverridesView.Tab.call(this, "device", WebInspector.UIString("D
evice"), [ | 178 WebInspector.OverridesView.Tab.call(this, "device", WebInspector.UIString("D
evice"), [ |
179 WebInspector.overridesSupport.settings.emulateResolution, | 179 WebInspector.overridesSupport.settings.emulateResolution, |
180 WebInspector.overridesSupport.settings.deviceScaleFactor, | 180 WebInspector.overridesSupport.settings.deviceScaleFactor, |
181 WebInspector.overridesSupport.settings.emulateViewport, | 181 WebInspector.overridesSupport.settings.emulateViewport |
182 WebInspector.overridesSupport.settings.deviceTextAutosizing | |
183 ]); | 182 ]); |
184 this.element.classList.add("overrides-device"); | 183 this.element.classList.add("overrides-device"); |
185 | 184 |
186 this.element.appendChild(this._createDeviceElement()); | 185 this.element.appendChild(this._createDeviceElement()); |
187 | 186 |
188 var footnote = this.element.createChild("p", "help-footnote"); | 187 var footnote = this.element.createChild("p", "help-footnote"); |
189 var footnoteLink = footnote.createChild("a"); | 188 var footnoteLink = footnote.createChild("a"); |
190 footnoteLink.href = "https://developers.google.com/chrome-developer-tools/do
cs/mobile-emulation"; | 189 footnoteLink.href = "https://developers.google.com/chrome-developer-tools/do
cs/mobile-emulation"; |
191 footnoteLink.target = "_blank"; | 190 footnoteLink.target = "_blank"; |
192 footnoteLink.createTextChild(WebInspector.UIString("More information about s
creen emulation")); | 191 footnoteLink.createTextChild(WebInspector.UIString("More information about s
creen emulation")); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 rowElement = tableElement.createChild("tr"); | 224 rowElement = tableElement.createChild("tr"); |
226 cellElement = rowElement.createChild("td"); | 225 cellElement = rowElement.createChild("td"); |
227 cellElement.colSpan = 4; | 226 cellElement.colSpan = 4; |
228 | 227 |
229 rowElement = tableElement.createChild("tr"); | 228 rowElement = tableElement.createChild("tr"); |
230 rowElement.title = WebInspector.UIString("Ratio between a device's physi
cal pixels and device-independent pixels."); | 229 rowElement.title = WebInspector.UIString("Ratio between a device's physi
cal pixels and device-independent pixels."); |
231 rowElement.createChild("td").appendChild(document.createTextNode(WebInsp
ector.UIString("Device pixel ratio:"))); | 230 rowElement.createChild("td").appendChild(document.createTextNode(WebInsp
ector.UIString("Device pixel ratio:"))); |
232 rowElement.createChild("td").appendChild(WebInspector.SettingsUI.createS
ettingInputField("", WebInspector.overridesSupport.settings.deviceScaleFactor, t
rue, 4, "80px", WebInspector.OverridesSupport.deviceScaleFactorValidator, true,
true, WebInspector.UIString("\u2013"))); | 231 rowElement.createChild("td").appendChild(WebInspector.SettingsUI.createS
ettingInputField("", WebInspector.overridesSupport.settings.deviceScaleFactor, t
rue, 4, "80px", WebInspector.OverridesSupport.deviceScaleFactorValidator, true,
true, WebInspector.UIString("\u2013"))); |
233 | 232 |
234 var viewportCheckbox = this._createSettingCheckbox(WebInspector.UIString
("Emulate mobile"), WebInspector.overridesSupport.settings.emulateViewport); | 233 var viewportCheckbox = this._createSettingCheckbox(WebInspector.UIString
("Emulate mobile"), WebInspector.overridesSupport.settings.emulateViewport); |
235 viewportCheckbox.title = WebInspector.UIString("Enable meta viewport, ov
erlay scrollbars and default 980px body width"); | 234 viewportCheckbox.title = WebInspector.UIString("Enable meta viewport, ov
erlay scrollbars, text autosizing and default 980px body width"); |
236 fieldsetElement.appendChild(viewportCheckbox); | 235 fieldsetElement.appendChild(viewportCheckbox); |
237 | 236 |
238 // FIXME: move text autosizing to the "misc" tab together with css media
, and separate it from device emulation. | |
239 var textAutosizingOverrideElement = this._createSettingCheckbox(WebInspe
ctor.UIString("Enable text autosizing "), WebInspector.overridesSupport.settings
.deviceTextAutosizing); | |
240 textAutosizingOverrideElement.title = WebInspector.UIString("Text autosi
zing is the feature that boosts font sizes on mobile devices."); | |
241 fieldsetElement.appendChild(textAutosizingOverrideElement); | |
242 | |
243 fieldsetElement.appendChild(this._createSettingCheckbox(WebInspector.UIS
tring("Shrink to fit"), WebInspector.overridesSupport.settings.deviceFitWindow))
; | 237 fieldsetElement.appendChild(this._createSettingCheckbox(WebInspector.UIS
tring("Shrink to fit"), WebInspector.overridesSupport.settings.deviceFitWindow))
; |
244 | 238 |
245 return fieldsetElement; | 239 return fieldsetElement; |
246 }, | 240 }, |
247 | 241 |
248 __proto__: WebInspector.OverridesView.Tab.prototype | 242 __proto__: WebInspector.OverridesView.Tab.prototype |
249 } | 243 } |
250 | 244 |
251 /** | 245 /** |
252 * @constructor | 246 * @constructor |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 | 634 |
641 WebInspector.OverridesView.Revealer.prototype = { | 635 WebInspector.OverridesView.Revealer.prototype = { |
642 /** | 636 /** |
643 * @param {!Object} overridesSupport | 637 * @param {!Object} overridesSupport |
644 */ | 638 */ |
645 reveal: function(overridesSupport) | 639 reveal: function(overridesSupport) |
646 { | 640 { |
647 WebInspector.inspectorView.showViewInDrawer("emulation"); | 641 WebInspector.inspectorView.showViewInDrawer("emulation"); |
648 } | 642 } |
649 } | 643 } |
OLD | NEW |