New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 769352 link

Starred by 3 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug


Sign in to add a comment

Support Chrome UI Devtools in Mac

Project Member Reported by thanhph@chromium.org, Sep 27 2017

Issue description

MacViews UI team in New York is converting native Cocoa UI to views. It'll be helpful to have UI Devtools to work in Mac as well before next year Q1 to reduce their UI conversion friction.

Sadrul suggested we could do the following steps:

Make the aura dependency from ui_devtools conditional to use_aura.
  Mac should exclude window_element.cc|h files.
  We need to update the UIElement api to use gfx::NativeWindow, instead of aura::Window.

Add some code to track the list of views::Widgets, and notify the dom-agent when things change.
  Currently, this happens directly where the dom-agent installs itself as an observer to aura::Env. This needs to be taken out into a provider-API (e.g. a RootDOMNodeProvider), which can then have an aura-specific implementation (which will install the EnvObserver etc.), and a views-specific implementation, which will manage the list of Widgets created/destroyed etc.

 
Blockedon: 775348
Blockedon: 775349
Blockedon: 775350
Blockedon: 775352
Blocking: 775353
Blocking: -775353
Blockedon: 775353
Project Member

Comment 8 by bugdroid1@chromium.org, Jan 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/601aae3f29b9affeb5ccee581fcf2a792344c9fd

commit 601aae3f29b9affeb5ccee581fcf2a792344c9fd
Author: Leonard Grey <lgrey@chromium.org>
Date: Fri Jan 19 17:45:54 2018

Change UIElement API to use gfx::NativeWindow

This is pre-work for getting UiDevTools working on Mac.

There's a few places that still won't compile on Mac as-is, and a few
where there was no getting around USE_AURA ifdefs, but all of that
will get isolated out into Aura-only paths when the Mac implementation
is added.

Bug: 769352
Change-Id: I191409f522f8470f7f94146dd708fcb27bb5e8f0
Reviewed-on: https://chromium-review.googlesource.com/871850
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530552}
[modify] https://crrev.com/601aae3f29b9affeb5ccee581fcf2a792344c9fd/components/ui_devtools/views/dom_agent.cc
[modify] https://crrev.com/601aae3f29b9affeb5ccee581fcf2a792344c9fd/components/ui_devtools/views/dom_agent.h
[modify] https://crrev.com/601aae3f29b9affeb5ccee581fcf2a792344c9fd/components/ui_devtools/views/ui_element.h
[modify] https://crrev.com/601aae3f29b9affeb5ccee581fcf2a792344c9fd/components/ui_devtools/views/view_element.cc
[modify] https://crrev.com/601aae3f29b9affeb5ccee581fcf2a792344c9fd/components/ui_devtools/views/view_element.h
[modify] https://crrev.com/601aae3f29b9affeb5ccee581fcf2a792344c9fd/components/ui_devtools/views/widget_element.cc
[modify] https://crrev.com/601aae3f29b9affeb5ccee581fcf2a792344c9fd/components/ui_devtools/views/widget_element.h
[modify] https://crrev.com/601aae3f29b9affeb5ccee581fcf2a792344c9fd/components/ui_devtools/views/window_element.cc
[modify] https://crrev.com/601aae3f29b9affeb5ccee581fcf2a792344c9fd/components/ui_devtools/views/window_element.h

Comment 9 by lgrey@chromium.org, Jan 19 2018

Cc: -lgrey@chromium.org thanhph@chromium.org
Owner: lgrey@chromium.org
Status: Started (was: Available)
Project Member

Comment 10 by bugdroid1@chromium.org, Feb 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/827f34d81e1e782160e03f7485e080e551a5ccdd

commit 827f34d81e1e782160e03f7485e080e551a5ccdd
Author: Leonard Grey <lgrey@chromium.org>
Date: Tue Feb 13 23:25:20 2018

[UiDevTools] Move |GetAttributes| to UiElement

This resolves a TODO and helps move some Aura-only code out of DOMAgent.

