Make sure to flush reflows before trying to scroll so that frame coordinates

will be up-to-date.  Bug 186149, r=peterv, sr=jst, a=asa
This commit is contained in:
bzbarsky%mit.edu 2003-04-26 01:13:28 +00:00
Родитель 0b19a3bbf0
Коммит 04d9b57f42
3 изменённых файлов: 9 добавлений и 0 удалений

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

@ -1283,6 +1283,9 @@ nsGenericHTMLElement::ScrollIntoView(PRBool aTop)
return NS_OK;
}
// Now flush to make sure things are up to date
presShell->FlushPendingNotifications(PR_FALSE);
// Get the primary frame for this element
nsIFrame *frame = nsnull;
presShell->GetPrimaryFrameFor(this, &frame);

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

@ -4118,6 +4118,9 @@ PresShell::GoToAnchor(const nsAString& aAnchorName, PRBool aScroll)
}
if (content) {
// Flush notifications so we scroll to the right place
FlushPendingNotifications(PR_FALSE);
// Get the primary frame
nsIFrame* frame = nsnull;
if (aScroll &&

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

@ -4118,6 +4118,9 @@ PresShell::GoToAnchor(const nsAString& aAnchorName, PRBool aScroll)
}
if (content) {
// Flush notifications so we scroll to the right place
FlushPendingNotifications(PR_FALSE);
// Get the primary frame
nsIFrame* frame = nsnull;
if (aScroll &&