Commit Graph
943 Commits
Author SHA1 Message Date
Alexandre Poirot b446e32dd9 Bug 1510690 - Do focus the content window from the actor when the toolbox closes. r=nchevobbe
No RDP request should be done when the toolbox closes as there no guarantee that
the request will complete. Instead, such cleanup should be done by the actors.

Differential Revision: https://phabricator.services.mozilla.com/D38309
2019-07-31 08:12:16 +00:00
Oriol Brufau aa2cfe8407 Bug 1544175 - Fix browser_console.js. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D38804
2019-07-29 22:06:57 +00:00
Oriol Brufau ab7fb91fef Bug 1544175 - Prevent devtools from accessing CPOWs. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D38803
2019-07-29 22:16:49 +00:00
Tom Schuster 4f127dfe56 Bug 1569122 - Limit Worker/SharedWorker MIME type blocking to Beta/Nightly. r=ckerschb
Depends on D39634

Differential Revision: https://phabricator.services.mozilla.com/D39635
2019-07-29 07:25:37 +00:00
Bogdan Tara 4a478de642 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-07-27 00:41:55 +03:00
Bogdan Tara 4df8771cb1 Merge inbound to mozilla-central. a=merge 2019-07-27 00:38:36 +03:00
Nicolas Chevobbe 781197d7d1 Bug 1569190 - Remove outputNode getter from webconsole.js .r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D39516
2019-07-26 16:39:18 +00:00
Nicolas Chevobbe 81db9f8b46 Bug 1569190 - Remove JSTerm outputNode getter. r=jdescottes.
The reference isn't used within the component itself,
and is available in the webConsoleUI.
Callsites are updated.

