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

22271 Коммитов

Автор SHA1 Сообщение Дата
Sebastian Zartner bf1098943a Bug 1551569 - New inactive CSS rule to show warning when margin or padding is used on internal table elements. r=nchevobbe,flod
Differential Revision: https://phabricator.services.mozilla.com/D101091
2021-01-11 07:30:02 +00:00
Nicolas Chevobbe 947d31a9ff Bug 1685667 - Move devtools/shared/screenshot files to client/server. r=jdescottes.
Since capture.js was only loaded by server files and
save.js by client files, there wasn't any reason to
have them in devtools/shared.
The files are moved and the references are updated.

Differential Revision: https://phabricator.services.mozilla.com/D101142
2021-01-08 17:36:36 +00:00
Emilio Cobos Álvarez 2b7ccb7ce1 Bug 1685917 - Remove the moz-focus-outer code. r=heycam
This pseudo does nothing and we successfully removed it in bug 1655859
(firefox 81).

Differential Revision: https://phabricator.services.mozilla.com/D101289
2021-01-11 01:57:17 +00:00
Bogdan Tara 7e9fbe5a65 Backed out changeset 1c185d07d900 (bug 1602440) for browser_dbg-sources-querystring.js failures
DONTBUILD
2021-01-09 16:54:08 +02:00
Hubert Boma Manilla d8a1890e91 Bug 1602440 - [devtools] Use actor instead of url for worker targets r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D98074
2021-01-07 01:59:40 +00:00
Jon Bauman 7fed1dba96 Bug 1682995 - Enable AVIF support by default. r=aosmond,preferences-reviewers,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D99964
2021-01-08 20:16:58 +00:00
Paul Zuehlcke fd417d4f9f Bug 1628936 - [devtools] Use the correct storage principal for handling cookies. r=ladybenko
For iframes it's important that we use the correct storage principal when interacting with cookies.
With dFPI enabled the origin attributes of third party contexts are different from the top ones.
This led to situations where we didn't show any cookies for storage isolated third party frames.

Differential Revision: https://phabricator.services.mozilla.com/D99439
2021-01-08 16:33:36 +00:00
Nicolas Chevobbe cf1c89970f Bug 1439963 - [devtools] Handle evaluation result in a new task, after the evaluation is done. r=ochameau.
This way we ensure that any microtask created by the evaluated expression are
run, which can impact what we send to the client (e.g. `Promise.resolve().then(() => 246)`
will show a resolved promise instead of a pending one).
Some stubs and node tests are added to ensure this does fix the issue.

Differential Revision: https://phabricator.services.mozilla.com/D100979
2021-01-08 13:47:00 +00:00
Nicolas Chevobbe 0e62b64184 Bug 1685408 - Re-enable browser_jsonview_save_json.js on Fission. r=Honza.
The test was failing on the getFileContents, where the channel we're using here
would close for some reason.
In this patch, we no longer create a channel but use OS.File.read to retrieve the
content of the saved file.
We take this as an opportunity to slightly refactor the test so it's easier to read.

Differential Revision: https://phabricator.services.mozilla.com/D101147
2021-01-08 12:36:06 +00:00
Emilio Cobos Álvarez c2f1413e6b Bug 1685078 - Support full <image> syntax in list-style-image as per spec. r=jrmuizel,TYLin
This allows supporting image-set(), etc, and simplifies the bullet frame
code significantly, too thanks to two changes:

  * Instead of manually managing the image request, use the CSS image
    loader, with the `REQUEST_REQUIRES_REFLOW` flag, to handle image
    loads correctly. This didn't exist when this code was initially
    implemented, but we can nicely use it now.

  * Instead of re-implementing another WebRender command-builder thing,
    we can just reuse the nsImageRenderer code.

Differential Revision: https://phabricator.services.mozilla.com/D100774
2021-01-08 09:44:24 +00:00
Daisuke Akatsuka ec8a8ac1ac Bug 1685647: Update MDN compat data. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D101105
2021-01-08 09:23:35 +00:00
Alexandre Poirot dae4c7eb6f Bug 1682780 - [devtools] Used contants to define ThreadActor `state` attribute. r=jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D100986
2021-01-07 13:36:11 +00:00
Alexandre Poirot 31c22e4866 Bug 1682780 - [devtools] Remove special hack around ThreadActor.attach from protocol.js internals. r=nchevobbe,jdescottes
This is no longer necessary as attach is no longer entering in a nested event loop.
And so we can have attach to complete and return its value as any other request.

