When the autocomplete popup has a scrollbar, the rightmost part
of the suggestions is hidden when using RTL locale.
XUL autocompletes (using the richlistbox) were always displaying the
suggestions using LTR. I couldn't find any CSS rule enforcing this, so
I assume this was a default behavior of the richlist box.
This patch restores the same behavior as before.
MozReview-Commit-ID: 9AcMxEe6tuL
--HG--
extra : rebase_source : 9329892b3d387739ffc9c53d3c89b3a30e8833ff
Modify the devtools autocomplete-popup to rely on a HTMLTooltip instance
instead of a XUL panel.
Other than the straightforward migration to HTML, the main difference with
the new implementation is that the richlistbox has now been replace with a
simple HTML list element. The former XUL widget used to be able to take the
focus from the input it was linked to.
This is no longer the case. Most autocomplete users were always keeping the
focus in the input, except for the inspector-search, which was moving the
focus back and forth between the input and the autocomplete's richlistbox.
Now the focus is always in the input. A practical example to illustrate how
this changes the UX: before when the user had the focus on the first element
of the list, pressing "DOWN" would keep the element selected but visually move
the focus in the input. Now the selection simply cycles to the next item.
Even though this introduces a difference in behaviour compared to the previous
implementation, it makes the inspector search UX consistent with the other
autocomplete widgets used in devtools.
Another difference is about the display for the inspector-search. The position
of the autocomplete popup used to be above the input. This is now impossible to
achieve because the search input is at the top of the toolbox and the HTML tooltip
can not exceed the limits of the toolbox.
For this #2 issue, either we manage to use XUL panel wrappers, in which case, the
autocomplete will be displayed as it used to. Or we can invert the order in which
items are inserted and explicitly ask for the autocomplete to be displayed below the
input. I prefered not to change this here in order to make the code change easier to
understand, but it should be addressed in a follow-up.
MozReview-Commit-ID: jH9aXm9Jvz
--HG--
extra : rebase_source : 57267be0d214ed807f3152838c4123400ab7b7e3
The HTMLTooltip supports an additional configuration parameter "useXulWrapper".
When set to true, if the tooltip is displayed in a XUL document, a XUL panel
will be used as an additional container for the tooltip.
This allows the tooltip to be displayed anywhere on the screen and can be
useful when displayed in small toolboxes.
MozReview-Commit-ID: 63kv4vAeW5R
--HG--
extra : source : fc4d902ff01ee92a5b6742d44286e5feaaba1500
extra : intermediate-source : 126f43ff3be5505920946a77ad82401c6bbaebef
extra : histedit_source : 863888c014723f7e95742079395497ba1a30aa36%2C13ba9aaf80acb96c587739c767c20a8f0f6a9a5a
Prevents two breadcrumb arrows from appearing because the light-theme breadcrumb
is a background while the firebug-theme one is a CSS generated element
MozReview-Commit-ID: 20DEHid7lOP
--HG--
extra : transplant_source : kh%A0%F2%14%0B%FF%F3%BC%A6%28%1E%A39%9E%F2F%04%15%7B
The autocomplete popup defines its width by finding the longest label
to display and then applying a "width:Xch" to its content, where X is
the length of the longest label + 3.
In order to support this, the HTMLTooltip setContent() methods allows to
use width: "auto" (which also becomes the default value). In this case,
the HTMLTooltip show() method will automatically compute the preferred
width for the tooltip. It will first calculate the tooltip height, then
measure the width of the tooltip for this computed height and use it as
the preferred width.
MozReview-Commit-ID: KDxZNB3KDdR
--HG--
extra : rebase_source : 8ceedd73434551050f8d63cbf03d66870e275b03