Bug 1750174 - Auto-refreshing pages reposition themselves to the top upon refresh. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D137383
This commit is contained in:
@@ -3499,13 +3499,21 @@ bool BrowsingContext::IsPopupAllowed() {
|
||||
/* static */
|
||||
bool BrowsingContext::ShouldAddEntryForRefresh(
|
||||
nsIURI* aCurrentURI, const SessionHistoryInfo& aInfo) {
|
||||
if (aInfo.GetPostData()) {
|
||||
return ShouldAddEntryForRefresh(aCurrentURI, aInfo.GetURI(),
|
||||
aInfo.GetPostData());
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool BrowsingContext::ShouldAddEntryForRefresh(nsIURI* aCurrentURI,
|
||||
nsIURI* aNewURI,
|
||||
bool aHasPostData) {
|
||||
if (aHasPostData) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool equalsURI = false;
|
||||
if (aCurrentURI) {
|
||||
aCurrentURI->Equals(aInfo.GetURI(), &equalsURI);
|
||||
aCurrentURI->Equals(aNewURI, &equalsURI);
|
||||
}
|
||||
return !equalsURI;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user