Commit Graph

3346 Commits

Author SHA1 Message Date
Matt Woodrow
ecfe4c769f Bug 1603194 - Pass nsDocShellLoadState's load flags to new process when process switching. r=kmag
Depends on D56821

Differential Revision: https://phabricator.services.mozilla.com/D56822
2019-12-12 02:32:29 +00:00
Oana Pop Rus
106bfb23cb Backed out changeset 0e82a2a87b39 (bug 1594288) for causing build bustages in nsDocShell.cpp on a CLOSED TREE 2019-12-11 17:08:33 +02:00
Andreas Farre
a41f9d2620 Bug 1594288 - Remove nsIDocShellTreeItem.findChildWithName. r=annyG
There are no callers of findChildWithName after it got replaced by
corresponding methods in BrowsingContext.

Differential Revision: https://phabricator.services.mozilla.com/D55977
2019-12-06 19:05:52 +00:00
Yaron Tausky
d902a7d422 Bug 1593246 - Part 1: Move SessionStorageManager to BrowsingContext r=dom-workers-and-storage-reviewers,sg,smaug
With Fission enabled we do not necessarily have access to the
nsDocShell that holds the top-level browsing context, so the
BrowsingContext is a better place to store information that needs
to be accessible to nested browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D55276
2019-12-10 12:12:25 +00:00
Emilio Cobos Álvarez
c2c776c612 Bug 1601563 - Don't set history title for subframes. r=mak
This doesn't affect GeckoView history per:

  https://searchfox.org/mozilla-central/rev/ea63a0888d406fae720cf24f4727d87569a8cab5/mobile/android/components/geckoview/GeckoViewHistory.cpp#348

So whether GeckoView does this is a different question.

Depends on D56213

Differential Revision: https://phabricator.services.mozilla.com/D56214
2019-12-09 22:39:55 +00:00
Kannan Vijayan
d68d8d22c1 Bug 1580241 - Fix usage of nsIDocShellTreeItem in nsDocShell::CanSavePresentation r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D56003
2019-12-06 19:30:49 +00:00
Razvan Maries
3aec015044 Backed out 3 changesets (bug 1593246) for build bustages on BrowsingContext.h. CLOSED TREE
Backed out changeset fd389138a684 (bug 1593246)
Backed out changeset 2663311a1b62 (bug 1593246)
Backed out changeset d9f0d827e28d (bug 1593246)
2019-12-09 20:32:18 +02:00
Yaron Tausky
af3113e2f9 Bug 1593246 - Part 1: Move SessionStorageManager to BrowsingContext r=dom-workers-and-storage-reviewers,sg,smaug
With Fission enabled we do not necessarily have access to the
nsDocShell that holds the top-level browsing context, so the
BrowsingContext is a better place to store information that needs
to be accessible to nested browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D55276
2019-12-09 13:04:51 +00:00
Gabriele Svelto
eeb9bfc398 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55443
2019-12-06 09:16:44 +00:00
Olli Pettay
c96e061efc Bug 1596958 - Synchronize layouthistorystate to parent process, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D53288
2019-12-05 20:30:45 +00:00
Mark Striemer
4762ab815c Bug 1565606 - Remove remote disco pane support from nsDocShell.cpp r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D55720
2019-12-05 18:32:39 +00:00
Brindusan Cristian
571f63a42b Backed out changeset 69ac0bf82505 (bug 1596958) for assertion failures at nsSHEntry.cpp. CLOSED TREE 2019-12-05 21:01:02 +02:00
Olli Pettay
5387a9b735 Bug 1596958 - Synchronize layouthistorystate to parent process, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D53288
2019-12-05 17:33:48 +00:00
Masatoshi Kimura
4bfa0ac097 Bug 1455716 - Followup to fix review comments. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D55881
2019-12-05 10:36:12 +00:00
Boris Zbarsky
2df1df0176 Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D53067
2019-12-05 04:44:32 +00:00
Masatoshi Kimura
1c4a66ae16 Bug 1455716 - Simplify/rename nsIWebBrowserChrome;setStatus and setStatusWithContext. r=bzbarsky
* Removed the STATUS_LINK constant.
* Removed the statusType parameter from nsIWebBrowserChrome::setStatus.
* Removed the setStatusWithContext method. No one uses the information from
  statusContext.
