Commit Graph
598 Commits
Author SHA1 Message Date
Masayuki Nakano 6388e58841 Bug 2044523 - Make nsPIDOMWindow.h stop including nsPIDOMWindowInlines.h r=dom-core-reviewers,geckoview-reviewers,media-playback-reviewers,webrtc-reviewers,win-reviewers,layout-reviewers,manuel,aosmond,smaug,bwc,gstoll,dholbert,farre,m_kato
This patch does not make some header files stop including the inline
header because fixing them require more changes.

Note that `#include "nsComponentManagerUtils.h"` is fixing a bustage
caused by "use of undeclared identifier 'do_CreateInstance'" error.

Differential Revision: https://phabricator.services.mozilla.com/D304432
2026-06-09 03:49:55 +00:00
Daniel Holbert a7933c4ecf Bug 2043105: Use MakeRefPtr to do allocation for various RefPtr variables in uriloader/. r=dom-core,smaug
While we're at it, remove some unnecessary null-checks after infallible
allocation.

Differential Revision: https://phabricator.services.mozilla.com/D302958
2026-05-28 16:43:27 +00:00
Sylvestre Ledru cebe122a67 Bug 2023419 - Remove Emacs/Vim modelines from uriloader/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287876
2026-03-16 17:21:21 +00:00
Vincent Hilla 407a6239f5 Bug 2020300 - Force sync about:blank despite Document::mOnloadBlockCount. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D285563
2026-03-04 16:58:20 +00:00
Nika Layzell 47624d281a Bug 2016521 - Part 9: Stop using PLDHashTable in nsDocLoader, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D283159
2026-02-18 02:14:04 +00:00
Vincent Hilla a0930ea839 Bug 2004132 - Don't assert hasActiveLoad as flushing can clear mDocumentRequest. r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D280418
2026-01-26 21:47:19 +00:00
Vincent Hilla e1d22ea27f Bug 2003255 - Force sync about:blank despite busy DocLoader. r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D274763
2025-12-03 23:21:55 +00:00
serge-sans-paille 7662b3abdc Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 19:36:01 +00:00
Cristina Horotan 8a1b1970b7 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing Gtest failures on AlreadyAddRefed.h
This reverts commit e98adca292.
2025-10-21 16:16:29 +00:00
serge-sans-paille e98adca292 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 15:05:17 +00:00
Cristina Horotan aab924e90d Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing build bustage at nsBrowserApp.cpp
This reverts commit fd0ffa193c.
2025-10-21 10:44:13 +00:00
serge-sans-paille fd0ffa193c Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 09:44:11 +00:00
Narcis Beleuzu e1e6bbb1c9 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing bustages on Document.cpp
This reverts commit b23c15e927.
2025-10-21 06:34:58 +00:00
serge-sans-paille b23c15e927 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 06:01:36 +00:00
Valentin Gosu 54d985a57c Bug 1986649 - DocumentLoadListener::OnStatus does not format the status string r=necko-reviewers,smaug,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D263543
2025-09-22 07:41:26 +00:00
Edgar Chen 2d823a05aa Bug 1978709 – Fix issue where load event might fire unexpectedly when loading a JavaScript URI; r=smaug
The issue occurs when a JavaScript URI is being loaded while image loads are also
triggered at the same time. If images finish loading before the Javascript URI
completes execution, e.g. requested images are avaiable in image cache or a
synchronous XHR is spining the event loop, the load event might be fired unexpectedly.
This is primarily because the Javascript URI loading is tracked as a state in DocLoader
whenever a Javascript URI load is triggered even if the load event should not fired.
So when image load complete, DocLoader erroneously determines to fire load event
due to document is in Javascript URI loading state.

Differential Revision: https://phabricator.services.mozilla.com/D260780
2025-09-09 15:09:54 +00:00
Narcis Beleuzu a5aeeac6b1 Revert "Bug 1986649 - DocumentLoadListener::OnStatus does not format the status string r=necko-reviewers,smaug,kershaw" for causing bc failures on browser_preferences_usage.js
This reverts commit 253d904c5e.
2025-09-09 14:06:07 +00:00
Valentin Gosu 253d904c5e Bug 1986649 - DocumentLoadListener::OnStatus does not format the status string r=necko-reviewers,smaug,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D263543
2025-09-09 10:32:46 +00:00
Julian Descottes f2c35072a5 Bug 1963189 - Forward WebProgress events directly from nsDocShell to BrowsingContextWebProgress, r=smaug,webdriver-reviewers,extension-reviewers,robwu,jdescottes
Prior to this change, all web progress events fired by nsDocLoader
were bubbled to the toplevel in-process nsDocShell instance, then
captured by web progress listener. This listener would filter the
notifications (using nsBrowserStatusFilter), then send them either
directly to the BrowsingContextWebProgress, or via. PBrowser to the
BrowsingContextWebProgress.

