Bug 956690 - Ensure we descend into the root scroll frame if there is a displayport set. r=tn

This commit is contained in:
Kartikaya Gupta 2014-01-29 17:40:01 -05:00
Родитель 472f982e5b
Коммит 0a88403bdb
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -2148,7 +2148,13 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
// If the child is a scrollframe that we want to ignore, then we need
// to descend into it because its scrolled child may intersect the dirty
// area even if the scrollframe itself doesn't.
if (child != aBuilder->GetIgnoreScrollFrame()) {
// There are cases where the "ignore scroll frame" on the builder is not set
// correctly, and so we additionally want to catch cases where the child is
// a root scrollframe and we are ignoring scrolling on the viewport.
nsIPresShell* shell = PresContext()->PresShell();
bool keepDescending = child == aBuilder->GetIgnoreScrollFrame() ||
(shell->IgnoringViewportScrolling() && child == shell->GetRootScrollFrame());
if (!keepDescending) {
nsRect childDirty;
if (!childDirty.IntersectRect(dirty, child->GetVisualOverflowRect()))
return;