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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js

Issue 1968843002: DevTools: update default focus element in security panel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address patch 1 comments Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js b/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js
index 56ebfc63b571768ba55311c25b76091a06b24a03..cb748997ddac0b575f322dbd5e7ab5e5dad9da0f 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js
@@ -40,12 +40,12 @@ function TreeOutline(nonFocusable)
/** @type {?function(!TreeElement, !TreeElement):number} */
this._comparator = null;
- this._contentElement = this._rootElement._childrenListNode;
- this._contentElement.addEventListener("keydown", this._treeKeyDown.bind(this), true);
+ this.contentElement = this._rootElement._childrenListNode;
+ this.contentElement.addEventListener("keydown", this._treeKeyDown.bind(this), true);
this.setFocusable(!nonFocusable);
- this.element = this._contentElement;
+ this.element = this.contentElement;
}
TreeOutline.Events = {
@@ -119,7 +119,7 @@ TreeOutline.prototype = {
*/
treeElementFromPoint: function(x, y)
{
- var node = this._contentElement.ownerDocument.deepElementFromPoint(x, y);
+ var node = this.contentElement.ownerDocument.deepElementFromPoint(x, y);
if (!node)
return null;
@@ -152,14 +152,14 @@ TreeOutline.prototype = {
setFocusable: function(focusable)
{
if (focusable)
- this._contentElement.setAttribute("tabIndex", 0);
+ this.contentElement.setAttribute("tabIndex", 0);
else
- this._contentElement.removeAttribute("tabIndex");
+ this.contentElement.removeAttribute("tabIndex");
},
focus: function()
{
- this._contentElement.focus();
+ this.contentElement.focus();
},
/**
@@ -223,7 +223,7 @@ TreeOutline.prototype = {
*/
_treeKeyDown: function(event)
{
- if (event.target !== this._contentElement)
+ if (event.target !== this.contentElement)
return;
if (!this.selectedTreeElement || event.shiftKey || event.metaKey || event.ctrlKey)
@@ -317,14 +317,13 @@ TreeOutline.prototype = {
function TreeOutlineInShadow()
{
TreeOutline.call(this);
- var innerElement = this.element;
- innerElement.classList.add("tree-outline");
+ this.contentElement.classList.add("tree-outline");
// Redefine element to the external one.
this.element = createElement("div");
this._shadowRoot = WebInspector.createShadowRootWithCoreStyles(this.element, "ui/treeoutline.css");
this._disclosureElement = this._shadowRoot.createChild("div", "tree-outline-disclosure");
- this._disclosureElement.appendChild(innerElement);
+ this._disclosureElement.appendChild(this.contentElement);
this._renderSelection = true;
}
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698