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
Родитель 2ab3cbac5a
Коммит eb26798e94
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -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