Commit 84a45617 authored by Erik Luo's avatar Erik Luo Committed by Commit Bot

DevTools: fix regressed Object popovers, dark theme context

Fixes 2 recent regressions
- Object popover properties had extra scrollbars; now they have
  standard line-height and show overflow
- Dark theme forced SoftContextMenus, which appear behind the
  inspected page in DeviceMode; now they are not enforced by theme

Screenshots:
https://imgur.com/a/JOXwaGI
https://imgur.com/a/NmXVtyx

Bug: none
Change-Id: Ia79e2a23ea987f4ed9e2cd29ba02537bdd4db076
Reviewed-on: https://chromium-review.googlesource.com/1167887Reviewed-by: default avatarAndrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581816}
parent 8e27fc9f
...@@ -71,7 +71,8 @@ ObjectUI.ObjectPopoverHelper = class { ...@@ -71,7 +71,8 @@ ObjectUI.ObjectPopoverHelper = class {
const titleElement = popoverContentElement.createChild('div', 'monospace object-popover-title'); const titleElement = popoverContentElement.createChild('div', 'monospace object-popover-title');
titleElement.createChild('span').textContent = description; titleElement.createChild('span').textContent = description;
linkifier = new Components.Linkifier(); linkifier = new Components.Linkifier();
const section = new ObjectUI.ObjectPropertiesSection(result, '', linkifier); const section = new ObjectUI.ObjectPropertiesSection(
result, '', linkifier, undefined, undefined, undefined, true /* showOverflow */);
section.element.classList.add('object-popover-tree'); section.element.classList.add('object-popover-tree');
section.titleLessMode(); section.titleLessMode();
popoverContentElement.appendChild(section.element); popoverContentElement.appendChild(section.element);
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
.name-and-value { .name-and-value {
overflow-x: hidden; overflow-x: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
line-height: normal;
} }
.editing-sub-part .name-and-value { .editing-sub-part .name-and-value {
......
...@@ -434,8 +434,7 @@ UI.ContextMenu = class extends UI.ContextSubMenu { ...@@ -434,8 +434,7 @@ UI.ContextMenu = class extends UI.ContextSubMenu {
_innerShow() { _innerShow() {
const menuObject = this._buildMenuDescriptors(); const menuObject = this._buildMenuDescriptors();
if (this._useSoftMenu || UI.ContextMenu._useSoftMenu || InspectorFrontendHost.isHostedMode() || if (this._useSoftMenu || UI.ContextMenu._useSoftMenu || InspectorFrontendHost.isHostedMode()) {
(UI.themeSupport.hasTheme() && menuObject.length)) {
this._softMenu = new UI.SoftContextMenu(menuObject, this._itemSelected.bind(this)); this._softMenu = new UI.SoftContextMenu(menuObject, this._itemSelected.bind(this));
this._softMenu.show(this._event.target.ownerDocument, new AnchorBox(this._x, this._y, 0, 0)); this._softMenu.show(this._event.target.ownerDocument, new AnchorBox(this._x, this._y, 0, 0));
} else { } else {
......
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