Bug 703241. Part 4: Don't let 'frame' be treated as its own container in PresShell::DoScrollContentIntoView. r=matspal

--HG--
extra : rebase_source : 1fba4feec8e6686d00c79bb2aea5d5ac0837c116
This commit is contained in:
Robert O'Callahan 2012-10-17 17:44:06 +13:00
parent a8f23be047
commit 7ce96b9824

View File

@ -3279,8 +3279,10 @@ PresShell::DoScrollContentIntoView()
return;
}
// Make sure we skip 'frame' ... if it's scrollable, we should use its
// scrollable ancestor as the container.
nsIFrame* container =
nsLayoutUtils::GetClosestFrameOfType(frame, nsGkAtoms::scrollFrame);
nsLayoutUtils::GetClosestFrameOfType(frame->GetParent(), nsGkAtoms::scrollFrame);
if (!container) {
// nothing can be scrolled
return;