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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElementHighlighter.js

Issue 2604883002: DevTools: namespace globals (Closed)
Patch Set: address CL feedback Created 3 years, 11 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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 Elements.ElementsTreeElementHighlighter = class { 7 Elements.ElementsTreeElementHighlighter = class {
8 /** 8 /**
9 * @param {!Elements.ElementsTreeOutline} treeOutline 9 * @param {!Elements.ElementsTreeOutline} treeOutline
10 */ 10 */
11 constructor(treeOutline) { 11 constructor(treeOutline) {
12 this._throttler = new Common.Throttler(100); 12 this._throttler = new Common.Throttler(100);
13 this._treeOutline = treeOutline; 13 this._treeOutline = treeOutline;
14 this._treeOutline.addEventListener(TreeOutline.Events.ElementExpanded, this. _clearState, this); 14 this._treeOutline.addEventListener(UI.TreeOutline.Events.ElementExpanded, th is._clearState, this);
15 this._treeOutline.addEventListener(TreeOutline.Events.ElementCollapsed, this ._clearState, this); 15 this._treeOutline.addEventListener(UI.TreeOutline.Events.ElementCollapsed, t his._clearState, this);
16 this._treeOutline.addEventListener(Elements.ElementsTreeOutline.Events.Selec tedNodeChanged, this._clearState, this); 16 this._treeOutline.addEventListener(Elements.ElementsTreeOutline.Events.Selec tedNodeChanged, this._clearState, this);
17 SDK.targetManager.addModelListener( 17 SDK.targetManager.addModelListener(
18 SDK.DOMModel, SDK.DOMModel.Events.NodeHighlightedInOverlay, this._highli ghtNode, this); 18 SDK.DOMModel, SDK.DOMModel.Events.NodeHighlightedInOverlay, this._highli ghtNode, this);
19 this._treeOutline.domModel().addEventListener(SDK.DOMModel.Events.InspectMod eWillBeToggled, this._clearState, this); 19 this._treeOutline.domModel().addEventListener(SDK.DOMModel.Events.InspectMod eWillBeToggled, this._clearState, this);
20 } 20 }
21 21
22 /** 22 /**
23 * @param {!Common.Event} event 23 * @param {!Common.Event} event
24 */ 24 */
25 _highlightNode(event) { 25 _highlightNode(event) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 _clearState() { 83 _clearState() {
84 if (this._isModifyingTreeOutline) 84 if (this._isModifyingTreeOutline)
85 return; 85 return;
86 86
87 delete this._currentHighlightedElement; 87 delete this._currentHighlightedElement;
88 delete this._alreadyExpandedParentElement; 88 delete this._alreadyExpandedParentElement;
89 delete this._pendingHighlightNode; 89 delete this._pendingHighlightNode;
90 } 90 }
91 }; 91 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698