Differential Revision: https://phabricator.services.mozilla.com/D100045
2021-01-07 13:32:41 +00:00
Alexandre Poirot 6fbec57619 Bug 1682780 - [devtools] Adapt tests and doc now that ThreadActor.attach no longer pause the thread. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D100022
2021-01-07 13:33:40 +00:00
Alexandre Poirot 3f9e98f591 Bug 1682780 - [devtools] Avoid pausing on thread actor's attach request. r=nchevobbe,jdescottes
We always used to pause when "attaching" the thread actor.
We ought to call ThreadActor's attach method first before using it.
And this method do various things:
  * Initialize the Debugger API, enable it, register various listeners, so that breakpoint can work,
  * Pause the current thread by starting a nested event loop
So that we also ought to resume the thread, by calling ThreadActor's resume right after attach.
Otherwise the page would be paused as soon as we open the DevTools.
Which sounds like something we might have wanted a very long time ago.
But sounds like pure legacy behavior from today's perspective.

Differential Revision: https://phabricator.services.mozilla.com/D99919
2021-01-07 15:02:11 +00:00
Alexandre Poirot 8440986b83 Bug 1682780 - [devtools] Remove unused callback arguments from xpshell debugger test helpers. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D99918
2021-01-07 13:08:13 +00:00
Nicolas Chevobbe d72cf4ca31 Bug 1684965 - [devtools] Manage a reference to the parent in Pool. r=ochameau.
At the moment, the `getParent` method was using the connection `poolFor` method
to retrieve the pool that was managing it. This is quite costly as `poolFor`
loops through all the pools of the connection.
This patch adds a `parentPool` property to the Pool that is set in `manage` and
reset in `unmanage`, and used in the `getParent` method.
This speeds up getParent as well as the methods that call it (`manage` when the
actor was already managed, and `destroy`).

Differential Revision: https://phabricator.services.mozilla.com/D100981
2021-01-07 15:35:50 +00:00
Nicolas Chevobbe 3815a47abb Bug 1685294 - [devtools] Add metric test for Pool. r=jdescottes.
The test creates a lot of nested pools and then stresses a few methods:
- manage
- manage, but with Pools that were already managed by another Pool
- unmanage
- destroy (through the connection disconnection)

Differential Revision: https://phabricator.services.mozilla.com/D100905
2021-01-07 15:35:06 +00:00
Nicolas Chevobbe 58d4daa45c Bug 1109362 - [devtools] Show number of errors in Toolbox toolbar. r=jdescottes,Honza.
This patch displays an error icon matching the number
of errors handled in the console.
An error can be:
- a nsIScriptError that is not a warning
- a console.error call
- a console.assert call
- a 4xx or 5xx network call

The counter is handled via the resourceWatcher of the toolbox,
where we listen for the different resources we need.
Clearing the console from the UI or via console.clear resets
the error count.
Clicking on the icon opens the split console if it wasn't already.
Navigating clears the error count, except if the persist log
option is enabled in the console.

A test is added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D100668
2021-01-07 09:19:08 +00:00
Kartik Gautam 7ae6aea145 Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D100484
2021-01-07 08:53:08 +00:00
Gabriel Luong a3d95331df Bug 1684463 - [devtools] Part 3: Split making the attribute editable logic out into _setupAttributeEditor. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D100528
2021-01-06 10:53:42 +00:00
Gabriel Luong 1dfbef470d Bug 1684463 - [devtools] Part 2: Split the appending attribute value logic out into _appendAttributeValue. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D100527
2021-01-06 10:49:54 +00:00
Gabriel Luong c1419e6729 Bug 1684463 - [devtools] Part 1: Shorten the _createAttribute function by refactoring the collapse function. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D100525
2021-01-06 10:41:20 +00:00
Abhishek Sharma 7281b04a6b Bug 1681890 - [devtools] Remove defer import in devtools/client/shared/components/test/chrome/head.js r=ntim
Differential Revision: https://phabricator.services.mozilla.com/D100886
2021-01-06 12:43:45 +00:00
Mihai Alexandru Michis b4e3622ffe Backed out changeset c17d361450d3 (bug 1681893) for causing eslint failures in test_nesting-<01/02>.js
CLOSED TREE
2021-01-06 12:40:55 +02:00
pedrofonsecadev 3a0474b856 Bug 1681893 -[devtools] Remove defer usage in devtools/server/tests/xpcshell/head_dbg.js r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D100880
2021-01-06 10:06:31 +00:00
Hubert Boma Manilla bf8708542a Bug 1685262 - [devtools] Add blockRequest/unblockRequest commands support r=ochameau,devtools-backward-compat-reviewers,nchevobbe
Fixes browser_jsterm_block_commands.js test

