Commit Graph

5136 Commits

Author SHA1 Message Date
shindli
91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke
f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Simon Giesecke
5f35e84559 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in docshell. r=smaug
Depends on D62570

Differential Revision: https://phabricator.services.mozilla.com/D62571

--HG--
extra : moz-landing-system : lando
2020-02-12 13:38:55 +00:00
Christoph Kerschbaumer
7f70f4117c Bug 1601887 - XFO: Display error page but still fire onload event in case x-frame-options blocks a load.r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D61862

--HG--
extra : moz-landing-system : lando
2020-02-11 18:40:54 +00:00
Kris Maglione
6dfb63c750 Bug 1582832: Part 3 - Correctly handle windowless BCs created for printing. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D61006

--HG--
extra : moz-landing-system : lando
2020-02-06 19:08:06 +00:00
Kris Maglione
44fded86b2 Bug 1582832: Part 2 - Don't attach a BrowsingContext before a FrameLoader is initialized. r=nika
There are cases where the initial BrowsingContext that we create for a
FrameLoader will never have a DocShell created for it. In the particular case
when the frame it belongs to is part of an inactive document, trying to
eagerly attach the BrowsingContext ends up attaching it as an active child of
its parent BrowsingContext, when it should be either cached or detached. Which
causes no end of problems.

This patch delays attaching the BrowsingContext until the FrameLoader is
initialized, which solves most of these problems.

Differential Revision: https://phabricator.services.mozilla.com/D59009

--HG--
extra : moz-landing-system : lando
2020-02-06 19:08:04 +00:00
Kris Maglione
1722817403 Bug 1582832: Part 1 - Make FrameLoader owner rather than DocShell responsible for discarding a BC. r=nika
There are all sorts of lifecycle issues which arise from making DocShell
responsible for discarding BrowsingContexts. In this particular bug, we tend
to run into them in cases where we create a BrowsingContext for a FrameLoader,
and then never create a DocShell for it, leading to it never being destroyed.
But there are myriad other issues as well.

This patch moves the responsibility for BrowsingContext lifecycle management
to the FrameLoader/FrameLoaderOwner, rather than the DocShell, which makes
things more consistent, and more closely aligns with spec-defined behavior.

Differential Revision: https://phabricator.services.mozilla.com/D59008

--HG--
extra : moz-landing-system : lando
2020-02-06 19:07:56 +00:00
Boris Zbarsky
eb44d8db75 Bug 1612529. document.open should clear form state from the SHEntry. r=smaug
Otherwise we're using state from the pre-open document for whatever content is
being written, which is not likely to be right.

Differential Revision: https://phabricator.services.mozilla.com/D61865

--HG--
extra : moz-landing-system : lando
2020-02-06 17:49:44 +00:00
Boris Zbarsky
646b3f7e6a Backed out changeset ec4e3e080c1c because it introduces linting failures.
MANUAL PUSH: fast backout
2020-02-06 12:44:12 -05:00
Boris Zbarsky
accf242db9 Bug 1612529. document.open should clear form state from the SHEntry. r=smaug
Otherwise we're using state from the pre-open document for whatever content is
being written, which is not likely to be right.

Differential Revision: https://phabricator.services.mozilla.com/D61865

--HG--
extra : moz-landing-system : lando
2020-02-06 17:29:20 +00:00
Olli Pettay
708bff2680 Bug 1612894, bring back the IsDiscarded check, r=farre
This brings back https://hg.mozilla.org/mozilla-central/rev/641b9a29f6ee#l1.346 for now.
The patch is based on code auditing, since haven't managed to reproduce the crash.


To sort out what behavior is wanted eventually, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1613431

Differential Revision: https://phabricator.services.mozilla.com/D61716

--HG--
extra : moz-landing-system : lando
2020-02-06 15:17:53 +00:00
Andrea Marchesini
b13b3b72d2 Bug 1611855 - Worklet must be part of the same parent's agentCluster - part 2 - CloneDataPolicy in writing, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D61182

--HG--
extra : moz-landing-system : lando
2020-02-06 13:46:25 +00:00
Narcis Beleuzu
d259fe38d8 Backed out 13 changesets (bug 1611855) for wpt failures on /audioworklet-postmessage-sharedarraybuffer.https.html . CLOSED TREE
Backed out changeset 2b661d588f96 (bug 1611855)
Backed out changeset 16094fc92bc9 (bug 1611855)
Backed out changeset 3f89bbcaff92 (bug 1611855)
Backed out changeset a906501b6d92 (bug 1611855)
Backed out changeset 54738b88425d (bug 1611855)
Backed out changeset d27de910a6c0 (bug 1611855)
Backed out changeset 261902f6336d (bug 1611855)
Backed out changeset 380d83b61e62 (bug 1611855)
Backed out changeset 39aac60ebf5e (bug 1611855)
Backed out changeset 5ea099787376 (bug 1611855)
Backed out changeset d0f58871f838 (bug 1611855)
Backed out changeset e1be102310a9 (bug 1611855)
Backed out changeset 633357835540 (bug 1611855)

