The messages depending on this should really be migrated to a better format, but this change at least reduces the burden on translators a little bit.
Differential Revision: https://phabricator.services.mozilla.com/D267415
Let's always use instance methods instead so we're consistent in the whole codebase.
We only keep the EventEmitter.decorate that is used significantly in DevTools
to handle old-syle function + prototype "classes".
We might also save a few cycles by avoid wrapping the static methods that was
done from the inheritence based ones.
Remove the test that was asserting the static methods.
Differential Revision: https://phabricator.services.mozilla.com/D267590
This flag was only used by the allocation tracker test and we can now rely on the
DevTools global spawn by mozJSModuleLoader.
Differential Revision: https://phabricator.services.mozilla.com/D253049
This consolidates the jest environment definition, and the xpcshell globals into the devtools/.eslintrc.mjs file, for easier configurations.
It also changes the restart of the configurations to work with flat config.
Differential Revision: https://phabricator.services.mozilla.com/D249948
When tracking tokens, we weren't handling the case of unterminated,
single-char quote.
Test cases are added to cover the fix.
Differential Revision: https://phabricator.services.mozilla.com/D214917
This is important to spawn this ESM only once between regular and browser toolbox,
and especially between various callsites used by the browser toolbox.
Otherwise we may start loading modules in two distinct system loaders
and may have inconsistancies when using `instanceof`.
Differential Revision: https://phabricator.services.mozilla.com/D207432
This is important to spawn this ESM only once between regular and browser toolbox,
and especially between various callsites used by the browser toolbox.
Otherwise we may start loading modules in two distinct system loaders
and may have inconsistancies when using `instanceof`.
Differential Revision: https://phabricator.services.mozilla.com/D207432
This is important to spawn this ESM only once between regular and browser toolbox,
and especially between various callsites used by the browser toolbox.
Otherwise we may start loading modules in two distinct system loaders
and may have inconsistancies when using `instanceof`.
Differential Revision: https://phabricator.services.mozilla.com/D207432
In some cases, it can be more useful to only get the token value than the whole
token text (e.g. for 'Function`, where the value is the function name, while
the text includes the opening parenthesis)
Refactor `test_lexer` to better test the tokens we get, including their value property.
Differential Revision: https://phabricator.services.mozilla.com/D207400
This new InspectorCSSParser makes use of the cssparser crate so DevTools end
up using the same code as the CSS engine.
At the moment, we can't get the token start and end offsets, so we create
a JS wrapper class to compute them in JS. This might be removed if we get
a way to retrieve utf16 position from the cssparser.
The existing lexer xpcshell test is modified so it can run against both js-based
and rust-based lexers.
Differential Revision: https://phabricator.services.mozilla.com/D202909
global option supercedes loadInDevToolsLoader, with omitting the
implicit contextual loader behavior.
In order to make the API less error-prone, use global option, with requireing
global option in DevTools global, to choose from shared global or explicit
contextual loader.
Differential Revision: https://phabricator.services.mozilla.com/D199466
They are also allowed after the month name, e.g. "Sep foo 26 1995".
These "unknown words" are supposed to be day of week, or abbreviations
of them, but they can be anything really.
We need to run telemetry before dropping explicit support for day of
week in later parts of the date string.
Differential Revision: https://phabricator.services.mozilla.com/D192560
They are also allowed after the month name, e.g. "Sep foo 26 1995".
These "unknown words" are supposed to be day of week, or abbreviations
of them, but they can be anything really.
We need to run telemetry before dropping explicit support for day of
week in later parts of the date string.
Differential Revision: https://phabricator.services.mozilla.com/D192560
This patch newly allows cases such as MonDDYYYY and Mon.DD.YYYY.
In adding tests for this patch, I noticed that the tests for parsing
periods were broken and could not fail the way that they were written,
so I fixed them.
This patch also fixes a couple of other standing bugs...
fixes Bug 485639 - for cases like "Aug 15 2015 10:00am"
fixes Bug 1760290 - for YYYY.MM.DD
Differential Revision: https://phabricator.services.mozilla.com/D186054
This wasn't really used anymore.
We are fetching the database from the server runtime in order to support
remote debugging correctly, where frontend CSS may be different from debuggee CSS.
Differential Revision: https://phabricator.services.mozilla.com/D187492
This wasn't really used anymore.
We are fetching the database from the server runtime in order to support
remote debugging correctly, where frontend CSS may be different from debuggee CSS.
Differential Revision: https://phabricator.services.mozilla.com/D187492
This appears to be unused and only page-actor is reading the list of all pseudo elements
by querying InspectorUtils directly.
Differential Revision: https://phabricator.services.mozilla.com/D185664
We used to only indent with one space when `devtools.editor.expandtab` was true.
Unit test is updated to make sure we do use the pref value now.
Differential Revision: https://phabricator.services.mozilla.com/D181225