The ellipsis character displayed by devtools is now relying on a localized string
in devtools/client/shared.properties instead of a complex preference.
The lazy loading of the ellipsis string has been removed, the ellipsis is retrieved
once when the client/shared/l10n.js file is loaded.
The ellipsis property on the LocalizationHelper instances has been removed in favor
of an ELLIPSIS export on the l10n.js module.
All the previous callers using either LocalizationHelper::ellipsis or retrieving the
intl.ellipsis preference have been migrated to rely on the ELLIPSIS export of l10n.js
MozReview-Commit-ID: 4JG0qbJGCw9
The intermittency is caused by a race condition. When delete is clicked in the
context menu, markupview changes the selection and sends the removeNode request
to the server. The selection change triggers the usual inspector update process
in the client. At the same time, the server removes the node and queues the
mutation triggered by the removal. And here lies the issue.
If the inspector components finish updating BEFORE the removal mutation is
received from the server, the test continues before the breadcrumbs learn
about the deletion and the test fails. If the update is still pending when
the mutation is received, the breadcrumbs have time to update before the
test continues to make assertions about the breadcrumb contents.
The fix here is to make the test to ensure that the breadcrumbs have seen the
deletion before it continues. To enable that, the breadcrumbs need to tell
the world that it has been updated even if the breadcrumbs were just trimmed
and a non-element node was selected that does not trigger the full update
process (early return in the code).
As the inspector update process has been collecting cruft for years and tests
make a lot of assumptions about the emitted events, it's not safe to trigger a
new inspector update in this special case. Therefore, only the
breadcrumbs-updated event is emitted in this special case and the test waits
for that if the deleted node is still present in the breadcrumbs.
MozReview-Commit-ID: AjC6k6SzLCu
Using mouseleave in chrome code generates a warning in docshell about
performance which notes mouseout should be used instead. This patch replaces
usage of mouseleave with mouseout across the devtools codebase.
This patch converts the inspector's context menu implementation away from
directly using XUL menus, and updates a number of tests to match.
MozReview-Commit-ID: L8aL23BUmXS
Existing keyboard shortcuts have been reimplemented using the new shortcut-key
api.
A keypress handler was removed on the breadcrumbs buttons, it had no use
since a focused button is always selected.
MozReview-Commit-ID: JTSRxwQGSlh
Add a displayName property on the NodeActor, which compute from Element.prefix + Element.localName.
The computation is made by a getNodeDisplayName function which can be imported wherever needed.
Edit some tests to ensure we correctly display node names.
MozReview-Commit-ID: 6z0G3ynbMoU
The breadcrumbs widget used to have a feature where it would show the first
child of the current selection even the DOM tree hadn't been expanded that
far yet.
This was to allow keyboard navigating the DOM through the breadcrumbs.
The breadcrumbs is a very rarely used widget and this code was unnecessarily
making things complex.
It was decided that this feature would be removed.
Instead, the breadcrumbs now act as simple linear elements in a toolbar and
you can keyboard navigate them with LEFT/RIGHT only. TAB/shift-TAB simply go
in/out of the breadcrumbs widget.
MozReview-Commit-ID: BmcaLnVBOBn
Move major DevTools files to new directories using the following steps:
hg mv browser/devtools devtools/client
hg mv toolkit/devtools/server devtools/server
hg mv toolkit/devtools devtools/shared
No other changes are made.