This component is placed by the consumer on a grid, and act on
one of the grid element size.
The component can be placed at the inline start or the inline end
of the area it is in.
This component relies on the existing Draggable component.
A test is added to ensure this works as expected.
Differential Revision: https://phabricator.services.mozilla.com/D37686
--HG--
extra : moz-landing-system : lando
Given that `CssProperties.isValidOnClient()` does only a client-side check for support of a CSS declaration, we can leverage the built-in `CSS.supports()` method and remove some of the inter-dependencies between the `CssProperties` object from the `CssPropertiesFront` and its consumers, `OutputParser` and `FilterWidget`.
Differential Revision: https://phabricator.services.mozilla.com/D37751
--HG--
extra : moz-landing-system : lando
Because ShouldIncludeEdge considers the |origin| node as well, it was possible for
the old code to 'miss' nodes and never write them to the core dump even though we
also wrote some edges with the node as referent.
Differential Revision: https://phabricator.services.mozilla.com/D37701
--HG--
extra : moz-landing-system : lando
Removed unnecessary code in GridItem.js file's onGridCheckboxClick function and updated the render function so that the onInspectIconClick call triggers the stopPropagation function.
Differential Revision: https://phabricator.services.mozilla.com/D37612
--HG--
extra : moz-landing-system : lando
This component is placed by the consumer on a grid, and act on
one of the grid element size.
The component can be placed at the inline start or the inline end
of the area it is in.
This component relies on the existing Draggable component.
A test is added to ensure this works as expected.
Differential Revision: https://phabricator.services.mozilla.com/D37686
--HG--
extra : moz-landing-system : lando
ChromeUtils.import still support a second argument as it used to do
when it was Components.utils.import. But this is deprecated and we should
instead always use the returned value.
Differential Revision: https://phabricator.services.mozilla.com/D37708
--HG--
extra : moz-landing-system : lando
Storage principal is the principal used for the storage area of a document,
as well as when trying to communicate to other same-origin document instances.
Right now the default is for the storage principal to be equal to the node
principal for all documents, but in the dynamic FPI feature (bug 1549587)
the storage principal for third-party documents will have a member of its
origin attributes set to the eTLD+1 of the domain of the top-level document
in order to 'partition' third-party data across top-level documents from
different sites.
This patch moves the devtools storage actor to use the storage principal
so that when dynamic FPI is enabled, devtools uses the correct principal.
Differential Revision: https://phabricator.services.mozilla.com/D37664
--HG--
extra : moz-landing-system : lando
`hasAttribute` and `getAttribute` were using for..of loop to
get what they wanted, which wasn't ideal.
Moreover, most of those operations were happening because we
didn't pass the attribute value to the parseAttribute function,
only an array of all the attributes. This is a bit unfortunate
there's only one place where we call the parseAttribute function,
and there, we have easy access to the attribute value.
This patch removes direct calls to hasAttribute and getAttribute.
hasAttribute is removed, but we need to keep getAttribute for the
isValid function in parsers.
We add an `attributeValue` parameter to the parseAttribute function.
The unit test for this function is also modified to pass the attribute
value.
perfherder reports a ~2.5% improvement on custom open and ~3% on
custom reload.
Differential Revision: https://phabricator.services.mozilla.com/D37551
--HG--
extra : moz-landing-system : lando
Since Firefox 67 tracked changes have unique identifiers as follows:
- ruleId => StyleRuleActor.actorID
- sourceId => StylesheetActor.actorID
Given that we're at Firefox 70 and beyond the window where we support connecting to servers older than 3 versions, this patch removes the backwards compatibility provided by methods to generate unique ids based on attributes of the rule and stylesheet for the tracked change.
Differential Revision: https://phabricator.services.mozilla.com/D37591
--HG--
extra : moz-landing-system : lando
We weren't handling comments at all, which means that having
any in the console would probably make the autocomplete not
working.
This patch handles both inline and multiline javascript comments,
and adds test cases to ensure we don't regress.
Depends on D36573
Differential Revision: https://phabricator.services.mozilla.com/D37196
--HG--
extra : moz-landing-system : lando
We'd like to enable the Origin header for all eligible reqeusts, which include POST.
The test should be adjusted.
Differential Revision: https://phabricator.services.mozilla.com/D33382
--HG--
extra : moz-landing-system : lando
We'd like to enable the Origin header for all eligible reqeusts, which include POST.
The test should be adjusted.
Differential Revision: https://phabricator.services.mozilla.com/D33382
--HG--
extra : moz-landing-system : lando
We use the openNetworkDetails prop which is already in use
in the netmonitor to collapse the message if the parameter
passed to the function is falsy (i.e. the panel is already
displayed)
Depends on D37388
Differential Revision: https://phabricator.services.mozilla.com/D37389
--HG--
extra : moz-landing-system : lando
This prop is only used when hideToggleButton isn't truthy.
In the case of the console, it won't ever be called, so
it's not mandatory.
Differential Revision: https://phabricator.services.mozilla.com/D37388
--HG--
extra : moz-landing-system : lando
Some people found that the ConfirmDialog was getting into their
way when typing into the console, as it was stealing the focus.
This patch fixes this by not focusing the ConfirmDialog when
we show it, so the user can still type.
This means that we now handle the dialog confirm and dismiss from
JSTerm, when the former is displayed.
Since it wasn't clear how you could close the popup, we add a close
button that makes it very obvious.
This means we can drop the key handler in the dialog as the jsterm
is always focused.
We also simply remove the feature to open the MDN link on `?` key
stroke as it's not discoverable and was the only part of the
panel where you could do such thing.
Existing tests are adapted and extended to cover the new behaviour.
Differential Revision: https://phabricator.services.mozilla.com/D36174
--HG--
extra : moz-landing-system : lando
Remove devtools.netmonitor.features.resizeColumns pref and any reference to it.
Differential Revision: https://phabricator.services.mozilla.com/D37159
--HG--
extra : moz-landing-system : lando
The console fails to connect to the server because
the getCachedMessages function throws on GMail.
This is because we try to access a property on a
cross-origin object, window.windowUtils, in
getInnerWindowId.
Wrapping the access to the property fixes the issue.
A test is added to make sure we don't regress.
// TODO: The test isn't failing without the fix,
so it should be re-written.
Differential Revision: https://phabricator.services.mozilla.com/D37069
--HG--
extra : moz-landing-system : lando
We were using Array.from to get an array of all the characters, and
be able to slice parts of the strings to run some checks.
This had the disadvantage of being quite slow on very large strings,
at a point where we introduced a bail out mechanism into the function
to not block the content page.
This patch switches to `String.prototype[Symbol.iterator]` to loop
over all the character, and removes lots of array and string manipulations.
On the same, super-large, string, the function cost went from 6700ms to
less than 200ms.
Differential Revision: https://phabricator.services.mozilla.com/D36572
--HG--
extra : moz-landing-system : lando
Already tested via toolbox menus in devtools/client/framework/test/browser_toolbox_zoom_popup.js
Could open a follow up to allow for other anchor points than bottom-left.
Differential Revision: https://phabricator.services.mozilla.com/D37044
--HG--
extra : moz-landing-system : lando
We were clearing the completion text all the time to prevent
a visual glitch while typing (See Bug 1491776). But since we
are now waiting for 75ms before calling the autocomplete
function (which triggers the autocompletion text update), we
have a flash of the completion text, which isn't ideal.
In this patch, we check if the typed letters match the begining
of the completion text, and if they do, we don't clear the
completion text.
In the same time, we set the completion text in absolute position
so it doesn't jump when the new letter is added in the CodeMirror
document.
Finally, we change how the Editor pipe events from CodeMirror to
include parameters, so we can use them in JsTerm.
Differential Revision: https://phabricator.services.mozilla.com/D36163
--HG--
extra : moz-landing-system : lando
Also changed the border radius to be consistent between doorhanger and arrow style tooltips.
There are still subtle differences between the XUL+arrow/HTML+arrow/XUL+doorhanger, but for now I would just like to fix this before we merge to 70.
Strictly using the photon shadow for doorhangers is too subtle and too inconsistent with our other tooltips, so I used shadow-20.
Differential Revision: https://phabricator.services.mozilla.com/D36767
--HG--
extra : moz-landing-system : lando
Ensure source links for selectors in the Rules view and warning links in Web Console for minified CSS go to the right location in the Style Editor after applying automatic prettification.
This only works for linked stylesheets. [Bug 1169770](https://bugzilla.mozilla.org/show_bug.cgi?id=1169770) needs to be fixed first before this can work correctly on inline minified stylesheets.
This patch augments the `prettifyCSS()` method to generate the mappings necessary to generate a sourcemap from the original to the prettified source. It uses these mappings to translate the cursor position when invoking the Style Editor to be opened at a specific location.
The mappings from the minified to the prettified source are used only until the stylesheet is changed in the Style Editor. Upon editing the source in the Style Editor, the associated mappings are cleared because it's likely they have been rendered invalid.
The updated stylesheet will already be prettified so it bypasses the `prettifyCSS()` method, thus avoiding the need to re-generate mappings. New CSS warnings will be listed in the Web Console which point to the right location in the edited stylesheet (the old warnings no longer point to the right place, but that's an acceptable side-effect). The Rules view in the Inspector also lists selectors with the new positions within the edited stylesheet.
Differential Revision: https://phabricator.services.mozilla.com/D36585
--HG--
extra : moz-landing-system : lando
Prevent toggling open Split Console with escape is pressed to toggle shortcutsModal closed.
Differential Revision: https://phabricator.services.mozilla.com/D36448
--HG--
extra : moz-landing-system : lando
This fixes 2 issues that we had when the subgrid and parent grid highlighter are shown:
1) When the subgrid and its parent grid container are both highlighted and the parent grid container
is unhighlighted, we need to still show a translucent parent grid container highlight.
2) Avoid showing a translucent parent grid container highlight for a subgrid, when the
parent grid container is already highlighted.
Differential Revision: https://phabricator.services.mozilla.com/D35725
This fixes an issue in the destroy function without having to guard for the
property existence.
Differential Revision: https://phabricator.services.mozilla.com/D36164
--HG--
extra : moz-landing-system : lando
Before this change, the accessibility icon was too close to the text beside it
on the RTL versions of Firefox.
Now a margin has been added to create sufficient space between the icon and
the text.
Differential Revision: https://phabricator.services.mozilla.com/D36014
--HG--
extra : moz-landing-system : lando
The bounds attribute has been deprecated and shown zero use, and thus this change removes it.
Differential Revision: https://phabricator.services.mozilla.com/D36005
--HG--
extra : moz-landing-system : lando
This implements the context menu items for the DOM mutation breakpoint.
In addition, there were some server changes to:
- Update the mutationBreakpoints form for the NodeActor
- Expose the mutationBreakpoints form
- Moved the setMutationBreakpoints method from the Node spec to Walker spec
since the Node spec only consisted of getter methods. It made more sense
that the setter went into the Walker spec to be more consistent with how
the Walker and Node spec have been arranged.
Unit tests will be followed up in Part 2 immediately.
Differential Revision: https://phabricator.services.mozilla.com/D36074
We use Cmd/Ctrl + B to switch between inline and editor mode. This
should be familiar for VSCode users as it toggles the file sidebar.
When changing the layout, we persist the choice into the editor pref
so the user keeps the same layout the next time they open the console.
Differential Revision: https://phabricator.services.mozilla.com/D34718
--HG--
extra : moz-landing-system : lando
When the editor preference is true, a CSS class is added to
the panel that allow us to shift the layout to a CSS Grid, where
the input panel is on the left and the output on the right.
A toolbar is added to be able to execute an expression when in
editor mode.
Differential Revision: https://phabricator.services.mozilla.com/D17096
--HG--
extra : moz-landing-system : lando
We take this as an opportunity to fix the alignment between the XHR
badge and the URL.
Differential Revision: https://phabricator.services.mozilla.com/D36297
--HG--
extra : moz-landing-system : lando
Add a context menu entry to export the console output to a file.
We group the 2 export entries into a submenu.
Differential Revision: https://phabricator.services.mozilla.com/D22158
--HG--
extra : moz-landing-system : lando
PowerOfTwo makes for a cleaner and more expressive interface, showing that the
profiler will use a power-of-2 storage size.
Using PowerOfTwoMask in ProfilerBuffer also makes it more obvious that we want
cheap modulo operations.
And we don't need to keep the original capacity, as it's only used once and can
easily be recomputed from the mask.
Differential Revision: https://phabricator.services.mozilla.com/D36027
--HG--
extra : moz-landing-system : lando
The Redux action/reducer setup for handling selecting and applying font variation instances is needlessly complex. The indirection is not necessary.
The flow is as follows:
- When a font variation instance (provided by some variable font files) is selected from the _Instances_ select menu, update all variation axes with the values associated with that instance.
- When the user makes any manual change to any of the axis values, save all axis values associated with a "Custom" variation instance. This enables the user to revert to them.
This patch removes the needless indirection about saving the axis values and applying the "Custom" variation instance. The logic is now moved to the UPDATE_AXIS_VALUE reducer.
Differential Revision: https://phabricator.services.mozilla.com/D36051
--HG--
extra : moz-landing-system : lando
The failure was happening on window7, which I guess is
pretty slow. Looking at the failure screenshot I was able
to see that the console output was empty.
The test is initially waiting for a 100 messages to be displayed
in the console output.
We are using the waitFor helper function for that. waitFor by default
call the function argument 500 times, at a 10ms interval, and then
fail.
Here, we bump the interval to 100ms, and set the max number of
tries to 500, in order to give extra time for the 100 messages
to be rendered in the output.
Pushed a TV job a re-ran it a few times without seeing the failure,
so the fix should be good.
Differential Revision: https://phabricator.services.mozilla.com/D36039
--HG--
extra : moz-landing-system : lando
Ctrl + A moves the cursor to the beginning of the line,
so we need to dismiss autocomplete.
A test case is added to make sure this behaves as
expected.
Differential Revision: https://phabricator.services.mozilla.com/D35573
--HG--
extra : moz-landing-system : lando
This was making browser_webconsole_scroll.js fail.
After some investigation, I found that the `isInWarningGroup`
prop, a function defined in `mapStateToProp` was causing a
re-rendering (because we were creating a new function each
time), impacting the shouldScrollToBottom behaviour.
To fix this, we no longer create a `isInWarningGroup` prop,
but directly use the `isMessageInWarningGroup` selector, which
was modified to take an array of visible messages instead of
the whole state.
Differential Revision: https://phabricator.services.mozilla.com/D35016
--HG--
extra : moz-landing-system : lando
If 2 messages are emitted during the same microsecond,
their timestamps are similar, and the sorting we do when
filtering for warning groups might be erroneous.
In such case, we now check the message id, to see which
one we handled first, which should be enough.
A test is added to ensure this works as expected. Basically,
we now render 2 logs one after the another, to increase the
chance they'll get the same timestamp.
The updated test was failing without the fix, and seems to
pass with it.
Differential Revision: https://phabricator.services.mozilla.com/D35015
--HG--
extra : moz-landing-system : lando
The Redux action/reducer setup for handling selecting and applying font variation instances is needlessly complex. The indirection is not necessary.
The flow is as follows:
- When a font variation instance (provided by some variable font files) is selected from the _Instances_ select menu, update all variation axes with the values associated with that instance.
- When the user makes any manual change to any of the axis values, save all axis values associated with a "Custom" variation instance. This enables the user to revert to them.
This patch removes the needless indirection about saving the axis values and applying the "Custom" variation instance. The logic is now moved to the UPDATE_AXIS_VALUE reducer.
Differential Revision: https://phabricator.services.mozilla.com/D36051
--HG--
extra : moz-landing-system : lando
We take this as an opportunity to clean-up the function that
waits for the evaluation result.
This change was causing an issue in main.js `_queueResponse`.
Previously, since `evaluateJsAsync` wasn't returning anything,
`_queueResponse` wouldn't be called (See https://searchfox.org/mozilla-central/rev/928742d3ea30e0eb4a8622d260041564d81a8468/devtools/server/main.js#1305-1308).
But now `ret` isn't falsy (the async function always return a
Promise), which means we ended up trying to send a response.
To fix this, we simply check if the response isn't falsy, or we
bail out.
Differential Revision: https://phabricator.services.mozilla.com/D35985
--HG--
extra : moz-landing-system : lando
This patch addresses bug 1548933. It adds/removes the preview highlight to related tokens (if necessary) as well as the target token. This happens when one token is broken into pieces due to a search query that only covers part of the token.
Differential Revision: https://phabricator.services.mozilla.com/D34749
--HG--
extra : moz-landing-system : lando
Showing moz-extension URLs in the debugger is not helpful -- we should display the name of the extension instead.
Differential Revision: https://phabricator.services.mozilla.com/D34427
--HG--
extra : moz-landing-system : lando
* Use XScopes data to display original varaibles (prototype)
* Move DWARF debugger logic to the separate package.
Differential Revision: https://phabricator.services.mozilla.com/D35367
--HG--
rename : devtools/client/debugger/packages/devtools-source-map/src/utils/convertToJSON.js => devtools/client/debugger/packages/devtools-wasm-dwarf/src/convertToJSON.js
rename : devtools/client/debugger/packages/devtools-source-map/wasm/dwarf_to_json.wasm => devtools/client/debugger/packages/devtools-wasm-dwarf/wasm/dwarf_to_json.wasm
extra : moz-landing-system : lando
due to leaks related to this test on other linux platforms, we might want to disable this
test on linux in general
Differential Revision: https://phabricator.services.mozilla.com/D35199
--HG--
extra : moz-landing-system : lando
Due to how highlighters work, it requires the inspector to be initialized.
It can happen than the user will mouseenter/mouseout on an element that
calls highlight/unhighlight very quickly.
Since the hightlight can take some time, it might happen that the unhighlight
call is handled first, before the highlight call, meaning that we now have an
highlighter displayed, even though the user isn't hovering anything that
should cause this anymore.
This patch introduces a new toolbox function called `getHighlighter` that
returns an object with a `highlight and a `unhighlight` function.
We keep a reference to any possible pending `highlight` call so we can wait
for it to be done in `unhighlight`, before destroying it.
The console makes use of the new helper function, and a test is added to ensure
we don't have zombie highlighters anymore.
Differential Revision: https://phabricator.services.mozilla.com/D34562
--HG--
extra : moz-landing-system : lando