Commit Graph

3 Commits

Author SHA1 Message Date
Patrick Brosset
6e4f4ac7bd Bug 1147826 - Remove deprecated TabActor reference in runAt:server GCLI commands; r=jwalker; r=miker
We used to rely on the TabActor a lot in
/toolkit/devtools/server/actors/highlighter.
This object was being passed around to various highlighter classes, helper
classes and functions.
It was a useful way to get access to the window the highlighters are shown,
listen to DOM events in that window, and also listen to tabActor's will-navigate
events.

Using this object isn't the best idea because it assumes the debugger server is
started and attached to a tab, which makes re-using highlighters outside of this
context impossible (or harder).
Plus we wanted to get rid of the tabActor reference in gcli command contexts.

This change introduces a HighlighterEnvironment that fulfills the requirements
above without relying on a tabActor.
It needs to be initialized either with a tabActor, when we have one (when using
the highlighter from the inspector panel), or with a window (which is what gcli
commands will use).

This change also fixes the highlight command and the rulers command (which
didn't work well with e10s either).
2015-06-01 14:41:12 +02:00
Joe Walker
cb03960f98 Bug 1128988 - runAt support for commands/converters; r=bgrins 2015-04-23 10:24:49 +01:00
Matteo Ferretti
25add9c6b5 Bug 1144163 - Add a rulers highlighter; added gcli command and button. r=pbrosset 2015-04-01 19:28:57 +02:00