170 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 3942e62d83 Bug 2042995: Use MakeRefPtr to do allocation for various RefPtr variables in docshell/. r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D302911
2026-05-28 16:08:18 +00:00
Maurice Dauer 8f4d580c70 Bug 2017220 - Improve cross-process framebusting checks, r=sfarre,maltejur
When a sandboxed iframe with "allow-top-navigation" attempts to navigate
the top-level, we must verify that the parent is permitted to do so. To
make this check reliable across processes, this patch introduces a new
flag that is propagated cross-process.

Differential Revision: https://phabricator.services.mozilla.com/D286658
2026-04-30 17:40:53 +00:00
Silaghi 8ee59513d7 Revert "Bug 2017220 - Improve cross-process framebusting checks, r=sfarre,maltejur" for causing bc failures at browser/components/urlbar
This reverts commit 13a448ae48.
2026-04-29 15:30:51 +00:00
Maurice Dauer 13a448ae48 Bug 2017220 - Improve cross-process framebusting checks, r=sfarre,maltejur
When a sandboxed iframe with "allow-top-navigation" attempts to navigate
the top-level, we must verify that the parent is permitted to do so. To
make this check reliable across processes, this patch introduces a new
flag that is propagated cross-process.

Differential Revision: https://phabricator.services.mozilla.com/D286658
2026-04-29 13:36:43 +00:00
Adam Vandolder 18113ecfd2 Bug 1892551 - Part 6: Remove now-unused attributes and methods from nsISHEntry. r=farre,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D212463
2026-03-18 17:26:25 +00:00
Adam Vandolder dd7184fd48 Bug 1892551 - Part 2: Remove SessionHistoryInParent conditionals. r=dom-core,farre,core-sessionstore-reviewers,devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D208061
2026-03-18 17:26:15 +00:00
Sylvestre Ledru fac1dea193 Bug 2023419 - Remove Emacs/Vim modelines from docshell/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287842
2026-03-16 21:02:22 +00:00
Malte Jürgens 591e48d384 Bug 2001668 - Make framebusting pref independent of pop-up blocking r=mdauer
Previously, "dom.security.framebusting_intervention.enabled" would only have an
effect with "dom.disable_open_during_load" enabled. This change makes these two
prefs independent.

Differential Revision: https://phabricator.services.mozilla.com/D273602
2026-03-12 14:38:07 +00:00
Vincent Hilla 9e16f5ae74 Bug 2008334 - Add BrowsingContext::GetOpenedDocumentPiPWindow utility. r=edgar,dom-core
While this isn't needed anymore with the current approach for bug 2008334,
it is still a good refactoring for the Document PiP code.

Differential Revision: https://phabricator.services.mozilla.com/D278261
2026-02-27 08:30:17 +00:00
Cristina Horotan d708afb786 Revert "Bug 2008334 - Don't throttle opener of Document PiP windows. r=edgar,layout-reviewers,dom-core,emilio" for causing bc failures on CanonicalBrowsingContext.cpp
This reverts commit 432e3f0c0a.

Revert "Bug 2008334 - Refactor: Introduce BrowsingContext::ActivenessChanged. r=edgar,dom-core,devtools-reviewers,ochameau"

This reverts commit 1036655edd.

Revert "Bug 2008334 - Add BrowsingContext::GetOpenedDocumentPiPWindow utility. r=edgar,dom-core"

This reverts commit 13f93ceeb1.
2026-02-25 20:50:24 +00:00
Vincent Hilla 13f93ceeb1 Bug 2008334 - Add BrowsingContext::GetOpenedDocumentPiPWindow utility. r=edgar,dom-core
While this isn't needed anymore with the current approach for bug 2008334,
it is still a good refactoring for the Document PiP code.

Differential Revision: https://phabricator.services.mozilla.com/D278261
2026-02-25 17:14:00 +00:00
Serban Stanca 9c58a6658c Revert "Bug 2008334 - Don't throttle opener of Document PiP windows. r=edgar,layout-reviewers,dom-core,emilio" for causing mochitests failures in CanonicalBrowsingContext.cpp.
This reverts commit 76865b559b.

This reverts commit 6f66289aec.

This reverts commit 5feb858ba4.
2026-02-25 12:26:26 +00:00
Vincent Hilla 5feb858ba4 Bug 2008334 - Add BrowsingContext::GetOpenedDocumentPiPWindow utility. r=edgar,dom-core
While this isn't needed anymore with the current approach for bug 2008334,
it is still a good refactoring for the Document PiP code.