Also renames |GetCustomAttributes| to |GetCustomProperties| to reduce
confusion between the two methods.
GetAttributes = Shows up as "HTML" properties in the view hierarchy
GetCustomProperties = Shows up as "CSS" properties when a node is selected.

Bug: 769352
Change-Id: I6932e74c09ae54aa677d0cc2793b4cab094c017c
Reviewed-on: https://chromium-review.googlesource.com/891781
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536543}
[modify] https://crrev.com/827f34d81e1e782160e03f7485e080e551a5ccdd/components/ui_devtools/views/css_agent.cc
[modify] https://crrev.com/827f34d81e1e782160e03f7485e080e551a5ccdd/components/ui_devtools/views/dom_agent.cc
[modify] https://crrev.com/827f34d81e1e782160e03f7485e080e551a5ccdd/components/ui_devtools/views/ui_element.cc
[modify] https://crrev.com/827f34d81e1e782160e03f7485e080e551a5ccdd/components/ui_devtools/views/ui_element.h
[modify] https://crrev.com/827f34d81e1e782160e03f7485e080e551a5ccdd/components/ui_devtools/views/view_element.cc
[modify] https://crrev.com/827f34d81e1e782160e03f7485e080e551a5ccdd/components/ui_devtools/views/view_element.h
[modify] https://crrev.com/827f34d81e1e782160e03f7485e080e551a5ccdd/components/ui_devtools/views/widget_element.cc
[modify] https://crrev.com/827f34d81e1e782160e03f7485e080e551a5ccdd/components/ui_devtools/views/widget_element.h
[modify] https://crrev.com/827f34d81e1e782160e03f7485e080e551a5ccdd/components/ui_devtools/views/window_element.cc
[modify] https://crrev.com/827f34d81e1e782160e03f7485e080e551a5ccdd/components/ui_devtools/views/window_element.h

Project Member

Comment 11 by bugdroid1@chromium.org, Feb 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e4ae34daad510d14f1c886b15bc9e3c5e5deacea

commit e4ae34daad510d14f1c886b15bc9e3c5e5deacea
Author: Leonard Grey <lgrey@chromium.org>
Date: Fri Feb 16 17:34:29 2018

[UiDevTools] Introduce new UiElement subclass to serve as the root of the DOM tree.

This is more prep for Mac support. The current root is a WindowElement which is
backed by aura::Window.

Bug: 769352
Change-Id: Ie7e05fb528f9f54fc07bc5ce96397715e0e34f1e
Reviewed-on: https://chromium-review.googlesource.com/876307
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537341}
[modify] https://crrev.com/e4ae34daad510d14f1c886b15bc9e3c5e5deacea/components/ui_devtools/views/BUILD.gn
[modify] https://crrev.com/e4ae34daad510d14f1c886b15bc9e3c5e5deacea/components/ui_devtools/views/dom_agent.cc
[modify] https://crrev.com/e4ae34daad510d14f1c886b15bc9e3c5e5deacea/components/ui_devtools/views/dom_agent.h
[modify] https://crrev.com/e4ae34daad510d14f1c886b15bc9e3c5e5deacea/components/ui_devtools/views/overlay_agent.cc
[add] https://crrev.com/e4ae34daad510d14f1c886b15bc9e3c5e5deacea/components/ui_devtools/views/root_element.cc
[add] https://crrev.com/e4ae34daad510d14f1c886b15bc9e3c5e5deacea/components/ui_devtools/views/root_element.h
[modify] https://crrev.com/e4ae34daad510d14f1c886b15bc9e3c5e5deacea/components/ui_devtools/views/ui_element.cc
[modify] https://crrev.com/e4ae34daad510d14f1c886b15bc9e3c5e5deacea/components/ui_devtools/views/ui_element.h

Project Member

Comment 12 by bugdroid1@chromium.org, Sep 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bc2b383e2edefb3c6c5d99f0cffd2eb5cac26fdb