* Removed the nsIWebBrowserChrome2 interface as setStatusWithContext was the
  only method.

Differential Revision: https://phabricator.services.mozilla.com/D55195
2019-12-04 13:50:01 +00:00
Matt Woodrow
349a2975b6 Bug 1598516 - Handle malformed uri load error with an error page. r=kmag
Previously this error occurred synchronously during AsyncOpen, and we handled it there.
With DocumentChannel we don't find out until it's handled in the parent, so the error is returned to the docshell via a failed status on the request.

Differential Revision: https://phabricator.services.mozilla.com/D54248
2019-12-03 23:54:33 +00:00
Matt Woodrow
cdddf2f21e Bug 1598516 - Enable DocumentChannel for all protocols, except for list of known issues. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D54246
2019-12-03 23:54:08 +00:00
Bogdan Tara
6e905df32f Backed out 8 changesets (bug 1598516) for run startup hangs CLOSED TREE
Backed out changeset bc0035aa57fe (bug 1598516)
Backed out changeset 33603b723337 (bug 1598516)
Backed out changeset 31c11dd9146d (bug 1598516)
Backed out changeset 4e269a638350 (bug 1598516)
Backed out changeset 76b86080c868 (bug 1598516)
Backed out changeset b6f84b01cbd9 (bug 1598516)
Backed out changeset 74d136798dd3 (bug 1598516)
Backed out changeset bf370938463e (bug 1598516)
2019-12-04 00:48:17 +02:00
Matt Woodrow
fbcbea9265 Bug 1598516 - Handle malformed uri load error with an error page. r=kmag
Previously this error occurred synchronously during AsyncOpen, and we handled it there.
With DocumentChannel we don't find out until it's handled in the parent, so the error is returned to the docshell via a failed status on the request.

Differential Revision: https://phabricator.services.mozilla.com/D54248
2019-12-03 20:43:24 +00:00
Matt Woodrow
8fc22f4047 Bug 1598516 - Enable DocumentChannel for all protocols, except for list of known issues. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D54246
2019-12-03 20:43:17 +00:00
Gurzau Raul
068af7717a Backed out 8 changesets (bug 1598516) for build bustage at ParentChannelListener.cpp on a CLOSED TREE.
Backed out changeset 7ac1b091aa5f (bug 1598516)
Backed out changeset b62c5b49b91c (bug 1598516)
Backed out changeset e48c0ce38498 (bug 1598516)
Backed out changeset cc2599921b5e (bug 1598516)
Backed out changeset 0a0f80b0b278 (bug 1598516)
Backed out changeset 1dc19a039cab (bug 1598516)
Backed out changeset b664c8af6e2d (bug 1598516)
Backed out changeset 943b440179b9 (bug 1598516)
2019-12-03 21:48:14 +02:00
Kannan Vijayan
1536dc74db Bug 1580675 - Fix usage of nsIDocShellTreeItem in nsDocShell::GetIsTopLevelContentDocShell. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D55525
2019-12-03 19:36:48 +00:00
Matt Woodrow
9aed7d89ee Bug 1598516 - Handle malformed uri load error with an error page. r=kmag
Previously this error occurred synchronously during AsyncOpen, and we handled it there.
With DocumentChannel we don't find out until it's handled in the parent, so the error is returned to the docshell via a failed status on the request.

Differential Revision: https://phabricator.services.mozilla.com/D54248
2019-12-03 06:19:53 +00:00
Matt Woodrow
5765391a3a Bug 1598516 - Enable DocumentChannel for all protocols, except for list of known issues. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D54246
2019-12-03 06:19:23 +00:00
Tom Ritter
8acb67af33 Bug 1592297 - Remove MOZ_QUIET and disable this output by default. r=mccr8,jdescottes
Instead of setting MOZ_QUIET to hide the DOMWINDOW and DOCSHELL log messages, you
now must set a regular logging module to enable them. They are automatically enabled
on tests that rely on these messages are leak checking.

That module is DocShellAndDOMWindowLeak:3

One disadvantage of this change is that you cannot set MOZ_QUIET to hide these
messages when running those tests (primarily browser-chrome).