Differential Revision: https://phabricator.services.mozilla.com/D278261
2026-02-25 10:48:31 +00:00
Nika Layzell d21f78c4f0 Bug 2008912 - New checks for synced contexts, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D278703
2026-01-15 19:00:55 +00:00
Sandor Molnar 769826e386 Revert "Bug 2008912 - New checks for synced contexts, r=smaug" for causing build bustages @ BrowsingContextGroup.cpp
This reverts commit 690933d7cd.
2026-01-14 23:49:00 +00:00
Nika Layzell 690933d7cd Bug 2008912 - New checks for synced contexts, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D278703
2026-01-14 23:09:26 +00:00
Vincent Hilla 1d7618633a Bug 1858562 - Part 1: Implement Document Picture-in-Picture Spec. r=edgar,smaug,dom-core,webidl,firefox-style-system-reviewers,layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D265290
2025-12-16 19:10:04 +00:00
Nika Layzell ca58979a61 Bug 1754009 - Remove IPDLParamTraits, r=ipc-reviewers,necko-reviewers,media-playback-reviewers,profiler-reviewers,core-sessionstore-reviewers,ahale,mccr8,valentin,canaltinova,farre,karlt
4 years ago, we removed the need to have the separate IPDLParamTraits
type, but we never got around to fully removing it. This patch rips out
the remains of IPDLParamTraits.

Differential Revision: https://phabricator.services.mozilla.com/D266719
2025-10-29 19:09:03 +00:00
Manuel Bucher ede104feef Bug 1992207 - Storage-Access-Headers: Remove unnecessary wc->SetUsingStorageAccess r=timhuang
Just setting the loadInfo introduced in Bug 1991888 is enough.
Not setting the bit is good for performance due to sending less data
over IPC.

Differential Revision: https://phabricator.services.mozilla.com/D269730
2025-10-29 14:29:58 +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
Olli Pettay 39952d088a Bug 1964065, ConsumeTransientUserGestureActivation should return early if the window context isn't current, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D267006
2025-10-01 15:25:22 +00:00
Manuel Bucher a98e2bff4e Bug 1968725 - Storage-Access-Headers: Parse Activate-Storage-Access Response header r=necko-reviewers,timhuang,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D262560
2025-09-24 10:07:21 +00:00
Norisz Fay 11bb1c0995 Revert "Bug 1968725 - Storage-Access-Headers: Parse Activate-Storage-Access Response header r=necko-reviewers,timhuang,kershaw" for causing bustage @ AntiTrackingUtils.cpp
This reverts commit a52399f94f.
2025-09-23 23:34:28 +00:00
Manuel Bucher a52399f94f Bug 1968725 - Storage-Access-Headers: Parse Activate-Storage-Access Response header r=necko-reviewers,timhuang,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D262560
2025-09-23 22:30:17 +00:00
Andreas Farre a9dce94db8 Bug 1983546 - Fire the navigate event correctly for history navigations. r=jjaschke
In the same manner as with beforeunload we track when we need to fire a
traverse navigate event for the top level window context. This is
required when: any event handlers are registered on the window's
navigation object or when there are any ongoing or upcoming method
trackers associated with a window's navigation object.

Also make sure to not fire a push/replace/reload navigate event when
only a traverse navigate event should be fired.

Differential Revision: https://phabricator.services.mozilla.com/D261408
2025-08-18 17:00:43 +00:00
[email protected] f786957865 Bug 1960822 - WorkerScope: Implement missing HasActivePeerConnections(), r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D245688
2025-07-08 00:09:38 +00:00
Andreas Farre 7cb502cd86 Bug 1965192 - Fire traverse navigation event. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D255834
2025-07-07 18:28:03 +00:00
Atila Butkovits a452d0c595 Revert "Bug 1965192 - Fire traverse navigation event. r=smaug" for causing failures at browser_bug1415918_beforeunload_options.js.
This reverts commit 0252f8d0c6.
2025-07-04 13:10:04 +00:00
Andreas Farre 0252f8d0c6 Bug 1965192 - Fire traverse navigation event. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D255834
2025-07-04 11:11:10 +00:00
Keith Cirkel 5eeff4c3fa Bug 1966738 - Part 3: Allow UI to process a Close Request r=reusable-components-reviewers,mstriemer
This new IPDL API allows processes to communicate to the Window that it
should process a Close Watcher close request, independent of the
browser controlled gestures such as the Esc key. This will allow the
browser UI to provide a button that can process a close request.

Differential Revision: https://phabricator.services.mozilla.com/D254530
2025-06-26 16:17:37 +00:00
Sandor Molnar 7852a992dc Revert "Bug 1966738 - Part 3: Allow UI to process a Close Request r=reusable-components-reviewers,mstriemer" for causing lint failure @ page_with_closewatcher.html
This reverts commit 9c2f9c2c3a.

Revert "Bug 1966738 - Part 2: Expose if there is an active CloseWatcher to the UI r=reusable-components-reviewers,mstriemer"

This reverts commit dfb2271f47.
2025-06-26 11:00:00 +00:00
Keith Cirkel 9c2f9c2c3a Bug 1966738 - Part 3: Allow UI to process a Close Request r=reusable-components-reviewers,mstriemer
This new IPDL API allows processes to communicate to the Window that it
should process a Close Watcher close request, independent of the
browser controlled gestures such as the Esc key. This will allow the
browser UI to provide a button that can process a close request.