Differential Revision: https://phabricator.services.mozilla.com/D99622
2021-01-06 09:46:43 +00:00
Rahul Yedida 398a8d1051 Bug 1678298 - [devtools] Use decodeURIComponent instead of decodeURI r=bomsy
Depends on D98294

Differential Revision: https://phabricator.services.mozilla.com/D98388
2021-01-06 09:13:08 +00:00
nchevobbe 1624b5bc35 Bug 1683882 - Parse console.trace for custom styling. r=baku.
Differential Revision: https://phabricator.services.mozilla.com/D100669
2021-01-06 06:03:49 +00:00
Daniel Holbert ac4480af11 Bug 1685231: Fix the typo "ot" in various code-comments (to "to", "of", or "not"). r=mccr8
DONTBUILD because this is a comment-only change and hence doesn't affect
behavior at all.

I ran across this typo in nsPageFrame.cpp, and figured I might as well grep for
it and fix it more comprehensively. And while I'm at it, I also fixed some
neighboring instances of a duplicated word around a linebreak, in
nsXMLContentSerializer.h.

Differential Revision: https://phabricator.services.mozilla.com/D100852
2021-01-06 04:54:51 +00:00
Markus Stange 5cd8830a74 Bug 1683723 - Replace deprecated Cocoa enum constants with their modern replacements. r=spohl
I ran the following command:

```
rg -l 'NSAlphaShiftKeyMask' . | xargs sed -i '' -e 's/NSAlphaShiftKeyMask/NSEventModifierFlagCapsLock/g'
rg -l 'NSAlternateKeyMask' . | xargs sed -i '' -e 's/NSAlternateKeyMask/NSEventModifierFlagOption/g'
rg -l 'NSAnyEventMask' . | xargs sed -i '' -e 's/NSAnyEventMask/NSEventMaskAny/g'
rg -l 'NSApplicationDefined' . | xargs sed -i '' -e 's/NSApplicationDefined/NSEventTypeApplicationDefined/g'
rg -l 'NSBorderlessWindowMask' . | xargs sed -i '' -e 's/NSBorderlessWindowMask/NSWindowStyleMaskBorderless/g'
rg -l 'NSCenterTextAlignment' . | xargs sed -i '' -e 's/NSCenterTextAlignment/NSTextAlignmentCenter/g'
rg -l 'NSClosableWindowMask' . | xargs sed -i '' -e 's/NSClosableWindowMask/NSWindowStyleMaskClosable/g'
rg -l 'NSCommandKeyMask' . | xargs sed -i '' -e 's/NSCommandKeyMask/NSEventModifierFlagCommand/g'
rg -l 'NSCompositeCopy' . | xargs sed -i '' -e 's/NSCompositeCopy/NSCompositingOperationCopy/g'
rg -l 'NSControlKeyMask' . | xargs sed -i '' -e 's/NSControlKeyMask/NSEventModifierFlagControl/g'
rg -l 'NSDeviceIndependentModifierFlagsMask' . | xargs sed -i '' -e 's/NSDeviceIndependentModifierFlagsMask/NSEventModifierFlagDeviceIndependentFlagsMask/g'
rg -l 'NSFlagsChanged' . | xargs sed -i '' -e 's/NSFlagsChanged/NSEventTypeFlagsChanged/g'
rg -l 'NSFullScreenWindowMask' . | xargs sed -i '' -e 's/NSFullScreenWindowMask/NSWindowStyleMaskFullScreen/g'
rg -l 'NSFullSizeContentViewWindowMask' . | xargs sed -i '' -e 's/NSFullSizeContentViewWindowMask/NSWindowStyleMaskFullSizeContentView/g'
rg -l 'NSFunctionKeyMask' . | xargs sed -i '' -e 's/NSFunctionKeyMask/NSEventModifierFlagFunction/g'
rg -l 'NSHelpKeyMask' . | xargs sed -i '' -e 's/NSHelpKeyMask/NSEventModifierFlagHelp/g'
rg -l 'NSKeyDown' . | xargs sed -i '' -e 's/NSKeyDown/NSEventTypeKeyDown/g'
rg -l 'NSKeyUp' . | xargs sed -i '' -e 's/NSKeyUp/NSEventTypeKeyUp/g'
rg -l 'NSLeftMouseDownMask' . | xargs sed -i '' -e 's/NSLeftMouseDownMask/NSEventMaskLeftMouseDown/g'
rg -l 'NSLeftMouseDown' . | xargs sed -i '' -e 's/NSLeftMouseDown/NSEventTypeLeftMouseDown/g'
rg -l 'NSLeftMouseDragged' . | xargs sed -i '' -e 's/NSLeftMouseDragged/NSEventTypeLeftMouseDragged/g'
rg -l 'NSLeftMouseUp' . | xargs sed -i '' -e 's/NSLeftMouseUp/NSEventTypeLeftMouseUp/g'
rg -l 'NSMiniaturizableWindowMask' . | xargs sed -i '' -e 's/NSMiniaturizableWindowMask/NSWindowStyleMaskMiniaturizable/g'
rg -l 'NSMiniControlSize' . | xargs sed -i '' -e 's/NSMiniControlSize/NSControlSizeMini/g'
rg -l 'NSMouseEntered' . | xargs sed -i '' -e 's/NSMouseEntered/NSEventTypeMouseEntered/g'
rg -l 'NSMouseExited' . | xargs sed -i '' -e 's/NSMouseExited/NSEventTypeMouseExited/g'
rg -l 'NSMouseMoved' . | xargs sed -i '' -e 's/NSMouseMoved/NSEventTypeMouseMoved/g'
rg -l 'NSNumericPadKeyMask' . | xargs sed -i '' -e 's/NSNumericPadKeyMask/NSEventModifierFlagNumericPad/g'
rg -l 'NSOtherMouseDownMask' . | xargs sed -i '' -e 's/NSOtherMouseDownMask/NSEventMaskOtherMouseDown/g'
rg -l 'NSOtherMouseDown' . | xargs sed -i '' -e 's/NSOtherMouseDown/NSEventTypeOtherMouseDown/g'
rg -l 'NSOtherMouseDragged' . | xargs sed -i '' -e 's/NSOtherMouseDragged/NSEventTypeOtherMouseDragged/g'
rg -l 'NSOtherMouseUp' . | xargs sed -i '' -e 's/NSOtherMouseUp/NSEventTypeOtherMouseUp/g'
rg -l 'NSRegularControlSize' . | xargs sed -i '' -e 's/NSRegularControlSize/NSControlSizeRegular/g'
rg -l 'NSResizableWindowMask' . | xargs sed -i '' -e 's/NSResizableWindowMask/NSWindowStyleMaskResizable/g'
rg -l 'NSRightMouseDown' . | xargs sed -i '' -e 's/NSRightMouseDown/NSEventTypeRightMouseDown/g'
rg -l 'NSRightMouseDragged' . | xargs sed -i '' -e 's/NSRightMouseDragged/NSEventTypeRightMouseDragged/g'
rg -l 'NSRightMouseUp' . | xargs sed -i '' -e 's/NSRightMouseUp/NSEventTypeRightMouseUp/g'
rg -l 'NSRightTextAlignment' . | xargs sed -i '' -e 's/NSRightTextAlignment/NSTextAlignmentRight/g'
rg -l 'NSScrollWheelMask' . | xargs sed -i '' -e 's/NSScrollWheelMask/NSEventMaskScrollWheel/g'
rg -l 'NSScrollWheel' . | xargs sed -i '' -e 's/NSScrollWheel/NSEventTypeScrollWheel/g'
rg -l 'NSShiftKeyMask' . | xargs sed -i '' -e 's/NSShiftKeyMask/NSEventModifierFlagShift/g'
rg -l 'NSSmallControlSize' . | xargs sed -i '' -e 's/NSSmallControlSize/NSControlSizeSmall/g'
rg -l 'NSTabletPointEventSubtype' . | xargs sed -i '' -e 's/NSTabletPointEventSubtype/NSEventSubtypeTabletPoint/g'
rg -l 'NSTitledWindowMask' . | xargs sed -i '' -e 's/NSTitledWindowMask/NSWindowStyleMaskTitled/g'
```

