Avoing crashing due to outdated text pointers by flushing pending reflows before finding out where to scroll the selection, b=252970, r+sr=bzbarsky, a=bsmedberg

git-svn-id: svn://10.0.0.236/trunk@176866 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rbs%maths.uq.edu.au
2005-07-30 02:43:17 +00:00
parent b8d33b6ab2
commit 71eb574482

View File

@@ -7209,6 +7209,12 @@ nsTypedSelection::ScrollIntoView(SelectionRegion aRegion, PRBool aIsSynchronous)
{
StCaretHider caretHider(caret); // stack-based class hides and shows the caret
// We are going to scroll to a character offset within a frame by
// using APIs on the scrollable view directly. So we need to
// flush out pending reflows to make sure that frames are up-to-date.
// We crash otherwise - bug 252970#c97
presShell->FlushPendingNotifications(Flush_OnlyReflow);
//
// Scroll the selection region into view.
//