commit 340ee3c1fc2283f0b23d293d60fc8711b1516889
parent ca92e249b8092343d48eab1ba37aa1275743b42f
Author: Jan-Niklas Jaeschke <jjaschke@mozilla.com>
Date: Wed, 1 Oct 2025 08:46:14 +0000
Bug 1991849 - Navigation API: Rename getter for `NavigationDestination::mURL` to `::GetURL()`. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D266969
Diffstat:
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dom/navigation/Navigation.cpp b/dom/navigation/Navigation.cpp
@@ -1072,7 +1072,7 @@ static void LogEvent(Event* aEvent, NavigateEvent* aOngoingEvent,
if (RefPtr<NavigationDestination> destination =
aOngoingEvent->Destination()) {
- log.AppendElement(destination->GetURI()->GetSpecOrDefault());
+ log.AppendElement(destination->GetURL()->GetSpecOrDefault());
}
if (aOngoingEvent->HashChange()) {
@@ -1210,7 +1210,7 @@ bool Navigation::InnerFireNavigateEvent(
// Step 9
init.mCanIntercept = document &&
- document->CanRewriteURL(aDestination->GetURI()) &&
+ document->CanRewriteURL(aDestination->GetURL()) &&
(aDestination->SameDocument() ||
aNavigationType != NavigationType::Traverse);
@@ -1256,8 +1256,8 @@ bool Navigation::InnerFireNavigateEvent(
// step 22
init.mHashChange = !aClassicHistoryAPIState && aDestination->SameDocument() &&
- EqualsExceptRef(aDestination->GetURI(), currentURL) &&
- !HasIdenticalFragment(aDestination->GetURI(), currentURL);
+ EqualsExceptRef(aDestination->GetURL(), currentURL) &&
+ !HasIdenticalFragment(aDestination->GetURL(), currentURL);
// Step 23
init.mUserInitiated = aUserInvolvement != UserNavigationInvolvement::None;
@@ -1360,10 +1360,10 @@ bool Navigation::InnerFireNavigateEvent(
// Step 33.7
if (nsDocShell* docShell = nsDocShell::Cast(document->GetDocShell())) {
docShell->UpdateURLAndHistory(
- document, aDestination->GetURI(), event->ClassicHistoryAPIState(),
+ document, aDestination->GetURL(), event->ClassicHistoryAPIState(),
*NavigationUtils::NavigationHistoryBehavior(aNavigationType),
document->GetDocumentURI(),
- Equals(aDestination->GetURI(), document->GetDocumentURI()));
+ Equals(aDestination->GetURL(), document->GetDocumentURI()));
}
break;
case NavigationType::Reload:
diff --git a/dom/navigation/NavigationDestination.cpp b/dom/navigation/NavigationDestination.cpp
@@ -108,6 +108,6 @@ NavigationHistoryEntry* NavigationDestination::GetEntry() const {
return mEntry;
}
-nsIURI* NavigationDestination::GetURI() const { return mURL; }
+nsIURI* NavigationDestination::GetURL() const { return mURL; }
} // namespace mozilla::dom
diff --git a/dom/navigation/NavigationDestination.h b/dom/navigation/NavigationDestination.h
@@ -47,7 +47,7 @@ class NavigationDestination final : public nsISupports, public nsWrapperCache {
nsIGlobalObject* GetParentObject();
NavigationHistoryEntry* GetEntry() const;
- nsIURI* GetURI() const;
+ nsIURI* GetURL() const;
private:
~NavigationDestination() = default;