Unfortunately, these events are modified as they are bubbled (e.g.
changing the progress flags to remove STATE_IS_NETWORK), which combined
with the filtering from nsBrowserStatusFilter led to some strange
behaviour in the notifications.

This change skips the in-content bubbling by directly propagating events
from the nsDocShell they were fired on to the corresponding
BrowsingContextWebProgress, and then performing the bubbling within the
parent process.

The one major exception to this is OnProgressChange, which relies on
nsDocLoader's handling on aCurTotalProgress and aMaxTotalProgress.
Because of that, these listeners continue to capture progress
notifications exclusively on the toplevel BrowsingContext, and do not
handle out-of-process iframes.

Differential Revision: https://phabricator.services.mozilla.com/D249651
2025-05-29 21:43:41 +00:00
Serban Stanca 5d41f6ffd5 Revert "Bug 1963189 - Forward WebProgress events directly from nsDocShell to BrowsingContextWebProgress, r=smaug,webdriver-reviewers,extension-reviewers,robwu,jdescottes" for causing webdriver failures in navigation_failed.py.
This reverts commit a6f912be7b.
2025-05-28 20:14:53 +00:00
Julian Descottes a6f912be7b Bug 1963189 - Forward WebProgress events directly from nsDocShell to BrowsingContextWebProgress, r=smaug,webdriver-reviewers,extension-reviewers,robwu,jdescottes
Prior to this change, all web progress events fired by nsDocLoader
were bubbled to the toplevel in-process nsDocShell instance, then
captured by web progress listener. This listener would filter the
notifications (using nsBrowserStatusFilter), then send them either
directly to the BrowsingContextWebProgress, or via. PBrowser to the
BrowsingContextWebProgress.

Unfortunately, these events are modified as they are bubbled (e.g.
changing the progress flags to remove STATE_IS_NETWORK), which combined
with the filtering from nsBrowserStatusFilter led to some strange
behaviour in the notifications.

This change skips the in-content bubbling by directly propagating events
from the nsDocShell they were fired on to the corresponding
BrowsingContextWebProgress, and then performing the bubbling within the
parent process.

The one major exception to this is OnProgressChange, which relies on
nsDocLoader's handling on aCurTotalProgress and aMaxTotalProgress.
Because of that, these listeners continue to capture progress
notifications exclusively on the toplevel BrowsingContext, and do not
handle out-of-process iframes.

Differential Revision: https://phabricator.services.mozilla.com/D249651
2025-05-28 18:01:24 +00:00
Edgar Chen 6ed58833fc Bug 1934092 - Fire load event for javascript URIs with non-string evaluation results; r=smaug
https://github.com/whatwg/html/issues/1895

Differential Revision: https://phabricator.services.mozilla.com/D244416
2025-05-02 12:30:32 +00:00
Manuel Bucher 860cec0ea7 Bug 1733498 - Migrate necko errors l10n strings from properties to Fluent r=necko-reviewers,valentin,flod
Differential Revision: https://phabricator.services.mozilla.com/D136612
2024-11-04 16:58:29 +00:00
Alexandru Marc 08119fcd9e Backed out 2 changesets (bug 1733498) for causing perma Localised repacks build bustages a=backout
Backed out changeset 2b0ab2780b86 (bug 1733498)
Backed out changeset 520270bde3eb (bug 1733498)
2024-11-01 11:37:29 +02:00
Manuel Bucher c519547743 Bug 1733498 - Migrate necko errors l10n strings from properties to Fluent r=necko-reviewers,valentin,flod
Differential Revision: https://phabricator.services.mozilla.com/D136612
2024-10-31 17:53:03 +00:00
Noemi Erli e877385275 Backed out 1 changesets (bug 1733498) for causing failures in browser_necko_l10n.js CLOSED TREE
Backed out changeset 005a00fa3096 (bug 1733498)
2024-10-30 23:57:31 +02:00
Manuel Bucher bc3fd99ef2 Bug 1733498 - Migrate necko errors l10n strings from properties to Fluent r=necko-reviewers,valentin,flod
Differential Revision: https://phabricator.services.mozilla.com/D136612
2024-10-30 20:38:41 +00:00
Stanca Serban 7a1ef5463b Backed out 2 changesets (bug 1733498) for causing mochitests failures.
Backed out changeset 27bdb3f9ad81 (bug 1733498)
Backed out changeset a0a8e9643810 (bug 1733498)
2024-10-28 19:54:02 +02:00
Manuel Bucher 34fde8cb17 Bug 1733498 - Migrate necko errors l10n strings from properties to Fluent r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D136612
2024-10-28 16:25:01 +00:00
Alexandru Marc feb645975e Backed out changeset 0643ca11931d (bug 1733498) for causing multiple failures. 2024-10-28 17:32:42 +02:00
Manuel Bucher 620c683cf5 Bug 1733498 - Migrate necko errors l10n strings from properties to Fluent r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D136612
2024-10-28 14:34:04 +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 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
Emilio Cobos Álvarez 610e57d843 Bug 1873967 - Remove DocGroup::TryToLoadIframesInBackground. r=sefeng
This is somewhat complex, untested, never shipped, and predates
fission.

