зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1092626 - Don't try to restore the scroll position if the frame is still dirty or has dirty children. r=roc
This commit is contained in:
Родитель
8dcb8265ce
Коммит
eb154663cc
|
@ -4752,9 +4752,15 @@ ScrollFrameHelper::FinishReflowForScrollbar(nsIContent* aContent,
|
|||
bool
|
||||
ScrollFrameHelper::ReflowFinished()
|
||||
{
|
||||
nsAutoScriptBlocker scriptBlocker;
|
||||
mPostedReflowCallback = false;
|
||||
|
||||
if (NS_SUBTREE_DIRTY(mOuter)) {
|
||||
// We will get another call after the next reflow and scrolling
|
||||
// later is less janky.
|
||||
return false;
|
||||
}
|
||||
|
||||
nsAutoScriptBlocker scriptBlocker;
|
||||
ScrollToRestoredPosition();
|
||||
|
||||
// Clamp current scroll position to new bounds. Normally this won't
|
||||
|
@ -4768,9 +4774,9 @@ ScrollFrameHelper::ReflowFinished()
|
|||
mDestination = GetScrollPosition();
|
||||
}
|
||||
|
||||
if (NS_SUBTREE_DIRTY(mOuter) || !mUpdateScrollbarAttributes)
|
||||
if (!mUpdateScrollbarAttributes) {
|
||||
return false;
|
||||
|
||||
}
|
||||
mUpdateScrollbarAttributes = false;
|
||||
|
||||
// Update scrollbar attributes.
|
||||
|
|
Загрузка…
Ссылка в новой задаче