--HG--
rename : dom/base/test/test_postMessages_workers.html => dom/base/test/test_postMessages.html
2020-02-06 12:31:36 +02:00
Andrea Marchesini
87b1a8a547 Bug 1611855 - Worklet must be part of the same parent's agentCluster - part 2 - CloneDataPolicy in writing, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D61182

--HG--
extra : moz-landing-system : lando
2020-02-05 22:07:34 +00:00
Nihanth Subramanya
ba28d4e4a2 Bug 1608713 - Add nsIWebNavigation load flags to force TRR mode and use them to load captive portal tabs with TRR disabled. r=valentin,Gijs,baku
Differential Revision: https://phabricator.services.mozilla.com/D60860

--HG--
extra : moz-landing-system : lando
2020-01-24 17:18:35 +00:00
Kershaw Chang
3abab1f43c Bug 1611472 - Add missing error codes r=mayhemer
In bug 1579049, response code 403 and 501 were changed to map to `NS_ERROR_PROXY_FORBIDDEN` and `NS_ERROR_PROXY_NOT_IMPLEMENTED`. This caused a regression, since 403 and 501 were mapping to `NS_ERROR_PROXY_CONNECTION_REFUSED` before. This patch fixes the regression by adding `NS_ERROR_PROXY_FORBIDDEN` and `NS_ERROR_PROXY_NOT_IMPLEMENTED` to nsDocShell.

Differential Revision: https://phabricator.services.mozilla.com/D61682

--HG--
extra : moz-landing-system : lando
2020-02-05 14:32:51 +00:00
Cosmin Sabou
ad62341488 Bug 1301399 - Delete trailing whitespace. r=pedantic-fix
DONTBUILD

--HG--
extra : amend_source : 5041a9eff745fdab5265be2d2b1dcecf78df00b0
2020-01-28 07:03:32 +02:00
Paul Bone
eeec2889a7 Bug 1301399 - Fix comment after removing code r=nika
Differential Revision: https://phabricator.services.mozilla.com/D60802

--HG--
extra : moz-landing-system : lando
2020-01-28 04:43:52 +00:00
Perry Jiang
c2250891d2 Bug 1264175 - remove FetchEvent.isReload r=dom-workers-and-storage-reviewers,valentin,sg,bzbarsky
isReload is no longer a property defined by the FetchEvent specification.

Differential Revision: https://phabricator.services.mozilla.com/D60774

--HG--
extra : moz-landing-system : lando
2020-01-25 00:05:12 +00:00
Kris Maglione
878d4b6711 Bug 1595936: Part 2 - Refresh feature policy when attaching browsing context. r=farre,baku
We go to great lengths to try to avoid initializing FrameLoaders during
document updates. That means that when `BindToTree` is called, the element's
FrameLoader is not initialized, and it has no BrowsingContext. Calling
`GetBrowsingContext()` (which happens as a side-effect of
`HTMLIFrameElement::RefreshFeaturePolicy`), however, forces eager
initialization, which can cause any number of problems.

This patch moves that logic from being triggered by `BindToTree` to being
triggered by `BrowsingContext::Embed`, which happens as soon as the
BrowsingContext is bound to the element, but does not force it to be created
early.

Differential Revision: https://phabricator.services.mozilla.com/D55872

--HG--
extra : moz-landing-system : lando
2020-01-24 19:03:10 +00:00
Dimi Lee
dc9c52a9d5 Bug 1601660 - Part 2: Remove getContentBlockingLog from nsIDocShell.idl r=Ehsan
This patch removes the unnecessary getContentBlockingLog function from
nsIDocShell.idl.

Depends on D57464

Differential Revision: https://phabricator.services.mozilla.com/D57444

--HG--
extra : moz-landing-system : lando
2020-01-24 11:06:49 +00:00
shindli
78f9c85759 Backed out changeset 86d1da74131f (bug 1264175) for causing mochitest failures in dom/serviceworkers/test/test_fetch_event.html CLOSED TREE 2020-01-24 06:18:04 +02:00
Tetsuharu OHZEKI
d1bcd85656 Bug 1594280 - Fix uses of nsIDocShellTreeItem in nsIDocShellTreeItem in nsDocShell::ValidateOrigin. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D58447

