The suggestions were sorted by the number of element matching the item, which could
be confusing and get in the way of the user when they wanted to search for the
least used version.
We now sort the suggestions by "type" (id, class, tag, …), and then, within those
groups, alphabetically.
Differential Revision: https://phabricator.services.mozilla.com/D249768
For some reason, having those as top level const in the module was triggering
a slow path (`GetNameIC` would show up a lot in profile).
This is way faster when those are used as static properties.
Having the state constants as symbol means that we can't use a json file for
the browser_css_statemachine.js test cases, so we move the data back in the test file.
We take this as an opportunity to re-arrange the test a bit (e.g. we don't need
to display results in the tab).
Differential Revision: https://phabricator.services.mozilla.com/D241947
`resolveState` now directly accepts an array of tokens so it won't do the tokenization,
and we take advantage of this in `traverseBackwards`, where we can pass the tokens
we computed at the top of `getInfoAt` and pop the last token from the stack until
we found the start of the "expression" we're interested in.
`browser_css_statemachine.js` is updated to test the 2 ways resolveState can be
called (with source + line + column, or with tokens).
Differential Revision: https://phabricator.services.mozilla.com/D241946
resolveState now takes separate line and column parameters rather than a caret object
to make it clear the object isn't modified in resolveState.
Reduce the number of calls to the limit function, as well as the number of
split operation we do on the source.
Removes a confusing case involving empty lines in traverseForward.
Differential Revision: https://phabricator.services.mozilla.com/D241943
Overriding the search shortcut allows us to execute the findPersistent command,
which prevents the search input to be closed when the user hit Enter.
A test is added to cover the new functionality.
Differential Revision: https://phabricator.services.mozilla.com/D237232
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 data is transient and only specific to the Editor's index react component.
There is no need to share nor persist this data in Redux,
this would avoid unecessary complexity/layers and avoid a few state updates.
Note that the target.match(:hover) was probably a poorly documented way to prevent
rending preview for token that are no longer hovered (the comment about whitespace sounds weird).
Also tweak waitForSelectedSource to also wait for CodeMirror to be updated.
Otherwise, we might try to hover tokens while CodeMirror is still udpating...
While doing that, use the L10N string instead of the final localized string.
Differential Revision: https://phabricator.services.mozilla.com/D180992
Done mostly automatically via find/replace following the conversions
specified here:
https://groups.google.com/a/mozilla.org/g/firefox-dev/c/9sGpF1TNbLk/m/QpU3oTUuAgAJ
For the most part I think the "flex: N N" usage could be simplified to
just "flex: N", but I wanted to preserve behavior (-moz-box-flex sets
both flex-grow and flex-shrink).
I changed legacy layout to also look at the order property rather than
-moz-box-ordinal-group because it made splitters and treecols easier (we
don't need to deal with both orders).
Differential Revision: https://phabricator.services.mozilla.com/D171715
Done mostly automatically via find/replace following the conversions
specified here:
https://groups.google.com/a/mozilla.org/g/firefox-dev/c/9sGpF1TNbLk/m/QpU3oTUuAgAJ
For the most part I think the "flex: N N" usage could be simplified to
just "flex: N", but I wanted to preserve behavior (-moz-box-flex sets
both flex-grow and flex-shrink).
I changed legacy layout to also look at the order property rather than
-moz-box-ordinal-group because it made splitters and treecols easier (we
don't need to deal with both orders).
Differential Revision: https://phabricator.services.mozilla.com/D171715
This patch looks bigger than it is, but it's mostly because
of plumbing.
To implement revert-layer we need not only the cascade origin of the
declaration, but the whole cascade level, plus also the layer order.
In order to do this, encapsulate these two things inside a 32-bit
`CascadePriority` struct and plumb it through the rule tree and so on.
This allows us to remove the packing and unpacking of CascadeLevel,
though I kept the ShadowCascadeOrder limit for now in case we need to
reintroduce it.
Fix `!important` behavior of layers while at it (implementing it in
`CascadeLevel::cmp`, spec quote included since it was tricky to find)
since some revert-layer tests were depending on it.
The style attribute test is failing now, but follow-up commit fixes
it, see spec issue.
In terms of the actual keyword implementation, it's sort of
straight-forward: We implement revert and revert-layer in a shared
way, by storing the cascade priority that reverted it.
Differential Revision: https://phabricator.services.mozilla.com/D133372
I kept a few having some overrides. But they may be irrelevant.
And I kept some eslint files for all folder that aren't matching the pattern matching "**/test*/**/browser*/".
Ideally we would rename these folder to match.
Last but not least, I identified one case where we were using mochitest file for xpcshell tests!
Differential Revision: https://phabricator.services.mozilla.com/D109481