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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/emulation/DevicesSettingsTab.js

Issue 2094873002: DevTools: fix deepActiveElement and focus on Dialog when document blurs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.ListWidget.Delegate} 8 * @implements {WebInspector.ListWidget.Delegate}
9 */ 9 */
10 WebInspector.DevicesSettingsTab = function() 10 WebInspector.DevicesSettingsTab = function()
(...skipping 14 matching lines...) Expand all
25 this._list = new WebInspector.ListWidget(this); 25 this._list = new WebInspector.ListWidget(this);
26 this._list.registerRequiredCSS("emulation/devicesSettingsTab.css"); 26 this._list.registerRequiredCSS("emulation/devicesSettingsTab.css");
27 this._list.element.classList.add("devices-list"); 27 this._list.element.classList.add("devices-list");
28 this._list.show(this.containerElement); 28 this._list.show(this.containerElement);
29 29
30 this._muteUpdate = false; 30 this._muteUpdate = false;
31 this._emulatedDevicesList = WebInspector.EmulatedDevicesList.instance(); 31 this._emulatedDevicesList = WebInspector.EmulatedDevicesList.instance();
32 this._emulatedDevicesList.addEventListener(WebInspector.EmulatedDevicesList. Events.CustomDevicesUpdated, this._devicesUpdated, this); 32 this._emulatedDevicesList.addEventListener(WebInspector.EmulatedDevicesList. Events.CustomDevicesUpdated, this._devicesUpdated, this);
33 this._emulatedDevicesList.addEventListener(WebInspector.EmulatedDevicesList. Events.StandardDevicesUpdated, this._devicesUpdated, this); 33 this._emulatedDevicesList.addEventListener(WebInspector.EmulatedDevicesList. Events.StandardDevicesUpdated, this._devicesUpdated, this);
34 34
35 this.setDefaultFocusedElement(this._addCustomButton); 35 this.setDefaultFocusedElement(this._addCustomButton);
dgozman 2016/06/24 17:53:51 ditto
luoe 2016/06/24 20:41:53 This could be safely removed as well.
36 } 36 }
37 37
38 WebInspector.DevicesSettingsTab.prototype = { 38 WebInspector.DevicesSettingsTab.prototype = {
39 /**
40 * @override
41 * @return {!Element}
42 */
43 defaultFocusedElement: function()
44 {
45 return this.contentElement;
46 },
47
39 wasShown: function() 48 wasShown: function()
40 { 49 {
41 WebInspector.VBox.prototype.wasShown.call(this); 50 WebInspector.VBox.prototype.wasShown.call(this);
42 this._devicesUpdated(); 51 this._devicesUpdated();
43 }, 52 },
44 53
45 _devicesUpdated: function() 54 _devicesUpdated: function()
46 { 55 {
47 if (this._muteUpdate) 56 if (this._muteUpdate)
48 return; 57 return;
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 * @return {boolean} 258 * @return {boolean}
250 */ 259 */
251 function scaleValidator(item, index, input) 260 function scaleValidator(item, index, input)
252 { 261 {
253 return WebInspector.DeviceModeModel.deviceScaleFactorValidator(input .value); 262 return WebInspector.DeviceModeModel.deviceScaleFactorValidator(input .value);
254 } 263 }
255 }, 264 },
256 265
257 __proto__: WebInspector.VBox.prototype 266 __proto__: WebInspector.VBox.prototype
258 } 267 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698