Commit Graph

3114 Commits

Author SHA1 Message Date
Matt Woodrow
28378eb5fe Bug 1574372 - Add parent-process version of nsDocumentOpenInfo, and use it in DocumentLoadListener. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D56137
2019-12-16 21:26:01 +00:00
Matt Woodrow
54948e07eb Bug 1574372 - Allow using nsWebNavigationInfo statically. r=bzbarsky
IsTypeSupported requires a docshell in order to determine if plugins are allowed. This adds a static version that lets the caller provide their own value for allowing plugins.

Differential Revision: https://phabricator.services.mozilla.com/D56132
2019-12-16 21:25:17 +00:00
Matt Woodrow
38dd6f0b54 Bug 1590422 - Show error page for unknown protocols. r=kmag
Before DocumentChannel, unknown protocol errors happened when we tried to create the channel, so didn't go through this path. With DocumentChannel we don't find out until we're in the parent process, so they come through as a failed request value, which encounters these filters.

Depends on D56841

Differential Revision: https://phabricator.services.mozilla.com/D57030
2019-12-16 00:19:03 +00:00
Tom Schuster
620c383d5f Bug 1594284 - Remove nsDocShell::CanAccessItem. r=annyG
Apparently Bug 1594288 removed the user of this function.

Differential Revision: https://phabricator.services.mozilla.com/D57226
2019-12-16 17:15:37 +00:00
Emilio Cobos Álvarez
3a412cb3ee Bug 1603889 - Simplify the scrollbar preference setup. r=smaug
So much plumbing to pass an enum down.

Differential Revision: https://phabricator.services.mozilla.com/D57182
2019-12-15 22:56:23 +00:00
Boris Zbarsky
8f97398a08 Bug 1602483 part 2. Add a window id argument to CheckLoadURIWithPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D56428
2019-12-12 16:41:19 +00:00
Boris Zbarsky
bf2401beec Bug 1602483 part 1. Add a window id argument to SetupRefreshURIFromHeader. r=ckerschb
We can use this for error reporting.

Differential Revision: https://phabricator.services.mozilla.com/D56427
2019-12-12 16:41:21 +00:00
Boris Zbarsky
fcb04b87e4 Bug 1602090 part 2. Create separate CheckMayLoad and CheckMayLoadWithReporting APIs. r=ckerschb
CheckMayLoadAndReport takes a window ID.  This allows us to report
errors from it to the web console as needed.  Most consumers know statically
whether they want reporting or not, so there's no reason to force the ones that
don't to provide window ids.

Differential Revision: https://phabricator.services.mozilla.com/D56388
2019-12-13 06:24:12 +00:00
Kris Maglione
41a5f0e588 Bug 1588220: Keep track of last active inner window when BrowsingContext is discarded. r=bzbarsky
Any number of outer windows may be attached to a BrowsingContext over its
lifetime. While the BrowsingContext is alive, it's easy to keep track of which
of these is active, and therefore which of its inner windows is active. After
it has been discarded, though, it discards its docShell reference, so all we
can tell about an inner window is whether it is active for its own outer
window, but not whether it should be considered active for its
BrowsingContext.

This patch updates the BrowsingContext detach logic to store a flag on the
current inner window recording that it was active when its BrowsingContext was
detached, and then later checks that flag to determine if it is the current
window for a detached BrowsingContext.

Differential Revision: https://phabricator.services.mozilla.com/D49032
2019-12-12 23:11:01 +00:00
Henri Sivonen
b33e8e6eaf Bug 1551276 - Autodetect legacy encodings on unlabeled pages. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D56362
2019-12-12 17:50:19 +00:00
Ciure Andrei
2e0157c747 Backed out 4 changesets (bug 1602483, bug 1602090) for causing perma leackchecks CLOSED TREE
Backed out changeset 6b057ba06b4a (bug 1602483)
Backed out changeset 9be3269d781d (bug 1602483)
Backed out changeset e3e2c1d7478e (bug 1602090)
Backed out changeset fdc4a588912e (bug 1602090)
2019-12-12 18:37:01 +02:00
Andreas Farre
f6b213192a Bug 1561715 - Part 1: Remove unused functionality in SchedulerGroup. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D55638
2019-12-11 14:48:41 +00:00
Oana Pop Rus
53a8a406db Backed out changeset 0810ad586986 (bug 1551276) for wpt failures in ar-ISO-8859-6-late.tentative.html on a CLOSED TREE 2019-12-12 16:38:54 +02:00
Boris Zbarsky
f99de7f9a0 Bug 1602483 part 2. Add a window id argument to CheckLoadURIWithPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D56428
2019-12-12 13:05:12 +00:00
Boris Zbarsky
94bba88e67 Bug 1602483 part 1. Add a window id argument to SetupRefreshURIFromHeader. r=ckerschb
We can use this for error reporting.

Differential Revision: https://phabricator.services.mozilla.com/D56427
2019-12-12 13:03:56 +00:00
Boris Zbarsky
d9b66ffabd Bug 1602090 part 2. Create separate CheckMayLoad and CheckMayLoadWithReporting APIs. r=ckerschb
CheckMayLoadAndReport takes a window ID.  This allows us to report
errors from it to the web console as needed.  Most consumers know statically
whether they want reporting or not, so there's no reason to force the ones that
don't to provide window ids.

Differential Revision: https://phabricator.services.mozilla.com/D56388
2019-12-12 13:03:42 +00:00
Andreas Farre
7e4d754e73 Bug 1594288 - Remove nsIDocShellTreeItem.findChildWithName. r=annyG
Differential Revision: https://phabricator.services.mozilla.com/D55977
2019-12-12 13:29:39 +00:00
Henri Sivonen
5404be1b75 Bug 1551276 - Autodetect legacy encodings on unlabeled pages. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D56362
2019-12-12 12:59:47 +00:00
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