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).
--HG--
extra : rebase_source : 461fbb722877479cbdeb1108dc7d2ca97ca68caa
Adds a global .eslintrc file for all source files in /browser/devtools.
This file defines a set of global variables that are commonly used in
/browser/devtools code.
The files that import modules with Cu.import will need to define their
own globals as /* globals ... */ comments.
This file also defines the configuration for all the rules we want to
use.
This also adds a set of .eslintrc files, one per test directory in
/browser/devtools. Each of these files extend from one of 2 parent config
files: .eslintrc.xpcshell or .eslintrc.mochitest.
The parent config define the set of globals these types of tests have
access to (test runner functions, assertion functions, etc.).
Finally, this also adds .eslintrc files in /toolkit/devtools for code and
tests, which just extend from their counterparts in /browser/devtools.
--HG--
extra : rebase_source : d7b6f639634b64dc084d0835a5fb36c9720a87e7
Now that we don't have to worry about XPCShellErrorReporter being invoked at
weird times, we can get rid of this nastiness - though it unfortunately means
getting rid of one of my best comments in the tree. :-(
This adds a generic walker method that cna be used to retrieve AnimationPlayerActor's
target DOM nodes in a way that they can be highlighted/selected later in the inspector.
Making the AnimationPlayerActor return the nodeActor directly wouldn't fully work, as
the walker would have missed the missing parent nodeFronts updates.
On the UI, this adds a new component in each PlayerWidget that displays a preview of the
target DOM nodes, highlight them on hover, and select them on click.
--HG--
extra : rebase_source : dfbf459d9de14233f125d028cf81f6b934941ea2
This part adds contextual menu items that become enabled when
the user right clicks on an attribute that has a link.
Depending on the nature of the link, a new tab will be opened or a node
selected.
The user can also choose to copy the link in the clipboard.
--HG--
extra : rebase_source : 00128a076003ebac34096d81d9e326bee6631259
extra : histedit_source : c1d67e84e9d57280040e5831233df523fff904e2
Now when the front requests the list of AnimationPlayers for a node,
all players for this node + the nodes in its subtree are returned.
Also the mutationobserver starts observing all mutations in the node
and its subtree.
--HG--
extra : rebase_source : c419bd2f397617317fa9c9d0b7fd22f07abc12cf
When transitions re-start (when a css class is toggled for instance), new AnimationPlayer objects
are created everytime. But now (since bug 1122414) names are given for AnimationPlayers that
correspond to transitions, and so we can use that to know when a transition re-starts on a node
and therefore send the correct events to the animation-panel.
--HG--
extra : rebase_source : 06fb4699438939efb42b363cbfabd0430a15d8c3
extra : histedit_source : 8d4ea42715c50be4138289613a6b7fda0a69e3c6
This prevents the WalkerActor from failing at handling various requests when
those requests are about DeaedNodes. Indeed, the async nature of the devtools
protocol means that the client could be asking for information about a node that
doesn't exist anymore because it was part of a page that was navigated away from.
The WalkerActor should know how to deal with such cases, so the patch adds a
number of early returns and a new test for them.
This helps avoiding the inspector-panel from going blank in some edge cases.
--HG--
extra : rebase_source : 26ef72eee71334f6fe467d46a486768296035b8a
extra : histedit_source : 697ddbd179ec2992706f20ca7baccbd4f90f9175%2C6e1130e38ed538809f3ee16fd9a5291fe60a85c1