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

Issue 2542243002: Add hovering feature to AshDevToolsDOMAgent (Closed)

Created:
4 years ago by Sarmad Hashmi
Modified:
4 years ago
Reviewers:
sadrul
CC:
chromium-reviews, kalyank, sadrul, pfeldman, devtools-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add hovering feature to AshDevToolsDOMAgent Hovering over any element in the frontend inspector will now highlight the corresponding Ash window/widget/view. The highlight and border color is whatever DevTools provides us in the highlightConfig. Currently, this is a slightly transparent light blue overlay with a dark yellow border. How this is done: - Create a widget in the primary root window under the OverlayContainer. - Whenever a node is highlighted, call AshDevToolsDOMAgent::HighlightNode on the main thread, which then determines where the object is (i.e: bounds) and what display it is on. - The parent |window| for the the |widget| that we created will update its bounds and the |root_view| of the widget has its border/background color updated to those provided in the highlightConfig. - When no node is being hovered over, hideHighlight is called by the frontend and we simply hide the widget. - We also do not want to show the |widget| in the DOM tree, so if we ever encounter its parent |window|, it will be ignored. BUG=648701 Committed: https://crrev.com/ae977ac4847526a5674b7898617369e6d272cde7 Cr-Commit-Position: refs/heads/master@{#437069}

Patch Set 1 #

Patch Set 2 : Add hovering feature to AshDevToolsDOMAgent #

Patch Set 3 : Add hovering feature to AshDevToolsDOMAgent #

Patch Set 4 : Update highlighting widget name #

Total comments: 14

Patch Set 5 : Add main_thread_task_runner to devtools_server and remove it from agent, also fix small bug #

Patch Set 6 : Add main_thread_task_runner to devtools_server and remove it from agent, also fix small bug #

Patch Set 7 : Remove UI_DEVTOOLS_EXPORT, will fix later #

Total comments: 1

Patch Set 8 : Mask colors when converting RGBA to SkColor #

Unified diffs Side-by-side diffs Delta from patch set Stats (+241 lines, -20 lines) Patch
M ash/common/devtools/ash_devtools_dom_agent.h View 1 2 3 4 2 chunks +20 lines, -1 line 0 comments Download
M ash/common/devtools/ash_devtools_dom_agent.cc View 1 2 3 4 5 6 7 8 chunks +129 lines, -2 lines 0 comments Download
M components/ui_devtools/devtools_server.h View 1 2 3 4 5 6 3 chunks +4 lines, -3 lines 0 comments Download
M components/ui_devtools/devtools_server.cc View 1 2 3 4 5 7 chunks +18 lines, -13 lines 0 comments Download
M components/ui_devtools/protocol.json View 2 chunks +70 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 32 (24 generated)
Sarmad Hashmi
PTAL sadrul@!
4 years ago (2016-12-03 01:50:46 UTC) #6
sadrul
https://codereview.chromium.org/2542243002/diff/60001/ash/common/devtools/ash_devtools_dom_agent.cc File ash/common/devtools/ash_devtools_dom_agent.cc (right): https://codereview.chromium.org/2542243002/diff/60001/ash/common/devtools/ash_devtools_dom_agent.cc#newcode94 ash/common/devtools/ash_devtools_dom_agent.cc:94: rgba->getB()); Should we sanity check these values? https://codereview.chromium.org/2542243002/diff/60001/ash/common/devtools/ash_devtools_dom_agent.cc#newcode125 ash/common/devtools/ash_devtools_dom_agent.cc:125: ...
4 years ago (2016-12-06 20:48:59 UTC) #11
Sarmad Hashmi
Also fixed the small bug here https://crbug.com/669352 https://codereview.chromium.org/2542243002/diff/60001/ash/common/devtools/ash_devtools_dom_agent.cc File ash/common/devtools/ash_devtools_dom_agent.cc (right): https://codereview.chromium.org/2542243002/diff/60001/ash/common/devtools/ash_devtools_dom_agent.cc#newcode94 ash/common/devtools/ash_devtools_dom_agent.cc:94: rgba->getB()); On ...
4 years ago (2016-12-06 22:54:34 UTC) #15
Sarmad Hashmi
fix for http://crbug.com/669352 causing problems, will solve in another CL.
4 years ago (2016-12-07 01:04:29 UTC) #19
sadrul
lgtm https://codereview.chromium.org/2542243002/diff/120001/ash/common/devtools/ash_devtools_dom_agent.cc File ash/common/devtools/ash_devtools_dom_agent.cc (right): https://codereview.chromium.org/2542243002/diff/120001/ash/common/devtools/ash_devtools_dom_agent.cc#newcode90 ash/common/devtools/ash_devtools_dom_agent.cc:90: DCHECK_LE(value, 255); Maybe return (value & 0xff) from ...
4 years ago (2016-12-07 17:37:50 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2542243002/140001
4 years ago (2016-12-07 21:37:48 UTC) #27
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years ago (2016-12-07 21:43:20 UTC) #30
commit-bot: I haz the power
4 years ago (2016-12-07 21:47:42 UTC) #32
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/ae977ac4847526a5674b7898617369e6d272cde7
Cr-Commit-Position: refs/heads/master@{#437069}

Powered by Google App Engine
This is Rietveld 408576698