devtools highlighter

Patrick Brosset <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout
Message-ID <[email protected]>
Hi,

We're struggling with a limitation related to the devtools highlighter 
(the outline you see in this video: 
https://www.youtube.com/watch?v=zBYEg40ByCM).
Today, the highlighter is created with XUL nodes that are appended in 
the browser XUL markup, in one of the parent elements of the page 
currently being inspected. These XUL nodes are absolutely positioned 
over the element being highlighted.

This technique has served us well until we wanted our devtools to work 
on Fennec, Fxos and E10S mode. In these cases, the page being inspected 
doesn't have a reachable parent element that we can use to append our 
highlighter elements, and appending it inside the content page itself 
isn't really a viable option because we don't want to impact the content 
in any way.
We do have a solution today but it's not entirely satisfactory because 
it relies on adding a css outline on the inspected element. So the 
content is being impacted, and using an outline we can really only draw 
a rectangle around the element (and the new highlighter in FF30 needs 
more than that, see: https://www.youtube.com/watch?v=hMBsRgSGr0k).

That's why I'd like your ideas on whether there would be a way to draw 
our highlighter at the layout/painting level instead. So in C++ rather 
than XUL/CSS. This would allow us to have only 1 highlighter that works 
across all devices and modes.
I'm thinking this might be possible since it would pretty similar to our 
devtools paint flashing mode: 
https://developer.mozilla.org/en-US/docs/Tools/Paint_Flashing_Tool

Thanks for your help!
Patrick
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.