Граф коммитов

22271 Коммитов

Автор SHA1 Сообщение Дата
Razvan Caliman 4142f8c0ce Bug 1572652 - [devtools] Remove CSS Grid highlighter management logic. r=ochameau
This patch removes the old grid highlighter management logic. Some of it is gradually replaced by commits later in this series.

The diff with changes made in D99591 turned out very hairy and difficult to follow. To ease review, I completely removed some methods here and reintroduced them in D99591.
Unless otherwise stated, the contents of `showGridHighlighter()`,  `hideGridHighlighter()`, `showParentGridHighlighter()` and `hideParentGridHighlighter()` may be considered completely rewritten.
If it helps, you may view the patches side-by-side to observe the difference (the diff view [looked very confusing](https://phabricator.services.mozilla.com/D99591?vs=on&id=378317#toc)).

In summary, the changes in this patch are:
- removed the separate parent grid highlighters map (`parentGridHighlighters`) and subgrid-to-parent mapping (`subgridToParentMap`); this information will be contained in the values of the `gridHighlighters` map which holds all instances of active grid highlighters (added in D99591)
- removed the cache pool for unused highlighters (`extraGridHighlighterPool`); with multi-process separation, this became unnecessarily complex
- removed `_getGridHighlighter()`; replaced with generic highlighter getter in D99591
- removed `destroyGridHighlighters()` reliant on the obsolete maps; replaced with consolidated highlighter destroy approach in D99591

Differential Revision: https://phabricator.services.mozilla.com/D99606
2020-12-15 15:16:04 +00:00
Nicolas Chevobbe ac3a027268 Bug 1679043 - [devtools] Fix race condition in StyleEditor when editing style sheet. r=daisuke,ochameau,devtools-backward-compat-reviewers,bomsy.
When the user edits a stylesheet in the StyleEditor, an `_isUpdating` flag is toggled,
and a request is sent to the server to actually apply those changes to the stylesheet.
It then causes a style-applied event to be emitted (or the stylesheet resource
to be updated, if watcher support is enabled for stylesheet).
In the end, this triggers the onStyleApplied function in the StyleEditor, where
we check if the `_isUpdating` flag is true (to know if the event was caused
through editing in style editor), and if not, replace the stylesheet content.

Unfortunately there's a race condition when the user is typing (and sending
multiple requests to the server), as the state of the _isUpdating flag could
be wrong if a new request is sent before the first one is handled.
This is probably highlighted with the throttling we're doing in the Resource API.

To fix this issue, we add a new `cause` parameter to the StyleSheets.update method,
which we set to `styleeditor` when calling update within the StyleEditor.
This `cause` parameter is then sent back by the server to the client (via the
style-applied event, or the resource update if we have Watcher support for stylesheets).
This `cause` can be checked by the StyleEditor client, and replace the check
on `_isUpdating`.

However, we need to keep the `_isUpdating` property to handle backward compatibility.

Differential Revision: https://phabricator.services.mozilla.com/D99862
2020-12-18 06:07:32 +00:00
Hubert Boma Manilla ed78ad3373 Bug 1683152 - [devtools] Handle netmonitor pause/resume on the client r=ochameau
Fixes browser_net_pause.js

Differential Revision: https://phabricator.services.mozilla.com/D99621
2020-12-17 17:38:19 +00:00
Hubert Boma Manilla 3a5a44e982 Bug 1683121 - [devtools] Disable blocking CSP test for fission r=ochameau
Disabling browser_net_block-csp.js as it fails with fission enabled.
Bug 1682153 details the issue, and the test would be enabled when this
bug is fixed.

Differential Revision: https://phabricator.services.mozilla.com/D99626
2020-12-17 15:34:04 +00:00
Hubert Boma Manilla 32735f86aa Bug 1683119 - [devtools] Stop setting the targetFront on _onResourcUpdated and _onResourceDestroyed r=ochameau
Fixes browser_preloaded_newtab.js test
Fixes browser_aboutdebugging_devtoolstoolbox_target_destroyed.js test

Differential Revision: https://phabricator.services.mozilla.com/D99624
2020-12-17 15:29:17 +00:00
Hubert Boma Manilla ae44ae4664 Bug 1683107 - [devtools] Query the nsIHttpChannel to make sure we get the sourceMapURL r=ochameau
This fixes browser_dbg-gc-sources.js test

Differential Revision: https://phabricator.services.mozilla.com/D99620
2020-12-17 14:55:54 +00:00
Nicolas Chevobbe d15f816596 Bug 1682848 - [devtools] Fix error when pausing in a content process script in the Browser Toolbox. r=bomsy.
When pausing in a content process script in the Browser Toolbox (e.g. somewhere
in devtools/server), we tried to display the PausedDebuggerOverlay, which was
causing an error to be displayed in the CanvasFrameAnonymousContentHelper, as
we didn't have access to a documentElement property it needed.

This happens because the _canShowOverlay method in the thread actor was only
checking for the presence of a window property on the target actor.
Unfortunately, the ContentProcessTargetActor does expose a window getter, which
is a Sandbox, and thus doesn't have a document.

This patch modifies the _canShowOverlay function to check that we do have access
to a documentElement.

Differential Revision: https://phabricator.services.mozilla.com/D99899
2020-12-17 08:02:40 +00:00
Nicolas Chevobbe 90b3bafd50 Bug 1682754 - [devtools] Use setPointerCapture in Draggable.js . r=rcaliman.
We used to set the `mousemove` event listener on the document once the drag
started, so we could track mouse movement outside of the drag element.
This can now be done another way, using `setPointerCapture`, so we can have the
event listener directly on the element, and not on the document anymore.

A few tests that were dispatching mousemove events from the document are updated.

Differential Revision: https://phabricator.services.mozilla.com/D99863
2020-12-16 10:01:56 +00:00
Kartik Gautam f7ffcd09fb Bug 1679758 - Remove trailing empty lines r=sylvestre,marionette-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-15 10:34:54 +00:00
Nicolas Chevobbe 51d30788b3 Bug 1681055 - [devtools] Add test case to check pretty-printing works on async function in console editor. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D99321
2020-12-15 08:44:55 +00:00
Nicolas Chevobbe 36ec5c6448 Bug 1681055 - [devtools] Update beautify-js to 1.13.0. r=ochameau.
This fix pretty-printing of async functions in console. A test case is added
to make sure we don't regress.

We used to copy the library tests and run them in xpcshell. The tests changed
a lot, and I don't think we get much value running tests that are already ran on
the project CI (we do have a few tests that checks that we get the output we want)
, so this patch remove the xpcshell test and the associated files.

The upgrade documentation is updated to remove some unecessary steps:
- no need to rename the exported module for each file
- no need to replace the acorn module, since what's in the file is just a subset
  of the library (~100 lines)
- no need to update the test file, which doesn't seem to exist anymore

Differential Revision: https://phabricator.services.mozilla.com/D99320
2020-12-15 08:48:19 +00:00
Emilio Cobos Álvarez 93ac2de55b Bug 1682295 - Update property dbs.
Differential Revision: https://phabricator.services.mozilla.com/D99706
2020-12-14 18:27:54 +00:00
Alexandre Poirot 44062da776 Bug 1573327 - [devtools] Pass breakpoints via the Watcher actor. r=jdescottes,devtools-backward-compat-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D88850
2020-12-14 08:54:25 +00:00
Razvan Caliman bd1ef62248 Bug 1572654 - [devtools] Hide flexbox highlighter when its nodeFront is dead r=ochameau
Depends on D97660

Hide highlighters when the node they highlight is removed from the DOM tree as a result of a mutation.

There is already a test covering this behavior for flexbox highlighters in: https://searchfox.org/mozilla-central/source/devtools/client/inspector/rules/test/browser_rules_flexbox-highlighter-on-mutation.js

Differential Revision: https://phabricator.services.mozilla.com/D98019
2020-12-13 16:38:51 +00:00
Razvan Caliman 195a4f97bd Bug 1572654 - [devtools] Restore active flexbox highlighter on page refresh r=jdescottes
Depends on D96730

This patch refactors slightly the way flexbox highlighters are restored when the page is refreshed while a highlighter is active.
To account for Fission, we store the `browsingContextID` of the target in addition to the node's unique selector, in order to match again the node after refresh and show a flexbox highlighter for it.

The events emitted are renamed to more generic versions "highlighter-restored" and "highlighter-discarded". They contain the highlighter type in the event data payload. Tests are updated accordingly.

Also made slight changes to the grid highlighter restore logic and corresponding tests in order to use the new generic events and test helpers. The bulk of the refactoring for grid highlighters will happen in [Bug 1572652](https://bugzilla.mozilla.org/show_bug.cgi?id=1572652)

Differential Revision: https://phabricator.services.mozilla.com/D97660
2020-12-13 17:25:23 +00:00
Razvan Caliman 96a20e675f Bug 1572654 - [devtools] Refactor telemetry logging for flexbox highlighter. r=jdescottes
Depends on D96449

Introduced two generic callbacks to `HighlightersOverlay`:

- `_afterShowHighlighterTypeForNode()` called after a highlighter is shown, but before emitting the "highlighter-shown" event that listeners react to
- `_beforeHideHighlighterType()` - called before an existing highlighter is hidden.

This allows us to move the telemetry logging methods for the Flexbox highlighter into these generic callbacks. The Grid highlighter will benefit from this too since it uses similar telemetry logging.
In an upcoming patch I will also move the logic to save metadata about the highlighter state in order to be able to restore it after page refresh.

Differential Revision: https://phabricator.services.mozilla.com/D96730
2020-12-13 16:47:31 +00:00
Razvan Caliman ae132c603e Bug 1572654 - [devtools] Refactor Layout Flexbox panel to use generic highlighter events and accessors & update tests r=ochameau
Depends on D96081

This patch builds upon the generalization in D96080 to update the Flexbox sidebar panel from the Inspector Layout panel to:
- listen to the generic highlighter events, "highlighter-shown" and "highlighter-hidden" and check for the flexbox highlighter type;
- use generic getter to get the node highlighted by the flexbox highlighter.

The corresponding tests are updated to use the generic highlighter events and test helpers.

Differential Revision: https://phabricator.services.mozilla.com/D96449
2020-12-10 14:13:42 +00:00
Razvan Caliman 8acb3c4cc7 Bug 1572654 - [devtools] Delegate event handling for flexbox and grid highlighters to the Markup view r=jdescottes
Depends on D96225

This patch removes event listeners for flexbox and grid highlighter events from individual nodes in the Markup view in favor of a delegated event handler at the panel level. It is similar to the approach introduced in D90247 for the selector highlighter in the Rules view (which will also be leveraged for the flexbox highlighter swatches in the Rule view).

This removes substantial duplication and a bit of ping-pong to enable/disable event listeners. It can also have a mild positive performance impact on documents with many flexbox & grid badges.

I updated both flex and grid badges in this patch for clarity and uniformity. To do that, I had to introduce emitting generic highlighter events for the grid highlighter as well. The bulk of the work for the grid highlighter will happen in [Bug 1572652](https://bugzilla.mozilla.org/show_bug.cgi?id=1572652).

Differential Revision: https://phabricator.services.mozilla.com/D96081
2020-12-10 14:13:40 +00:00
Razvan Caliman 69cc4c1599 Bug 1572654 - [devtools] Delegate toggling flexbox highlighter from CSS property swatches up to Rules view & update tests r=jdescottes
Depends on D96080

This patch leverages work done in D90247 for the `SelectorHighlighter`. Here, we delegate event handling of clicks on flexbox swatches next to "flex" and "inline-flex" CSS properties up to the Rules view. This will toggle the Flexbox highlighter from a single place in the Rules view.

When the Flexbox highlighter is shown/hidden, the swatches are marked "active" accordingly. We don't differentiate which swatch to mark if there are multiple "flex" properties. Only properties matching the selected node are shown. `display` is not an inheritable property so there will be only one winning `display: flex` declaration for the selected node. Even if there are duplicates, they will be marked overwritten. Swatches are hidden for overwritten properties. This eases the work when toggling some of the duplicates, the winning one will already show an "active" swatch.

This patch looks more scary than it is. The changes in tests are mass-renames to a new CSS class name and to use the same helpers.

It's easier if you start reviewing `highlighters-overlay.js`, then `text-property-editor.js`, then `rules.js`.

Differential Revision: https://phabricator.services.mozilla.com/D96225
2020-12-10 14:13:35 +00:00
Razvan Caliman 97e9ee02db Bug 1572654 - [devtools] Consolidate logic to show/hide flexbox highlighter r=jdescottes
Depends on D96079

This patch begins the work to make invoking the Flexbox highlighter process-agnostic. It replaces the direct-access methods that use the top-level inspector front with methods to show/hide highlighters corresponding to the nodes' respective inspector fronts.

There are other patches in this series which incrementally refactor the logic.

Known broken here, but updated in patches down the line:
- restoring active flexbox highlighters on refresh
- hiding highlighters when their target node or display type changes in remoted frames use cases

Differential Revision: https://phabricator.services.mozilla.com/D96080
2020-12-10 14:13:33 +00:00
Razvan Caliman 2661594be1 Bug 1572654 - [devtools] Dispatch thunk to toggle flexbox highlighter from Flexbox panel r=jdescottes
Depends on D96078

Following the technique introduced in [Bug 1623906](https://bugzilla.mozilla.org/show_bug.cgi?id=1623906), remove the prop-drilled method to toggle the flexbox highlighter with a thunk dispatched from a deeply nested React component.

In a follow-up bug, I will also migrate the `onSetFlexboxOverlayColor` method and remove the awkward indirection in this flow: `flexbox.js` -> `layout.js` -> `LayoutApp` -> `Flexbox`.

Differential Revision: https://phabricator.services.mozilla.com/D96079
2020-12-10 14:11:58 +00:00
Razvan Caliman e258dd23a9 Bug 1572654 - [devtools] Do not hide Flexbox / Grid highlighters from TextPropertyEditor when display value changes r=jdescottes
This behavior is duplicated with existing logic in `HighlightersOverlay`: https://searchfox.org/mozilla-central/rev/e75e8e5b980ef18f4596a783fbc8a36621de7d1e/devtools/client/inspector/shared/highlighters-overlay.js#1503-1543

That logic needs to be updated to listen to the `WalkerFront` corresponding to the frames where highlighters are visible, but that will happen in a patch later in this queue. This is just cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D96078
2020-12-10 14:11:51 +00:00
Nicolas Chevobbe 9583f26576 Bug 1680893 - [devtools] Fix copy rule when the user ended the selection over the rule checkbox. r=rcaliman.
When selecting something in the rule view, if the user
moused up right onto the enable/disable rule checkbox,
and then tried to copy the selection, the clipboard was empty.
This is due to copySelection checking the target of the copy
event and doing something special if it is an input or a textarea.

To fix this, we add an extra check to test if the input isn't
a checkbox.

A test case, failing without the fix, is added to ensure we don't
regress this.

Differential Revision: https://phabricator.services.mozilla.com/D99425
2020-12-13 23:43:14 +00:00
Dorel Luca 7320ae982a Backed out changeset f3aaf04fce3b (bug 1679758) for Devtool failures in browser_styleeditor_syncAddProperty.js. CLOSED TREE 2020-12-13 16:38:21 +02:00
Kartik Gautam caf549c200 Bug 1679758 - Remove trailing empty lines r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-13 13:28:30 +00:00
Hubert Boma Manilla ce646bb5ee Bug 1674653 - [devtools] Resend requests with fission r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D95474
2020-12-12 16:01:44 +00:00
Steve Fink dad68c3ddf Bug 1662254 - Rename CC_WAITING -> CC_FINISHED r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D94792
2020-12-11 19:04:31 +00:00
Emilio Cobos Álvarez 3987c781d0 Bug 1635914 - Move active flag handling explicitly to BrowsingContext. r=nika
And have it mirror in the parent process more automatically.

The docShellIsActive setter in the browser-custom-element side needs to
be there rather than in the usual DidSet() calls because the
AsyncTabSwitcher code relies on getting an exact amount of notifications
as response to that specific setter. Not pretty, but...

BrowserChild no longer sets IsActive() on the docshell itself for OOP
iframes. This fixes bug 1679521. PresShell activeness is used to
throttle rAF as well, which handles OOP iframes nicely as well.

Differential Revision: https://phabricator.services.mozilla.com/D96072
2020-12-11 15:43:19 +00:00
Nicolas Chevobbe 9cd6389ce8 Bug 1680440 - [devtools] Remove backward compatibility comments for descriptor watcher traits. r=jdescottes.
The watcher trait might not be set on other descriptors, so
we want to keep them until we can get rid of the generic client
code that is handling them. This can probably be done as part of Bug 1680280.

Differential Revision: https://phabricator.services.mozilla.com/D98737
2020-12-11 14:20:16 +00:00
Nicolas Chevobbe 6d5ae59617 Bug 1680440 - [devtools] Cleanup backward compatibility comments in target-mixin. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D98735
2020-12-11 14:20:15 +00:00
Nicolas Chevobbe 9ebc9135be Bug 1680440 - [devtools] Remove try/catch block around getPushSubscription. r=jdescottes.
The block was here to accomodate for older servers. We shouldn't
have that case anymore.

Differential Revision: https://phabricator.services.mozilla.com/D98734
2020-12-11 13:55:21 +00:00
Nicolas Chevobbe 464d3947cb Bug 1680440 - [devtools] Remove erroneous backward compatibility comments for goForward/goBack methods. r=ladybenko.
Those methods are used in the client, so we don't want to remove them.
The original comment was only here to indicate when it was added.

Differential Revision: https://phabricator.services.mozilla.com/D98733
2020-12-11 13:55:14 +00:00
Nicolas Chevobbe cba90d934e Bug 1680440 - [devtools] Remove backward compatibility comment around code for deprecated tools in the Toolbox. r=jdescottes.
The code might still be used in the future for the storage inspector, so we can
remove the backward compat comment, and add more context around those lines.

Differential Revision: https://phabricator.services.mozilla.com/D98732
2020-12-11 13:55:01 +00:00
Nicolas Chevobbe fc88e75e67 Bug 1680440 - [devtools] Remove backward compatibility code in CombinedProgress#onProgressForWalker. r=yzen.
Older server didn't have the `completed` property, and we needed to rely on the
`progress` one. `completed` was added in 79, so we'll always have access to it now.

Differential Revision: https://phabricator.services.mozilla.com/D98731
2020-12-11 13:54:54 +00:00
Nicolas Chevobbe 0fa223f2bb Bug 1680440 - [devtools] Remove code handling missing startTime property in console evaluation response. r=ladybenko.
Differential Revision: https://phabricator.services.mozilla.com/D98730
2020-12-11 13:54:46 +00:00
Nicolas Chevobbe d384313a27 Bug 1680440 - [devtools] Remove backward compatibility code to handle older messages in legacy listeners. r=ladybenko.
Older message had a _type property and a different shape,
so we needed to transform them.
We shouldn't get those anymore since 78, so we can remove that code.

Differential Revision: https://phabricator.services.mozilla.com/D98729
2020-12-11 13:54:33 +00:00
Nicolas Chevobbe 7b006ffb1b Bug 1680440 - [devtools] Remove getFavicon trait on Tab descriptor. r=ladybenko.
The trait was added in 76, so we can safely remove it.
This allows us to cleanup retrieveAsyncFormData, that
we rename to retrieveFavicon to better represents what it does.

Differential Revision: https://phabricator.services.mozilla.com/D98728
2020-12-11 13:54:26 +00:00
Nicolas Chevobbe 5fc6358573 Bug 1680440 - [devtools] Remove hasTabInfo trait on Tab descriptor. r=ladybenko.
The trait was added in 77, so we can safely remove it now.

Differential Revision: https://phabricator.services.mozilla.com/D98727
2020-12-11 13:54:13 +00:00
Nicolas Chevobbe 0578684be5 Bug 1680440 - [devtools] Remove favicons parameter in listTabs call. r=ladybenko,devtools-backward-compat-reviewers,jdescottes.
The parameter was only used for older servers, so we
can remove it now.

Differential Revision: https://phabricator.services.mozilla.com/D98726
2020-12-11 13:54:06 +00:00
Nicolas Chevobbe 7e7de7c94f Bug 1680440 - [devtools] Remove showUserAgentShadowRoots parameter in getWalker call. r=ladybenko.
The parameter was only used for server older than 74 (newer
servers only rely on the showAllAnonymousContent param).

Differential Revision: https://phabricator.services.mozilla.com/D98725
2020-12-11 13:53:58 +00:00
Nicolas Chevobbe a2398fb444 Bug 1680440 - [devtools] Remove nullable on profiler-started activeBrowsingContextID property. r=ladybenko,devtools-backward-compat-reviewers.
The nullable attribute was only there to handle server
older than 72, so we can remove it now.

Differential Revision: https://phabricator.services.mozilla.com/D98724
2020-12-11 13:53:45 +00:00
Nicolas Chevobbe 2b79562e27 Bug 1680440 - [devtools] Remove emitsRuleUpdatedEvent trait on the StyleRuleActor. r=ladybenko.
The trait was added in 72, so it's safe to remove it now.
With the trait removed, the onDeclarationUpdated method in rule.js
was no longer called, so we can remove it as well.

Differential Revision: https://phabricator.services.mozilla.com/D98723
2020-12-11 13:53:37 +00:00
Nicolas Chevobbe 450824e09f Bug 1680440 - [devtools] Remove backward compatibility comment for getSupportedFeatures. r=ladybenko,devtools-backward-compat-reviewers.
The function is used, the comment was only mentioning when
the function was added, which doesn't bring us any value.

Differential Revision: https://phabricator.services.mozilla.com/D98722
2020-12-11 13:53:30 +00:00
Nicolas Chevobbe efd881c98f Bug 1680440 - [devtools] Remove backward compatibility comment in paused debugger overlay. r=ladybenko.
The code isn't ready to be removed, as it depends on a Bug fix,
and not a given Firefox version.

Differential Revision: https://phabricator.services.mozilla.com/D98721
2020-12-11 13:53:22 +00:00
Nicolas Chevobbe 48fff0a45c Bug 1680440 - [devtools] Remove backward compatibility code in getNodeFrontFromNodeGrip. r=ladybenko,devtools-backward-compat-reviewers.
Since we now always have a contentDomReference in grips, we
don't need to fallback on gripToNodeFront.
And since gripToNodeFront was only used from getNodeFrontFromNodeGrip,
we can remove it, as well as the walker actor method getNodeActorFromObjectActor.

We also had to get a content reference from a rendered Reps in the console, for
the "Reveal in inspector" context menu entry, so we stringigy it in a data attribute.

Differential Revision: https://phabricator.services.mozilla.com/D98720
2020-12-11 13:53:14 +00:00
Itiel 920d7235e4 Bug 1681554 - Fix the Console's multi-line editor Search History borders when focused r=nchevobbe
Also fix the border radius for RTL on macOS

Differential Revision: https://phabricator.services.mozilla.com/D99269
2020-12-11 13:16:27 +00:00
Nicolas Chevobbe 6820632f46 Bug 1681448 - [devtools] Fix evaluation result message ordering. r=bomsy.
When evaluating an expression containing console api calls,
it might happen that the result message is handled by the
client before the console api messages.
This is due to the fact that those messages are handled by
the resource watcher, which throttles resources, whereas
the result message is directly added from the webconsole
frontend.
In the console reducer we already have code handling out-of-order
messages, but it is only triggered for messages with different
timestamps; in our case, the timestamp of the result message
might be the same as the one of the console api messages.

To fix this issue, we simply add an extra millisecond on the
evaluation result packet, which will ensure it will have a
distinct timestamp from the console api messages it might
have triggered, with minimal risk of side effects.

The existing test for ordering is enhanced by logging multiple
messages, and it is failing quite frequently without the fix.

Differential Revision: https://phabricator.services.mozilla.com/D99205
2020-12-11 10:20:39 +00:00
Nicolas Chevobbe 3aff30e0c2 Bug 1681065 - [devtools] Update MDN compat data for release 85. r=Honza.
This patch updates the compat data json files, using the update script.

Differential Revision: https://phabricator.services.mozilla.com/D98913
2020-12-10 16:49:12 +00:00
Nicolas Chevobbe beaffca71c Bug 1680218 - [devtools] Remove PreferenceActor traits. r=jdescottes.
The trait were added in 81 and 82, so we can safely remove them now.
We take this opportunity to bail early in setDefaultpreferencesIfNeeded
when there's no default preferences to set.

Differential Revision: https://phabricator.services.mozilla.com/D98498
2020-12-09 13:18:17 +00:00
Nicolas Chevobbe f29b1b76c7 Bug 1680218 - [devtools] Remove supportsOverflowDebugging2 trait. r=rcaliman.
The trait was added in Firefox 83, so we can safely
remove it now.

Differential Revision: https://phabricator.services.mozilla.com/D98497
2020-12-09 13:18:09 +00:00
Nicolas Chevobbe abc372fb68 Bug 1680218 - [devtools] Remove mentions of WorkerDescriptorActor#connect. r=ochameau,devtools-backward-compat-reviewers.
The function doesn't exist anymore on newer server, so
we can remove it from the spec file.

Differential Revision: https://phabricator.services.mozilla.com/D98496
2020-12-09 13:17:56 +00:00
Nicolas Chevobbe e913b1cbda Bug 1680218 - [devtools] Remove handling of old markup mutations. r=rcaliman.
frameLoad and documentUnload aren't emitted anymore (since 81),
so we can remove the code that was handling them.

Differential Revision: https://phabricator.services.mozilla.com/D98495
2020-12-09 13:17:48 +00:00
Nicolas Chevobbe 67ae0a0120 Bug 1680218 - [devtools] Remove unused methods in StyleSheetActor spec. r=daisuke,devtools-backward-compat-reviewers,jdescottes.
Those methods were only kept for backward compatibility in the spec file, so we
can remove them from here.
`getText` is still used from the `StyleSheetFront#guessIndentation`, so we remove
the backward compat comment, and add more information on it.

The methods on the actor can't be removed as they're still called from the StyleSheetsActor
to support servers that don't use the resource watcher for stylesheets.
A test that was using those methods was updated.

Differential Revision: https://phabricator.services.mozilla.com/D98494
2020-12-09 13:34:04 +00:00
Nicolas Chevobbe f04e61747b Bug 1680218 - [devtools] Remove isFileNameSupported trait in StyleSheetActor. r=daisuke.
The trait was added in 81, so we can safely remove it now.

Differential Revision: https://phabricator.services.mozilla.com/D98493
2020-12-09 13:17:32 +00:00
Nicolas Chevobbe aa45f21d3f Bug 1680218 - [devtools] Remove supportResourceRequests trait in StyleSheetActor. r=daisuke.
The trait was added in 81, so we can safely remove it now.

Differential Revision: https://phabricator.services.mozilla.com/D98491
2020-12-09 13:17:24 +00:00
Nicolas Chevobbe 2d1582a2b7 Bug 1680218 - [devtools] Remove backward compatibility code for StyleSheetsFront#getTraits. r=rcaliman.
Differential Revision: https://phabricator.services.mozilla.com/D98490
2020-12-09 13:17:16 +00:00
Nicolas Chevobbe 205f99ee89 Bug 1680218 - [devtools] Remove supportsIsTopLevelDocument trait. r=rcaliman.
The trait was introduced in Firefox 81, so it's
safe to remove it now.

Differential Revision: https://phabricator.services.mozilla.com/D98489
2020-12-09 13:17:08 +00:00
Nicolas Chevobbe 94359716cc Bug 1680218 - [devtools] Remove getAttributesInOwnerDocument trait. r=rcaliman.
The trait was introduced in Firefox 80, so it's
safe to remove it now.

Differential Revision: https://phabricator.services.mozilla.com/D98488
2020-12-09 13:16:56 +00:00
Nicolas Chevobbe 1aac59224c Bug 1680218 - [devtools] Remove supportsNodePicker trait. r=rcaliman.
The trait was introduced in Firefox 80, so it's
safe to remove it now.

Differential Revision: https://phabricator.services.mozilla.com/D98487
2020-12-09 13:16:48 +00:00
Csoregi Natalia 0c82325a1d Backed out 11 changesets (bug 1680218) for causing devtools failures e.g. /browser_rules_add-rule-and-property.js. CLOSED TREE
Backed out changeset a17c7da1221c (bug 1680218)
Backed out changeset 2cbd9d935611 (bug 1680218)
Backed out changeset 58034e6bc337 (bug 1680218)
Backed out changeset 9e668aa17d1c (bug 1680218)
Backed out changeset 082988607e17 (bug 1680218)
Backed out changeset 63d5d5fb0feb (bug 1680218)
Backed out changeset d09c87a11d72 (bug 1680218)
Backed out changeset 37adf02276eb (bug 1680218)
Backed out changeset 5103a959e33d (bug 1680218)
Backed out changeset 34838b56270b (bug 1680218)
Backed out changeset 936c49ae59a4 (bug 1680218)
2020-12-09 10:01:41 +02:00
Nicolas Chevobbe ef4f17ddbe Bug 1680218 - [devtools] Remove PreferenceActor traits. r=jdescottes.
The trait were added in 81 and 82, so we can safely remove them now.
We take this opportunity to bail early in setDefaultpreferencesIfNeeded
when there's no default preferences to set.

Differential Revision: https://phabricator.services.mozilla.com/D98498
2020-12-09 06:25:15 +00:00
Nicolas Chevobbe fbe8a70bc3 Bug 1680218 - [devtools] Remove supportsOverflowDebugging2 trait. r=rcaliman.
The trait was added in Firefox 83, so we can safely
remove it now.

Differential Revision: https://phabricator.services.mozilla.com/D98497
2020-12-09 06:25:12 +00:00
Nicolas Chevobbe b52e8b6f00 Bug 1680218 - [devtools] Remove mentions of WorkerDescriptorActor#connect. r=ochameau,devtools-backward-compat-reviewers.
The function doesn't exist anymore on newer server, so
we can remove it from the spec file.

Differential Revision: https://phabricator.services.mozilla.com/D98496
2020-12-09 06:25:10 +00:00
Nicolas Chevobbe a2b70b69db Bug 1680218 - [devtools] Remove handling of old markup mutations. r=rcaliman.
frameLoad and documentUnload aren't emitted anymore (since 81),
so we can remove the code that was handling them.

Differential Revision: https://phabricator.services.mozilla.com/D98495
2020-12-09 06:25:07 +00:00
Nicolas Chevobbe 882badf682 Bug 1680218 - [devtools] Remove unused methods in StyleSheetActor spec. r=daisuke,devtools-backward-compat-reviewers,jdescottes
Those methods were only kept for backward compatibility in the spec file, so we
can remove them from here.
The methods on the actor can't be removed as they're still called from the StyleSheetsActor
to support servers that don't use the resource watcher for stylesheets.
A test that was using those methods was updated.

Differential Revision: https://phabricator.services.mozilla.com/D98494
2020-12-09 06:25:05 +00:00
Nicolas Chevobbe bb4db98163 Bug 1680218 - [devtools] Remove isFileNameSupported trait in StyleSheetActor. r=daisuke.
The trait was added in 81, so we can safely remove it now.

Differential Revision: https://phabricator.services.mozilla.com/D98493
2020-12-09 06:25:02 +00:00
Nicolas Chevobbe 0093051061 Bug 1680218 - [devtools] Remove supportResourceRequests trait in StyleSheetActor. r=daisuke.
The trait was added in 81, so we can safely remove it now.

Differential Revision: https://phabricator.services.mozilla.com/D98491
2020-12-09 06:24:59 +00:00
Nicolas Chevobbe 5dac76356c Bug 1680218 - [devtools] Remove backward compatibility code for StyleSheetsFront#getTraits. r=rcaliman.
Differential Revision: https://phabricator.services.mozilla.com/D98490
2020-12-09 06:23:54 +00:00
Nicolas Chevobbe 63a91e4bfb Bug 1680218 - [devtools] Remove supportsIsTopLevelDocument trait. r=rcaliman.
The trait was introduced in Firefox 81, so it's
safe to remove it now.

Differential Revision: https://phabricator.services.mozilla.com/D98489
2020-12-09 06:23:46 +00:00
Nicolas Chevobbe ba390c5097 Bug 1680218 - [devtools] Remove getAttributesInOwnerDocument trait. r=rcaliman.
The trait was introduced in Firefox 80, so it's
safe to remove it now.

Differential Revision: https://phabricator.services.mozilla.com/D98488
2020-12-09 06:23:39 +00:00
Nicolas Chevobbe cd4eca5098 Bug 1680218 - [devtools] Remove supportsNodePicker trait. r=rcaliman.
The trait was introduced in Firefox 80, so it's
safe to remove it now.

Differential Revision: https://phabricator.services.mozilla.com/D98487
2020-12-09 06:23:26 +00:00
Oriol Brufau 1176df78f5 Bug 1680931 - Fix inspector highlighter race conditions. r=rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D98869
2020-12-08 18:22:31 +00:00
Julian Descottes 96aa99602f Bug 1326659 - [devtools] Remove macos skipif for browser_toolbox_keyboard_navigation.js r=yzen
Depends on D98987
Try push looks ok without the skip-if, might be fine to remove it

Differential Revision: https://phabricator.services.mozilla.com/D99038
2020-12-08 18:15:25 +00:00
Julian Descottes 5bf85ffc24 Bug 1326659 - [devtools] Use button element to render close button in NotificationBox r=nchevobbe,yzen
Differential Revision: https://phabricator.services.mozilla.com/D98987
2020-12-08 18:14:22 +00:00
Nicolas Chevobbe e1302ab436 Bug 1680684 - [devtools] Fix handling of escaped characters for console autocomplete. r=bomsy.
The analyzeInputString function tried to handle escape characters in strings,
by having a dedicated ESCAPE state.
Unfortunately, when in ESCAPE state, the code will always re-assign the NORMAL state.
So if at some point the string was terminated, the code would assume we were entering
a string state again.
In the end, this would cause the autocomplete to fail, because the JSPropertyProvider
would think that it was passed an unterminated string literal.
This is fixed by introducing quote-specific escape state, so we know which state to get
back in once the escape character is consumed.

A few test cases are added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D98754
2020-12-08 16:31:27 +00:00
Alexandre Poirot 1a154de122 Bug 1644188 - [devtools] Unregister service worker in all resourceWatcher/targetList tests. r=jdescottes
Not doing that, makes the browser_resources_sources.js test to fail because
of pending SW's target which comes with unexpected sources.

Differential Revision: https://phabricator.services.mozilla.com/D98460
2020-12-08 13:12:11 +00:00
Alexandre Poirot 53d3715f45 Bug 1644188 - [devtools] Test Service Worker JS sources watching. r=jdescottes
This helps cover the workaround put in ResourceWatcher in order to trigger
the SOURCE legacy listener for targets that we don't yet support in the Watcher actor.

Differential Revision: https://phabricator.services.mozilla.com/D98438
2020-12-08 13:12:09 +00:00
Alexandre Poirot cc447685d4 Bug 1644188 - [devtools] Prevents watching for resources we no longer watch on target switching. r=jdescottes
This code in ResourceWatcher was forcing to watch resources we stopped listening to
when the target was switching.

Differential Revision: https://phabricator.services.mozilla.com/D98437
2020-12-08 13:45:40 +00:00
Alexandre Poirot 9717df61b3 Bug 1644188 - [devtools] Implement server side JS sources. r=jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D87504
2020-12-08 13:11:59 +00:00
Nicolas Chevobbe fe574be463 Bug 1680202 - [devtools] Remove unused watchpoint trait on Root actor. r=ochameau.
We take this as an opportunity to remove the watchpoint
pref as well, since it was always set to true.

Differential Revision: https://phabricator.services.mozilla.com/D98447
2020-12-08 10:56:12 +00:00
Nicolas Chevobbe 1c4be694f6 Bug 1680202 - [devtools] Remove perfActorVersion trait on Root actor. r=julienw.
The trait wasn't used at all.

Differential Revision: https://phabricator.services.mozilla.com/D98446
2020-12-08 10:55:54 +00:00
Nicolas Chevobbe d384fc5d5d Bug 1680202 - [devtools] Remove bulk traits on Root actor. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D98445
2020-12-08 10:55:41 +00:00
Nicolas Chevobbe 54acdc1626 Bug 1680202 - [devtools] Remove sources traits on Root actor. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D98444
2020-12-08 10:55:34 +00:00
Nicolas Chevobbe 81536061a5 Bug 1680202 - [devtools] Remove storageInspector traits on Root actor. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D98443
2020-12-08 10:55:21 +00:00
Nicolas Chevobbe 7f12163d9d Bug 1680202 - [devtools] Remove heapSnaphots traits on Root actor. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D98442
2020-12-08 10:55:13 +00:00
Nicolas Chevobbe a8c3a9ef74 Bug 1681070 - [devtools] Add a script to update MDN compat data. r=daisuke.
This patch adds a script which is similar to the one that was written in the README.md file.
This goes along with a simple package.json that let's us have a simple command
to execute the update script.

The README file is updated as well to reflect this new script.

Differential Revision: https://phabricator.services.mozilla.com/D98912
2020-12-08 09:16:33 +00:00
Bogdan Tara ade4d82c59 Backed out changeset 98c3e6255c58 (bug 1597600) for browser_installssl.js failures CLOSED TREE 2020-12-07 21:01:50 +02:00
R. Martinho Fernandes c99fe51d2d Bug 1597600 - make certificate overrides depend on origin attributes r=keeler,geckoview-reviewers,smaug,agi
Differential Revision: https://phabricator.services.mozilla.com/D91962
2020-12-07 17:10:52 +00:00
Josue Quilon 0910846e1e Bug 1664768 - [devtools] Remove defer usage in devtools\client\shared\test\helper_addons.js r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D95106
2020-10-29 13:00:01 +00:00
Nicolas Chevobbe da432100a0 Bug 1679974 - [devtools] Remove backward compatibility code for older version of getCSSDatabase. r=ladybenko.
Differential Revision: https://phabricator.services.mozilla.com/D98319
2020-12-04 16:50:43 +00:00
Nazım Can Altınova f4d36497aa Bug 1667061 - Add ProfilerViewMode for preset and append `view` querystring while opening the front-end. r=gregtatum
Depends on D91266

Differential Revision: https://phabricator.services.mozilla.com/D91267
2020-12-04 10:47:22 +00:00
Nazım Can Altınova 349951062c Bug 1667061 - Format the perf.d.ts file. r=gregtatum
My editor formats this file automatically when I need to change something here,
and it's annoying to exclude these when I need to change something in this
file. I guess it doesn't hurt to format it so we won't have to do that again.

Differential Revision: https://phabricator.services.mozilla.com/D91266
2020-12-04 10:47:09 +00:00
Emilio Cobos Álvarez 96a85ab8c6 Bug 1680558 - Update cssparser to get ParserState in rule parser. r=heycam
The changes should be trivial.

The third_party changes are up for review in
https://github.com/servo/rust-cssparser/pull/277 (and of course I'll
land with a bump to 0.28 rather than the override after that gets r+'d).

The basic idea is that with this we have the actual start offset of the
rule, so we wouldn't include html comments or other invalid stuff we
discard during sanitization in bug 1680084. But that's a separate
change.

Differential Revision: https://phabricator.services.mozilla.com/D98677
2020-12-04 10:47:55 +00:00
Nicolas Chevobbe eee9299520 Bug 1678757 - [devtools] Add missing errors in Error previewer. r=bomsy.
We weren't handling the error exception object in the Error previewer for
some error classes, and as a result we'd show an undefined grip in the console,
instead of a proper error message.
A test is added to check that we do print wasm errors as expected.

Differential Revision: https://phabricator.services.mozilla.com/D98469
2020-12-03 17:16:25 +00:00
Razvan Maries bde72eb2fd Backed out 2 changesets (bug 1667061) for perma failures on browser_popup-record-capture-view.js. CLOSED TREE
Backed out changeset af2cb6cee546 (bug 1667061)
Backed out changeset f374a2996151 (bug 1667061)
2020-12-03 20:01:56 +02:00
Nazım Can Altınova 4b0e6b19ca Bug 1667061 - Add ProfilerViewMode for preset and append `view` querystring while opening the front-end. r=gregtatum
Depends on D91266

Differential Revision: https://phabricator.services.mozilla.com/D91267
2020-12-03 14:19:22 +00:00
Nazım Can Altınova 43ad52a612 Bug 1667061 - Format the perf.d.ts file. r=gregtatum
My editor formats this file automatically when I need to change something here,
and it's annoying to exclude these when I need to change something in this
file. I guess it doesn't hurt to format it so we won't have to do that again.

Differential Revision: https://phabricator.services.mozilla.com/D91266
2020-12-03 11:14:47 +00:00
Nicolas Chevobbe eed6fa3f03 Bug 1680207 - [devtools] Remove backward compatibility code in devtools/client/inspector/rules/models/rule.js. r=bomsy.
The code was handling < 49 servers, so we can safely remove it.

Depends on D98449

Differential Revision: https://phabricator.services.mozilla.com/D98450
2020-12-03 09:23:33 +00:00
Nicolas Chevobbe 5b0ec6d578 Bug 1680207 - [devtools] Remove unnecessary backward compatibility comment in ObjectActor. r=bomsy.
Depends on D98448

Differential Revision: https://phabricator.services.mozilla.com/D98449
2020-12-03 09:18:56 +00:00
Nicolas Chevobbe 573de07f71 Bug 1680207 - [devtools] Remove backward compatibility code in WalkerFront. r=bomsy.
This code handled server older than 42, so it's safe to remove it.

Differential Revision: https://phabricator.services.mozilla.com/D98448
2020-12-03 09:20:50 +00:00
Nicolas Chevobbe 460c8c2214 Bug 1680281 - [devtools] Update backward compatibility comments for WatcherActor traits. r=jdescottes.
Those traits are going to be removed in Bug 1680280,
and not through the regular backward-compatibility cleanup routine.

Differential Revision: https://phabricator.services.mozilla.com/D98483
2020-12-02 18:42:47 +00:00
Nicolas Chevobbe 04874858ce Bug 1680211 - [devtools] Remove backward compatibility code to handle hidden system addons. r=jdescottes.
All addons have the hidden property now, so we can remove
the backward compatibility code and tidy up things a bit.

Differential Revision: https://phabricator.services.mozilla.com/D98466
2020-12-03 06:24:21 +00:00
Nicolas Chevobbe f211a1d986 Bug 1680211 - [devtools] Remove uninstallUnsupportedExtensions function. r=jdescottes.
The function was taking care of removing old addons.
It landed 2 years ago, so we can assume that we don't
need that anymore.

Differential Revision: https://phabricator.services.mozilla.com/D98465
2020-12-03 06:24:14 +00:00
Nicolas Chevobbe 767dc27ef8 Bug 1680211 - [devtools] Remove backward compatibility code for handling worker targets without unique id. r=jdescottes.
Prior to Firefox 68, worker target didn't have a unique id,
and we were relying on their actor id in a few places.
Now that we should have the id everywhere, we can remove
the backward compatibility code, and simplify some of
the logic.

Differential Revision: https://phabricator.services.mozilla.com/D98464
2020-12-03 06:24:06 +00:00
Julian Descottes 0e4a1ef1aa Bug 1673897 - [devtools] Throw if a spec method defines an array return value r=ochameau
Depends on D96940

Differential Revision: https://phabricator.services.mozilla.com/D96941
2020-12-02 14:35:53 +00:00
Julian Descottes a0e3b72bea Bug 1673897 - [devtools] Stop using arrays as return values for rdp responses r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96940
2020-12-02 14:35:46 +00:00
Alexandre Poirot 350909e718 Bug 1678385 - [devtools] Enable legacy listener for targets that watcher actor doesn't support. r=jdescottes
This is useful for SOURCE resource, as that's one resource that we expect to
fetch from all targets, but Service Worker and Shared worker targets aren't supported
yet by the watcher. So we should be using legacy listener for these.

Differential Revision: https://phabricator.services.mozilla.com/D97631
2020-12-02 10:33:49 +00:00
Nicolas Chevobbe 7e3eb1eda3 Bug 1680000 - [devtools] Remove backward compatibility code in GridFront. r=jdescottes.
We can remove the code that was handling connecting to server older
than Firefox 60.

Differential Revision: https://phabricator.services.mozilla.com/D98313
2020-12-02 08:09:38 +00:00
Christian Holler 894124e3cf Bug 1677049 - Skip problematic mochitest-bc tests in TSan. r=Gankro,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D98365
2020-12-01 20:21:20 +00:00
Andrew McCreight 37d53cb0c1 Bug 1680042 - Fix "detroyed" typos. DONTBUILD r=necko-reviewers,geckoview-reviewers,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D98341
2020-12-01 17:35:54 +00:00
Nicolas Chevobbe 9a7b1bb9be Bug 1679409 - [devtools] Write a test for color scheme simulation. r=rcaliman.
The test is quite simple as it checks the state of the buttons as we cycle through
it, and checks that the rule view does show the expected applied rule when
simulating a color scheme.

Even if the color scheme simulation is behind a pref, this simple test will help
avoid regression. It also highlights that the feature does not work on remote
iframe when Fission is enabled, which is why we tag it as `fail-if = fission`.

Differential Revision: https://phabricator.services.mozilla.com/D98047
2020-12-01 17:00:08 +00:00
Nicolas Chevobbe 8b51d8b3ca Bug 1679971 - [devtools] Remove unnecessary argument when calling highlighter.show. r=rcaliman.
Cleanup backward compatibility code.

Depends on D97395

Differential Revision: https://phabricator.services.mozilla.com/D98297
2020-12-01 12:32:15 +00:00
Hubert Boma Manilla 6dd4b5fa16 Bug 1677856 - [devtools] Update codemirror javascript mode r=nchevobbe
This patch updates the modes file for javascript.
It fixes particularly the issue with the source editors syntax highlighting issue, caused by the usage
of optional chaining inside template strings.
It also benefits of any other improvements that have been made.

Differential Revision: https://phabricator.services.mozilla.com/D98106
2020-12-01 13:13:30 +00:00
Hubert Boma Manilla 0b6ab1ef69 Bug 1676177 - [devtools] Throtting requests in fission r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D97965
2020-11-30 23:03:55 +00:00
Nicolas Chevobbe e1ad6a59fa Bug 1679503 - [devtools] Make getNodeFrontInFrame helper Fission-compatible. r=rcaliman.
The helper wasn't working for element in remote frame when Fission was enabled.
We fix this by first retrieving the iframe associated target front and related
walker front.
Then we can check if the walker is different from the top-level one, and call
`querySelector` with the appropriate queryNode.

Differential Revision: https://phabricator.services.mozilla.com/D98046
2020-11-27 15:41:04 +00:00
Nicolas Chevobbe 32aaf870e6 Bug 1677942 - [devtools] Use new syntax for backward compatibility comments. r=jdescottes,devtools-backward-compat-reviewers.
This turns all existing backward compatibility comments (or
comments mentioning a specific Firefox version), into the new
syntax we agreed upon in Bug 1673535.

Differential Revision: https://phabricator.services.mozilla.com/D97395
2020-12-01 10:27:47 +00:00
Nicolas Chevobbe 453481a6fe Bug 1678636 - [devtools] Prevent paused overlay to be shown after resuming. r=ladybenko.
Before showing the pause overlay, we wait for the page to be fully loaded.
This introduced some delay, and at the moment we were showing the overlay, the
debugger could not be paused anymore.
This patch adds another check to ensure the debugger is paused, as well as a
test to avoid regression."

Differential Revision: https://phabricator.services.mozilla.com/D97778
2020-12-01 09:17:17 +00:00
Nicolas Chevobbe 41f54d06bf Bug 1678638 - [devtools] Remove unused node parameter from PausedDebuggerOverlay#show. r=ladybenko.
This was probably here to match other highlighters, but
we're not using it at all so let's remove it.

Differential Revision: https://phabricator.services.mozilla.com/D97777
2020-12-01 09:17:09 +00:00
Tim Nguyen 1b7ef862e8 Bug 1679714 - Remove layout.css.conic-gradient.enabled preference. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D98126
2020-11-30 12:45:14 +00:00
Oriol Brufau 50f32274b5 Bug 1678613 - Use property descriptors in promise previewers. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D97760
2020-11-27 15:53:55 +00:00
Fabien CASTERS 59aee01268 Bug 1676629 - Remove defer usage in devtools/server/actors/storage.js r=Honza,ladybenko
Differential Revision: https://phabricator.services.mozilla.com/D96712
2020-11-26 14:35:28 +00:00
Nicolas Chevobbe 00e272dd2d Bug 1678258 - [devtools] Fix debugger paused overlay buttons. r=rcaliman.
In Bug 1673328, the signature of the resume function was modified,
but we missed that the function was called from the paused overlay,
which means we didn't pass the correct signature anymore, and buttons
of the paused overlay weren't working at all.
This patch fixes the callsite and adds a mochitest where we go
through a simple case of pausing and then stepping and resuming
by clicking on the overlay buttons.
Since the pause overlay is different from the other highlighters
for which we already had test helpers, we needed to add dedicated
test helpers for the pause overlay, in the test actor.

Differential Revision: https://phabricator.services.mozilla.com/D97757
2020-11-26 15:06:06 +00:00
Sunita Sen 663194d7fc Bug 1329241 - Add support for touch-action:pinch-zoom - Add pinch-zoom support to touchAction r=kats,emilio
Differential Revision: https://phabricator.services.mozilla.com/D97815
2020-11-24 13:33:51 +00:00
Kartik Gautam b95d37ecfb Bug 1677247 - Replace :not(:is(X)) with :not(X) in the codebase. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D97943
2020-11-25 04:23:25 +00:00
Florent Viard fc9a18178f Bug 1674622 - Fixes timings/time fields for har import/export; r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D96210
2020-11-18 12:39:08 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke d10d03d076 Bug 1676365 - Move SpinEventLoopUntil to separate header. r=#xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96556

Depends on D96554
2020-11-23 16:10:41 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Razvan Maries 880fb394c6 Bug 1607321 - Disabled browser_dbg-worker-scopes.js on Mac and Windows10. r=aryx
Differential Revision: https://phabricator.services.mozilla.com/D97844
2020-11-22 09:44:55 +00:00
Julian Descottes 51ed7cc519 Bug 1297132 - [devtools] Stop loading unused globalOverlay.js in toolbox r=rcaliman,bgrins
Per https://bugzilla.mozilla.org/show_bug.cgi?id=1297132#c2 , the APIs from globalOverlay.js seem unused in DevTools. Storage panel and styleeditor are still using goUpdateCommand and others, but they load their own copy of globalOverlay.js

Differential Revision: https://phabricator.services.mozilla.com/D96703
2020-11-20 17:14:31 +00:00
Emilio Cobos Álvarez 559823cc19 Bug 1617608 - Allow toggling :focus-visible from inspector. r=rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D97164
2020-11-20 16:24:37 +00:00
Hubert Boma Manilla cee5bf40eb Bug 1662736 - [devtools] Simplify the network resource payload for the server watcher r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94720
2020-11-20 16:17:36 +00:00
Oriol Brufau 18fa52a577 Bug 1676476 - Replace grip.promiseState with a preview. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D97340
2020-11-19 21:51:56 +00:00
Nicolas Chevobbe ab089e8e85 Bug 1677732 - [devtools] Document backward compatibility comment pattern. r=rcaliman.
In Bug 1673535, we agreed on a specific pattern for backward compatibility comments,
so this patch documents this syntax on our backward compatibility document.

We take this as an opportunity to reword the section where we talked about removing
old backward compatibility code, as well as adding another way of testing backward compatibility.

Differential Revision: https://phabricator.services.mozilla.com/D97320
2020-11-19 13:38:46 +00:00
Zac Svoboda 52e80c2e61 Bug 1623250 - Correct :visited invalid property tooltip r=ladybenko,rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D96487
2020-11-17 16:40:15 +00:00
Nicolas Chevobbe 7bd6a81b4f Bug 1677379 - [devtools] Fix Learn more link on CORS warning message. r=ckerschb.
In Bug 1575068, the message of CORSMissingAllowHeaderFromPreflight and CORSPreflightDidNotSucceed
changed, and the category field was updated in the nsIErrorMessage. As a result, the keys in
errordocs.js needed to be changed, which was rightfully done, but the value was changed as well,
which means the resulting url of the Learn more links were modified as well. I'm not sure if
something changed since then, but those 2 urls now lead to 404 pages on MDN.
This patch fixes those URLs to ensure we do link to the right MDN pages.

Differential Revision: https://phabricator.services.mozilla.com/D97129
2020-11-19 10:41:35 +00:00
Nicolas Chevobbe 5939a047d3 Bug 1678241 - [devtools] Remove callback param in sendHTTPRequest. r=bomsy.
The function now directly return a Promise instead.

Differential Revision: https://phabricator.services.mozilla.com/D97541
2020-11-19 10:38:01 +00:00
Julian Descottes 99b276a899 Bug 1678023 - [devtools] Force print.tab_modal.enabled to true in print.tab_modal.enabled r=ochameau
The preference print.tab_modal.enabled drives the usage of the print preview UI and is only set to true on EARLY_BETA_OR_EARLIER.
Force the pref in the test to avoid failures after late beta.

Differential Revision: https://phabricator.services.mozilla.com/D97448
2020-11-18 20:09:46 +00:00
Micah Tigley f9418e8f58 Bug 1677660 - Remove backwards-compat methods from Compatibility front. r=jdescottes,daisuke,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D97248
2020-11-18 16:29:31 +00:00
Yura Zenevich 6319e84056 Bug 1677659 - set height on an a11y icon image for when a11y panel is disabled. r=jdescottes DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D97245
2020-11-18 16:03:19 +00:00
Belén Albeza a91fb8ce84 Bug 1677697 - Fix storage actors being instanced twice r=ochameau
This avoids instancing twice the different storage type actors (legacy and resources). In order to keep current server tests working, a pref to force instancing legacy actors has been introduced.

Differential Revision: https://phabricator.services.mozilla.com/D97287
2020-11-17 15:53:28 +00:00
Alexandre Poirot 7f97511367 Bug 1676810 - [devtools] Use a shared WatchedData module in order to update cross process data object. r=jdescottes
This will allow to better handle more complex data like breakpoints.

Differential Revision: https://phabricator.services.mozilla.com/D96805
2020-11-18 09:23:34 +00:00
Sylvestre Ledru bebb9f9181 Bug 1519636 - Reformat with clang-format-11 to the Google coding style r=andi,sg,geckoview-reviewers,snorp
It is bringing some minor changes

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90795
2020-11-18 09:05:59 +00:00
Hubert Boma Manilla 6e19a79a32 Bug 1677546 - [devtools] Rename network actors to parent and content actors r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D97239
2020-11-17 23:21:26 +00:00
Emilio Cobos Álvarez 203f4a1e40 Bug 1677693 - Show -moz-outline-radius as inactive when outline-style is auto. r=rcaliman,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D97281
2020-11-17 17:04:18 +00:00
Alexandre Poirot b6defeeb72 Bug 1676808 - [devtools] Rename all watcher to watcherFront. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D96859
2020-11-17 11:15:40 +00:00
Alexandre Poirot 03ce56bda3 Bug 1676808 - [devtools] Rename ResourceWatcher.hasWatcherSupport to hasResourceWatcherSupport. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D97148
2020-11-17 11:15:38 +00:00
Alexandre Poirot ee7d0f17ec Bug 1676808 - [devtools] Expose WatcherFront via the TargetList instead of ResourceWatcher. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D96804
2020-11-17 11:15:35 +00:00
Julian Descottes ee9aa9e845 Bug 1676769 - [devtools] Try catch around instantiateTarget/addWatcherDataEntry in DevTools parent actors r=ochameau,nchevobbe
Depends on D97153

DevTools window actors rely on sendQuery for 2 APIs: instantiateTarget and addWatcherDataEntry.
If an exception occurs in the child actor, it will be propagated back to the parent, which will reject the sendQuery.
This can make the code revolving around those APIs very fragile. Since this code is involved in setting up the initial targets, it could be nice to catch errors there to avoid too many potential blank toolbox situations.

Differential Revision: https://phabricator.services.mozilla.com/D97155
2020-11-17 13:15:45 +00:00
Julian Descottes 34ec69f339 Bug 1676769 - [devtools] Use document.documentURI to detect print preview documents r=ochameau
DevToolsFrameChild actor excludes about:blank windows to avoid creating unnecessary targets.
In the parent process we are supposed to also exclude about:blank windows when fetching the browsing-contexts that should be debugged.
However the parent-process logic relies on checking the documentURI to exclude about:blank. The actor relies on a docShell flag called hasLoadedNonBlankURI.

The printpreview browser element uses an about:blank window, but still displays a document different from about:blank.
Consequently the parent process check considers this document as valid, because of its documentURI.
But the child actor throws because of the hasLoadedNonBlankURI flag.

This changeset adds an additional check for `window.document.documentURI` in the child actor.
Also adds a new mochitest to check that we can open the BrowserToolbox and inspect the print preview

Differential Revision: https://phabricator.services.mozilla.com/D97153
2020-11-17 13:15:24 +00:00
Ping Chen e65209a869 Bug 1577900: Add a prettyPrint button to the multiline editor of devtools. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D95457
2020-11-17 07:38:54 +00:00
Sylvestre Ledru c0f6fe8caf Bug 1562642 - Add missing license headers r=mhoye,marionette-reviewers,webdriver-reviewers,perftest-reviewers,tarek
Differential Revision: https://phabricator.services.mozilla.com/D97138
2020-11-17 02:06:54 +00:00
Oriol Brufau fddd41228d Bug 1552648 - Avoid too much recursion when inspecting nested promises. r=nchevobbe,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96317
2020-11-16 18:15:14 +00:00
Noemi Erli debd6a2710 Backed out 3 changesets (bug 1676808) for causing devtools failures CLOSED TREE
Backed out changeset bc9b1ba331c3 (bug 1676808)
Backed out changeset 9e26cb0f0bdf (bug 1676808)
Backed out changeset 03abab648794 (bug 1676808)
2020-11-17 01:23:53 +02:00
Alexandre Poirot 02c7de7954 Bug 1676808 - [devtools] Rename all watcher to watcherFront. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D96859
2020-11-16 21:08:24 +00:00
Alexandre Poirot 1b2d2414ad Bug 1676808 - [devtools] Rename ResourceWatcher.hasWatcherSupport to hasResourceWatcherSupport. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D97148
2020-11-16 21:08:21 +00:00
Alexandre Poirot b1bb3196f3 Bug 1676808 - [devtools] Expose WatcherFront via the TargetList instead of ResourceWatcher. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D96804
2020-11-16 21:08:19 +00:00
Nika Layzell 42028efc71 Bug 1671983 - Part 4: Stop awaiting BrowserTestUtils.loadURI, r=annyG,remote-protocol-reviewers,extension-reviewers,preferences-reviewers,whimboo,zombie
This method only is async in order to allow callers to wait for a process switch
triggered by the call to `loadURI` to be finished before resolving. With
DocumentChannel, we should never trigger a process switch eagerly like this
again, so we don't need any of the async behaviour here anymore.

This part is largely mechanical changes to tests, removing the `await` calls on
`loadURI`, and a follow-up part will remove the actual async logic from
`BrowserTestUtils.loadURI`.

Differential Revision: https://phabricator.services.mozilla.com/D94641
2020-11-12 18:01:03 +00:00
Nicolas Chevobbe 41e5dcf390 Bug 1673226 - [devtools] Load missing ObjectInspector-related CSS files in inspector. r=rcaliman.
The ObjectInspector might be used in the inspector by extension
using the setExpression API. When we moved reps to a dedicated
folder and split it so it does not contain objectInspector bits
anymore (in Bug 1669956), we forgot to include Tree.css and ObjectInspector.css
in the inspector panel, resulting in weird styling for the side panel.
This patch includes the missing CSS files, which fixes the issue.

Differential Revision: https://phabricator.services.mozilla.com/D97126
2020-11-16 14:14:47 +00:00
Julian Descottes 4c52379c29 Bug 1676646 - [devtools] Remove unused Connected localized string in aboutdebugging r=ladybenko,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96714
2020-11-16 09:34:00 +00:00
Karl Tomlinson 332494e855 Bug 1213512 remove unused NS_ERROR_DOM_FILE_ABORT_ERR r=baku
Depends on D95967

Differential Revision: https://phabricator.services.mozilla.com/D95968
2020-11-13 07:55:31 +00:00
Nicolas Chevobbe 68d3b8b92b Bug 1672980 - [devtools] Fix browser_browser_resources_console_messages failures on beta simulation. r=ochameau.
This is flipping the devtools.browsertoolbox.fission pref, which
is only enabled on Nightly at the moment.

Differential Revision: https://phabricator.services.mozilla.com/D96411
2020-11-11 09:05:01 +00:00
Hubert Boma Manilla a70ec38159 Bug 1662736 - [devtools] Simplify the network request payload r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94457
2020-11-13 15:17:48 +00:00
Julian Descottes e7ec1ff308 Bug 1676980 - [devtools] Remove unused protocol/utils describeTemplate() helper r=ochameau
Depends on D96935

Differential Revision: https://phabricator.services.mozilla.com/D96939
2020-11-13 10:21:36 +00:00
Julian Descottes 3ad6fe2ca8 Bug 1676974 - [devtools] Remove unused protocol/utils.js method() helper r=ochameau
Current implementation
```lang=javascript
exports.method = function(fn, spec = {}) {
  fn._methodSpec = Object.freeze(spec);
  if (spec.request) {
    Object.freeze(spec.request);
  }
  if (spec.response) {
    Object.freeze(spec.response);
  }
  return fn;
};
```
https://searchfox.org/mozilla-central/rev/5a1a34953a26117f3be1a00db20c8bbdc03273d6/devtools/shared/protocol/utils.js#70-79

The helper method() in protocol/utils.js is only called from two methods:
- actorBridge (never used in the codebase)
- actorBridgeWithSpec (used by a few actors)

actorBridgeWithSpec doesn't pass the second argument, so in practice, this method could be reduced to:
```lang=javascript
exports.method = function(fn) {
  fn._methodSpec = Object.freeze({});
  return fn;
};
```

`_methodSpec` is only mentioned in one other spot: https://searchfox.org/mozilla-central/rev/5a1a34953a26117f3be1a00db20c8bbdc03273d6/devtools/shared/protocol/Actor/generateActorSpec.js#27-40

But based on our coverage tooling, we never actually have a `_methodSpec` when we run this code: https://coverage.moz.tools/#view=file&revision=latest&path=devtools/shared/protocol/Actor/generateActorSpec.js

To hit it, we would have to call `generateActorSpec` directly with an actor where we used `actorBridgeWithSpec`. But we never do that, we only use it with plain JS objects in the devtools/shared/specs folder.

Consequently, this helper can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D96935
2020-11-13 09:49:53 +00:00
Bogdan Tara 3667467db8 Backed out 10 changesets (bug 1662254) for lint failure on generate_static_pref_list.py CLOSED TREE
Backed out changeset 972e63387191 (bug 1662254)
Backed out changeset 3a9d6f0aa380 (bug 1662254)
Backed out changeset 4b3ffe7fe1af (bug 1662254)
Backed out changeset 4834b1025611 (bug 1662254)
Backed out changeset ec1f7afe8a2d (bug 1662254)
Backed out changeset c7a6b927b1de (bug 1662254)
Backed out changeset 2427d85b2605 (bug 1662254)
Backed out changeset 979bf4ac97bb (bug 1662254)
Backed out changeset 3e443333c636 (bug 1662254)
Backed out changeset a5261578ebfc (bug 1662254)
2020-11-12 23:59:07 +02:00
Steve Fink 9ab0a6a530 Bug 1662254 - Rename CC_WAITING -> CC_FINISHED r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D94792
2020-11-12 19:05:32 +00:00
Julian Descottes 2a85b4f393 Bug 1650963 - [devtools] Set non-fission flag when opening DevTools window from a non-fission host tab r=Honza
We cannot use swapFrameLoaders between a fission and a non fission window. We should make sure to open non-fission windows if the current host is not a fission one.

Differential Revision: https://phabricator.services.mozilla.com/D96696
2020-11-12 15:18:43 +00:00
Cody Welsh 049cc3d149 Bug 1673932 - [devtools] - Combine `register` calls in highlighters. r=jdescottes
Combine the calls to the highlighter `register()` function in a loop.
One of several possible solutions here.

Differential Revision: https://phabricator.services.mozilla.com/D96302
2020-11-12 08:38:59 +00:00
Cody Welsh efbcf065d3 Bug 1673932 - [devtools] - Use absolute paths in highlighters register helper. r=jdescottes
Change the logic in the devtools/server/actors/highlighters.js file to
use absolute paths instead of constructing them from an internal helper
function. Also modify the calls to `register` at the bottom of the file
according to this change.

Differential Revision: https://phabricator.services.mozilla.com/D96301
2020-11-10 10:12:53 +00:00
Tim Huang 7ec26df273 Bug 1641270 - Part 6: Pass CookieJarSettings to nsIWebBrowserPersist.saveURI() and nsIWebBrowserPersist.savePrivacyAwareURI(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D95616
2020-11-11 18:19:27 +00:00
Andreea Pavel 51f16bb9d2 Backed out changeset 62af829812bd (bug 1662736) for permafailing bug 1676641 and bug 1655183 on a CLOSED TREE 2020-11-11 19:53:14 +02:00
Hubert Boma Manilla d4cec11d5a Bug 1662736 - [devtools] Simplify the network request payload r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94457
2020-11-11 10:51:28 +00:00
Julian Descottes 2e535d26d6 Bug 1669666 - [devtools] Ignore custom pageshow/pagehide events in BrowsingContextTargetActor r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D96605
2020-11-11 09:51:11 +00:00
Dan Minor 57441aa8cc Bug 1673054 - Migrate uses of intl.uidirection to intl.l10n.pseudo; r=Gijs,zbraniecki
This also removes pref overrides from methods like LocaleService::IsLocaleRTL or
IntlService.getLocaleInfo, because it doesn't really make sense to override the
result of checking an arbitrary locale, the relevant use case is overriding the
result for the current app locale.

Removal of the intl.uidirection pref completely will be done in a separate bug.

Differential Revision: https://phabricator.services.mozilla.com/D96235
2020-11-09 15:33:39 +00:00
Kris Maglione cfebcd3fd2 Bug 1669961: Return null from `.contentWindow` when inner window is inactive. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93853
2020-11-10 20:35:04 +00:00
Kris Maglione 7ae9faa46f Bug 1651774: Update mozilla/use-services rule for native Services implementation. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D93858
2020-11-06 18:58:33 +00:00
Nicolas Chevobbe 6abc8ae401 Bug 1634208 - [devtools] Fix browser_jsterm_screenshot_command_warnings intermittent. r=ladybenko.
It looks like the test was hitting the timeout limit on slow hardware (e.g. on
linux ccov on TRY).
Requesting a longer timeout seems to fix the failure.

Differential Revision: https://phabricator.services.mozilla.com/D96405
2020-11-10 16:07:32 +00:00
Steven MacLeod 971103bdd5 Bug 1606061 - move TouchEventsOverride to BrowsingContext. r=farre,devtools-backward-compat-reviewers
This change removes docshell's `mTouchEventsOverride` and replaces it
with a new `BrowsingContext` field `TouchEventsOverrideInternal`.
All uses of the old field have been replaced and an override should
now work under fission when there are cross-origin descendent frames.

Differential Revision: https://phabricator.services.mozilla.com/D96414
2020-11-10 15:57:30 +00:00
Nicolas Chevobbe 56c8e9380a Bug 1667778 - [devtools] Remove mentions of launchpad in debugger. r=jdescottes.
This removes the few mentions of the launchpad that were
still existing in the debugger codebase.
We take this as an opportunity to use the #mount element
as the root of the React app (instead of creating a new
div for it).

Depends on D96384

Differential Revision: https://phabricator.services.mozilla.com/D96513
2020-11-10 13:05:24 +00:00
Nicolas Chevobbe 514b0ddad4 Bug 1675769 - [devtools] Move devtools-environment function into debugger/src. r=bomsy.
This moves the `isNode` and `isNodeTest` functions to the debugger/src/utils folder,
updates the callsites to those functions, generates the bundles, and finally,
removes the devtools-environment folder, as well as all mentions of it.

Differential Revision: https://phabricator.services.mozilla.com/D96384
2020-11-10 15:18:32 +00:00
Nicolas Chevobbe 6e6be10526 Bug 1675769 - [devtools] Remove usage of devtools-environment isTesting. r=bomsy.
When possible, we switch to the plain devtools/shared/flags module.
In some cases, the check was only done for jest test, so we use
isNodeTest instead.

Differential Revision: https://phabricator.services.mozilla.com/D96382
2020-11-10 15:14:07 +00:00
Nicolas Chevobbe 9725148bcb Bug 1675769 - [devtools] Clean-up devtools-environment usage. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D96381
2020-11-10 15:07:57 +00:00
smolnar ec58e559fc Backed out changeset 1780d41127e8 (bug 1662736) for causing devtools failure. CLOSED TREE 2020-11-10 15:07:27 +02:00
Andrey Bienkowski e5944c6972 Bug 1674841 - [devtools] Clean up devtools/shared/protocol/tests/xpcshell/test_protocol_async.js r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D95553
2020-11-10 12:55:29 +00:00
Nicolas Chevobbe 858da426e6 Bug 1674400 - [devtools] Update pretty-fast to 0.2.4. r=bomsy.
This updates the pretty-fast module to bring the commits
that were done there the 3 last years (date of the last
version being published).

Differential Revision: https://phabricator.services.mozilla.com/D96176
2020-11-10 12:15:13 +00:00
Hubert Boma Manilla 5c91d1f55c Bug 1662736 - [devtools] Simplify the network request payload r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94457
2020-11-10 12:44:23 +00:00
Yura Zenevich 21c81dd7e6 Bug 1675539 - add telemetry for tabbing order overlay activation. r=jdescottes,janerik
Differential Revision: https://phabricator.services.mozilla.com/D96091
2020-11-09 16:19:20 +00:00
Alexandre Poirot efdfcfb399 Bug 1672826 - [devtools] Unmanage fronts when we purge a whole prefix. r=nchevobbe
Previous `purgeRequestForDestroy` method was only rejecting all pending requests.
The new `syncFrontDestroy` allows to fully destroy the front, including
unregistering it/unmanage it. So that if we receive a packet from a brand new
actor, with the same prefix and actor ID, DevToolsClient.getFront doesn't return
the old destroyed front.
This issue was making pending requests that were never resolved.

Differential Revision: https://phabricator.services.mozilla.com/D94718
2020-11-09 12:29:53 +00:00
Alexandre Poirot 8e2267f855 Bug 1672826 - [devtools] Close ChildDebuggerTransport in the parent process when we destroy content process targets. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D94485
2020-11-09 12:26:41 +00:00
Andrey Bienkowski e86e7489c7 Bug 1674425 - [devtools] Remove defer usage in server/tests/browser/browser_perf-realtime-markers.js r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D95337
2020-11-09 11:42:38 +00:00
Fabien CASTERS a2ece0090c Bug 1664766 - [devtools] Remove defer usage in devtools\client\shared\test\test-actor.js. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94966
2020-11-09 11:36:51 +00:00
Andrey Bienkowski 9a314848ae Bug 1673934 - [devtools] Remove defer usage in client/debugger/src/actions/tests/preview.spec.js r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D95858
2020-11-09 11:31:42 +00:00
Ben Delevingne 6df2de2623 Bug 1674136 - [devtools] Remove defer usage in devtools/client/shared/test/shared-redux-head.js. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D95152
2020-11-09 10:21:26 +00:00
Nicolas Chevobbe 3da665e7b3 Bug 1674115 - [devtools] Fix crash caused by calling WorkerDebugger.setDebuggerReady. r=ochameau.
We were trying to resume the worker debugger in case we
couldn't connect to the worker. Since connectToWorker can
reject when the worker is closed, we might try to resume a
closed worker, which could cause a crash.
In this patch, we simply check if the worker debugger isn't closed
before resuming it.

Differential Revision: https://phabricator.services.mozilla.com/D95990
2020-11-09 10:03:41 +00:00
Nicolas Chevobbe a76f5a8519 Bug 1675497 - [devtools] Remove unused duplicated object-inspector folder. r=bomsy.
Something probably went wrong in Bug 1671163 and we ended up
with this duplicated, unused folder.

Differential Revision: https://phabricator.services.mozilla.com/D96027
2020-11-09 09:57:12 +00:00
Nicolas Chevobbe 220bf52237 Bug 1675450 - [devtools] Remove unused ObjectActor.definitionSite. r=ochameau,devtools-backward-compat-reviewers.
The function wasn't used, except in a test that this patch removes.
Since it was also the only use of the getSourcesManager hook, we're able to
remove it as well.

Differential Revision: https://phabricator.services.mozilla.com/D95989
2020-11-09 09:50:26 +00:00
Alexandre Poirot 48133a28a8 Bug 1673627 - [devtools] Force showing iframe content instead of inline content for remote frames. r=jdescottes
For some reason we return an inlineTextChild when the iframe is remote, so only with fission turned on.
When the iframe isn't remote, WalkerFront.inlineTextChild returns undefined.

Differential Revision: https://phabricator.services.mozilla.com/D95868
2020-11-09 08:43:28 +00:00
Nick Alexander b143efdd25 Bug 1675332 - Make `--headless --jsdebugger` launch a headed Browser Toolbox. r=emalysz
Before this commit, the `MOZ_HEADLESS` environment variable was set by
the `--headless` process and inherited by the launched Browser Toolbox
process, hiding the debugger UI.  This commit allows to launch the JS
debugger when running under `--headless` by explicitly removing the
`MOZ_HEADLESS` variable from the environment.  To do this, a small
tweak to `Subprocess.jsm` is used that allows `null` to signal
"removal", distinct from `undefined` for "ignored".

While here I prefixed the output from the launched Browser Toolbox
process, which helps visually distinguish warnings, etc; and I also
corrected a typo that I stumbled across.

Differential Revision: https://phabricator.services.mozilla.com/D95897
2020-11-06 04:53:24 +00:00
Belén Albeza a6367adcc2 Bug 1673821 - [devtools] Fix error when closing storage panel r=jdescottes
Introduce a guard in the actor's destructor, so it does not fail if called more than once.

Differential Revision: https://phabricator.services.mozilla.com/D96068
2020-11-06 14:12:55 +00:00
Neil Deakin c5eff66205 Bug 1649843, remove now unused legacy actor code, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D95206
2020-11-06 15:46:11 +00:00
Nicolas Chevobbe 90fc707966 Bug 1673368 - [devtools] Remove unnecessary parts of debugger's webpack config. r=jdescottes
I inlined the two existing functions that were modifying the base config directly
back into the base webpack config, and then removed everything that wasn't hit
or used by the bundling script.
Thanks to this work, we're able to remove a few files that were previously only
used in Launchpad, or that are simple enough to be inlined into the webpack config.

Since postcss wasn't used, we can also remove the postcss.config.js file, as
well as some libraries from package.json.

Differential Revision: https://phabricator.services.mozilla.com/D96018
2020-11-06 14:49:16 +00:00
Nicolas Chevobbe e783099865 Bug 1673368 - [devtools] Remove dependency on devtools-launchpad in webpack config. jdescottes. r=jdescottes
This patch is simply inlining what was in devtools-launchpad directly into the
debugger's webpack config.
In order for the bundling script to still work, we had to add the dependencies
that were used in devtools-launchpad.
For some reason, this shifted a lot of modules in the generated files (but files
have the same size before and after, so I guess nothing changed).

Next patch in the serie will cleanup this webpack config.

Differential Revision: https://phabricator.services.mozilla.com/D96017
2020-11-06 14:29:44 +00:00
Julian Descottes d6d8ea296d Bug 1654763 - [devtools] Remove implementation, tests and documentation for actorHasMethod r=rcaliman,ochameau,devtools-backward-compat-reviewers
actorhasMethod had several technical limitations making it hard to use consistently. We now removed all the call sites for this method. This changeset removes the method and all its dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D95861
2020-11-06 13:50:52 +00:00
Julian Descottes 7f05d92a6e Bug 1673605 - [devtools] Remove unused css variables from perf.css r=julienw
Depends on D94747

Differential Revision: https://phabricator.services.mozilla.com/D94828
2020-10-27 17:44:14 +00:00
Nicolas Chevobbe 2e2dfdc264 Bug 1673641 - [devtools] Fix browser_browser_toolbox_evaluation_context.js failure on beta simulation. r=ladybenko.
The test was failing on Beta because we weren't setting the devtools.webconsole.input.context
pref, which is true only on Nightly.
This patch flip this pref in the test, which seems to make the test pass.

Differential Revision: https://phabricator.services.mozilla.com/D96061
2020-11-05 17:04:10 +00:00
Andrew Halberstadt 331bc892dd Bug 1675319 - [manifestparser] Properly support multiline skip-if statements, r=jmaher,extension-reviewers,zombie
This supports one manifestparser expression per line in the 'skip-if',
'fail-if' and 'run-if' keys. As a side effect the:

    skip-if = foo ||
        bar

syntax is no longer supported. Instead it can be:

    skip-if =
        foo  # bug 123
        bar  # bug 456

Differential Revision: https://phabricator.services.mozilla.com/D95927
2020-11-05 19:55:08 +00:00
Razvan Caliman ac7cf1d57c Bug 1675226 - [devtools] Remove leftover specific box model highlighter events r=jdescottes
Use the generic "highlighter-shown" / "highlighter-hidden" events and check for highlighter type.
Use generic helpers in tests.
Fix an unrelated leftover nit from D92802

Differential Revision: https://phabricator.services.mozilla.com/D95835
2020-11-05 14:43:46 +00:00
Oriol Brufau d2199d3928 Bug 1674590 - Show reason of rejected promise in console, and allow it to be inspected. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D95450
2020-11-05 14:28:01 +00:00
Nerixyz 60cff423b5 Bug 1674577: Show icon corresponding to the source file if it's inside of an extension. r=jdescottes,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D95446
2020-11-05 09:54:42 +00:00
Nicolas Chevobbe 4bad3995de Bug 1592584 - [devtools] Accept worker targets in console. r=ochameau.
The `dom.worker.console.dispatch_events_to_main_thread` pref is used by platform
code to check if console API messages in the worker thread should be dispatched
to the main thread. If so, the message parameters are cloned, or stringified if
they can't be. This is currently the default behavior.

The pref is checked on the server side and added as a trait to the root actor.
On the client, if the pref isn't true, then we accept messages coming from
worker targets in the console. We can't accept them without condition, otherwise
we would get duplicated message (from the main thread AND the worker thread).

The browser_webconsole_console_logging_workers_api.js test is repurposed for
worker logging since it was disabled on e10s anyway. We add a few test case
to check we can get cached and live message, and that non-clonable object, like
worker scope, are displayed like regular objects when the pref is false.

Differential Revision: https://phabricator.services.mozilla.com/D85397
2020-11-05 10:17:36 +00:00
Nicolas Chevobbe 4269e69069 Bug 1674417 - [devtools] Rename SourcesManager instances. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D95333
2020-11-05 08:54:54 +00:00
Eitan Isaacson f42d5e8b3d Bug 1672694 - P1: Query layout for selectable text state. r=morgan,Jamie,yzen
The SELECTABLE_TEXT state is currently under-utilized and probably wrong, since it simply relies on testing if a hypertext has any text. A more correct reflection of the state should be taken from layout's IsSelectable method.

Note, even if an element is styled `user-select: none`, the text will still be keyboard selectable if it is editable (eg. input or contenteditable), so we should consider that SELECTABLE_TEXT.

Differential Revision: https://phabricator.services.mozilla.com/D95783
2020-11-04 19:56:55 +00:00
Julian Descottes d8f70bb25f Bug 1675020 - [devtools] Disable frequent intermittents / permafail DevTools tests on Fission platforms r=Honza
Temporarily add skip-if=fission in order to move devtools tests on Fission platforms to Tier1

Differential Revision: https://phabricator.services.mozilla.com/D95746
2020-11-04 18:39:57 +00:00
Julian Descottes e65f71419f Bug 1674977 - [devtools] Remove gDevTools::isFissionContentToolboxEnabled r=ochameau
Depends on D95686

Finally, remove the method itself.

Differential Revision: https://phabricator.services.mozilla.com/D95687
2020-11-04 18:32:37 +00:00
Julian Descottes 4952a99950 Bug 1674977 - [devtools] Always return true from gDevTools::isFissionContentToolboxEnabled r=ochameau
Depends on D95685

Keep the isFissionContentToolboxEnabled method but always return true to effectively enable all fission related behavior for all content toolboxes.

Differential Revision: https://phabricator.services.mozilla.com/D95686
2020-11-04 14:33:37 +00:00
Julian Descottes d17e35eb23 Bug 1674977 - [devtools] Enable Frame watching for all content toolboxes r=ochameau
This changeset only starts the FrameWatcher for any content toolbox.
The stack will progressively phase out the devtools.contenttoolbox.fission preference.

Differential Revision: https://phabricator.services.mozilla.com/D95685
2020-11-04 14:26:06 +00:00
Alexandre Poirot 613fcbb932 Bug 1675256 - [devtools] Remove discardRequestBody and discardResponseBody attributes of NETWORK_EVENT resource. r=bomsy,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D95846
2020-11-04 17:14:03 +00:00
Alexandre Poirot 2de72821eb Bug 1675237 - [devtools] Set NETWORK_EVENT resource's `isRacing` attribute early, on securityInfo update. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D95836
2020-11-04 17:14:03 +00:00
Andrey Bienkowski 4de647d3c5 Bug 1675299 - [devtools] Improve the guidelines for commit naming r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D95864
2020-11-04 16:39:46 +00:00
Yura Zenevich c7aaa8e041 Bug 1654956 - add UI for displaying tabbing order overlay in the accessibility panel. r=jdescottes,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D94926
2020-11-03 15:33:16 +00:00
Yura Zenevich ba825c5746 Bug 1654956 - add AccessibleWalker functionality to show/hide tabbing order overlay. r=jdescottes,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D94925
2020-11-03 15:33:09 +00:00
Yura Zenevich e669493035 Bug 1654956 - adding TabbingOrderHighlighter that highlights a sequence of nodes within the tabbing order. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D94924
2020-11-03 15:33:01 +00:00
Yura Zenevich 265472b1e2 Bug 1654956 - adding NodeTabbingOrderHighlighter highlighter to highlight nodes that are in the tabbing order for a particular target. r=jdescottes,rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D94923
2020-11-03 15:32:53 +00:00
Csoregi Natalia 7f8521b157 Backed out changeset b39d14d9fe26 (bug 1673934) for debugger failures. CLOSED TREE 2020-11-04 13:19:59 +02:00
Hubert Boma Manilla 42cc6b08ee Bug 1675039 - [devtools] Fix crash when serverTiming does not exists r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D95749
2020-11-04 10:37:53 +00:00
Andrey Bienkowski 2ec70a4044 Bug 1673934 - [devtools] Remove defer usage in client/debugger/src/actions/tests/preview.spec.js r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D95275
2020-11-04 10:45:45 +00:00
Andrey Bienkowski ee420ad724 Bug 1674971 - [devtools] Replace task.js with async/await in devtools/docs/contributing/javascript.md r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D95674
2020-11-04 10:43:35 +00:00
Kartikaya Gupta b86f005446 Bug 1673071 - Disable failing tests. r=jrmuizel,marionette-reviewers,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D95429
2020-11-03 23:05:08 +00:00
Razvan Maries 10425eddfc Backed out 7 changesets (bug 1658084, bug 1671983) for perma failures on browser_async_remove_tab.js and browser_e10s_chrome_process.js. CLOSED TREE
Backed out changeset 2e6309c1cdbd (bug 1658084)
Backed out changeset 99aafd9304ef (bug 1671983)
Backed out changeset 80280b85280a (bug 1671983)
Backed out changeset 008db2659002 (bug 1671983)
Backed out changeset 32bd45c7fe3a (bug 1671983)
Backed out changeset 56e227e6580c (bug 1671983)
Backed out changeset a404f809f79d (bug 1671983)
2020-11-04 04:23:47 +02:00
Nika Layzell 5f9c85da95 Bug 1671983 - Part 4: Stop awaiting BrowserTestUtils.loadURI, r=annyG,remote-protocol-reviewers,extension-reviewers,preferences-reviewers,whimboo,zombie
This method only is async in order to allow callers to wait for a process switch
triggered by the call to `loadURI` to be finished before resolving. With
DocumentChannel, we should never trigger a process switch eagerly like this
again, so we don't need any of the async behaviour here anymore.

This part is largely mechanical changes to tests, removing the `await` calls on
`loadURI`, and a follow-up part will remove the actual async logic from
`BrowserTestUtils.loadURI`.

Differential Revision: https://phabricator.services.mozilla.com/D94641
2020-11-04 00:55:36 +00:00
Razvan Maries 156298851f Backed out 4 changesets (bug 1673071) for perma failures on grid-minimum-contribution-baseline-shim-vertical-lr.html. CLOSED TREE
Backed out changeset a8ad01797ee0 (bug 1673071)
Backed out changeset f2ed8ed80bf2 (bug 1673071)
Backed out changeset 34d6c0fbfeef (bug 1673071)
Backed out changeset d6857ecf3c81 (bug 1673071)
2020-11-04 00:56:16 +02:00
Kartikaya Gupta 7bfa94e01a Bug 1673071 - Disable failing tests. r=jrmuizel,marionette-reviewers,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D95429
2020-11-03 14:59:47 +00:00
Julian Descottes 5f04ebe1d9 Bug 1654758 - [devtools] Remove usage of actorHasMethod in responsive/ui module r=bradwerth
All the backward compatibility code can be removed.

"setMaxTouchPoints" was added in https://bugzilla.mozilla.org/show_bug.cgi?id=1500672 (FF77)
"simulateScreenOrientationChange" was added in https://bugzilla.mozilla.org/show_bug.cgi?id=1357774 (FF69)
"captureScreenshot" was added in https://bugzilla.mozilla.org/show_bug.cgi?id=1579133 (FF71)

Differential Revision: https://phabricator.services.mozilla.com/D95313
2020-11-03 16:48:25 +00:00
Julian Descottes d55fc399a4 Bug 1654752 - [devtools] Remove actorHasMethod usage in animation inspector r=daisuke
The related backward compatibility code was only to support FF62 or older and can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D95309
2020-11-03 16:47:55 +00:00
Julian Descottes ea163d7b6b Bug 1674357 - [devtools] Remove lifetime from DevTools protocol r=ochameau,devtools-backward-compat-reviewers
Depends on D95299

The lifetime feature seems unused in DevTools. Removing it should have no impact.

Differential Revision: https://phabricator.services.mozilla.com/D95302
2020-11-03 16:43:52 +00:00
Julian Descottes 9168a9f524 Bug 1674405 - [devtools] Extract StyleSheet, StyleSheets and MediaRule fronts to individual files r=daisuke,devtools-backward-compat-reviewers
Depends on D95329

Differential Revision: https://phabricator.services.mozilla.com/D95330
2020-11-03 16:35:51 +00:00
Julian Descottes 3ad5aa0547 Bug 1674405 - [devtools] Extract StyleSheet, StyleSheets and MediaRule specs to individual files r=daisuke,devtools-backward-compat-reviewers
Depends on D95328

Differential Revision: https://phabricator.services.mozilla.com/D95329
2020-11-03 15:56:12 +00:00
Julian Descottes bcd5dded83 Bug 1674405 - [devtools] Extract StyleSheet, StyleSheets and MediaRule actors to individual files r=daisuke
Depends on D95299

The actors/stylesheets.js file contained three actors.
This change moves each actor in its own file.

Differential Revision: https://phabricator.services.mozilla.com/D95328
2020-11-02 18:42:53 +00:00
Julian Descottes a311d05ca5 Bug 1654760 - [devtools] Remove usage of actorHasMethod in SwatchColorPickerTooltip r=rcaliman
This backward compatibility code can be removed
"getBackgroundColor" was added in https://bugzilla.mozilla.org/show_bug.cgi?id=1568053 (FF70)

Differential Revision: https://phabricator.services.mozilla.com/D95315
2020-11-03 16:34:58 +00:00
Andrey Bienkowski ffe82f7865 Bug 1674986 Fix a comment in devtools/client/inspector/shared/test/head.js r=rcaliman DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D95681
2020-11-03 11:35:31 +00:00
Cristina Coroiu 72d7b11420 Bug 1607636 - disable browser_dbg-inline-preview.js for frequent failures r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D95449
2020-11-03 10:11:31 +00:00
Julian Descottes ea5444d838 Bug 1674721 - [devtools] Log a meaningful failure message when attempting to run ToolboxTask on ASAN builds r=ladybenko
Differential Revision: https://phabricator.services.mozilla.com/D95500
2020-11-03 10:05:08 +00:00
Julian Descottes 3def563fd2 Bug 1674371 - [devtools] Move ELEMENT_STYLE constant to a single file r=rcaliman,devtools-backward-compat-reviewers
Depends on D95299

Differential Revision: https://phabricator.services.mozilla.com/D95307
2020-11-02 18:45:03 +00:00
Julian Descottes 7021e9145e Bug 1674362 - [devtools] Extract PageStyle and StyleRule fronts to individual files r=rcaliman,devtools-backward-compat-reviewers
Depends on D95298

Also extract the corresponding fronts in individual files.

Differential Revision: https://phabricator.services.mozilla.com/D95299
2020-11-02 18:36:09 +00:00
Julian Descottes 6094cf8dcb Bug 1674362 - [devtools] Extract PageStyle and StyleRule specs to individual files r=rcaliman,devtools-backward-compat-reviewers
Depends on D95297

After moving actors to individual files, we should also do the same with specs.
Both actors are using shared types, which are moved to a shared types file.

Differential Revision: https://phabricator.services.mozilla.com/D95298
2020-11-02 18:35:28 +00:00
Julian Descottes 51323f232a Bug 1674362 - [devtools] Extract PageStyle and StyleRule actors to individual files r=rcaliman
The actors/styles.js file contained two actors.
This change moves each actor in its own file.
A shared actors/utils/style-utils file is also created to host shared helpers.

Differential Revision: https://phabricator.services.mozilla.com/D95297
2020-11-02 17:14:55 +00:00
Markus Stange b3bfed14fe Bug 1669838 - Add the SwComposite thread to the presets "Firefox Platform", "Firefox Front-End", "Firefox Graphics" and "Media". r=gregtatum
These are the presets that I think are most likely in use by people
who report performance bugs with the browser.

The SwComposite thread is used when software webrender is enabled,
except on macOS where it is never used. In those configurations, the
samples from the SwComposite thread are interesting in the same cases
when the samples from the Renderer thread are interesting, i.e. whenever
the performance bottleneck is on the rendering side.
However, we do not need to profile the SwComposite thread in all cases where
we profile the Renderer thread, because in some configurations the Renderer
thread is only profiled so that the screenshot markers are captured. The
SwComposite thread does not have screenshot markers.

Differential Revision: https://phabricator.services.mozilla.com/D95546
2020-11-02 17:41:50 +00:00
Belén Albeza 65ade5bf66 Bug 1669509 - [devtools] Hide internal indexedDB's when we are not in the browser toolbox r=ochameau
In https://phabricator.services.mozilla.com/D91122#C3084925OL296 we transferred the filtering of indexedDB dbs to a transformer, but it was not being applied since the `hosts` getter was still used by the client. Since we discussed this filtering should be done in the server, this patch moves the filtering to the storage actor instead.

Differential Revision: https://phabricator.services.mozilla.com/D95020
2020-11-02 13:28:56 +00:00
Julian Descottes 72919d479b Bug 1654757 - [devtools] Remove usage of actorHasMethod in performance-controller r=julienw
This backward compatibility code was added a long time ago and is no longer necessary

Differential Revision: https://phabricator.services.mozilla.com/D95312
2020-11-02 13:29:31 +00:00