Show corresponding window,widget, and view in the UIElement tree when hovered

Desktop / Chromium - Thanh Pham [chromium.org] - 8 August 2017 15:41 EDT

Show corresponding window,widget, and view in the UIElement tree when hovered.

Currently, in UI Devtools, when looking at the UI, users don't know which UIElement is associated with which DOM node so it's hard to see or change its properties on the fly. This cl will identify the element under mouse cursor when in inspection mode. Users can exit inspection mode by left click or click on the blue box-in-arrow.

Bug: 736855 Change-Id: Ie36b41701eb9744aad7c7914b2e197515c40ce3b Reviewed-on: https://chromium-review.googlesource.com/582927 Commit-Queue: Thanh Pham

dabbb4d Show corresponding window,widget, and view in the UIElement tree when hovered.
.../views/chrome_browser_main_extra_parts_views.cc | 5 +
components/ui_devtools/BUILD.gn | 2 +
components/ui_devtools/protocol.json | 357 ++++++++++++++++++---
components/ui_devtools/views/BUILD.gn | 3 +
.../ui_devtools/views/ui_devtools_css_agent.cc | 1 -
.../ui_devtools/views/ui_devtools_css_agent.h | 2 +-
.../ui_devtools/views/ui_devtools_dom_agent.cc | 113 ++++---
.../ui_devtools/views/ui_devtools_dom_agent.h | 28 +-
.../ui_devtools/views/ui_devtools_overlay_agent.cc | 61 ++++
.../ui_devtools/views/ui_devtools_overlay_agent.h | 43 +++
.../ui_devtools/views/ui_devtools_unittest.cc | 93 +++++-
components/ui_devtools/views/ui_element.cc | 37 +++
components/ui_devtools/views/ui_element.h | 5 +-
components/ui_devtools/views/view_element.cc | 4 +-
components/ui_devtools/views/view_element.h | 2 +-
components/ui_devtools/views/widget_element.cc | 4 +-
components/ui_devtools/views/widget_element.h | 2 +-
components/ui_devtools/views/window_element.cc | 4 +-
components/ui_devtools/views/window_element.h | 2 +-
19 files changed, 651 insertions(+), 117 deletions(-)

Upstream: git.chromium.org


  • Share