Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: devtools highlighter

85 views
Skip to first unread message

Robert O'Callahan

unread,
Mar 23, 2014, 6:07:18 AM3/23/14
to Patrick Brosset, dev-tec...@lists.mozilla.org
On Fri, Mar 21, 2014 at 9:55 PM, Patrick Brosset <pbro...@mozilla.com>wrote:

> 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.
>

I think you need an API to add anonymous content to the root element of the
page. We don't have such an API at the moment but it might not be hard to
add.

Rob
--
Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus eanuttehrotraiitny eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o Whhei csha iids teoa
stiheer :p atroa lsyazye,d 'mYaonu,r "sGients uapr,e tfaokreg iyvoeunr,
'm aotr atnod sgaoy ,h o'mGee.t" uTph eann dt hwea lmka'n? gBoutt uIp
waanndt wyeonut thoo mken.o w

Ehsan Akhgari

unread,
Mar 23, 2014, 5:22:57 PM3/23/14
to rob...@ocallahan.org, Patrick Brosset, dev-tec...@lists.mozilla.org
On 2014-03-23, 6:07 AM, Robert O'Callahan wrote:
> On Fri, Mar 21, 2014 at 9:55 PM, Patrick Brosset <pbro...@mozilla.com>wrote:
>
>> 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.
>>
>
> I think you need an API to add anonymous content to the root element of the
> page. We don't have such an API at the moment but it might not be hard to
> add.

Bug 924692 is making the canvas frame have a native anonymous content.
If that is where you would like to stick that element in, then art of
the frame constructions bits is being done in that bug.

Cheers,
Ehsan

Patrick Brosset

unread,
Mar 24, 2014, 4:38:30 AM3/24/14
to Ehsan Akhgari, rob...@ocallahan.org, Heather Arthur, Brian Grinstead, Joe Walker, dev-tec...@lists.mozilla.org, Mike Ratcliffe
Thanks Rob and Ehsan for that information.
I believe being able to add anonymous content to the root element of the
page is what we need indeed. This way we can keep on using HTML and CSS
to display our highlighter (or whatever we want to overlay on content
from the devtools in the future), which is what we're comfortable with.
To be honnest I'm not familiar with what the root canvas frame is
(relatively new to firefox development), but I'm guessing the way to
proceed now is waiting for bug 924692 to land, and filing a new one to
have this anonymous content API accessible to chrome privileged js code.

Cheers,
Patrick

Patrick Brosset

unread,
Jun 4, 2014, 3:12:48 AM6/4/14
to Ehsan Akhgari, rob...@ocallahan.org, dev-tec...@lists.mozilla.org
Bug 924692 landed yesterday so I thought this would be a good time to
revive this thread.

So with this bug, there's now a way to insert anonymous content in the
canvas frame, which is awesome.
From what I understood looking at the bug and code, I can see 2 things
potentially missing for the devtools highlighter use case:

- the code that creates the anonymous content seems pretty specifically
tied to the touch caret and it doesn't seem possible as of now to insert
any content,
- I don't think this can be accessed by privileged JS code yet.

I wanted to file a bug to address these 2 points, but wanted to check
here first.

Cheers,
Patrick

Robert O'Callahan

unread,
Jun 4, 2014, 7:00:59 AM6/4/14
to Patrick Brosset, Ehsan Akhgari, dev-tec...@lists.mozilla.org
On Wed, Jun 4, 2014 at 7:12 PM, Patrick Brosset <pbro...@mozilla.com>
wrote:

> So with this bug, there's now a way to insert anonymous content in the
> canvas frame, which is awesome.
> From what I understood looking at the bug and code, I can see 2 things
> potentially missing for the devtools highlighter use case:
>
> - the code that creates the anonymous content seems pretty specifically
> tied to the touch caret and it doesn't seem possible as of now to insert
> any content,
> - I don't think this can be accessed by privileged JS code yet.
>
> I wanted to file a bug to address these 2 points, but wanted to check here
> first.
>

That's right.

Patrick Brosset

unread,
Jun 4, 2014, 7:15:36 AM6/4/14
to rob...@ocallahan.org, Ehsan Akhgari, dev-tec...@lists.mozilla.org
On 6/4/14, 1:00 PM, Robert O'Callahan wrote:
> On Wed, Jun 4, 2014 at 7:12 PM, Patrick Brosset <pbro...@mozilla.com
> <mailto:pbro...@mozilla.com>> wrote:
>
> So with this bug, there's now a way to insert anonymous content in
> the canvas frame, which is awesome.
> From what I understood looking at the bug and code, I can see 2
> things potentially missing for the devtools highlighter use case:
>
> - the code that creates the anonymous content seems pretty
> specifically tied to the touch caret and it doesn't seem possible
> as of now to insert any content,
> - I don't think this can be accessed by privileged JS code yet.
>
> I wanted to file a bug to address these 2 points, but wanted to
> check here first.
>
>
> That's right.
Thanks, bug https://bugzilla.mozilla.org/show_bug.cgi?id=1020244 filed.

loksudan...@gmail.com

unread,
Oct 31, 2014, 4:39:45 AM10/31/14
to
0 new messages