Commit Graph

3171 Commits

Author SHA1 Message Date
Kershaw Chang
f5178cdb47 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
2020-02-05 14:32:51 +00:00
Cosmin Sabou
c0491e2272 Bug 1301399 - Delete trailing whitespace. r=pedantic-fix
DONTBUILD
2020-01-28 07:03:32 +02:00
Paul Bone
26c6477e1d Bug 1301399 - Fix comment after removing code r=nika
Differential Revision: https://phabricator.services.mozilla.com/D60802
2020-01-28 04:43:52 +00:00
Perry Jiang
5496c776a9 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
2020-01-25 00:05:12 +00:00
Dimi Lee
51d5fc7183 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
2020-01-24 11:06:49 +00:00
shindli
a15d7fb755 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
660e0491c4 Bug 1594280 - Fix uses of nsIDocShellTreeItem in nsIDocShellTreeItem in nsDocShell::ValidateOrigin. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D58447
2020-01-23 18:14:42 +00:00
Perry Jiang
fa01983b69 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
2020-01-24 02:38:01 +00:00
Paul Bone
2e53e07bb9 Bug 1301399 - Remove annoying session history assertion r=nika
Differential Revision: https://phabricator.services.mozilla.com/D60773
2020-01-23 00:55:53 +00:00
Oana Pop Rus
0691a9a985 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
222a7c3b54 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
2020-01-06 20:00:51 +00:00
Eric Rahm
a2e43ed1d6 Bug 1610386 - Remove nsAutoPtr usage from docshell/. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D60454
2020-01-21 22:29:00 +00:00
Matt Woodrow
6f12105920 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
2020-01-17 02:11:40 +00:00
Dorel Luca
58ecbd79df 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
359c4f9263 Bug 1597154 - pt 5. Rename SchemeUsesDocChannel r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D59823
2020-01-16 03:53:46 +00:00
Paul Bone
aec5c6e795 Bug 1597154 - pt 3. Defer to documentchannel for process switching for all schemes r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D58899
2020-01-16 03:52:46 +00:00
Paul Bone
3fb0a951c1 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
2020-01-16 03:52:01 +00:00
Dimi Lee
d59145948e 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
2019-12-17 11:05:06 +00:00
Matt Woodrow
f3883f930b 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
2020-01-15 08:02:57 +00:00
Narcis Beleuzu
bf2b2d612d Backed out changeset b3538b7016aa (bug 1599438) for bustages on TestHttpFuzzing.cpp . CLOSED TREE 2020-01-15 06:03:55 +02:00
Narcis Beleuzu
4723d54743 Backed out changeset ea7d48958f2f (bug 1594280) for mochitest failures on nsDocShell.cpp . CLOSED TREE 2020-01-15 05:50:28 +02:00
Matt Woodrow
5f6fd6d997 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
2020-01-15 02:05:57 +00:00
Tetsuharu OHZEKI
abbe92b5c8 Bug 1594280 - Fix uses of nsIDocShellTreeItem in nsIDocShellTreeItem in nsDocShell::ValidateOrigin. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D58447
2020-01-14 21:03:52 +00:00
Matt Woodrow
9ea8c6570f Bug 1607987 - Split DocumentChannelChild into two classes. r=jya
This shouldn't have any functional changes, and adds some new comments to explain the purpose of the classes a bit better.

Differential Revision: https://phabricator.services.mozilla.com/D59265
2020-01-13 00:28:13 +00:00
Ciure Andrei
c6f59c79e3 Backed out changeset ca6f43c06131 (bug 1607987) for causing test_bug369370.html to permafail 2020-01-13 04:10:57 +02:00
Matt Woodrow
cf1f801e8b Bug 1607987 - Split DocumentChannelChild into two classes. r=jya
This shouldn't have any functional changes, and adds some new comments to explain the purpose of the classes a bit better.

Differential Revision: https://phabricator.services.mozilla.com/D59265
2020-01-13 00:28:13 +00:00
Johann Hofmann
282e012e20 Bug 353933 - Make OnOverlink use CreateExposableURI. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D59428
2020-01-10 12:45:38 +00:00
Matt Woodrow
86c525d4e7 Bug 1598523 - Enable DocumentChannel for view-source. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D57894
2020-01-08 01:00:43 +00:00
Matt Woodrow
452cbf7077 Bug 1598523 - Share code for creating a channel for a document between nsDocShell, DocumentChannelChild and ContentChild. r=kmag
Note that this also implicitly adds support for the view-source+srcdoc configuration, and setting of the BaseURI, which were both in the nsDocShell version but not the others.

Differential Revision: https://phabricator.services.mozilla.com/D57887
2020-01-08 02:10:54 +00:00
Bogdan Tara
191d90bec0 Backed out 6 changesets (bug 1598523) for geckoview failures complaining about NavigationDelegateTest.loadUnknownProtocol
Backed out changeset 2e7ea1ae7fa2 (bug 1598523)
Backed out changeset 6adc1062662b (bug 1598523)
Backed out changeset 141372c43f02 (bug 1598523)
Backed out changeset c5abcaabaf2d (bug 1598523)
Backed out changeset 5a22a20dd993 (bug 1598523)
Backed out changeset e0df103c9cf3 (bug 1598523)
2020-01-08 02:56:18 +02:00
Matt Woodrow
3d34bed9be Bug 1598523 - Enable DocumentChannel for view-source. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D57894
2020-01-07 20:58:20 +00:00
Matt Woodrow
40b9b10577 Bug 1598523 - Share code for creating a channel for a document between nsDocShell, DocumentChannelChild and ContentChild. r=kmag
Note that this also implicitly adds support for the view-source+srcdoc configuration, and setting of the BaseURI, which were both in the nsDocShell version but not the others.

