That's what the code intended to do, but it was checking an unexisting property.
This patch fixes that and adds a test to make sure changes are synced in the rule
view when editing properties in the layout view.
Move getRuleViewRuleEditor from inspector/rules/test/head to inspector/test/head in order to use
it in computed test folder. Remove the duplicated function in inspector/shared/test/head.
MozReview-Commit-ID: JbE4ppheSZC
This patch provides a mechanism for overriding the throttle function in
inspector tests with a manually controllable throttle. I did modify a
few tests to not check for a second "ruleview-changed" as it required
using a setTimeout to defer the code to the next frame to get it to work
as it currently exists. I figured it was safer to just not flush the
throttle, and reduce how many "ruleview-changed" events that the test
expected.
MozReview-Commit-ID: 8AIMouZjLBf
Scoped stylesheets cannot make reference to an element outside of the scope in any
part of a selector. This means a selector such as ".theme-light .scoped-element"
can not work in a scoped stylesheet.
Theme specific rules have been removed from the filter&bezier tooltip css. Instead
CSS variables defined for each theme are used in the scoped stylesheets.
MozReview-Commit-ID: 7apGbPc0CYy
The rule-view and computed-view now have tabindex="-1" on their containers
so that clicking anywhere in the views will focus them, so will tabbing
through the inspector to them.
This means that any user activity on them ends up focusing them (or any
focusable element in them, which was the case before anyway).
Because of this, pressing ctrl+F (or any other shortcut) will work correctly:
the _onShortcut callback in each of these views will detect that the active
element is the view itself and will therefore handle the event.
Note that the container element that has the tabindex attribute is a child of
the main container element that is scrollable (overflow:auto). That is
because if we use only one element for both, then grabbing the scrollbar will
focus the element and blur any field that's currently focused.
MozReview-Commit-ID: 97a1tpdlbmZ
Removes some old eye-dropper related code in browser.js which was not
used anymore since the devtools menu are added dynamically now.
And replaces the code in devtools/client/menus.js to call the gcli
eyedropper command now instead of the old eyedropper tool.
MozReview-Commit-ID: DMn9eiVOnGY
This moves the eyedropper button from the toolbar into the inspector,
therefore the old eyedropper command isn't needed anymore,
or at least not as it was.
The button in the inspector simply uses the pickColorFromPage inspector
actor method.
And to preserve a eyedropper gcli command, a new simpler one was added.
MozReview-Commit-ID: B1yr1EqLFBD
The color-picker tooltip now uses the new eye-dropper highlighter, by
using the pickColorFromPage inspector method instead of the XUL-based
eye-dropper tool.
Telemetry hasn't yet been re-implemented in the new eye-dropper highlighter
so the telemetry-related test code has been removed for now. This will be
added again in a later commit.
MozReview-Commit-ID: enSzSKHac4
The inspector actor now has a new method that can be used to pick a
color from the page. This method just instantiates the eye-dropper
highlighter and shows it on the page.
The method doesn't return the color because this requires user interaction.
Instead, it returns immediately and an event is sent later, when the user
has selected a color or escaped.
MozReview-Commit-ID: cjadLyNXQd
This is mostly porting code from the XUL eye-dropper over to a new
highlighter file.
While I have tested this locally, this highlighter isn't yet used
in devtools.
This will come in later patches.
MozReview-Commit-ID: IF0puLu5Yc7