Differential Revision: https://phabricator.services.mozilla.com/D254530
2025-06-26 10:32:35 +00:00
Keith Cirkel a023f401f8 Bug 1947188 - Update "Last History Activation" across all documents r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D246234
2025-05-12 17:10:49 +00:00
Cristina Horotan 88a5aa3f07 Merge autoland to mozilla-central a=merge 2025-04-17 07:10:50 +03:00
Keith Cirkel f583e68c6e Bug 1960938 - rename mUserGestureStart to mLastActivationTimestamp & add comments r=dom-core,jjaschke
This brings our implementation closer to the verbage in the spec, which
changed user gesture start to last activation timestamp.

This also adds comments to various parts of WindowContext which interact
with mLastActivationTimestamp nee mUserGestureStart, pointing to the
various parts of the spec which describe this functionality, making it
easier to follow (and giving us SpecMonkey references).

Differential Revision: https://phabricator.services.mozilla.com/D245758
2025-04-16 15:45:55 +00:00
Malte Jürgens e5437e476c Bug 1909681 - Remove mixed content exception button and permission r=freddyb,devtools-reviewers,nchevobbe
Rationale on this can be found in Bug 1909681.

Differential Revision: https://phabricator.services.mozilla.com/D237065
2025-04-08 12:53:40 +00:00
Andreas Farre e6dd45c1ae Bug 1948254 - Part 4: Implement #navigate-event-firing. r=webidl,smaug,jjaschke
This includes:

* #fire-a-traverse-navigate-event
* #fire-a-push/replace/reload-navigate-event
* #fire-a-download-request-navigate-event

which are all implemented in terms of #inner-navigate-event-firing-algorithm.

Actually calling any of the above is only added for History.pushState and
History.replaceState using #fire-a-push/replace/reload-navigate-event.

Differential Revision: https://phabricator.services.mozilla.com/D238786
2025-03-19 13:23:26 +00:00
Alexandru Marc 63b7a8e91a Backed out 4 changesets (bug 1948254) for causing hazard bustages @ Navigation.cpp CLOSED TREE
Backed out changeset 98ba043125fe (bug 1948254)
Backed out changeset 7061817d6823 (bug 1948254)
Backed out changeset 763b0331c48b (bug 1948254)
Backed out changeset de134481ec47 (bug 1948254)
2025-03-18 23:48:09 +02:00
Andreas Farre a3594f5aec Bug 1948254 - Part 4: Implement #navigate-event-firing. r=webidl,smaug,jjaschke
This includes:

* #fire-a-traverse-navigate-event
* #fire-a-push/replace/reload-navigate-event
* #fire-a-download-request-navigate-event

which are all implemented in terms of #inner-navigate-event-firing-algorithm.

Actually calling any of the above is only added for History.pushState and
History.replaceState using #fire-a-push/replace/reload-navigate-event.

Differential Revision: https://phabricator.services.mozilla.com/D238786
2025-03-18 16:24:26 +00:00
Sandor Molnar bfaffc7de8 Backed out 4 changesets (bug 1948254) for causing wpt & hazard failures @ Navigation.cpp / NavigateEvent CLOSED TREE
Backed out changeset f5ad49e89bc3 (bug 1948254)
Backed out changeset 640382d73264 (bug 1948254)
Backed out changeset a79c8bef5dc3 (bug 1948254)
Backed out changeset 4a26e79ce32e (bug 1948254)
2025-03-18 12:12:29 +02:00
Andreas Farre f28fb7a59e Bug 1948254 - Part 4: Implement #navigate-event-firing. r=webidl,smaug
This includes:

* #fire-a-traverse-navigate-event
* #fire-a-push/replace/reload-navigate-event
* #fire-a-download-request-navigate-event

which are all implemented in terms of #inner-navigate-event-firing-algorithm.

Actually calling any of the above is only added for History.pushState and
History.replaceState using #fire-a-push/replace/reload-navigate-event.

Differential Revision: https://phabricator.services.mozilla.com/D238786
2025-03-18 08:17:44 +00:00
Norisz Fay 24465cfc3a Backed out 4 changesets (bug 1948254) for causing failure on idlharness.https.html CLOSED TREE
Backed out changeset 545c51e30bd9 (bug 1948254)
Backed out changeset 403e2c469af4 (bug 1948254)
Backed out changeset 05bbdc23154a (bug 1948254)
Backed out changeset 1f3acb6cf9cd (bug 1948254)
2025-03-17 22:15:33 +02:00
Andreas Farre affa2a2beb Bug 1948254 - Part 4: Implement #navigate-event-firing. r=webidl,smaug
This includes:

* #fire-a-traverse-navigate-event
* #fire-a-push/replace/reload-navigate-event
* #fire-a-download-request-navigate-event

which are all implemented in terms of #inner-navigate-event-firing-algorithm.

Actually calling any of the above is only added for History.pushState and
History.replaceState using #fire-a-push/replace/reload-navigate-event.

Differential Revision: https://phabricator.services.mozilla.com/D238786
2025-03-17 16:28:56 +00:00