Then I removed changes to third-party webrtc code, removed a comment in accessible/mac/mozAccessible.mm,
and performed some manual replacements in native_mouse_mac_window.xhtml.

Differential Revision: https://phabricator.services.mozilla.com/D100260
2021-01-05 21:17:11 +00:00
Gabriel Luong 1939c31e93 Bug 1671802 - [devtools] Break up the logic in buildMarkup() into separate functions. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D100516
2021-01-05 07:15:42 +00:00
Mark Banner 14da69d10f Bug 1684905 - Fully enable globalThis for ESLint. r=Gijs,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D100697
2021-01-04 20:32:57 +00:00
Gerald Squelart 484485975e Bug 1679930 - Add ActivePS experimental feature "CPU Utilization" - r=canaltinova
This patch adds "CPU Utilization" ("cpu" for short) as a new feature that will control the upcoming still-experimental CPU measurements.

Differential Revision: https://phabricator.services.mozilla.com/D99054
2021-01-04 07:17:38 +00:00
Emilio Cobos Álvarez 1903289616 Bug 1684689 - Fix usage of createImageData in devtools. r=jdescottes
This fixes the DAMP failures and effectively preserves behavior.

Differential Revision: https://phabricator.services.mozilla.com/D100623
2021-01-04 17:27:24 +00:00
Sebastian Hengst 6af01df508 Bug 1682533 - update bugzilla components after component reorganization in Bug 1682260: remove linebreak at end of file. a=lint-fix CLOSED TREE 2021-01-04 16:42:38 +01:00
Sebastian Hengst 447823eecf Bug 1682533 - update bugzilla components after component reorganization in bug 1682260. r=Honza DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D99770
2021-01-04 11:20:11 +00:00
Julian Descottes d8c21acf2f Bug 1678550 - [devtools] Load damp.js using the main DevTools Loader r=perftest-reviewers,nchevobbe,ochameau
Depends on D97626

Differential Revision: https://phabricator.services.mozilla.com/D97727
2021-01-04 13:07:08 +00:00
Kaique da Silva 74dde45aea Bug 1681897 - [devtools] Implemented the defer on test r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D100588
2021-01-04 11:17:18 +00:00
bfmags 4368aa9486 Bug 1681889 - Remove unused `defer` require from devtools/client/memory/test/xpcshell/head.js. r=ntim
Differential Revision: https://phabricator.services.mozilla.com/D100498
2020-12-28 16:12:23 +00:00
bfmags 3584270b01 Bug 1681894 - Remove unused `defer` require from devtools/shared/protocol/tests/xpcshell/head.js. r=ntim
Differential Revision: https://phabricator.services.mozilla.com/D100500
2020-12-28 16:10:08 +00:00
Cosmin Sabou 2978aa00a3 Backed out changeset dbed1cdf588f (bug 1684173) for mochitest plain and devtools failures. a=backout DONTBUILD 2020-12-28 00:43:51 +02:00
Kartik Gautam 775cdec032 Bug 1684173 - Add newline character at end of files when missing r=sylvestre
Depends on D100443

Differential Revision: https://phabricator.services.mozilla.com/D100484
2020-12-27 11:43:41 +00:00
Sonia Singla 7ea3ae701b Bug 1681896 - Remove defer usage in devtools/shared/transport/tests/xpcshell/head_dbg.js. r=ntim
Differential Revision: https://phabricator.services.mozilla.com/D100473
2020-12-26 23:34:32 +00:00
Kartik Gautam 5d5093a494 Bug 1679452 - Replace :not(X):not(Y) with :not(X, Y) r=ntim
Differential Revision: https://phabricator.services.mozilla.com/D100147
2020-12-19 11:24:13 +00:00
Nicolas Chevobbe 7dda7cfb80 Bug 1683264 - [devtools] Remove assets/dictionnary.txt . r=bomsy.
The file doesn't seem to be used anywhere, so it's probably safe to remove it.

Differential Revision: https://phabricator.services.mozilla.com/D100083
2020-12-18 13:45:31 +00:00
Razvan Caliman 38dd364312 Bug 1572652 - [devtools] Replace GridInspector.onShowGridOutlineHighlight() with thunk in Layout panel and update tests. r=nchevobbe
Depends on D99610

