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 28 matching lines...) Expand all Loading... |
39 this.registerRequiredCSS("helpScreen.css"); | 39 this.registerRequiredCSS("helpScreen.css"); |
40 this.element.classList.add("overrides-view"); | 40 this.element.classList.add("overrides-view"); |
41 | 41 |
42 this._tabbedPane = new WebInspector.TabbedPane(); | 42 this._tabbedPane = new WebInspector.TabbedPane(); |
43 this._tabbedPane.shrinkableTabs = false; | 43 this._tabbedPane.shrinkableTabs = false; |
44 this._tabbedPane.verticalTabLayout = true; | 44 this._tabbedPane.verticalTabLayout = true; |
45 | 45 |
46 if (!WebInspector.overridesSupport.isInspectingDevice()) { | 46 if (!WebInspector.overridesSupport.isInspectingDevice()) { |
47 if (!WebInspector.overridesSupport.responsiveDesignAvailable()) | 47 if (!WebInspector.overridesSupport.responsiveDesignAvailable()) |
48 new WebInspector.OverridesView.DeviceTab().appendAsTab(this._tabbedP
ane); | 48 new WebInspector.OverridesView.DeviceTab().appendAsTab(this._tabbedP
ane); |
49 new WebInspector.OverridesView.ViewportTab().appendAsTab(this._tabbedPan
e); | |
50 } | 49 } |
51 if (!WebInspector.overridesSupport.responsiveDesignAvailable()) { | 50 new WebInspector.OverridesView.ViewportTab().appendAsTab(this._tabbedPane); |
52 new WebInspector.OverridesView.UserAgentTab().appendAsTab(this._tabbedPa
ne); | 51 new WebInspector.OverridesView.NetworkTab().appendAsTab(this._tabbedPane); |
53 new WebInspector.OverridesView.NetworkTab().appendAsTab(this._tabbedPane
); | |
54 } | |
55 new WebInspector.OverridesView.SensorsTab().appendAsTab(this._tabbedPane); | 52 new WebInspector.OverridesView.SensorsTab().appendAsTab(this._tabbedPane); |
56 | 53 |
57 this._lastSelectedTabSetting = WebInspector.settings.createSetting("lastSele
ctedEmulateTab", "device"); | 54 this._lastSelectedTabSetting = WebInspector.settings.createSetting("lastSele
ctedEmulateTab", "device"); |
58 this._tabbedPane.selectTab(this._lastSelectedTabSetting.get()); | 55 this._tabbedPane.selectTab(this._lastSelectedTabSetting.get()); |
59 this._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabSele
cted, this._tabSelected, this); | 56 this._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabSele
cted, this._tabSelected, this); |
60 this._tabbedPane.show(this.element); | 57 this._tabbedPane.show(this.element); |
61 | 58 |
62 this._warningFooter = this.element.createChild("div", "overrides-footer"); | 59 this._warningFooter = this.element.createChild("div", "overrides-footer"); |
63 this._overridesWarningUpdated(); | 60 this._overridesWarningUpdated(); |
64 WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSupport
.Events.OverridesWarningUpdated, this._overridesWarningUpdated, this); | 61 WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSupport
.Events.OverridesWarningUpdated, this._overridesWarningUpdated, this); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 139 |
143 __proto__: WebInspector.VBox.prototype | 140 __proto__: WebInspector.VBox.prototype |
144 } | 141 } |
145 | 142 |
146 /** | 143 /** |
147 * @constructor | 144 * @constructor |
148 * @extends {WebInspector.OverridesView.Tab} | 145 * @extends {WebInspector.OverridesView.Tab} |
149 */ | 146 */ |
150 WebInspector.OverridesView.DeviceTab = function() | 147 WebInspector.OverridesView.DeviceTab = function() |
151 { | 148 { |
152 WebInspector.OverridesView.Tab.call(this, "device", WebInspector.UIString("D
evice"), []); | 149 WebInspector.OverridesView.Tab.call(this, "device", WebInspector.UIString("D
evice"), [WebInspector.overridesSupport.settings.emulateDevice]); |
153 this.element.classList.add("overrides-device"); | 150 this.element.classList.add("overrides-device"); |
154 | 151 |
155 this._deviceSelectElement = WebInspector.overridesSupport.createDeviceSelect
(document); | 152 this.element.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebIn
spector.UIString("Device"), WebInspector.overridesSupport.settings.emulateDevice
, true)); |
156 this._deviceSelectElement.addEventListener("change", this._updateValueLabels
.bind(this), false); | 153 this.element.appendChild(this._createDeviceElement()); |
157 this._deviceSelectElement.addEventListener("keypress", this._keyPressed.bind
(this), false); | |
158 this.element.appendChild(this._deviceSelectElement); | |
159 | |
160 var buttonsBar = this.element.createChild("div"); | |
161 var emulateButton = buttonsBar.createChild("button", "settings-tab-text-butt
on"); | |
162 emulateButton.textContent = WebInspector.UIString("Emulate"); | |
163 emulateButton.addEventListener("click", this._emulateButtonClicked.bind(this
), false); | |
164 emulateButton.disabled = WebInspector.overridesSupport.isInspectingDevice(); | |
165 | |
166 var resetButton = buttonsBar.createChild("button", "settings-tab-text-button
"); | |
167 resetButton.textContent = WebInspector.UIString("Reset"); | |
168 resetButton.addEventListener("click", this._resetButtonClicked.bind(this), f
alse); | |
169 this._resetButton = resetButton; | |
170 | |
171 this._viewportValueLabel = this.element.createChild("div", "overrides-device
-value-label"); | |
172 this._viewportValueLabel.textContent = WebInspector.UIString("Viewport:"); | |
173 this._viewportValueElement = this._viewportValueLabel.createChild("span", "o
verrides-device-value"); | |
174 | |
175 this._userAgentLabel = this.element.createChild("div", "overrides-device-val
ue-label"); | |
176 this._userAgentLabel.textContent = WebInspector.UIString("User agent:"); | |
177 this._userAgentValueElement = this._userAgentLabel.createChild("span", "over
rides-device-value"); | |
178 | |
179 this._updateValueLabels(); | |
180 WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSupport
.Events.HasActiveOverridesChanged, this._hasActiveOverridesChanged, this); | |
181 this._hasActiveOverridesChanged(); | |
182 } | |
183 | |
184 WebInspector.OverridesView.DeviceTab.prototype = { | |
185 /** | |
186 * @param {?Event} e | |
187 */ | |
188 _keyPressed: function(e) | |
189 { | |
190 if (e.keyCode === WebInspector.KeyboardShortcut.Keys.Enter.code) | |
191 this._emulateButtonClicked(); | |
192 }, | |
193 | |
194 _emulateButtonClicked: function() | |
195 { | |
196 var option = this._deviceSelectElement.options[this._deviceSelectElement
.selectedIndex]; | |
197 WebInspector.overridesSupport.emulateDevice(option.metrics, option.userA
gent); | |
198 }, | |
199 | |
200 _resetButtonClicked: function() | |
201 { | |
202 WebInspector.overridesSupport.reset(); | |
203 }, | |
204 | |
205 _hasActiveOverridesChanged: function() | |
206 { | |
207 this._resetButton.disabled = !WebInspector.overridesSupport.hasActiveOve
rrides(); | |
208 }, | |
209 | |
210 _updateValueLabels: function() | |
211 { | |
212 var option = this._deviceSelectElement.options[this._deviceSelectElement
.selectedIndex]; | |
213 var metrics; | |
214 if (option.metrics && (metrics = WebInspector.OverridesSupport.DeviceMet
rics.parseSetting(option.metrics))) | |
215 this._viewportValueElement.textContent = WebInspector.UIString("%s \
xD7 %s, devicePixelRatio = %s", metrics.width, metrics.height, metrics.deviceSca
leFactor); | |
216 else | |
217 this._viewportValueElement.textContent = ""; | |
218 this._userAgentValueElement.textContent = option.userAgent || ""; | |
219 }, | |
220 | |
221 __proto__: WebInspector.OverridesView.Tab.prototype | |
222 } | |
223 | |
224 | |
225 /** | |
226 * @constructor | |
227 * @extends {WebInspector.OverridesView.Tab} | |
228 */ | |
229 WebInspector.OverridesView.ViewportTab = function() | |
230 { | |
231 var settings = [WebInspector.overridesSupport.settings.overrideCSSMedia]; | |
232 if (!WebInspector.overridesSupport.responsiveDesignAvailable()) | |
233 settings = settings.concat([WebInspector.overridesSupport.settings.overr
ideDeviceResolution, WebInspector.overridesSupport.settings.emulateViewport]); | |
234 WebInspector.OverridesView.Tab.call(this, "viewport", WebInspector.UIString(
"Screen"), settings); | |
235 this.element.classList.add("overrides-viewport"); | |
236 | |
237 if (!WebInspector.overridesSupport.responsiveDesignAvailable()) { | |
238 this._createDeviceMetricsElement(); | |
239 var checkbox = this._createSettingCheckbox(WebInspector.UIString("Emulat
e viewport"), WebInspector.overridesSupport.settings.emulateViewport); | |
240 this.element.appendChild(checkbox); | |
241 } | |
242 this._createMediaEmulationFragment(); | |
243 | 154 |
244 var footnote = this.element.createChild("p", "help-footnote"); | 155 var footnote = this.element.createChild("p", "help-footnote"); |
245 var footnoteLink = footnote.createChild("a"); | 156 var footnoteLink = footnote.createChild("a"); |
246 footnoteLink.href = "https://developers.google.com/chrome-developer-tools/do
cs/mobile-emulation"; | 157 footnoteLink.href = "https://developers.google.com/chrome-developer-tools/do
cs/mobile-emulation"; |
247 footnoteLink.target = "_blank"; | 158 footnoteLink.target = "_blank"; |
248 footnoteLink.createTextChild(WebInspector.UIString("More information about s
creen emulation")); | 159 footnoteLink.createTextChild(WebInspector.UIString("More information about s
creen emulation")); |
249 } | 160 } |
250 | 161 |
251 WebInspector.OverridesView.ViewportTab.prototype = { | 162 WebInspector.OverridesView.DeviceTab.prototype = { |
252 _createDeviceMetricsElement: function() | 163 _createDeviceElement: function() |
253 { | 164 { |
254 var checkbox = this._createSettingCheckbox(WebInspector.UIString("Emulat
e screen"), WebInspector.overridesSupport.settings.overrideDeviceResolution); | 165 var fieldsetElement = WebInspector.SettingsUI.createSettingFieldset(WebI
nspector.overridesSupport.settings.emulateDevice); |
255 checkbox.firstChild.disabled = WebInspector.overridesSupport.isInspectin
gDevice(); | 166 fieldsetElement.id = "metrics-override-section"; |
256 this.element.appendChild(checkbox); | |
257 | 167 |
258 var fieldsetElement = WebInspector.SettingsUI.createSettingFieldset(WebI
nspector.overridesSupport.settings.overrideDeviceResolution); | 168 fieldsetElement.appendChild(WebInspector.overridesSupport.createDeviceSe
lect(document)); |
259 if (WebInspector.overridesSupport.isInspectingDevice()) | |
260 fieldsetElement.disabled = true; | |
261 fieldsetElement.id = "metrics-override-section"; | |
262 | 169 |
263 var tableElement = fieldsetElement.createChild("table", "nowrap"); | 170 var tableElement = fieldsetElement.createChild("table", "nowrap"); |
264 | 171 |
265 var rowElement = tableElement.createChild("tr"); | 172 var rowElement = tableElement.createChild("tr"); |
266 var cellElement = rowElement.createChild("td"); | 173 var cellElement = rowElement.createChild("td"); |
267 cellElement.appendChild(document.createTextNode(WebInspector.UIString("R
esolution:"))); | 174 cellElement.appendChild(document.createTextNode(WebInspector.UIString("R
esolution:"))); |
268 cellElement = rowElement.createChild("td"); | 175 cellElement = rowElement.createChild("td"); |
269 | 176 |
270 var widthOverrideInput = WebInspector.SettingsUI.createSettingInputField
("", WebInspector.overridesSupport.settings.deviceWidth, true, 4, "80px", WebIns
pector.OverridesSupport.integerInputValidator, true); | 177 var widthOverrideInput = WebInspector.SettingsUI.createSettingInputField
("", WebInspector.overridesSupport.settings.deviceWidth, true, 4, "80px", WebIns
pector.OverridesSupport.integerInputValidator, true); |
271 cellElement.appendChild(widthOverrideInput); | 178 cellElement.appendChild(widthOverrideInput); |
(...skipping 13 matching lines...) Expand all Loading... |
285 widthRangeInput.type = "range"; | 192 widthRangeInput.type = "range"; |
286 widthRangeInput.min = 100; | 193 widthRangeInput.min = 100; |
287 widthRangeInput.max = 2000; | 194 widthRangeInput.max = 2000; |
288 cellElement.appendChild(widthRangeInput); | 195 cellElement.appendChild(widthRangeInput); |
289 | 196 |
290 rowElement = tableElement.createChild("tr"); | 197 rowElement = tableElement.createChild("tr"); |
291 rowElement.title = WebInspector.UIString("Ratio between a device's physi
cal pixels and device-independent pixels."); | 198 rowElement.title = WebInspector.UIString("Ratio between a device's physi
cal pixels and device-independent pixels."); |
292 rowElement.createChild("td").appendChild(document.createTextNode(WebInsp
ector.UIString("Device pixel ratio:"))); | 199 rowElement.createChild("td").appendChild(document.createTextNode(WebInsp
ector.UIString("Device pixel ratio:"))); |
293 rowElement.createChild("td").appendChild(WebInspector.SettingsUI.createS
ettingInputField("", WebInspector.overridesSupport.settings.deviceScaleFactor, t
rue, 4, "80px", WebInspector.OverridesSupport.doubleInputValidator, true)); | 200 rowElement.createChild("td").appendChild(WebInspector.SettingsUI.createS
ettingInputField("", WebInspector.overridesSupport.settings.deviceScaleFactor, t
rue, 4, "80px", WebInspector.OverridesSupport.doubleInputValidator, true)); |
294 | 201 |
| 202 var viewportCheckbox = this._createSettingCheckbox(WebInspector.UIString
("Emulate mobile"), WebInspector.overridesSupport.settings.emulateViewport); |
| 203 viewportCheckbox.title = WebInspector.UIString("Enable meta viewport, ov
erlay scrollbars and default 980px body width"); |
| 204 fieldsetElement.appendChild(viewportCheckbox); |
| 205 |
| 206 // FIXME: move text autosizing to the "misc" tab together with css media
, and separate it from device emulation. |
295 var textAutosizingOverrideElement = this._createSettingCheckbox(WebInspe
ctor.UIString("Enable text autosizing "), WebInspector.overridesSupport.settings
.deviceTextAutosizing); | 207 var textAutosizingOverrideElement = this._createSettingCheckbox(WebInspe
ctor.UIString("Enable text autosizing "), WebInspector.overridesSupport.settings
.deviceTextAutosizing); |
296 textAutosizingOverrideElement.title = WebInspector.UIString("Text autosi
zing is the feature that boosts font sizes on mobile devices."); | 208 textAutosizingOverrideElement.title = WebInspector.UIString("Text autosi
zing is the feature that boosts font sizes on mobile devices."); |
297 fieldsetElement.appendChild(textAutosizingOverrideElement); | 209 fieldsetElement.appendChild(textAutosizingOverrideElement); |
298 | 210 |
299 checkbox = this._createSettingCheckbox(WebInspector.UIString("Shrink to
fit"), WebInspector.overridesSupport.settings.deviceFitWindow); | 211 fieldsetElement.appendChild(this._createSettingCheckbox(WebInspector.UIS
tring("Shrink to fit"), WebInspector.overridesSupport.settings.deviceFitWindow))
; |
300 fieldsetElement.appendChild(checkbox); | 212 |
301 this.element.appendChild(fieldsetElement); | 213 return fieldsetElement; |
302 }, | 214 }, |
303 | 215 |
| 216 __proto__: WebInspector.OverridesView.Tab.prototype |
| 217 } |
| 218 |
| 219 |
| 220 /** |
| 221 * @constructor |
| 222 * @extends {WebInspector.OverridesView.Tab} |
| 223 */ |
| 224 WebInspector.OverridesView.ViewportTab = function() |
| 225 { |
| 226 var settings = [WebInspector.overridesSupport.settings.overrideCSSMedia]; |
| 227 WebInspector.OverridesView.Tab.call(this, "viewport", WebInspector.UIString(
"Screen"), settings); |
| 228 this.element.classList.add("overrides-viewport"); |
| 229 |
| 230 this._createMediaEmulationFragment(); |
| 231 } |
| 232 |
| 233 WebInspector.OverridesView.ViewportTab.prototype = { |
304 _createMediaEmulationFragment: function() | 234 _createMediaEmulationFragment: function() |
305 { | 235 { |
306 var checkbox = WebInspector.SettingsUI.createSettingCheckbox(WebInspecto
r.UIString("CSS media"), WebInspector.overridesSupport.settings.overrideCSSMedia
, true); | 236 var checkbox = WebInspector.SettingsUI.createSettingCheckbox(WebInspecto
r.UIString("CSS media"), WebInspector.overridesSupport.settings.overrideCSSMedia
, true); |
307 var fieldsetElement = WebInspector.SettingsUI.createSettingFieldset(WebI
nspector.overridesSupport.settings.overrideCSSMedia); | 237 var fieldsetElement = WebInspector.SettingsUI.createSettingFieldset(WebI
nspector.overridesSupport.settings.overrideCSSMedia); |
308 if (WebInspector.overridesSupport.isInspectingDevice()) | 238 if (WebInspector.overridesSupport.isInspectingDevice()) |
309 fieldsetElement.disabled = true; | 239 fieldsetElement.disabled = true; |
310 | 240 |
311 var mediaSelectElement = fieldsetElement.createChild("select"); | 241 var mediaSelectElement = fieldsetElement.createChild("select"); |
312 var mediaTypes = WebInspector.CSSStyleModel.MediaTypes; | 242 var mediaTypes = WebInspector.CSSStyleModel.MediaTypes; |
313 var defaultMedia = WebInspector.overridesSupport.settings.emulatedCSSMed
ia.get(); | 243 var defaultMedia = WebInspector.overridesSupport.settings.emulatedCSSMed
ia.get(); |
(...skipping 25 matching lines...) Expand all Loading... |
339 }, | 269 }, |
340 | 270 |
341 __proto__: WebInspector.OverridesView.Tab.prototype | 271 __proto__: WebInspector.OverridesView.Tab.prototype |
342 } | 272 } |
343 | 273 |
344 | 274 |
345 /** | 275 /** |
346 * @constructor | 276 * @constructor |
347 * @extends {WebInspector.OverridesView.Tab} | 277 * @extends {WebInspector.OverridesView.Tab} |
348 */ | 278 */ |
349 WebInspector.OverridesView.UserAgentTab = function() | |
350 { | |
351 WebInspector.OverridesView.Tab.call(this, "user-agent", WebInspector.UIStrin
g("User Agent"), [WebInspector.overridesSupport.settings.overrideUserAgent]); | |
352 this.element.classList.add("overrides-user-agent"); | |
353 var checkbox = this._createSettingCheckbox(WebInspector.UIString("Spoof user
agent"), WebInspector.overridesSupport.settings.overrideUserAgent); | |
354 this.element.appendChild(checkbox); | |
355 this.element.appendChild(this._createUserAgentSelectRowElement()); | |
356 } | |
357 | |
358 WebInspector.OverridesView.UserAgentTab.prototype = { | |
359 /** | |
360 * @return {!Element} | |
361 */ | |
362 _createUserAgentSelectRowElement: function() | |
363 { | |
364 var fieldsetElement = WebInspector.SettingsUI.createSettingFieldset(WebI
nspector.overridesSupport.settings.overrideUserAgent); | |
365 var userAgentSelectAndInput = WebInspector.overridesSupport.createUserAg
entSelectAndInput(document); | |
366 fieldsetElement.appendChild(userAgentSelectAndInput.select); | |
367 fieldsetElement.createChild("br"); | |
368 fieldsetElement.appendChild(userAgentSelectAndInput.input); | |
369 return fieldsetElement; | |
370 }, | |
371 | |
372 __proto__: WebInspector.OverridesView.Tab.prototype | |
373 } | |
374 | |
375 | |
376 /** | |
377 * @constructor | |
378 * @extends {WebInspector.OverridesView.Tab} | |
379 */ | |
380 WebInspector.OverridesView.NetworkTab = function() | 279 WebInspector.OverridesView.NetworkTab = function() |
381 { | 280 { |
382 WebInspector.OverridesView.Tab.call(this, "network", WebInspector.UIString("
Network"), [WebInspector.overridesSupport.settings.emulateNetworkConditions]); | 281 WebInspector.OverridesView.Tab.call(this, "network", WebInspector.UIString("
Network"), [WebInspector.overridesSupport.settings.emulateNetworkConditions, Web
Inspector.overridesSupport.settings.overrideUserAgent]); |
383 this.element.classList.add("overrides-network"); | 282 this.element.classList.add("overrides-network"); |
384 this.element.appendChild(this._createSettingCheckbox(WebInspector.UIString("
Limit network throughput"), WebInspector.overridesSupport.settings.emulateNetwor
kConditions)); | 283 this.element.appendChild(this._createSettingCheckbox(WebInspector.UIString("
Limit network throughput"), WebInspector.overridesSupport.settings.emulateNetwor
kConditions)); |
385 this.element.appendChild(this._createNetworkConditionsElement()); | 284 this.element.appendChild(this._createNetworkConditionsElement()); |
| 285 this.element.appendChild(this._createSettingCheckbox(WebInspector.UIString("
Spoof user agent"), WebInspector.overridesSupport.settings.overrideUserAgent)); |
| 286 this.element.appendChild(this._createUserAgentSelectRowElement()); |
386 } | 287 } |
387 | 288 |
388 WebInspector.OverridesView.NetworkTab.prototype = { | 289 WebInspector.OverridesView.NetworkTab.prototype = { |
389 /** | 290 /** |
390 * @return {!Element} | 291 * @return {!Element} |
391 */ | 292 */ |
392 _createNetworkConditionsElement: function() | 293 _createNetworkConditionsElement: function() |
393 { | 294 { |
394 var fieldsetElement = WebInspector.SettingsUI.createSettingFieldset(WebI
nspector.overridesSupport.settings.emulateNetworkConditions); | 295 var fieldsetElement = WebInspector.SettingsUI.createSettingFieldset(WebI
nspector.overridesSupport.settings.emulateNetworkConditions); |
395 | 296 |
396 var networkThroughput = WebInspector.overridesSupport.createNetworkThrou
ghputSelect(document); | 297 var networkThroughput = WebInspector.overridesSupport.createNetworkThrou
ghputSelect(document); |
397 fieldsetElement.appendChild(networkThroughput); | 298 fieldsetElement.appendChild(networkThroughput); |
398 fieldsetElement.createChild("br"); | 299 fieldsetElement.createChild("br"); |
399 | 300 |
400 var networkDomains = WebInspector.SettingsUI.createSettingInputField("Fo
r domains:", WebInspector.overridesSupport.settings.networkConditionsDomains, fa
lse, 0, "", WebInspector.OverridesSupport.networkDomainsValidator, false); | 301 var networkDomains = WebInspector.SettingsUI.createSettingInputField("Fo
r domains:", WebInspector.overridesSupport.settings.networkConditionsDomains, fa
lse, 0, "", WebInspector.OverridesSupport.networkDomainsValidator, false); |
401 networkDomains.querySelector("input").placeholder = WebInspector.UIStrin
g("Leave empty to limit all domains"); | 302 networkDomains.querySelector("input").placeholder = WebInspector.UIStrin
g("Leave empty to limit all domains"); |
402 fieldsetElement.appendChild(networkDomains); | 303 fieldsetElement.appendChild(networkDomains); |
403 | 304 |
404 return fieldsetElement; | 305 return fieldsetElement; |
405 }, | 306 }, |
406 | 307 |
| 308 /** |
| 309 * @return {!Element} |
| 310 */ |
| 311 _createUserAgentSelectRowElement: function() |
| 312 { |
| 313 var fieldsetElement = WebInspector.SettingsUI.createSettingFieldset(WebI
nspector.overridesSupport.settings.overrideUserAgent); |
| 314 var userAgentSelectAndInput = WebInspector.overridesSupport.createUserAg
entSelectAndInput(document); |
| 315 fieldsetElement.appendChild(userAgentSelectAndInput.select); |
| 316 fieldsetElement.createChild("br"); |
| 317 fieldsetElement.appendChild(userAgentSelectAndInput.input); |
| 318 return fieldsetElement; |
| 319 }, |
| 320 |
407 __proto__: WebInspector.OverridesView.Tab.prototype | 321 __proto__: WebInspector.OverridesView.Tab.prototype |
408 } | 322 } |
409 | 323 |
410 | 324 |
411 /** | 325 /** |
412 * @constructor | 326 * @constructor |
413 * @extends {WebInspector.OverridesView.Tab} | 327 * @extends {WebInspector.OverridesView.Tab} |
414 */ | 328 */ |
415 WebInspector.OverridesView.SensorsTab = function() | 329 WebInspector.OverridesView.SensorsTab = function() |
416 { | 330 { |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 | 592 |
679 __proto__ : WebInspector.OverridesView.Tab.prototype | 593 __proto__ : WebInspector.OverridesView.Tab.prototype |
680 } | 594 } |
681 | 595 |
682 /** @enum {string} */ | 596 /** @enum {string} */ |
683 WebInspector.OverridesView.SensorsTab.DeviceOrientationModificationSource = { | 597 WebInspector.OverridesView.SensorsTab.DeviceOrientationModificationSource = { |
684 UserInput: "userInput", | 598 UserInput: "userInput", |
685 UserDrag: "userDrag", | 599 UserDrag: "userDrag", |
686 ResetButton: "resetButton" | 600 ResetButton: "resetButton" |
687 } | 601 } |
OLD | NEW |