Implement a pseudo class to highlight element easily

RESOLVED FIXED in Firefox 26

Status

()

Firefox
Developer Tools: Inspector
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: paul, Assigned: paul)

Tracking

Trunk
Firefox 26
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
In Firefox Desktop, in the developer tools, to highlight an element, we add a <xul:box> on top of the browser and draw another <xul:box> in it.

For Firefox Android and Firefox OS, we also want to be able to highlight a node. But drawing a window on top of the content window is not easy (syncing highlighter position when the user scroll or pan is hard).

A very easy way to work around that is to use CSS to style the highlighted element. For exemple: "outline:3px solid red". It would be really useful if we could have a dedicated pseudo class. It will be up to the devtools code to add and remove the pseudo class to the highlighted elements, via nsIDOMUtils.addPseudoClassLock().
(Assignee)

Comment 1

5 years ago
Created attachment 800752 [details] [diff] [review]
patch.diff
Assignee: nobody → paul
Status: NEW → ASSIGNED
Attachment #800752 - Flags: review?(bzbarsky)
(Assignee)

Updated

5 years ago
Blocks: 912915
Comment on attachment 800752 [details] [diff] [review]
patch.diff

r=me
Attachment #800752 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/e2bf999b8857
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
You need to log in before you can comment on or make changes to this bug.