Commit Graph
1191 Commits
Author SHA1 Message Date
Vincent Hilla 206f82125f Bug 2045516 - Mark CreateAboutBlankDocumentViewer MOZ_CAN_RUN_SCRIPT. r=dom-core-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D305215
2026-06-09 15:28:58 +00:00
Daniel Holbert fbc22c18f3 Bug 2044510: Pass already_AddRefed types by-value instead of by rvalue reference, in docshell/. r=dom-core-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D304357
2026-06-05 21:06:33 +00:00
Mark Banner 35a52635ae Bug 2040720 - Change nsIURIFixupInfo to pass the search engine id rather than the name. r=farre,search-reviewers,firefox-desktop-core-reviewers ,urlbar-reviewers,mak,scunnane
Differential Revision: https://phabricator.services.mozilla.com/D301366
2026-05-26 17:26:07 +00:00
Andreas FarreandSimon Farre a78f50cee8 Bug 2031699 - Don't queue new history navigation synchronously when intercepting. r=dom-core,jjaschke,smaug
Make sure to synchronously start a history load when we intercept a history
traversal.

Co-authored-by: Simon Farre <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D294179
2026-05-20 18:15:04 +00:00
Andreas Farre 477bab48ed Bug 2024044 - Don't run #navigate-event-intercept-commit-handler-steps from document.open r=dom-core,jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D291687
2026-04-02 11:45:50 +00:00
Vincent Hilla 3dee5a386c Bug 1706538 - Don't mark non-initial top about:{blank,newtab} as transient. r=tabbrowser-reviewers,farre,sthompson
Other browsers and iframes already keep non-initial about:blank documents in
session history. This change extends that to top-level about:blank loads.

In addition, nsDocShell::ShouldAddToSessionHistory is removed.

When browser.newtabpage.enabled=false, newly opened tabs continue to have their
initial about:newtab session history entry marked as transient. The logic is
moved from nsDocShell to AboutNewTabParent.

Differential Revision: https://phabricator.services.mozilla.com/D284624
2026-03-24 11:35:52 +00:00
Adam Vandolder aff5c74581 Bug 1892551 - Part 9: Remove now unused LoadHistoryEntry overload. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D284724
2026-03-18 17:26:32 +00:00
Adam Vandolder 9f7121ab8c Bug 1892551 - Part 8: Remove now unnecessary nsDocShell::mSavingOldViewer. r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D256537
2026-03-18 17:26:30 +00:00
Adam Vandolder 387517ad2c Bug 1892551 - Part 5: Remove now-unnecessary usage of nsISHEntry. r=farre,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D210689
2026-03-18 17:26:22 +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
Andreas Farre c31ce474dc Bug 2020364 - Part 3: Check if ongoing navigation is NavigationID. r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D285988
2026-03-13 13:57:24 +00:00
Andreas Farre c3ca18d2ae Bug 1986879 - Implement #update-the-navigation-api-entries-for-reactivation. r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D263743
2026-03-05 13:17:51 +00:00
Sandor Molnar 0b3df449de Revert "Bug 2020364 - Part 4: Check if ongoing navigation is NavigationID. r=dom-core,smaug" for causing wpt failures.
This reverts commit 661e1afdb0.

Revert "Bug 2020364 - Part 3: Fix #commit-a-navigate-event. r=dom-core,smaug"

This reverts commit 545875b149.

Revert "Bug 2020364 - Part 2: Move NavigationWaitForAllScope. r=dom-core,smaug"

This reverts commit a4116b1cfb.

Revert "Bug 2020364 - Part 1: Rename method tracker to navigation tracker. r=dom-core,jjaschke"

This reverts commit 7e59786d3d.
2026-03-04 16:45:54 +00:00
Andreas Farre 545875b149 Bug 2020364 - Part 3: Fix #commit-a-navigate-event. r=dom-core,smaug
Move setting up the success and failure callbacks for when committing a
navigate event to after the committed promise is certain to have been
resolved. This works because all same document navigations will sooner
or later end up calling #update-the-navigation-api-entries-for-a-same-document-navigation.

