Bug 492760. Don't try to do a best-effort scroll to never-been-laid-out frames. r+sr=roc

This commit is contained in:
Boris Zbarsky 2009-05-14 21:40:28 -04:00
parent b7ce1207f5
commit e923e46de8

View File

@ -4203,6 +4203,13 @@ PresShell::DoScrollContentIntoView(nsIContent* aContent,
return;
}
if (frame->GetStateBits() & NS_FRAME_FIRST_REFLOW) {
// The reflow flush before this scroll got interrupted, and this frame's
// coords and size are all zero, and it has no content showing anyway.
// Don't bother scrolling to it. We'll try again when we finish up layout.
return;
}
// This is a two-step process.
// Step 1: Find the bounds of the rect we want to scroll into view. For
// example, for an inline frame we may want to scroll in the whole