Remove it to simplify the code.

Depends on D198183

Differential Revision: https://phabricator.services.mozilla.com/D198184
2024-01-10 22:33:17 +00:00
Nika Layzell 38d90f11db Bug 1873294 - Clean up logic for firing cross-process load events, r=smaug
Previously it may have been possible in some edge cases for us to send
`MaybeFireEmbedderLoadEvents` for a non-toplevel frame during docshell
tree teardown.

Differential Revision: https://phabricator.services.mozilla.com/D197825
2024-01-08 19:30:59 +00:00
Emilio Cobos Álvarez d02e297b2d Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu
Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.

I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).

Differential Revision: https://phabricator.services.mozilla.com/D190450
2023-10-10 08:51:12 +00:00
Markus Stange a4e2816d54 Bug 1843484 - Use EventTarget* instead of nsISupports* for the event target parameter of the EventDispatcher::Dispatch methods. r=smaug
This saves a few QueryInterface calls on the hot path.

Differential Revision: https://phabricator.services.mozilla.com/D186977
2023-08-28 23:38:43 +00:00
Peter Van der Beken c10814e75a Bug 1846277 - Remove nsGlobalWindow.h. r=dom-core,necko-reviewers,jesup,farre
Differential Revision: https://phabricator.services.mozilla.com/D184973
2023-08-02 20:41:48 +00:00
Kershaw Chang bd7389a309 Bug 1760580 - P2: Provide a reason when request is cancelled with NS_BINDING_ABORTED, r=necko-reviewers,media-playback-reviewers,valentin,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D156071
2022-09-08 09:11:19 +00:00
Olli Pettay 0072c0e2fe Bug 1752413, add nsIWebProgress.documentRequest to let one to access the request for the document, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D137212
2022-02-01 15:46:32 +00:00
Kagami Sascha Rosylight a822b59742 Bug 1539884 - Part 33: Mark nsDocLoader::DocLoaderIsEmpty as CAN_RUN_SCRIPT r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D134416
2021-12-23 16:27:25 +00:00
Peter Van der Beken e3ef4b903e Bug 1744397 - Simplify refresh code: pass around delay as an unsigned int. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D132863
2021-12-16 22:27:08 +00:00
Norisz Fay d281685db4 Backed out 5 changesets (bug 1742865, bug 1744397) for causing wpt failures on attr-meta-http-equiv-refresh/parsing.html CLOSED TREE
Backed out changeset 7b01edc5a0e0 (bug 1744397)
Backed out changeset 41abd4b7d2c0 (bug 1744397)
Backed out changeset 634641e3a05a (bug 1744397)
Backed out changeset 6e7755177481 (bug 1744397)
Backed out changeset e9fc94b33da9 (bug 1742865)
2021-12-14 13:25:58 +02:00
Peter Van der Beken d15e0b1095 Bug 1744397 - Simplify refresh code: pass around delay as an unsigned int. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D132863
2021-12-14 10:14:00 +00:00
Peter Van der Beken 44fed2b80b Bug 1706347 - Check mOOPChildrenLoading when deciding to put page in BFCache with Fission enabled. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D117199
2021-08-16 09:08:33 +00:00
Sebastian Hengst 46af0b14b5 Backed out changeset f912045db98d (bug 1706347) for causing content crashes (bug 1725558). a=backout DONTBUILD 2021-08-13 11:19:42 +02:00
Peter Van der Beken 1cea2f0150 Bug 1706347 - Check mOOPChildrenLoading when deciding to put page in BFCache with Fission enabled. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D117199
2021-08-12 14:11:29 +00:00
Csoregi Natalia 3dc6e87585 Backed out changeset b6399ca8a2c1 (bug 1706347) for failures on iframe-cross-origin-print.sub.html. CLOSED TREE 2021-07-20 00:41:23 +03:00