Differential Revision: https://phabricator.services.mozilla.com/D285524
2026-03-04 14:13:28 +00:00
Andreas Farre 7e59786d3d Bug 2020364 - Part 1: Rename method tracker to navigation tracker. r=dom-core,jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D285523
2026-03-04 14:13:22 +00:00
Sandor Molnar db86d43b9c Revert "Bug 2020364 - Part 3: Fix #commit-a-navigate-event. r=dom-core,smaug" for causing assertion failures @ Navigation.cpp
This reverts commit 0a0404c0db.

Revert "Bug 2020364 - Part 2: Move NavigationWaitForAllScope. r=dom-core,smaug"

This reverts commit 83f1bc2194.

Revert "Bug 2020364 - Part 1: Rename method tracker to navigation tracker. r=dom-core,jjaschke"

This reverts commit 6e3656e6e2.
2026-03-04 11:45:02 +00:00
Andreas Farre 0a0404c0db Bug 2020364 - Part 3: Fix #commit-a-navigate-event. r=dom-core,smaug
Move setting up the success and failure callbacks for when committing a
navigate event to after the committed promise is certain to have been
resolved. This works because all same document navigations will sooner
or later end up calling #update-the-navigation-api-entries-for-a-same-document-navigation.

Differential Revision: https://phabricator.services.mozilla.com/D285524
2026-03-04 10:51:52 +00:00
Andreas Farre 6e3656e6e2 Bug 2020364 - Part 1: Rename method tracker to navigation tracker. r=dom-core,jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D285523
2026-03-04 10:51:46 +00:00
Vincent Hilla 54fe7c7be5 Bug 2009931 - Cleanup after BrowserChild::Init crash. r=nika,hsivonen
This commit removes the unsuccessful deferring of notifications around
BrowserChild::Init and  and narrows when we ignore a failure in
nsDocShell::Initialize.

Differential Revision: https://phabricator.services.mozilla.com/D279293
2026-01-29 14:38:19 +00:00
serge-sans-paille 9db08d3f52 Bug 2009953 - Do not use reserved identifiers for macro guard in identifiers r=emilio,geckoview-reviewers,media-playback-reviewers,devtools-reviewers,win-reviewers,ochameau,gstoll,keeler,mccr8,padenot,alwu,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D278766
2026-01-22 17:49:59 +00:00
pstanciu bc297a68a0 Revert "Bug 2009953 - Do not use reserved identifiers for macro guard in identifiers r=emilio,geckoview-reviewers,media-playback-reviewers,devtools-reviewers,win-reviewers,ochameau,gstoll,keeler,mccr8,padenot,alwu,m_kato" for causing build bustages @ CParserContext.h
This reverts commit afd052662d.
2026-01-21 16:23:10 +00:00
serge-sans-paille afd052662d Bug 2009953 - Do not use reserved identifiers for macro guard in identifiers r=emilio,geckoview-reviewers,media-playback-reviewers,devtools-reviewers,win-reviewers,ochameau,gstoll,keeler,mccr8,padenot,alwu,m_kato
Also remove security/manager/ssl/nsVerificationJob.h per request of
@keeler instead of changing its guard.