--HG--
extra : moz-landing-system : lando
2020-01-23 18:14:42 +00:00
Perry Jiang
64699e71f7 Bug 1264175 - remove FetchEvent.isReload r=dom-workers-and-storage-reviewers,valentin,sg,bzbarsky
isReload is no longer a property defined by the FetchEvent specification.

Differential Revision: https://phabricator.services.mozilla.com/D60774

--HG--
extra : moz-landing-system : lando
2020-01-24 02:38:01 +00:00
Valentin Gosu
f67d51022f Bug 1609869 - Make about:networking an HTML page r=Gijs
* renames aboutNetworking.xhtml to aboutNetworking.html
* fixes markup to be valid html
* fixes missing instructions link in about:networking#logging

Differential Revision: https://phabricator.services.mozilla.com/D60814

--HG--
rename : toolkit/content/aboutNetworking.xhtml => toolkit/content/aboutNetworking.html
extra : moz-landing-system : lando
2020-01-23 16:42:02 +00:00
Paul Bone
f7edb168be Bug 1301399 - Remove annoying session history assertion r=nika
Differential Revision: https://phabricator.services.mozilla.com/D60773

--HG--
extra : moz-landing-system : lando
2020-01-23 00:55:53 +00:00
Oana Pop Rus
1d2bce24ac Backed out 2 changesets (bug 1601660) for gv-junit failures in ContentBlockingControllerTest. on a CLOSED TREE
Backed out changeset ec5d3b078a88 (bug 1601660)
Backed out changeset 06001b30f6cd (bug 1601660)
2020-01-22 12:06:22 +02:00
Dimi Lee
da3402759d Bug 1601660 - Part 2: Remove getContentBlockingLog from nsIDocShell.idl r=Ehsan
This patch removes the unnecessary getContentBlockingLog function from
nsIDocShell.idl.

Differential Revision: https://phabricator.services.mozilla.com/D57444

--HG--
extra : moz-landing-system : lando
2020-01-06 20:00:51 +00:00
Eric Rahm
ac2d94a930 Bug 1610386 - Remove nsAutoPtr usage from docshell/. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D60454

--HG--
extra : moz-landing-system : lando
2020-01-21 22:29:00 +00:00
Sylvestre Ledru
187e9bafaf Bug 1519636 - Automatically reformat recent changes using clang-format r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D60354

--HG--
extra : moz-landing-system : lando
2020-01-21 09:51:27 +00:00
Emilio Cobos Álvarez
256c124f94 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

Differential Revision: https://phabricator.services.mozilla.com/D60327

--HG--
extra : moz-landing-system : lando
2020-01-20 16:19:48 +00:00
Emilio Cobos Álvarez
aa3a695712 Bug 1609996 - Remove mozilla/Move.h. r=froydnj
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'

Further manual fixups and cleanups to the include order incoming.

Differential Revision: https://phabricator.services.mozilla.com/D60323

--HG--
extra : moz-landing-system : lando
2020-01-20 16:18:20 +00:00
Andreas Farre
68ac0a2401 Bug 1583863 - Part 3: WindowContext using SyncedContext, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D56743

--HG--
extra : moz-landing-system : lando
2020-01-20 14:58:52 +00:00
Andreas Farre
e19bb50a53 Bug 1583863 - Part 2: BrowsingContext moved to SyncedContext, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D56742

--HG--
extra : moz-landing-system : lando
2020-01-20 14:57:47 +00:00
Andreas Farre
44204936b7 Bug 1583863 - Part 1: Introduce common SyncedContext logic, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D56741

--HG--
extra : moz-landing-system : lando
2020-01-20 14:57:40 +00:00
Matt Woodrow
ca24f6fed5 Bug 1607991 - Remove ConfigureChannel. r=kmag
The intent of ConfigureChannel was to be code that needed to be applied to both the DocumentChannelChild in the content process, and the real channel in the parent.

It looks like everything in there is either QI'ing to a sub-type of channel (which won't apply to DocumentChannelChild), or is mutating the loadinfo/loadflags (which only need to be done once).

Differential Revision: https://phabricator.services.mozilla.com/D59264

--HG--
extra : moz-landing-system : lando
2020-01-17 02:11:40 +00:00
alwu
c0fb1f5b8e Bug 1606782 - part2 : create media controller via canonical browsing context. r=chunmin,nika
As each media controller corresponds to a tab (a browsing context tree), so the controller's life cycle should be equal to the tab. Currently we use the top-level browsing context to represent a tab, so when that browsing context is being destroyed, we should also destroy the corresponding media controller.

Therefore, `MediaControlService` don't need to have methods to access media controller anymore, we should access media controller directly from the top-level canonical browsing context.

Differential Revision: https://phabricator.services.mozilla.com/D58591

