Summary:
this removes references to GCLI in the inspector front and from the browser menu, leaving
no further uses of gcli eyedropper
Test Plan: mochitests
Reviewers: ochameau
Tags: #secure-revision
Bug #: 1447487
Differential Revision: https://phabricator.services.mozilla.com/D3614
Summary:
this removes references to GCLI in the inspector front and from the browser menu, leaving
no further uses of gcli eyedropper
Test Plan: mochitests
Reviewers: ochameau
Tags: #secure-revision
Bug #: 1447487
Differential Revision: https://phabricator.services.mozilla.com/D3614
The inplace-editor is programmatically hiding the autocomplete-popup
on TAB and notifies the caller. The caller (eg rule view) will trigger
a click on the next focusable element immediately after that.
If the HTMLTooltip is still consuming outside clicks at that point
the click will be swallowed and the new inplace-editor cannot be created.
Depends on D2661
Differential Revision: https://phabricator.services.mozilla.com/D2662
A click event is only fired if the element on which mousedown and mouseup
happened are the same. If this is not the case, the HTMLTooltip will not
be able to hide itself.
Listening to mouseup makes the behavior more consistent but forces the
hide() method to be always asynchronous, while before it was only
asynchronous for tooltips using the XULWrapper.
Depends on D2660
Differential Revision: https://phabricator.services.mozilla.com/D2661
The inplace-editor is programmatically hiding the autocomplete-popup
on TAB and notifies the caller. The caller (eg rule view) will trigger
a click on the next focusable element immediately after that.
If the HTMLTooltip is still consuming outside clicks at that point
the click will be swallowed and the new inplace-editor cannot be created.
Depends on D2661
Differential Revision: https://phabricator.services.mozilla.com/D2662
A click event is only fired if the element on which mousedown and mouseup
happened are the same. If this is not the case, the HTMLTooltip will not
be able to hide itself.
Listening to mouseup makes the behavior more consistent but forces the
hide() method to be always asynchronous, while before it was only
asynchronous for tooltips using the XULWrapper.
Depends on D2660
Differential Revision: https://phabricator.services.mozilla.com/D2661
In particular, the ID allows us to associate the tooltip with the button that
triggers it using the aria-controls attribute.
MozReview-Commit-ID: ArjH2s5JNlC
We will use this later when we introduce a MenuList class since it will want to
manage focus for its menu items.
This patch also extends the definition of focusable elements somewhat.
MozReview-Commit-ID: 3shnC0t79rF
The current default value for height of Infinity has the unfortunate side
effect that, when combined with using a XUL wrapper, there will be a large
filler element stretching vertically on one side of the tooltip that effectively
neuters all content beneath it. While this is probably fine for tooltips that
are shown on hover, it is problematic if we want to use this for DevTools menus
because it means the user is unable to click anything above/below the menu so
long as it is open (which can be particularly problematic once we make
HTMLTooltip support the "Disable popup autohide" feature"). Even if we were to
decide that clicks outside the tooltip should be consumed anyway we would still
have the problem that hover styles don't apply in this "dead" region.
As a result, this patch makes the { height: Infinity } behaviour opt-in for
those tooltips that really need it. For most uses, however, a height calculated
when the tooltip is shown should be sufficient (and later in this patch series
we will add a mechanism to HTMLTooltip to explicitly request it recalculate its
size and position in response to content changes).
This patch introduces the { height: "auto" } mechanism and also reverses the
order in which size/position properties are calculated to match the regular
manner in which layout is performed: widths first, then heights.
MozReview-Commit-ID: 7BeVkxGVhYn
In a couple of places in DevTools we read back the value of the
"devtools.toolbox.zoomValue" pref and take that to be the zoom value. However,
at certain zoom levels these two can differ: the pref value representing the
ideal zoom and currentZoom giving the actual zoom value in use.
This patch makes us use the actual zoom value in the two places where this
occurs.
Unfortunately, we cannot easily adjust the browser_html_tooltip_zoom.js test for
this since it uses a separate XUL document that does not take into account the
pref value---as a result that test directly sets the currentZoom on the separate
doc and hence this problem won't occur.
Instead, this patch adjusts the browser_toolbox_zoom_popup.js test since the
toolbox menu positioning uses the same problematic pattern so we can reproduce
the bug in the browser_toolbox_zoom_popup.js. (This patch fixes both
occurances of this pattern.)
At least locally browser_toolbox_zoom_popup.js passes for me with a zoom of 1.5
but fails with a zoom of 1.4. Similarly in my testing of HTMLTooltip, zoom
values such as 1.2 and 1.4 often show significant misalignment whilst a zoom of
1.3 or 1.5 is fine.
With the code changes in this patch, the test passes with any given zoom factor.
(This patch also incidentally replaced isNaN with the more robust Number.isNaN.)
MozReview-Commit-ID: JmlRoidARVp
Currently the arrow offset is not correctly positioned in RTL mode as evidenced
by the test case included in this patch (which fails without the code changes
included in this patch).
This patch logicalizes the calculations for positioning the tooltip which fixes
this and other issues when using RTL mode and will make it easier to introduce
a new "doorhanger" type tooltip later in this patch series.
MozReview-Commit-ID: BQXhDHbPTbl
This leaves getAdjustedQuads alone because it lives in its own world and its
result gets sent over IPC. That leaves things in a bit of an intermediate
state, but that should be OK for now.
MozReview-Commit-ID: DH6eGqCFhPr
The methods have been improved and now live in telemetry.js again.
We use these methods for tools that at least require timing.
MozReview-Commit-ID: 2CqBCA9j3XU
This patch will multiply the HTML tooltip position to the zoom value in order to
display HTML tooltip in correct position.
MozReview-Commit-ID: GHVkB5hN44k
As far as I am aware, we can't create tests to detect whether an error has been thrown... especially if the error has no side affects.
If we really need a test for these simple four fixes you can always insist but I don't think we do.
MozReview-Commit-ID: 7j9N1X4jTHY
These issues were previously ignored due to the nature of our global import
rules. They need to be fixed before that rule can be updated.
MozReview-Commit-ID: DCChktTc5TW
Both reason and isSlotted arguments of setNodeFront are optional, switching to an
object argument avoids weird calls such as setNodeFront(front, null, true) in favor
of a more explicit setNodeFront(front, { isSlotted: true });
MozReview-Commit-ID: A6nziH3QQYe