Differential Revision: https://phabricator.services.mozilla.com/D278766
2026-01-21 15:46:08 +00:00
Vincent Hilla fd219ed843 Bug 2007897 - Use normal load path when initial about:blank doesn't match remote type. r=hsivonen,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D277764
2026-01-05 14:34:27 +00:00
Atila Butkovits 4b85427200 Revert "Bug 2003759 - Add crash annotations for docshell initialization failure reasons. r=hsivonen,gsvelto" for causing bustages at nsWebBrowser.cpp.
This reverts commit 857dc0c7fe.
2025-12-16 14:00:50 +00:00
Vincent Hilla 857dc0c7fe Bug 2003759 - Add crash annotations for docshell initialization failure reasons. r=hsivonen,gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D276521
2025-12-16 11:25:51 +00:00
Vincent Hilla f5e10c041c Bug 2005094 - Don't fail assertion if docshell is broken after initialization. r=hsivonen,dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D275960
2025-12-12 11:42:22 +00:00
Atila Butkovits f43210f622 Revert "Bug 1986879 - Implement #update-the-navigation-api-entries-for-reactivation. r=smaug" for causing reftest failures.
This reverts commit 28759ec172.
2025-12-03 21:42:35 +00:00
Andreas Farre 28759ec172 Bug 1986879 - Implement #update-the-navigation-api-entries-for-reactivation. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D263743
2025-12-03 19:08:59 +00:00
Henri SivonenandVincent Hilla 39a8a4171b Bug 543435 - Make initial about:blank not get overwritten by an async about:blank load. r=sessionstore-reviewers,sfoster,timhuang,credential-management-reviewers,issammani,webidl,extension-reviewers,tabbrowser-reviewers,migration-reviewers,home-newtab-reviewers,hsivonen,cookie-reviewers,fxview-reviewers,firefox-desktop-core-reviewers ,dao,valentin,mossop,smaug,geckoview-reviewers,Jamie,mtigley,thecount,media-playback-reviewers,padenot,dom-worker-reviewers,jesup,jdescottes,asuth,robwu,karlt,profiler-reviewers,kpatenio,devtools-reviewers,tcampbell,nchevobbe
Co-authored-by: Vincent Hilla <[email protected]>
Signed-off-by: Vincent Hilla <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D155376
2025-11-24 05:34:22 +00:00
Simon Farre 4e44144ea2 Bug 1999663 - Fix restoration of scroll position r=dom-core,smaug
This patch updates the scroll position data of the "local" (i.e. not
SHIP/in parent process) navigation API entries at the right time and
removes restoring scroll position from mActiveEntry of nsDocShell and
instead uses the target history entry, i.e. the one we're navigating
towards and use that scroll that. This is technically spec compliant
since the active entry is supposed to be the target entry at that
moment.

SHIP still works as intended and is left unchanged by this patch.

Differential Revision: https://phabricator.services.mozilla.com/D272446
2025-11-18 16:18:03 +00:00
Emilio Cobos Álvarez 2daf495209 Bug 1997763 - Factor document viewer destruction into its own function. r=dom-core,smaug
No behavior change but noticed while looking / poking at this code for
bug 1994942.

Differential Revision: https://phabricator.services.mozilla.com/D270952
2025-11-03 13:43:27 +00:00
Andreas Farre 8c62080bf9 Bug 1995693 - Make sure NotifiedBeforeUnloadListeners is sent over IPC. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D269547
2025-10-22 10:53:24 +00:00
Jan-Niklas Jaeschke f1839c7ffa Bug 1995598 - Navigation API - Remove upcoming non-traverse API method tracker from the navigation object. r=smaug
Having this tracker as part of the navigation state led to
broken state when reentering a navigation by triggering
a new navigation from a `navigateerror` handler.

This patch removes the upcoming non-traverse API method tracker
from `Navigation` and passes it as argument, hereby following the spec.

Differential Revision: https://phabricator.services.mozilla.com/D269448
2025-10-22 09:14:29 +00:00
Benjamin VanderSloot 1f5d422cf8 Bug 1991135, part 1 - Add support for <meta name=rating> behind a pref - r=dom-core,firefox-desktop-core-reviewers ,fluent-reviewers,bolsson,smaug,frontend-codestyle-reviewers,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D266422
2025-10-17 16:58:37 +00:00
Keith Cirkel 451168ca30 Bug 1955947 - Part 2: Implement RestoreScrollPositionData r=farre,dom-core
This implements the basics of RestoreScrollPositionData.
It introduces the new method nsDocShell::RestoreScrollPosFromActiveSHE
which will set the scroll position to the position stored by the active
session history entry.

One could say this deviates slightly from the stated spec because the
spec suggests "HasBeenScrolledByUser" should be true/false if the "user"
has scrolled the document. This however, is a little ambiguous and
doesn't seem to correlate with behaviour from other browsers. Instead we
simply check if the scroll generation has changed since the navigation
event was fired.

It does not pass all scroll-behavior tests, as some rely on an unspecced
behaviour whereby the scroll restoration is deferred until the active
navigation interception promise has settled. We can resolve this in
another bug because this behaviour is not detailed in the spec.

Differential Revision: https://phabricator.services.mozilla.com/D266431
2025-10-03 12:28:09 +00:00
Jan-Niklas Jaeschke 02b345eb14 Bug 1959960, part 3 - Navigation API: Implement #performing-a-navigation-api-traversal. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D259215
2025-09-08 15:10:52 +00:00
Sandor Molnar 9769da1b4a Revert "Bug 1959960, part 4 - Navigation API: Update test expectations. r=farre" for causing bc failures
This reverts commit efa9033dd3.