Differential Revision: https://phabricator.services.mozilla.com/D52413
2019-12-02 15:41:35 +00:00
Jean-Yves Avenard
81d5ecb73c Bug 1599006 - P4. Properly carry history and frecency data when switching process. r=kmag,mayhemer.
This allows test toolkit/components/places/tests/browser/browser_multi_redirect_frecency.js and others to pass when fission is enabled.

The content process expects to know the chain of redirects encountered while opening a URI. The DocumentChannelParent gather that information and sends it to the new ContentChild which can then propagate the information to the new nsDocShell.

The data used to only be passed around during same-origin redirects when fission mode was enabled.

In order to allow for move semantics and preventing unnecessary copy of the DocumentChannelRedirect array, we make the nsIChildProcessChannelListener::onChannelReady property C++ only (noscript).
As we have only one concrete nsIChildProcessChannelListener class (ChildProcessListener) and that the unique OnChannelReady implementation is infallible; we really don't need for the method to return nsresult (so we declare it nostdcall). This helps simplify that call.

Differential Revision: https://phabricator.services.mozilla.com/D54909
2019-11-28 06:09:54 +00:00
Kannan Vijayan
a7f07ec178 Bug 1580228 - Fix usage of nsIDocShellTreeItem in nsDocShell::EndPageLoad r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D54604
2019-11-25 21:55:48 +00:00
Jean-Yves Avenard
8a48fe9a76 Bug 1596665 - P5. Pass last site information from the parent and remove DCC's nsHashPropertyBag inheritance. r=mayhemer,kmag
The previous site URI is now only written on the parent and sent back to the child once all redirects have completed.

In a follow up we will also transfer this information when a process switch occur as it's currently broken.

Differential Revision: https://phabricator.services.mozilla.com/D53926
2019-11-26 01:47:48 +00:00
Jean-Yves Avenard
586eaab253 Bug 1596665 - P4. Expose some nsDocShell utility methods. r=kmag
And use the new methods where we can.

Differential Revision: https://phabricator.services.mozilla.com/D53925
2019-11-26 01:24:42 +00:00
Jean-Yves Avenard
63d31f1d10 Bug 1596665 - P3. Copy property bag from parent to child. r=kmag,mayhemer
Rather that setting the property bag on both the child and parent from the docshell; we first set it on the parent instead, and once the redirect (or process switch) has completed we carry that bag across.

Differential Revision: https://phabricator.services.mozilla.com/D53924
2019-11-26 01:24:34 +00:00
Coroiu Cristina
3ec04652cd Backed out 6 changesets (bug 1598516) for Mn and pgo failures on a CLOSED TREE
Backed out changeset 63a84cdfd937 (bug 1598516)
Backed out changeset 894aaa4bc62e (bug 1598516)
Backed out changeset e19ada9e8b30 (bug 1598516)
Backed out changeset 72f2256ae171 (bug 1598516)
Backed out changeset 6ba74ff735ba (bug 1598516)
Backed out changeset b235cf22b0e4 (bug 1598516)
2019-11-26 04:40:35 +02:00
Matt Woodrow
2af26fa26b Bug 1598516 - Handle malformed uri load error with an error page. r=kmag
Previously this error occurred synchronously during AsyncOpen, and we handled it there.
With DocumentChannel we don't find out until it's handled in the parent, so the error is returned to the docshell via a failed status on the request.

Differential Revision: https://phabricator.services.mozilla.com/D54248
2019-11-25 20:22:57 +00:00
Matt Woodrow
b27192a627 Bug 1598516 - Enable DocumentChannel for all protocols, except for list of known issues. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D54246
2019-11-25 20:22:31 +00:00
Kershaw Chang
e7bb179208 Bug 1579049 - P1: Map Http error response codes to gecko error codes r=mayhemer,valentin
Differential Revision: https://phabricator.services.mozilla.com/D49903
2019-11-21 14:24:36 +00:00
Jean-Yves Avenard
69592715a2 Bug 1595637 - P3. Only set contentType, contentDisposition and originalURI in the parent. r=kmag,mayhemer
They don't need to be set on the DocumentChannelChild as they are never read.

Differential Revision: https://phabricator.services.mozilla.com/D52785
2019-11-21 10:58:14 +00:00
Ehsan Akhgari
c5ab356460 Bug 1592599 - Switch nsIDocShell.getDocShellEnumerator() away from using nsISimpleEnumerator; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D51100
2019-11-18 20:11:58 +00:00
Andreas Farre
2fb0a6c70f Bug 1590782 - Switch process when InternalLoad finds oop BrowsingContext. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D50945
2019-11-12 21:52:18 +00:00
Matt Woodrow
fe12d7ee86 Bug 1594166 - Enable DocumentChannel for ftp, file and blob. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D51902
2019-11-07 19:01:43 +00:00
Matt Woodrow
16f0a21197 Bug 1593560 - Allow data urls with DocumentChannel. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D51547
2019-11-06 22:37:06 +00:00
Dorel Luca
116f107e5b Backed out changeset b2026c2b563f (bug 1594529) for Browser-chrome failures in workspace/build/src/docshell/base/nsDocShell. CLOSED TREE 2019-11-07 03:45:01 +02:00
Jonathan Kingston
cf53fe6298 Bug 1594529 - Adding in asserts for LoadURI to ensure we have the correct contentPolicyType r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D52088
2019-11-06 23:47:06 +00:00
Dorel Luca
c4c3d1ed72 Backed out changeset eaee8979fdc4 (bug 1594529) for Browser-chrome in toolkit/components/passwordmgr/test/browser/browser_doorhanger_crossframe.js. CLOSED TREE 2019-11-07 02:12:16 +02:00
Kris Maglione
184f4783e8 Bug 1594529: Infer nsDocShell::IsFrame from BrowsingContext. r=nika
This fixes the content policy type for document loads in these frames, where
the explicit mIsFrame flag was not set, due to DocShell creation taking a
different code path in remote frames than in in-process frames.

Differential Revision: https://phabricator.services.mozilla.com/D52093
2019-11-06 20:34:36 +00:00
Coroiu Cristina
c2912e226b Backed out 7 changesets (bug 1593560) for crashtest failures at tests/layout/base/crashtests/446328.html on a CLOSED TREE
Backed out changeset 7dfae085a4cb (bug 1593560)
Backed out changeset 9842c80c98d8 (bug 1593560)
Backed out changeset d67a10437af7 (bug 1593560)
Backed out changeset 3e3948e9531c (bug 1593560)
Backed out changeset a7d04e276b44 (bug 1593560)
Backed out changeset 9f52c9f6dc54 (bug 1593560)
Backed out changeset 90572c49d464 (bug 1593560)
2019-11-07 00:32:53 +02:00
Matt Woodrow
46f931aa7a Bug 1593560 - Allow data urls with DocumentChannel. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D51547
2019-11-06 18:22:00 +00:00
Andreas Tolfsen
46e958bbf3 bug 1549708: docshell: add nsIDocShell.isForceReloading; r=bzbarsky
Exposes a new nsIDocShell API, isForceReloading, to determine if
the loaded document was force-reloaded or not.

It relies on the underlying behaviour of nsDocShell::IsForceReloading(),
which again relies on nsDocShell::IsForceReloadType(mLoadType).

The getter is used in the remote agent to test that
Page.reload({ignoreCache: true}) works as intended.

Differential Revision: https://phabricator.services.mozilla.com/D51435
2019-11-04 13:28:23 +00:00
Sebastian Hengst
84c9c8b5c1 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-11-06 15:00:06 +01:00
Sebastian Hengst
ebf630f398 Merge mozilla-inbound to mozilla-central. a=merge 2019-11-06 14:54:44 +01:00
Andreas Farre
230e07715f Bug 1582716 - Remove nsDocShell::GetIsOnlyToplevelInTabGroup. r=nika
We can remove isOnlyToplevelInTabGroup entirely since we have
BrowsingContext/BrowsingContextGroup exposed through
chrome-webidl. Checking if a browsing context is the only top level
(auxilliary or otherwise) is only a matter of checking that there
isn't a parent, and that the size of the browsing context group is 1.

Differential Revision: https://phabricator.services.mozilla.com/D46590
2019-11-06 10:54:49 +00:00