Commit eef35019 authored by Livvie Lin's avatar Livvie Lin Committed by Commit Bot

[DevTools] Add tooltips for origins in Security panel sidebar

Bug: 900031
Change-Id: I58e2846c9dd447bed42983db49b1d1ecf0e235b6
Reviewed-on: https://chromium-review.googlesource.com/c/1321671
Commit-Queue: Livvie Lin <livvielin@chromium.org>
Reviewed-by: default avatarErik Luo <luoe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606172}
parent 5c8381c9
...@@ -15,6 +15,7 @@ Security.SecurityPanel = class extends UI.PanelWithSidebar { ...@@ -15,6 +15,7 @@ Security.SecurityPanel = class extends UI.PanelWithSidebar {
title.textContent = Common.UIString('Overview'); title.textContent = Common.UIString('Overview');
this._sidebarMainViewElement = new Security.SecurityPanelSidebarTreeElement( this._sidebarMainViewElement = new Security.SecurityPanelSidebarTreeElement(
title, this._setVisibleView.bind(this, this._mainView), 'security-main-view-sidebar-tree-item', 'lock-icon'); title, this._setVisibleView.bind(this, this._mainView), 'security-main-view-sidebar-tree-item', 'lock-icon');
this._sidebarMainViewElement.tooltip = title.textContent;
this._sidebarTree = new Security.SecurityPanelSidebarTree(this._sidebarMainViewElement, this.showOrigin.bind(this)); this._sidebarTree = new Security.SecurityPanelSidebarTree(this._sidebarMainViewElement, this.showOrigin.bind(this));
this.panelSidebarElement().appendChild(this._sidebarTree.element); this.panelSidebarElement().appendChild(this._sidebarTree.element);
...@@ -445,6 +446,7 @@ Security.SecurityPanelSidebarTree = class extends UI.TreeOutlineInShadow { ...@@ -445,6 +446,7 @@ Security.SecurityPanelSidebarTree = class extends UI.TreeOutlineInShadow {
const originElement = new Security.SecurityPanelSidebarTreeElement( const originElement = new Security.SecurityPanelSidebarTreeElement(
Security.SecurityPanel.createHighlightedUrl(origin, securityState), this._showOriginInPanel.bind(this, origin), Security.SecurityPanel.createHighlightedUrl(origin, securityState), this._showOriginInPanel.bind(this, origin),
'security-sidebar-tree-item', 'security-property'); 'security-sidebar-tree-item', 'security-property');
originElement.tooltip = origin;
this._elementsByOrigin.set(origin, originElement); this._elementsByOrigin.set(origin, originElement);
this.updateOrigin(origin, securityState); this.updateOrigin(origin, securityState);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment