Commit Graph

4231 Commits

Author SHA1 Message Date
Butkovits Atila
97758b43e2 Backed out 3 changesets (bug 266554) for causing failures at subresource.any.worker.html. CLOSED TREE
Backed out changeset 4df11a91b7ce (bug 266554)
Backed out changeset 20e57705bd19 (bug 266554)
Backed out changeset 031663eb54ba (bug 266554)
2024-11-14 05:33:02 +02:00
Zach Hoffman
a1768d4a23 Bug 266554 - Send Referer header on refresh. r=peterv,ckerschb,dom-core,smaug
This applies for refreshes resulting from either a `<meta>` refresh or
the Refresh header. Referrer Policy is honored.

Because exposing the referrer in a new place could have privacy
implications, this behavior is gated behind a disabled pref until
anti-tracking has been considered in bug 1928294.

Some WPTs that D227450 touches are cleaned up a bit.

Differential Revision: https://phabricator.services.mozilla.com/D227450
2024-11-14 02:09:02 +00:00
Zach Hoffman
8c6dd9f815 Bug 266554 - Use document ReferrerInfo for refreshes. r=peterv,ckerschb,dom-core,smaug
When ReferrerInfo is exposed later in the patch set, using the document
referrer info instead of mReferrerInfo will matter, but for now,
behavior should be unchanged.

Optional argument aSendReferrer for the ReferrerInfo constructor is
added. Because the existing behavior of InitWithDocument setting
mSendReferrer to true is acceptable in all other cases, the
aSendReferrer argument is not passed to InitWithDocument and
nsIReferrerInfo.idl is unchanged.

Unused method ReferrerInfo::CloneWithNewSendReferrer is removed.

Differential Revision: https://phabricator.services.mozilla.com/D227449
2024-11-14 02:09:02 +00:00
Zach Hoffman
e2150bda1b Bug 266554 - Ensure document is non-null in nsDocShell::ForceRefreshURI. r=peterv,dom-core,smaug
This should be safe to do because Refreshes are applied only to
documents and not to subresources.

Differential Revision: https://phabricator.services.mozilla.com/D227448
2024-11-14 02:09:01 +00:00
Simon Friedberger
4fcd691190 Bug 1919544 - Do not HTTPS-First upgrade URLs with http:// scheme r=mak,necko-reviewers,urlbar-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228588
2024-11-13 17:15:57 +00:00
Sandor Molnar
9e0c14a80e Backed out changeset c4dfee1f9194 (bug 1919544) for causing bc failures @ browser_UrlbarInput_formatValue.js CLOSED TREE 2024-11-13 15:20:39 +02:00
Simon Friedberger
8eafd874fe Bug 1919544 - Do not HTTPS-First upgrade URLs with http:// scheme r=mak,necko-reviewers,urlbar-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228588
2024-11-13 11:44:43 +00:00
Emilio Cobos Álvarez
e923afbf46 Bug 1927967 - Use typed units for nsDocumentViewer bounds. r=hiro,dholbert
SVG is fine because it always uses an effective DPI of 1. The rest
already use and assume layout pixels.

Differential Revision: https://phabricator.services.mozilla.com/D228120
2024-11-06 12:37:39 +00:00
Adi
20c01e8bd9 Backed out changeset 816825f333b7 (bug 1909110) for causing bc failures @ browser_bug575561.js. CLOSED TREE 2024-10-29 16:27:31 +02:00
Tom Schuster
89f6452c39 Bug 1909110 - Apply CSP to media that would be loaded as a MediaDocument. r=necko-reviewers,nika,freddyb
Differential Revision: https://phabricator.services.mozilla.com/D221326
2024-10-29 13:05:25 +00:00
Norisz Fay
7c7d41d846 Backed out changeset 5b4cea7ea948 (bug 1924861) for causing mochitest failures on test_ext_tabs_goBack_goForward.html, test_bug1300461.html CLOSED TREE 2024-10-29 04:57:43 +02:00
Adam Vandolder
b0355ca479 Bug 1924861 - Only show the first history entry if it has user interaction. r=dom-core,omc-reviewers,sessionstore-reviewers,dao,peterv,tabbrowser-reviewers,mviar,sfoster
Differential Revision: https://phabricator.services.mozilla.com/D221390
2024-10-29 00:27:19 +00:00
Zach Hoffman
14134ce9b2 Bug 1544428 - Do not dispatch popstate or hashchange when hasRef changes. r=jjaschke,dom-core,sessionstore-reviewers,dao,farre
This behavior was already agreed upon in
<https://github.com/whatwg/html/issues/7386>, but bug 1544428 was an
implementation edge case needing to be fixed.

An exception is when the fragment contains a directive, in which case a
difference in `hasRef` is sufficient, to retain existing behavior WRT
directives.

Although bug 1544428 is about popstate, hashchange was erroneously being
dispatched, as well, which this patch fixes.

Some tests that depended on the old behavior are updated.

Differential Revision: https://phabricator.services.mozilla.com/D225567
2024-10-23 14:59:04 +00:00
Olli Pettay
2cd74a0e96 Bug 1801586, bring back the old behavior when session-history-in-parent isn't enabled, r=peterv
bug 1717765 changed the behavior for non-SHIP too, and https://searchfox.org/mozilla-central/rev/d0c13bb2a9c3a9ab6f5eb5a23230161928b079d9/docshell/base/nsDocShell.cpp#6922
seems to rely on the old behavior. We need to have DocumentViewer always when restoring from bfcache, and non-SHIP doesn't deal with failure cases well.

No test for this (at least not yet).

Differential Revision: https://phabricator.services.mozilla.com/D225409
2024-10-16 13:14:50 +00:00
Emilio Cobos Álvarez
7e3778ba99 Bug 1922956 - Further clean-up widget creation code-paths. r=win-reviewers,mac-reviewers,geckoview-reviewers,mstange,rkraesig,m_kato
This is all super-hacky (see a lot of the XXXcjones comments).

Simplify it... We never create widgets with a bare native parent but no
nsIWidget parent. Pass nsIWidgets and deal with things correctly.

There were also things that were dealing with stuff that can't happen,
like top level popups, children of PuppetWidgets, or such.

Instead of overriding Create(), let's just teach nsBaseWidget about
non-native (headless/puppet) widgets.

Remove lots of old APIs for the native window stuff that are unused
and/or unimplemented.

Differential Revision: https://phabricator.services.mozilla.com/D224613
2024-10-07 16:43:53 +00:00
Timothy Nikkel
c3d7871769 Bug 1922983. Avoid useless QI in nsDocShell::Get/SetWindowDraggingAllowed on every paint in content process. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D224671
2024-10-07 10:27:11 +00:00
Iulian Moraru
7387be52c2 Backed out changeset 4888b2f651bc (bug 1921972) for causing multiple failures. CLOSED TREE 2024-10-06 23:50:12 +03:00
Emilio Cobos Álvarez
0901d90ded Bug 1921972 - Don't add external protocol navigations to the loadgroup. r=smaug,necko-reviewers
Much like we do with downloads (bug 1656925), these don't unload the
current document.

This prevents them from having mismatched flags, which asserts, see the
test-case.

Differential Revision: https://phabricator.services.mozilla.com/D224606
2024-10-06 19:33:02 +00:00
Peter Van der Beken
94b09a989c Bug 1920960 - Simplify nsDocShellLoadState::CalculateChannelLoadFlags argument. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D223499
2024-10-02 12:26:40 +00:00
Andreas Farre
6a489c97d4 Bug 1909698 - Use URI from session history when coming out from bfcache. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D222118
2024-09-17 12:17:38 +00:00
Iulian Moraru
7b1382ec19 Backed out changeset 05fceb07f800 (bug 1909698) for causing wpt crashes/assertions. CLOSED TREE 2024-09-16 23:28:38 +03:00
Andreas Farre
40bab40276 Bug 1909698 - Use URI from session history when coming out from bfcache. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D222118
2024-09-16 17:38:10 +00:00
Andreas Farre
fdd79b0fba Bug 1916559 - Only store pending uninvoked directives for same document navigation. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D221637
2024-09-12 06:02:24 +00:00
Emilio Cobos Álvarez
c08146b660 Bug 1911977 - Don't abort networking activity on external protocol navigations. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D221029
2024-09-10 15:22:04 +00:00
Emilio Cobos Álvarez
d1c713eb50 Bug 1911977 - Minor clean-ups in nsDocShell::InternalLoad. r=smaug
Use const and the same style for download and JS checks.

Differential Revision: https://phabricator.services.mozilla.com/D221028
2024-09-05 17:08:39 +00:00
Butkovits Atila
a16da946fd Backed out 2 changesets (bug 1911977) for causing failures at browser_thumbnails_bg_bad_url.js. CLOSED TREE
Backed out changeset 564fe3a44acf (bug 1911977)
Backed out changeset d142c4f64ae7 (bug 1911977)
2024-09-05 04:19:21 +03:00
Emilio Cobos Álvarez
ae7187bdd7 Bug 1911977 - Don't abort networking activity on external protocol navigations. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D221029
2024-09-04 20:18:55 +00:00
Emilio Cobos Álvarez
9f46207409 Bug 1911977 - Minor clean-ups in nsDocShell::InternalLoad. r=smaug
Use const and the same style for download and JS checks.

Differential Revision: https://phabricator.services.mozilla.com/D221028
2024-09-04 20:18:55 +00:00
Sean Feng
fde536a9dd Bug 1882670 - Cancel the loading=lazy iframe when it's load via a different way r=emilio,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D218143
2024-09-04 14:06:47 +00:00
Cristina Horotan
24065fbb66 Backed out changeset d232f991af6a (bug 1882670) for causing cdp failures at frame.spec.js CLOSED TREE 2024-09-04 02:35:14 +03:00
Sean Feng
66cda424bd Bug 1882670 - Cancel the loading=lazy iframe when it's load via a different way r=emilio,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D218143
2024-09-03 19:34:36 +00:00
Nika Layzell
771e757ee4 Bug 1914594 - Move docshell.newWindowTarget to be on LoadInfo, r=necko-reviewers,kershaw
Previously, this was passed around using the nsHashPropertyBag base
class on HTTP channels. In bug 1907269, this base was added to
nsExtProtocolChannel to support reading this property for external
protocols.

This unfortunately ended up not working when a HTTP channel redirects to
an external protocol, as the hash property propagation logic in
nsHttpChannel happens after the check that the target channel is a HTTP
channel, so the property was lost when redirecting to an external
protocol.

Rather than refactoring HTTP redirect logic, this patch simplifies by
moving the property onto the LoadInfo where it will be trivially
preserved across redirects, and available in the places which need it.

Because the nsHashPropertyBag base is no longer required for
nsExtProtocolChannel, it is also removed.

Differential Revision: https://phabricator.services.mozilla.com/D220744
2024-09-03 16:00:23 +00:00
Butkovits Atila
e58f119acf Backed out changeset 6c62047559a6 (bug 1882670) for causing failures at iframe-loading-lazy-reload-location-reload.html. CLOSED TREE 2024-08-28 19:42:11 +03:00
Sean Feng
3923e9990b Bug 1882670 - Cancel the loading=lazy iframe when it's load via a different way r=emilio,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D218143
2024-08-28 15:11:55 +00:00
Florian Quèze
cf888920da Bug 1913624 - Remove expired telemetry histograms ENCODING_OVERRIDE_SITUATION_TEXT and ENCODING_OVERRIDE_SITUATION_HTML, r=chutten.
Depends on D219442