--HG--
extra : moz-landing-system : lando
2020-01-16 18:05:14 +00:00
Julian Descottes
dee6e3c78d Bug 1585747 - Remove devtools-specific workaround in BrowsingContext.cpp r=nika
Depends on D47963

This workaround was only used by DevTools when using a chrome frame. DevTools toolbox now always uses frame type=content, so the workaround can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D47964

--HG--
extra : moz-landing-system : lando
2020-01-14 14:47:17 +00:00
pbz
70e1dba79e Bug 1432856 - Extended focus methods in Window.webidl, Client.webidl and Element.webidl to pass CallerType. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D55811

--HG--
extra : moz-landing-system : lando
2020-01-16 14:38:40 +00:00
Dorel Luca
69b213c6ee Backed out 5 changesets (bug 1597154) for Mochitest error in docshell/test/mochitest/test_bug529119-2.html. CLOSED TREE
Backed out changeset 051d6f3a237c (bug 1597154)
Backed out changeset 8f8a663e3118 (bug 1597154)
Backed out changeset 1638767d4977 (bug 1597154)
Backed out changeset cc9c332c22a6 (bug 1597154)
Backed out changeset 9580b0a08782 (bug 1597154)
2020-01-16 07:44:40 +02:00
Paul Bone
b15b836c17 Bug 1597154 - pt 5. Rename SchemeUsesDocChannel r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D59823

--HG--
extra : moz-landing-system : lando
2020-01-16 03:53:46 +00:00
Paul Bone
6557402e10 Bug 1597154 - pt 3. Defer to documentchannel for process switching for all schemes r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D58899

--HG--
extra : moz-landing-system : lando
2020-01-16 03:52:46 +00:00
Paul Bone
23fa0553ac Bug 1597154 - pt 1. Avoid redirecting loads between processes more than once r=mattwoodrow,kmag
This doesn't fix the bug, but it is a good idea.

Differential Revision: https://phabricator.services.mozilla.com/D57597

--HG--
extra : moz-landing-system : lando
2020-01-16 03:52:01 +00:00
Dimi Lee
45330c2c4e Bug 1601310 - Add GetContentBlockingEvents IPC method for the child to retrive content blocking event in the parent. r=timhuang,twisniewski,Ehsan
This patch does the following:
1. Add a WindowGlobalChild IPC method - GetContentBlockingEvents. Documents can use the method
   retrieve content blocking events stored in the parent process.
2. Update nsIDocShell::GetHasTrackingContentBlocked to return a promise.
3. Replace API in report-site-issue to use the promise-based GetHasTrackingContentBlocked API

Differential Revision: https://phabricator.services.mozilla.com/D56204

--HG--
extra : moz-landing-system : lando
2019-12-17 11:05:06 +00:00
Anny Gakhokidze
15952e531f Bug 1574017 - Fix console error reporting for postMessage, r=peterv
1. Rename mCallerDocumentURI field of PostMessageEvent to mCallerURI as we
might not always have a document, e.g. when we have a sandbox.
2. When we neither have caller's inner window (and thus we have no caller's
window ID) nor caller's URI, use script location as a source name for the error
object when reporting errors to console.
3. When the caller of postMessage has its window in a different process, pass along
the caller's window ID so that the error can be reported correctly.

Differential Revision: https://phabricator.services.mozilla.com/D59526

--HG--
extra : moz-landing-system : lando
2020-01-15 20:20:31 +00:00
Matt Woodrow
dc86748b77 Bug 1599438 - Store sandbox flags on the LoadInfo when creating a channel for a docshell, so that we don't read a stale value from the BrowsingContext later. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D59263

--HG--
extra : moz-landing-system : lando
2020-01-15 08:02:57 +00:00
Narcis Beleuzu
c59ca04e7b Backed out changeset b3538b7016aa (bug 1599438) for bustages on TestHttpFuzzing.cpp . CLOSED TREE 2020-01-15 06:03:55 +02:00
Narcis Beleuzu
6724b78bd2 Backed out changeset ea7d48958f2f (bug 1594280) for mochitest failures on nsDocShell.cpp . CLOSED TREE 2020-01-15 05:50:28 +02:00
Matt Woodrow
dd0d183cb4 Bug 1599438 - Store sandbox flags on the LoadInfo when creating a channel for a docshell, so that we don't read a stale value from the BrowsingContext later. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D59263

--HG--
extra : moz-landing-system : lando
2020-01-15 02:05:57 +00:00
Tetsuharu OHZEKI
41d6d9d2c9 Bug 1594280 - Fix uses of nsIDocShellTreeItem in nsIDocShellTreeItem in nsDocShell::ValidateOrigin. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D58447

--HG--
extra : moz-landing-system : lando
2020-01-14 21:03:52 +00:00