DevTools: traverse DOM and send boxes for spacing tool
One step towards building a distance tool is to send rects to the overlay page, which will calculate what to draw. In this CL, rects for elements and individual text lines are sent and outlined in gray. In the future, the list of boxes will be fewer (only interesting elements) and gray outlines will not be shown. Drive-by: zooming the page w/ Cmd +/- now scales the boxes. Screenshot: https://imgur.com/a/n6a46YS Can be enabled in DevTools on DevTools via: `Main.sendOverProtocol( 'Overlay.setInspectMode', {mode: 'showDistances', highlightConfig: {}} )` Bug: 946873 Change-Id: I1d9aa0fb4fdc6aab435fb4d60ae8c24221475b81 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1546504 Commit-Queue: Erik Luo <luoe@chromium.org> Reviewed-by:Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#657579}
Showing
Please register or sign in to comment