Differential Revision: https://phabricator.services.mozilla.com/D219443
2024-08-20 10:26:52 +00:00
Peter Van der Beken
210c536413 Bug 1912083 - Switch url argument to UTF8 string. r=jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D218947
2024-08-20 07:56:25 +00:00
Nika Layzell
454d9e08eb Bug 1881037 - Part 1: Stop showing unknown protocol error pages for web-triggered loads, r=smaug,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D217495
2024-08-15 10:19:49 +00:00
Henri Sivonen
52ee691148 Bug 1908759 - Don't use UTS 46 ToUnicode from nsDocShell::AttemptURIFixup. r=necko-reviewers,jesup,valentin
Differential Revision: https://phabricator.services.mozilla.com/D217009
2024-08-14 18:30:08 +00:00
Norisz Fay
66de804dac Backed out 3 changesets (bug 1881037) for causing mochitest failure on test_popup_unknown_protocol.html CLOSED TREE
Backed out changeset c948d8669436 (bug 1881037)
Backed out changeset 30866fb1a697 (bug 1881037)
Backed out changeset db0212e2c079 (bug 1881037)
2024-08-10 00:42:47 +03:00
Nika Layzell
4a09bbc478 Bug 1881037 - Part 1: Stop showing unknown protocol error pages for web-triggered loads, r=smaug,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D217495
2024-08-09 20:26:11 +00:00
Noemi Erli
0f7c979555 Backed out changeset 437beb1efdd2 (bug 1882670) for causing web platform failures CLOSED TREE 2024-08-08 00:58:01 +03:00
Sean Feng
e98d0bcded Bug 1882670 - Cancel the loading=lazy iframe when it's load via a different way r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D218143
2024-08-07 20:32:19 +00:00
Sean
17f89e2207 Bug 1890028 - Display Server Error message when server returns HTTP 500 and unusual content-type r=kershaw,fluent-reviewers,necko-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D216978
2024-08-07 13:31:02 +00:00
Emilio Cobos Álvarez
77c40caac6 Bug 1910698 - Remove nsIScriptError.sourceLine. r=smaug,devtools-reviewers,webdriver-reviewers,necko-reviewers,nchevobbe,kershaw,jdescottes,credential-management-reviewers,dimi
Afaict the source lines are not exposed anywhere in the UI.

Differential Revision: https://phabricator.services.mozilla.com/D218115
2024-08-01 17:12:48 +00:00
Nika Layzell
6e919ecc09 Bug 1907269 - Part 1: Allow pop-up windows to load external URIs for first load, r=Gijs
Previously this load would be allowed due to the "web-controlled" check
failing to reject the load. This patch instead bases it on the
docshell.newWindowTarget flag, which is set for the first load in a new
DocShell due to a call to window.open or target=_blank.

This required making the external protocol channel be a property bag so
that the flag can be set on the channel. In the future we may want to
switch this flag to being set in a more generic way which is less
specific to the channel.

Differential Revision: https://phabricator.services.mozilla.com/D217484
2024-07-31 20:34:54 +00:00
Sandor Molnar
84c538e41e Backed out 2 changesets (bug 1907269) for causing bc failures @ browser_ftp_protocol_handlers.js CLOSED TREE
Backed out changeset 3270496f12d8 (bug 1907269)
Backed out changeset 218c98804a83 (bug 1907269)
2024-07-30 02:16:42 +03:00
Nika Layzell
6ad52aa799 Bug 1907269 - Part 1: Allow pop-up windows to load external URIs for first load, r=Gijs
Previously this load would be allowed due to the "web-controlled" check
failing to reject the load. This patch instead bases it on the
docshell.newWindowTarget flag, which is set for the first load in a new
DocShell due to a call to window.open or target=_blank.

This required making the external protocol channel be a property bag so
that the flag can be set on the channel. In the future we may want to
switch this flag to being set in a more generic way which is less
specific to the channel.

Differential Revision: https://phabricator.services.mozilla.com/D217484
2024-07-29 22:15:43 +00:00
Henri Sivonen
7d94c50478 Bug 1753352 - Inherit principal into about:blank with query string. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D212093
2024-07-17 16:12:53 +00:00
Henri Sivonen
41b363d50d Bug 1889536 - Migrate IDNA handling to ICU4X. r=necko-reviewers,geckoview-reviewers,credential-management-reviewers,home-newtab-reviewers,valentin,owlish,dimi,thecount,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D206579
2024-07-09 11:26:43 +00:00
Tamas Szentpeteri
c1ca326517 Backed out 2 changesets (bug 1889536) for causing bpnu bustages on nsIDNService.cpp. CLOSED TREE
Backed out changeset 87d0e483dd8c (bug 1889536)
Backed out changeset c3d6429d8a59 (bug 1889536)
2024-07-09 14:08:25 +03:00