This patch uses the thunk approach introduced in [Bug 1623906](https://bugzilla.mozilla.org/show_bug.cgi?id=1623906) to replace the `GridInspector.onShowGridOutlineHighlight()` method which is prop-drilled through React components. `onShowGridOutlineHighlight()` is just an alias for `HighlightersOverlay.showGridHighlighter()` without any special handling, so we drop the indirection altogether.

The method  is replaced by a new thunk, `showGridHighlighter()` introduced in a new file `client/inspector/grids/actions/grid-highlighter.js`. This thunk is dispatched with options to show a grid highlighter with outlines for the given cell / area, or just the default grid highlighter when no options are given.

The corresponding tests are updated to use the generic events emitted by `HighlightersOverlay` introduced with [Bug 1646028](https://bugzilla.mozilla.org/show_bug.cgi?id=1646028) and the test helpers added in D85858.

Differential Revision: https://phabricator.services.mozilla.com/D99674
2020-12-16 09:59:33 +00:00
Razvan Caliman 79649b82c6 Bug 1572652 - [devtools] Consolidate telemetry logging for grid and flexbox highlighters. r=nchevobbe
Depends on D99609

This patch consolidates logging telemetry in response to the highlighter show/hide lifecycle using the approach introduced for Flexbox highlighter in D96730

`_afterShowHighlighterTypeForNode()` and `_beforeHighlighterTypeForNode()` are generic methods to call in the lifecycle of the highlighter. We use them to run non-critical operations related to showing/hiding highlighters, like logging telemetry. The operations are grouped within by highlighter type.

Differential Revision: https://phabricator.services.mozilla.com/D99610
2020-12-16 10:00:26 +00:00
Razvan Caliman 017bbccb6b Bug 1572652 - [devtools] Destroy grid highlighters when nodes stop being grid containers. r=ochameau
Depends on D99591

Differential Revision: https://phabricator.services.mozilla.com/D99609
2020-12-17 17:21:45 +00:00
Razvan Caliman 2110082a7c Bug 1572652 - [devtools] Refactor methods to show/hide CSS Grid highlighters for grids and subgrids. r=ochameau
Depends on D99606

This patch refactors the logic to show/hide CSS Grid highlighters.

It doesn't use the generic highlighter methods introduced with [Bug 1646028](https://bugzilla.mozilla.org/show_bug.cgi?id=1646028) for other highlighters because the special cases for CSS Grid added too much complexity. I decided to keep a parallel implementation which does reuse some of the generic helpers (see other patches in this series).

CSS Grid highlighters are special for a few reasons:
- multiple instances can be visible at the same time (default 3) vs single instance for all other highlighter types; the limit is arbitrary but used as a rudimentary way to guard against performance degradation because each highlighter instantiates a [large canvas](https://searchfox.org/mozilla-central/rev/95cf843de977805a3951f9137f5ff1930599d94e/devtools/server/actors/highlighters/utils/canvas.js#25-43) that hogs the GPU. A smart mitigation was investigated once, but never followed-through [Bug 1232491](https://bugzilla.mozilla.org/show_bug.cgi?id=1232491)
- it is possible to highlight nodes which are not selected in the Inspector
- there is a parent-child relationship between grid and subgrid highlighters (see detailed explanation added in JSDoc for `HighlightersOverlay.showGridHighlighter()`); when one is shown, it influences whether and how the other is shown
- there can be multiple subgrids with the same grid parent

NOTE: Unless otherwise stated inline, please treat the following methods as completely rewritten:

- showGridHighlighter()
- hideGridHighlighter()
- showParentGridHighlighter()
- hideParentGridHighlighter()

In summary, the changes in this patch are:
- refactored `showGridHighlighter()`,  `hideGridHighlighter()`, `showParentGridHighlighter()` and `hideParentGridHighlighter()` to use the data from `gridHighlighters` map;
- modified `_getHighlighterTypeForNode()` to return multiple instances for Grid highlighters;
- destroy, not just hide, grid highlighter instances when unused.

Further clean-up and integration with existing generic helpers follows in the next patches in this series.

Differential Revision: https://phabricator.services.mozilla.com/D99591
2020-12-17 17:40:18 +00:00
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