gDevTools.jsm isn't properly reloadable as JSM as meant to be long-lived singletons.
Also, it contains browser related code (gDevToolsBrowser) mixed with more generic one (gDevTools).
This move is going to help hot reloading devtools codebase while improve readability of
one of our core piece of code (devtools startup and browser hooks).
Extracted a shared helper to open the browser context menu and choose
the 'inspect element' item. This helper works with e10s.
Adapted it a little bit so it waits for the right events in order to
make sure the inspector is ready.
This also involved modifying inspectNode in nsContextMenu.js to make it
wait until the node was selected and the node was ready.
Used this in browser_inspector_initialization.js,
browser_rules_content_02.js and browser_markup_keybindings_04.js
Also removed a now useless inspector-updated event that was trigger from
the animation-inspector panel in some situation. This was left behind
from a long time ago but didn't serve any purpose anymore.
The preview also causes a ruleview-changed event to be emitted. If the frame
script happened to detect the change fast enough, the test would continue to
commit the value and start to wait for a ruleview-changed event. If the event
triggered by the preview had not been emitted, the test would continue
immediately once the event triggered by the preview was received but before
the value was actually committed and reflected in the computed rule list.
The fix is to wait for the ruleview-changed triggered by the preview before
committing the change to avoid mixing these two events.
Add a flag to check if the ruleview was displaying an editor before creating
a newProperty editor. A new property editor is now only displayed if no other
editor was previously displayed.
Added new mochitest to check this use case.
When clicking on the ":" next to the name of a property, the editor is now opened
for the name of the property instead of the value,
Added a test to check this behaviour as well.
The auto-refresh highlighter base class was getting a reference to the window
object to use for highlighting at instanciation time.
This reference should be updated if a navigation of the highlight environment
occurs.
This commit maps the "win" property to a getter, so that win is always in sync
with the current highlight environment.
After Bug 1238133, HTML documents are directly loaded inside XUL elements.
They inherit a -moz-user-focus: ignore; coming from minimal-xul.css.
Usually this is overridden by xul.css, which restores -moz-user-focus: normal;
on iframe, browser and some other elements.
This commit adds a new class to all inspector tab panel elements including html,
and a new CSS rule to override the default -moz-user-focus.
Also added a new test case dedicated to this.