commit bc2b383e2edefb3c6c5d99f0cffd2eb5cac26fdb
Author: Leonard Grey <lgrey@chromium.org>
Date: Wed Sep 19 15:15:21 2018

UIDevTools: Extract CSS tests

Currently, UIDevToolsTest tests the whole system together
in a single test file. This file uses WindowElement in most
tests, which makes it difficult to port for the forthcoming
Mac implementation, which does not have WindowElement due
to not being an Aura platform.

This  is the first of a series of changes that will
break most of UIDevToolsTest up into more granular tests,
which will make it easier to isolate WindowElement use
to Aura.

This change takes the functionality that was previously
being tested in the style tests in UIDevToolsTest, and
breaks it into:
- css_agent_unittest.cc, which tests interaction between
elements and CSSAgent
- Separate files for individual element subclasses, to
ensure the mapping between the elements and their underlying
objects.

Additionally, it fixes a few bugs smoked out by the new
tests in CSSAgent and WidgetElement.

Bug: 769352
Change-Id: Ie24f2166a2dbe7fef31db2800c8bf88a1f470057
Reviewed-on: https://chromium-review.googlesource.com/1231033
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592401}
[modify] https://crrev.com/bc2b383e2edefb3c6c5d99f0cffd2eb5cac26fdb/components/ui_devtools/BUILD.gn
[modify] https://crrev.com/bc2b383e2edefb3c6c5d99f0cffd2eb5cac26fdb/components/ui_devtools/css_agent.cc
[add] https://crrev.com/bc2b383e2edefb3c6c5d99f0cffd2eb5cac26fdb/components/ui_devtools/css_agent_unittest.cc
[add] https://crrev.com/bc2b383e2edefb3c6c5d99f0cffd2eb5cac26fdb/components/ui_devtools/ui_devtools_unittest_utils.cc
[add] https://crrev.com/bc2b383e2edefb3c6c5d99f0cffd2eb5cac26fdb/components/ui_devtools/ui_devtools_unittest_utils.h
[modify] https://crrev.com/bc2b383e2edefb3c6c5d99f0cffd2eb5cac26fdb/components/ui_devtools/views/BUILD.gn
[modify] https://crrev.com/bc2b383e2edefb3c6c5d99f0cffd2eb5cac26fdb/components/ui_devtools/views/ui_devtools_unittest.cc
[add] https://crrev.com/bc2b383e2edefb3c6c5d99f0cffd2eb5cac26fdb/components/ui_devtools/views/view_element_unittest.cc
[modify] https://crrev.com/bc2b383e2edefb3c6c5d99f0cffd2eb5cac26fdb/components/ui_devtools/views/widget_element.cc
[modify] https://crrev.com/bc2b383e2edefb3c6c5d99f0cffd2eb5cac26fdb/components/ui_devtools/views/widget_element.h
[add] https://crrev.com/bc2b383e2edefb3c6c5d99f0cffd2eb5cac26fdb/components/ui_devtools/views/widget_element_unittest.cc
[add] https://crrev.com/bc2b383e2edefb3c6c5d99f0cffd2eb5cac26fdb/components/ui_devtools/views/window_element_unittest.cc

Project Member

Comment 13 by bugdroid1@chromium.org, Sep 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/58171a8dd550b5c7653e6a702e2baa12038c5265

commit 58171a8dd550b5c7653e6a702e2baa12038c5265
Author: Leonard Grey <lgrey@chromium.org>
Date: Thu Sep 27 14:47:23 2018

UIDevTools: Feed mouse event directly into FindElementIdTargetedByPoint

No behavior change intended, just pushing some code into the function
from the callsite. This will allow Mac to use the same interface, but
with mouse events targeting widgets instead of aura::Windows.

