gecko-dev/docshell/base
Jan-Niklas Jaeschke 8726853107 Bug 1895555 - Text Fragments: Implement same-document navigation. r=farre,dom-core
Same-document navigation follows a different code path than normal navigation
and was therefore not covered in the initial implementation for text fragments.
Same-document navigation does not set a URI in the `Document`, which
is the way cross-document navigation would parse text directives from the URL.

Instead, `nsDocShell::ScrollToAnchor()` is called via
`nsDocShell::InternalLoad()`-> `nsDocShell::HandleSameDocumentNavigation()`.
This code path needs to parse and remove the fragment directive from the new
fragment to be able to find text fragments and to allow for element-id fallback.
`nsDocShell::ScrollToAnchor()` needs to start an attempt to scroll to the text fragment
if it exists. It must not, however, clear the uninvoked text directives,  because a
same-document navigation could happen before the document is fully loaded,
hence the target text might not be part of the DOM tree.

As per spec, a second attempt to scroll to the text fragment is done after the load
is completed. This is done by `Document::ScrollToRef()`, which is called by
`nsDocumentViewer::LoadComplete()` after the load has finished.
This call will clear the uninvoked directives.

Differential Revision: https://phabricator.services.mozilla.com/D209726
2024-05-17 12:16:00 +00:00
..
crashtests Bug 1864255. Make sure some crashtests in dom/ cleanup any opened windows after they finish. r=dom-core,peterv 2023-11-17 01:31:21 +00:00
BaseHistory.cpp Bug 130327: Use exposable URL when updating history r=mak 2024-03-07 05:11:51 +00:00
BaseHistory.h
BrowsingContext.cpp Bug 1831092 - Use the new pull-based API for all crash annotations and remove the global annotations table r=jgilbert,necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,padenot,handyman,afranchuk,valentin,alwu,sotaro 2024-03-04 10:24:43 +00:00
BrowsingContext.h Bug 1875100 - Propagate top level activeness automatically to top descendants. r=nika,tabbrowser-reviewers,mconley,extension-reviewers,robwu,geckoview-reviewers,owlish,kaya 2024-02-07 10:58:15 +00:00
BrowsingContextGroup.cpp Bug 1877242 - Avoid some unnecessary refcounting churn when accessing parent-cross-chrome-boundary. r=nika 2024-01-30 23:24:43 +00:00
BrowsingContextGroup.h Bug 1840762 - Don't throttle postMessage for pdf.js. r=smaug 2024-01-17 21:49:34 +00:00
BrowsingContextWebProgress.cpp Bug 1848406 - Detect stateful bounces for window associated storages. r=bvandersloot,asuth 2024-04-17 20:29:04 +00:00
BrowsingContextWebProgress.h
CanonicalBrowsingContext.cpp Bug 1677190 - Introduce SessionStoreFunctions for GeckoView package and move the existing SessionStoreFunctions from toolkit to the browser package. r=geckoview-reviewers,farre,nika,owlish 2024-04-30 11:17:55 +00:00
CanonicalBrowsingContext.h Bug 1875481 - Part 3: Add content analysis support to printing operations r=handyman,spohl,fluent-reviewers,kpatenio,smaug,emilio 2024-04-10 00:15:47 +00:00
ChildProcessChannelListener.cpp
ChildProcessChannelListener.h
IHistory.h Bug 1858894 - Hide http history entries that were upgraded to https r=places-reviewers,freddyb,mak 2023-11-20 09:27:57 +00:00
LoadContext.cpp
LoadContext.h
metrics.yaml Bug 1877842 - Migrate performance GVST probes r=perry.mcmanis,denispal 2024-02-09 21:11:05 +00:00
moz.build Bug 1865480. Rename nsIContentViewer to nsIDocumentViewer. r=layout-reviewers,emilio 2023-11-21 12:45:59 +00:00
nsAboutRedirector.cpp Bug 1882422: Use a local testing page to return complex data and make use of it in C++-land r=peterv 2024-04-03 23:43:17 +00:00
nsAboutRedirector.h
nsCTooltipTextProvider.h
nsDocShell.cpp Bug 1895555 - Text Fragments: Implement same-document navigation. r=farre,dom-core 2024-05-17 12:16:00 +00:00
nsDocShell.h Bug 1888242 - Simplify viewport handling in RDM. r=bradwerth,devtools-reviewers,ochameau 2024-04-02 15:21:04 +00:00
nsDocShellEditorData.cpp
nsDocShellEditorData.h
nsDocShellEnumerator.cpp
nsDocShellEnumerator.h
nsDocShellLoadState.cpp Bug 1885598: Assert on a passed remoteTypeOverride to avoid footguns r=nika 2024-03-25 18:57:07 +00:00
nsDocShellLoadState.h Bug 1885598: Assert on a passed remoteTypeOverride to avoid footguns r=nika 2024-03-25 18:57:07 +00:00
nsDocShellLoadTypes.h
nsDocShellTelemetryUtils.cpp Bug 1793560 - Remove navigate-to CSP directive r=tschuster 2024-01-03 16:43:12 +00:00
nsDocShellTelemetryUtils.h
nsDocShellTreeOwner.cpp Bug 1895229 - Remove nsIWebBrowserChromeFocus. r=hsivonen,dom-core 2024-05-06 11:30:34 +00:00
nsDocShellTreeOwner.h
nsDSURIContentListener.cpp Bug 1865918 p3. Update CreateContentViewer to reflect nsIDocumentViewer's new name. r=emilio 2023-11-22 13:50:57 +00:00
nsDSURIContentListener.h
nsIDocShell.idl Bug 1895229 - Remove nsIWebBrowserChromeFocus. r=hsivonen,dom-core 2024-05-06 11:30:34 +00:00
nsIDocShellTreeItem.idl
nsIDocShellTreeOwner.idl Bug 1881863 - Part 1: Standardize on boolean over bool in xpidl, r=xpcom-reviewers,necko-reviewers,valentin,extension-reviewers,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,search-reviewers,anti-tracking-reviewers,places-reviewers,nalexander,emilio,zombie,sgalich,karlt,lina,Standard8 2024-04-04 18:45:21 +00:00
nsIDocumentLoaderFactory.idl Bug 1865480. Rename nsIContentViewer to nsIDocumentViewer. r=layout-reviewers,emilio 2023-11-21 12:45:59 +00:00
nsIDocumentViewer.idl Bug 1892481 - More consistently enforce noscript and builtinclass in xpidl, r=xpcom-reviewers,necko-reviewers,valentin,media-playback-reviewers,mccr8,padenot 2024-04-22 18:19:58 +00:00
nsIDocumentViewerEdit.idl Bug 1865479. Rename nsIContentViewerEdit to nsIDocumentViewerEdit. r=layout-reviewers,tnikkel 2023-11-19 10:13:12 +00:00
nsILoadContext.idl
nsILoadURIDelegate.idl
nsIPrivacyTransitionObserver.idl Bug 1881863 - Part 1: Standardize on boolean over bool in xpidl, r=xpcom-reviewers,necko-reviewers,valentin,extension-reviewers,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,search-reviewers,anti-tracking-reviewers,places-reviewers,nalexander,emilio,zombie,sgalich,karlt,lina,Standard8 2024-04-04 18:45:21 +00:00
nsIReflowObserver.idl
nsIRefreshURI.idl
nsIScrollObserver.h
nsITooltipListener.idl
nsITooltipTextProvider.idl
nsIURIFixup.idl Bug 1881863 - Part 1: Standardize on boolean over bool in xpidl, r=xpcom-reviewers,necko-reviewers,valentin,extension-reviewers,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,search-reviewers,anti-tracking-reviewers,places-reviewers,nalexander,emilio,zombie,sgalich,karlt,lina,Standard8 2024-04-04 18:45:21 +00:00
nsIWebNavigation.idl
nsIWebNavigationInfo.idl
nsIWebPageDescriptor.idl
nsPingListener.cpp
nsPingListener.h
nsRefreshTimer.cpp
nsRefreshTimer.h
nsWebNavigationInfo.cpp Bug 1865995 p2. Rename ContentViewerType to match nsIDocumentViewer's new name. r=emilio 2023-11-23 21:35:19 +00:00
nsWebNavigationInfo.h
SerializedLoadContext.cpp
SerializedLoadContext.h
SyncedContext.h
SyncedContextInlines.h
URIFixup.sys.mjs Bug 1841869 - entering "abc @xyz.[TLD]" in address bar opens a prompt regarding loading "xyz.[TLD]" instead of searching for "abc @xyz.[TLD]" on the default search engine.r=adw 2024-01-31 19:07:57 +00:00
WindowContext.cpp Bug 1875466 - Remove nsContentUtils::ShouldHideObjectOrEmbedImageDocument. r=emilio 2024-01-22 14:26:10 +00:00
WindowContext.h Bug 1873330 - Part 4: Add UserActivation::Modifiers getters. r=smaug 2024-01-11 17:24:02 +00:00