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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/accessibility/AXTreePane.js

Issue 2782773002: [DevTools] Remove SDKModels' fromTarget methods (Closed)
Patch Set: addressed review comments Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 Accessibility.AXTreePane = class extends Accessibility.AccessibilitySubPane { 7 Accessibility.AXTreePane = class extends Accessibility.AccessibilitySubPane {
8 /** 8 /**
9 * @param {!Accessibility.AccessibilitySidebarView} axSidebarView 9 * @param {!Accessibility.AccessibilitySidebarView} axSidebarView
10 */ 10 */
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 */ 219 */
220 setPreselected(x) { 220 setPreselected(x) {
221 if (this._preselected === x) 221 if (this._preselected === x)
222 return; 222 return;
223 this._preselected = x; 223 this._preselected = x;
224 this.listItemElement.classList.toggle('hovered', x || this._hovered); 224 this.listItemElement.classList.toggle('hovered', x || this._hovered);
225 this.setFocusable(x); 225 this.setFocusable(x);
226 if (this._preselected) { 226 if (this._preselected) {
227 this._treePane._setPreselectedTreeElement(this); 227 this._treePane._setPreselectedTreeElement(this);
228 this.listItemElement.classList.toggle('hovered', true); 228 this.listItemElement.classList.toggle('hovered', true);
229 this._axNode.highlightDOMNode(); 229 if (this._axNode.deferredDOMNode())
230 this._axNode.deferredDOMNode().highlight();
230 } 231 }
231 } 232 }
232 233
233 /** 234 /**
234 * @param {boolean} x 235 * @param {boolean} x
235 */ 236 */
236 setHovered(x) { 237 setHovered(x) {
237 if (this._hovered === x) 238 if (this._hovered === x)
238 return; 239 return;
239 this._hovered = x; 240 this._hovered = x;
240 this.listItemElement.classList.toggle('hovered', x || this._preselected); 241 this.listItemElement.classList.toggle('hovered', x || this._preselected);
241 if (this._hovered) { 242 if (this._hovered) {
242 this._treePane.setHoveredElement(this); 243 this._treePane.setHoveredElement(this);
243 this.listItemElement.classList.toggle('hovered', true); 244 this.listItemElement.classList.toggle('hovered', true);
244 this._axNode.highlightDOMNode(); 245 if (this._axNode.deferredDOMNode())
246 this._axNode.deferredDOMNode().highlight();
245 } 247 }
246 } 248 }
247 249
248 focus() { 250 focus() {
249 this.listItemElement.focus(); 251 this.listItemElement.focus();
250 } 252 }
251 253
252 /** 254 /**
253 * @param {boolean} focusable 255 * @param {boolean} focusable
254 */ 256 */
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 483
482 return super.select(omitFocus, selectedByUser); 484 return super.select(omitFocus, selectedByUser);
483 } 485 }
484 }; 486 };
485 487
486 /** @type {!Object<string, string>} */ 488 /** @type {!Object<string, string>} */
487 Accessibility.AXNodeTreeElement.RoleStyles = { 489 Accessibility.AXNodeTreeElement.RoleStyles = {
488 internalRole: 'ax-internal-role', 490 internalRole: 'ax-internal-role',
489 role: 'ax-role', 491 role: 'ax-role',
490 }; 492 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698