Revert "Bug 1959960, part 3 - Navigation API: Implement #performing-a-navigation-api-traversal. r=smaug"

This reverts commit d6cb3b2867.

Revert "Bug 1959960, part 2 - Navigation API: Add log messages for navigation methods. r=farre"

This reverts commit 5b352fa6e0.

Revert "Bug 1959960, part 1 - Navigation API: Implement traversal methods. r=farre,dom-core,smaug"

This reverts commit f1667a9dd5.
2025-09-08 13:36:28 +00:00
Jan-Niklas Jaeschke d6cb3b2867 Bug 1959960, part 3 - Navigation API: Implement #performing-a-navigation-api-traversal. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D259215
2025-09-08 11:44:30 +00:00
Andreas Farre 66d0f29617 Bug 1959389 - Finish handling aborting/finishing navigations. r=jjaschke
Implement #inform-the-navigation-api-about-child-navigable-destruction.
Add the final calls to #set-the-ongoing-navigation and tweak some of the
existing ones to only happen during history traversals or only during
navigation.

Differential Revision: https://phabricator.services.mozilla.com/D262564
2025-08-27 07:43:27 +00:00
agoloman b5247f5ded Revert "Bug 1959389 - Finish handling aborting/finishing navigations. r=jjaschke" for causing test_load_history_entry.html.
This reverts commit 0ab5ef40be.
2025-08-26 14:46:28 +00:00
Andreas Farre 0ab5ef40be Bug 1959389 - Finish handling aborting/finishing navigations. r=jjaschke
Implement #inform-the-navigation-api-about-child-navigable-destruction.
Add the final calls to #set-the-ongoing-navigation and tweak some of the
existing ones to only happen during history traversals or only during
navigation.

Differential Revision: https://phabricator.services.mozilla.com/D262564
2025-08-26 13:34:32 +00:00
Emilio Cobos Álvarez 8cd79d0bd4 Bug 1977581 - Cleanup nsIBaseWindow::GetMainWidget usage. r=smaug
AppWindow::GetMainWidget() is just mWindow. Add a helper to simplify
GetMainWidget() usage and use it across the tree, simplifying users.

Differential Revision: https://phabricator.services.mozilla.com/D258744
2025-08-05 09:19:20 +00:00
Jan-Niklas Jaeschke be58e08268 Bug 1959961, part 3 - Navigation API: Add flag to nsDocShell::Stop() whether to unset the ongoing navigation. r=farre,dom-core
`nsDocShell::Stop()` is called in `nsDocShell::InternalLoad()`, and would abort
ongoing navigations. Adding this flag to that specific call site
prevents this and keeps the intended behavior.

Differential Revision: https://phabricator.services.mozilla.com/D255144
2025-07-22 12:59:15 +00:00
Fatih Kilic eed44c4862 Bug 1968607 - Part 1: Replace CSP with PolicyContainer. r=tschuster,webidl,smaug
We are making changes to many files. Very huge chunk of the changes are just renaming CSP -> PolicyContainer. Part 1 and part 2 are solely separated as frontend and backend. The unfortunate thing is, I mistakenly placed IDL changes in part 1, and many of those IDL changes affect frontend code too. I'm sorry for this inconvinience and hard to review patch(es).

(FWIW before this rewrite we had another patch stack. It is 25 patches and I believe isn't as comprehensive as this one. It also didn't replace CSP's inheritance but was copied alongside with CSP, but we decided to change our method and make policy conttainer contain CSP and copy it around after some discussion and reviews)

Differential Revision: https://phabricator.services.mozilla.com/D249248
2025-07-11 05:39:17 +00:00
Tim Huang b31768b095 Bug 1970169 - Stop commit partitionedPrincipal when doing SessionHistoryCommit. r=smaug,necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D255761
2025-07-08 09:01:15 +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
Frédéric Wang be953ead58 Bug 1915629 - Implement Trusted Types support for the "pre-navigation check". r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D243819
2025-07-02 09:57:26 +00:00