Bug: 769352
Change-Id: Ibfec8c567b6e28b1d9b77bf6a7c388e1b69e3395
Reviewed-on: https://chromium-review.googlesource.com/1237115
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594718}
[modify] https://crrev.com/58171a8dd550b5c7653e6a702e2baa12038c5265/components/ui_devtools/views/overlay_agent_aura.cc
[modify] https://crrev.com/58171a8dd550b5c7653e6a702e2baa12038c5265/components/ui_devtools/views/overlay_agent_aura.h
[modify] https://crrev.com/58171a8dd550b5c7653e6a702e2baa12038c5265/components/ui_devtools/views/ui_devtools_unittest.cc

Blockedon: 898280
Project Member

Comment 15 by bugdroid1@chromium.org, Oct 25

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a324ccd8893e51f40faaf456a0f6f8bfe337c9f7

commit a324ccd8893e51f40faaf456a0f6f8bfe337c9f7
Author: Leonard Grey <lgrey@chromium.org>
Date: Thu Oct 25 15:34:18 2018

UIDevTools: Extract overlay tests

As part of this, also:
- Stray clean up (removing dead code, reordering, fixing corner cases)
- FindUIElementIdForBackendElement specialization for Widget
- GetNodeWindowAndBounds tests for View/Widget/Window elements (to restore
coverage from the tests that were turned into OverlayAgentTest.HighlightRects)

Bug: 769352
Change-Id: I0eff1ee2c57e29b39d684146fcee5b75441f0fde
Reviewed-on: https://chromium-review.googlesource.com/c/1283551
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Reviewed-by: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602716}
[modify] https://crrev.com/a324ccd8893e51f40faaf456a0f6f8bfe337c9f7/components/ui_devtools/views/BUILD.gn
[modify] https://crrev.com/a324ccd8893e51f40faaf456a0f6f8bfe337c9f7/components/ui_devtools/views/overlay_agent_aura.cc
[modify] https://crrev.com/a324ccd8893e51f40faaf456a0f6f8bfe337c9f7/components/ui_devtools/views/overlay_agent_aura.h
[add] https://crrev.com/a324ccd8893e51f40faaf456a0f6f8bfe337c9f7/components/ui_devtools/views/overlay_agent_unittest.cc
[modify] https://crrev.com/a324ccd8893e51f40faaf456a0f6f8bfe337c9f7/components/ui_devtools/views/ui_devtools_unittest.cc
[modify] https://crrev.com/a324ccd8893e51f40faaf456a0f6f8bfe337c9f7/components/ui_devtools/views/view_element_unittest.cc
[modify] https://crrev.com/a324ccd8893e51f40faaf456a0f6f8bfe337c9f7/components/ui_devtools/views/widget_element.cc
[modify] https://crrev.com/a324ccd8893e51f40faaf456a0f6f8bfe337c9f7/components/ui_devtools/views/widget_element_unittest.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Jan 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e8a6aa3b78d8a51f6a191c971ed0e3e0ed3ff8e9

commit e8a6aa3b78d8a51f6a191c971ed0e3e0ed3ff8e9
Author: Leonard Grey <lgrey@chromium.org>
Date: Wed Jan 16 18:29:01 2019

Add observation callback for NativeWidgetMac init

This is ground work for UIDevTools on Mac.

Currently, UIDevTools uses aura::Env to track new windows which appear after its element tree has been constructed. This is unavailable on Mac, so we need a way to track newly created widgets instead.

Bug: 769352
Change-Id: I1aabd164bc6cf8faa700868ac485197e9f46ab8a
Reviewed-on: https://chromium-review.googlesource.com/c/1413173
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623304}
[modify] https://crrev.com/e8a6aa3b78d8a51f6a191c971ed0e3e0ed3ff8e9/ui/views/widget/native_widget_mac.h
[modify] https://crrev.com/e8a6aa3b78d8a51f6a191c971ed0e3e0ed3ff8e9/ui/views/widget/native_widget_mac.mm
[modify] https://crrev.com/e8a6aa3b78d8a51f6a191c971ed0e3e0ed3ff8e9/ui/views/widget/native_widget_mac_unittest.mm

Sign in to add a comment