Differential Revision: https://phabricator.services.mozilla.com/D39505
2019-07-26 16:39:08 +00:00
Armando Ferreira 2b4b284157 Bug 1558201 - Disable history navigation with Arrow keys in Editor mode. r=nchevobbe
In editor mode, there are dedicated icons to history navigation  (See Bug [[ https://bugzilla.mozilla.org/show_bug.cgi?id=1558198 | 1558198 ]]).
Removing the arrow up/down history navigation which is troublesome when working with multi-line snippets.

Differential Revision: https://phabricator.services.mozilla.com/D39262
2019-07-26 18:23:59 +00:00
Kris Maglione 545eb3d999 Bug 1568035: Part 4 - Update test expections for Fission. r=mccr8
Some failures crept in and out after my last sets of annotations landed. This
patch updates most of the annotations to deal with them.

MANUAL PUSH: Lando won't let me land.

Differential Revision: https://phabricator.services.mozilla.com/D39462
2019-07-24 13:06:57 -07:00
Kris Maglione fdba7d1377 Bug 1568035: Part 1 - Skip tests which cause shutdown leaks under Fission. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D39459
2019-07-19 15:31:16 -07:00
Nicolas Chevobbe 7076d3a083 Bug 1559717 - Fix displaying getter value for getter returning falsy values. r=davidwalsh.
We were displaying result.value.throw if result.value.return
was falsy. But it can happen that a getter does return a
falsy value, and we want to display it.
So now we turn the expression the other way around, we first
check result.value.throw, and then default to result.value.return.
A mochitest is added to ensure we hav expected value for different
getters returning falsy values.

Differential Revision: https://phabricator.services.mozilla.com/D39136
2019-07-25 13:55:14 +00:00
Kris Maglione 1b5a278b6a Bug 1566952: Part 2 - Update Fission failure annotations after skipping crashes. r=mccr8
When a test crashes, the harness skips all of the remaining tests in the
directory. That means that with crashes skipped, we now try to run a whole lot
more tests than we did before, and a lot of them fail under Fission.

This patch adds annotations to the new failures that show up after part 1.

Differential Revision: https://phabricator.services.mozilla.com/D38726
2019-07-19 12:30:10 -07:00
Nicolas Chevobbe d34a531e46 Bug 1568439 - Move webconsole-l10n to utils/l10n. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D39159
2019-07-24 11:11:34 +00:00
Armando Ferreira b06f32a5f3 Bug 1558198 - Add history navigation buttons in Editor toolbar. r=nchevobbe
Adding History navigation to Editor toolbar

Differential Revision: https://phabricator.services.mozilla.com/D38951
2019-07-23 18:36:01 +00:00
Armando Ferreira 67ff266803 Bug 1540722 - Copy link location should work for learn-more links. r=nchevobbe
Support for coping link location from within the Console panel (through the context menu) can be extended and cover learn more links too.

Differential Revision: https://phabricator.services.mozilla.com/D38546
2019-07-23 18:34:08 +00:00
Alexandre Poirot 85afd526d1 Bug 1567760 - Fix OOM failures in browser_webconsole_inspect_cross_domain_object.js. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D38985
2019-07-23 17:01:28 +00:00
Tom Schuster 4c7462fcf2 Bug 1523706 - Extend devtools test. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D37912
2019-07-23 09:47:03 +00:00
Razvan Maries def2e7c168 Merge mozilla-inbound to mozilla-central a=merge 2019-07-23 00:37:54 +03:00
Gabriel Luong 12587ec458 Bug 1567276 - Refactor inspector to inspectorFront. r=rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D38554
2019-07-18 15:33:55 -04:00
Sebastian Streich 8f2232bf12 Bug 1100630 - Print Related JS-Line on CSP Violation (if any) r=ckerschb,dveditz
Differential Revision: https://phabricator.services.mozilla.com/D31420
2019-07-22 09:31:57 +00:00
Nicolas Chevobbe c489070ddb Bug 1567370 - Add a close button to the Editor Toolbar. r=Honza.
The button display the same icon that will be used
in the console input when in inline-mode to toggle
the editor mode, active.
A test is added to ensure the button works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D38622
2019-07-19 14:10:06 +00:00
Ciure Andrei 23b8c9fc62 Bug 1560261 - disable browser_webconsole_warning_groups_filtering.js on windows 7 opt for frequent failures. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D38091
2019-07-17 17:55:59 +00:00
Eden Chuang e043f4c07d Bug 1561930 - Correct the wrong attribute isFromChromeContext value for chrome context messages from Cu.reportError r=baku
Differential Revision: https://phabricator.services.mozilla.com/D38464
2019-07-18 21:49:30 +00:00
Noemi Erli 7f6698b383 Backed out changeset a98b795c2b3c (bug 1100630) for Linting failure CLOSED TREE 2019-07-18 19:19:48 +03:00
Sebastian Streich 728a295bbb Bug 1100630 - Print Related JS-Line on CSP Violation (if any) r=ckerschb,dveditz
Differential Revision: https://phabricator.services.mozilla.com/D31420
2019-07-18 15:14:41 +00:00
Nicolas Chevobbe 39eeb06393 Bug 1565781 - Fix ConsoleTable with nested holey array. r=Honza.
A test is added to ensure this is fixed properly.
We also fix the Array previewer to properly return
undefined for unknown array properties, rather than null.

Differential Revision: https://phabricator.services.mozilla.com/D38467
2019-07-18 12:04:42 +00:00
Nicolas Chevobbe 048abcd904 Bug 1567082 - Fix console table overflow. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D38466
2019-07-18 11:58:16 +00:00
Nicolas Chevobbe db0b64398f Bug 1554877 - Make JsTerm editor resizable. r=Honza.
We add a GridElementWidthResizer to handle the editor width.
The width is then persisted in a pref.
A test is added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D37687
2019-07-18 05:51:44 +00:00
Nicolas Chevobbe a1ef07d3e3 Bug 1565962 - Refactor webconsole layout. r=Honza.
Since we now have a GridElementWidthResizer element, we can
get rid of the SplitBox wrapping the SideBar, and have all
major elements as child of the App element, controlled by
a CSS Grid.

This makes it easy to change the console layout when toggling
the editor mode (re-ordering element in JS, changing the CSS
grid templates, and placing the element in different areas).
This also means we can take advantage of subgrid to align
the sidebar toolbar with the filter bar for example.

As the part of the stylesheet dedicated to layout grew, it
made sense to have it all in a separate stylesheet, App.css,
that lives next to the App component.

Differential Revision: https://phabricator.services.mozilla.com/D38038
2019-07-18 09:02:46 +00:00
Ciure Andrei 48dbfa7888 Merge inbound to mozilla-central. a=merge 2019-07-18 06:46:41 +03:00
Kris Maglione 9f00b7395d Bug 1566182: Annotate mochitests that fail with Fission enabled. r=mccr8
My preference was to annotate most of the failing tests with `fail-if` so that
if they start passing, the `fail-if` needs to be removed and they need to keep
passing. That doesn't work for tests that timeout, or which trigger failures
from their cleanup functions, however, so those tests need skip-if. And tests
with fail in their cleanup functions likely leave the browser in an
inconsistent state for subsequent tests, anyway, so really should be skipped
regardless.

There are some remaining tests which still fail because of crashes. I chose
not to skip them here, but to fix the crashes in separate bugs instead.

Differential Revision: https://phabricator.services.mozilla.com/D38247
2019-07-15 16:19:32 -07:00
Benjamin 56ebd1e54c Bug 1566149: Added test to ensure CSP 'navigate-to' does not parse r=ckerschb
The test sets a navigate-to policy which results in a parse error.

Differential Revision: https://phabricator.services.mozilla.com/D38221
2019-07-17 18:16:47 +00:00
Alexandre Poirot 4cc4a20117 Bug 1543023 - Use ChromeUtils.import only with one argument in all /devtools/ r=jdescottes
ChromeUtils.import still support a second argument as it used to do
when it was Components.utils.import. But this is deprecated and we should
instead always use the returned value.

Differential Revision: https://phabricator.services.mozilla.com/D37708
2019-07-11 17:08:20 +00:00
yulia 7eba825d59 Bug 1559819 - rename threadClient to threadFront; r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D32848
2019-07-11 09:45:32 +00:00
Panos Astithas f3ad8a7772 Bug 1233891 - Use DOM promises instead of deprecated sync promises in devtools/. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D37138
2019-07-09 17:26:32 +00:00
Nicolas Chevobbe 6fca865e74 Bug 1564363 - Close the network detail on Escape. r=Honza.
We use the openNetworkDetails prop which is already in use
in the netmonitor to collapse the message if the parameter
passed to the function is falsy (i.e. the panel is already
displayed)

Depends on D37388

Differential Revision: https://phabricator.services.mozilla.com/D37389
2019-07-09 10:50:50 +00:00
Nicolas Chevobbe d2bf50f8de Bug 1534706 - Don't focus ConfirmDialog when displaying it. r=Honza
Some people found that the ConfirmDialog was getting into their
way when typing into the console, as it was stealing the focus.
This patch fixes this by not focusing the ConfirmDialog when
we show it, so the user can still type.
This means that we now handle the dialog confirm and dismiss from
JSTerm, when the former is displayed.

Since it wasn't clear how you could close the popup, we add a close
button that makes it very obvious.

This means we can drop the key handler in the dialog as the jsterm
is always focused.
We also simply remove the feature to open the MDN link on `?` key
stroke as it's not discoverable and was the only part of the
panel where you could do such thing.

Existing tests are adapted and extended to cover the new behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D36174
2019-07-09 12:28:38 +00:00
Nicolas Chevobbe 567783311c Bug 1563914 - Fix ConsoleTable with invalid headers. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D37164
2019-07-09 08:47:58 +00:00
Jonathan Kingston 32524b62e2 Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35504
2019-07-08 16:37:45 +00:00
Noemi Erli 4acd3d3219 Bug 1563684 - ES lint fix CLOSED TREE 2019-07-08 16:12:34 +03:00
Nicolas Chevobbe db316fa41b Bug 1563684 - Fix blank console on GMail. r=yulia.
The console fails to connect to the server because
the getCachedMessages function throws on GMail.
This is because we try to access a property on a
cross-origin object, window.windowUtils, in
getInnerWindowId.
Wrapping the access to the property fixes the issue.
A test is added to make sure we don't regress.

// TODO: The test isn't failing without the fix,
so it should be re-written.

Differential Revision: https://phabricator.services.mozilla.com/D37069
2019-07-08 12:34:20 +00:00
Coroiu Cristina a91457cb63 Backed out changeset 8b0c5e44d937 (bug 1100630) for wpt failures at securitypolicyviolation/securitypolicyviolation-block-cross-origin-image-from-script.sub.html on a CLOSED TREE 2019-07-17 17:10:03 +03:00
Sebastian Streich c6683b48aa Bug 1100630 - Print Related JS-Line on CSP Violation (if any) r=ckerschb,dveditz
Differential Revision: https://phabricator.services.mozilla.com/D31420
2019-07-17 10:54:07 +00:00
Coroiu Cristina 8ab6fd660e Backed out changeset ffc9fe173b43 (bug 1566149) for ESlint failure on a CLOSED TREE 2019-07-17 10:18:26 +03:00
Benjamin 2bb4e15ad7 Bug 1566149: Added test to ensure CSP 'navigate-to' does not parse r=ckerschb
The test sets a navigate-to policy which results in a parse error.

Differential Revision: https://phabricator.services.mozilla.com/D38221
2019-07-16 19:12:17 +00:00
Victor Porof 17c15acb83 Bug 1561435 - Update pageError stubs file after formatting devtools/client/ by running browser_webconsole_update_stubs_page_error.js, r=standard8
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35890
2019-06-28 23:03:19 +02:00
Victor Porof b7732ae890 Bug 1561435 - Format devtools/client/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35884
2019-07-05 11:24:38 +02:00
Victor Porof bd5a075607 Bug 1561435 - Update pageError stubs file after formatting testing/ by running browser_webconsole_update_stubs_page_error.js, r=standard8
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36412
2019-06-28 22:48:16 +02:00
Razvan Caliman 3bd92ba2a5 Bug 724505 - Map minified CSS to prettyfied CSS. r=gl
Ensure source links for selectors in the Rules view and warning links in Web Console for minified CSS go to the right location in the Style Editor after applying automatic prettification.

This only works for linked stylesheets. [Bug 1169770](https://bugzilla.mozilla.org/show_bug.cgi?id=1169770) needs to be fixed first before this can work correctly on inline minified stylesheets.

This patch augments the `prettifyCSS()` method to generate the mappings necessary to generate a sourcemap from the original to the prettified source. It uses these mappings to translate the cursor position when invoking the Style Editor to be opened at a specific location.

The mappings from the minified to the prettified source are used only until the stylesheet is changed in the Style Editor. Upon editing the source in the Style Editor, the associated mappings are cleared because it's likely they have been rendered invalid.

The updated stylesheet will already be prettified so it bypasses the `prettifyCSS()` method, thus avoiding the need to re-generate mappings. New CSS warnings will be listed in the Web Console which point to the right location in the edited stylesheet (the old warnings no longer point to the right place, but that's an acceptable side-effect). The Rules view in the Inspector also lists selectors with the new positions within the edited stylesheet.

Differential Revision: https://phabricator.services.mozilla.com/D36585
2019-07-04 17:30:00 +00:00