Differential Revision: https://phabricator.services.mozilla.com/D57887
2020-01-07 21:17:22 +00:00
Tetsuharu OHZEKI
b4b7ece113 Bug 1575326 - Fix usage of nsIDocShellTreeItem in nsDocShell::SetIsActive. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D58443
2020-01-07 08:08:49 +00:00
Tetsuharu OHZEKI
37027fc3a2 bug 1575328 - Fix usage of nsIDocShellTreeItem in nsDocShell::SetMixedContentChannel. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D58442
2020-01-07 08:16:26 +00:00
Matt Woodrow
e2a14477d6 Bug 1598520 - Allow DocumentChannel for srcdoc= loads. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D57587
2020-01-06 21:36:34 +00:00
Matt Woodrow
8b1b33cac0 Bug 1598520 - Don't require nsIChildChannel for process switching, as we don't need this for DocumentChannel either. r=mayhemer,kmag
Differential Revision: https://phabricator.services.mozilla.com/D57586
2020-01-06 21:58:48 +00:00
Tetsuharu OHZEKI
423370c334 Bug 1606528 - part 2: Replace idioms with BrowsingContext::IsTop(). r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D58481
2020-01-06 19:13:38 +00:00
Jean-Yves Avenard
e17a2ef796 Bug 1607068 - Don't assert that the timing object isn't set for about:blank load. r=mattwoodrow
about:blank gets loaded into the new docshell before ResumeRedirectedLoad get called for the 'real' load
Under some circumstances, it is sometimes possible that we got far enough with the about:blank load to initialize a timing.
Under these conditions, it is safe to disregard the existing timing information and replace it with the one carried over.

Differential Revision: https://phabricator.services.mozilla.com/D58733
2020-01-06 02:47:42 +00:00
Emilio Cobos Álvarez
07b0dcbdab Bug 1606659 - Don't pass margin and scrollbar preferences to nsFrameLoader::Show. r=mattwoodrow
Instead, get them on the relevant code paths.

Differential Revision: https://phabricator.services.mozilla.com/D58534
2020-01-05 22:48:40 +00:00
Jean-Yves Avenard
28a15c589a Bug 1603187 - P4. Pass navigation timing info to the new docshell when performing a process switch. r=mattwoodrow,farre
Differential Revision: https://phabricator.services.mozilla.com/D57772
2020-01-05 05:44:44 +00:00
Boris Zbarsky
515db023b7 Fix mis-pasted comment. No bug,
Differential Revision: https://phabricator.services.mozilla.com/D58158
2019-12-23 20:38:20 +00:00
Chris Peterson
0a9155f83b Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

Differential Revision: https://phabricator.services.mozilla.com/D56440
2019-12-20 07:16:43 +00:00
Razvan Maries
29d98a3d41 Backed out 5 changesets (bug 1598520) for perma fails on test_enumerateDevices_navigation.html. CLOSED TREE
Backed out changeset 583dac2feebc (bug 1598520)
Backed out changeset c769e733f588 (bug 1598520)
Backed out changeset 45287a2ec476 (bug 1598520)
Backed out changeset 59cff6014447 (bug 1598520)
Backed out changeset ddf722557c33 (bug 1598520)
2019-12-20 01:56:55 +02:00
Matt Woodrow
b62e743375 Bug 1598520 - Allow DocumentChannel for srcdoc= loads. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D57587
2019-12-19 21:48:00 +00:00
Matt Woodrow
531027b22b Bug 1598520 - Don't require nsIChildChannel for process switching, as we don't need this for DocumentChannel either. r=mayhemer,kmag
Differential Revision: https://phabricator.services.mozilla.com/D57586
2019-12-19 21:47:10 +00:00
Razvan Maries
601e71c3cb Backed out 5 changesets (bug 1598520) for Linting failure. CLOSED TREE
Backed out changeset b4f71abf75fe (bug 1598520)
Backed out changeset 8e3b650d9313 (bug 1598520)
Backed out changeset 73c37ad27d18 (bug 1598520)
Backed out changeset 10ad2e4d27c3 (bug 1598520)
Backed out changeset 4a5d10759bf3 (bug 1598520)
2019-12-20 00:38:32 +02:00
Matt Woodrow
7bfadab242 Bug 1598520 - Allow DocumentChannel for srcdoc= loads. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D57587
2019-12-19 21:48:00 +00:00
Matt Woodrow
a773e1515d Bug 1598520 - Don't require nsIChildChannel for process switching, as we don't need this for DocumentChannel either. r=mayhemer,kmag
Differential Revision: https://phabricator.services.mozilla.com/D57586
2019-12-19 21:47:10 +00:00
Kris Maglione
b709d4b8cc Bug 1588259: Part 2 - Prevent URI loads in partially-initialized BrowsingContexts. r=smaug
When we open a new window from a content process, we create a nested event
loop to wait for it to be initialized by the parent. The problem with this is
that the OpenWindow code which calls the window provider expects the window to
be in-process and uninitialized, so that it can load its own initial URI into
it, and correctly fulfil the spec-codified contract of window.open(). If
another caller initiates a load in the new window during the nested event
loop, those invariants are broken, and any manner of undefined behavior can
occur.

This patch adds a new flag to the BrowsingContext, marking it as uninitialized
until the end of the nested event loop, and blocking any attempts to load a
new URI into it in the meantime.

Differential Revision: https://phabricator.services.mozilla.com/D57667
2019-12-19 22:05:19 +00:00
Razvan Maries
8e52fd1919 Backed out 2 changesets (bug 1588259) for perma fais on 1588259.html. CLOSED TREE
Backed out changeset 62fb499df45a (bug 1588259)
Backed out changeset 34716f07e8cb (bug 1588259)
2019-12-19 23:34:57 +02:00