Bug 857336 - Always allow PresShell::GoToAnchor to scroll when called from nsDocShell::ScrollToAnchor. r=roc

This commit is contained in:
Mats Palmgren 2013-04-21 09:22:45 +02:00
parent 5dc9f3b37e
commit 34bff63aba

View File

@ -9718,6 +9718,11 @@ nsDocShell::ScrollToAnchor(nsACString & aCurHash, nsACString & aNewHash,
return NS_OK;
}
nsIScrollableFrame* rootScroll = shell->GetRootScrollFrameAsScrollable();
if (rootScroll) {
rootScroll->ClearDidHistoryRestore();
}
// If we have no new anchor, we do not want to scroll, unless there is a
// current anchor and we are doing a history load. So return if we have no
// new anchor, and there is no current anchor or the load is not a history