Bug 1236040 - When updating the scroll position, only schedule image visibility checks if the display port has changed. r=tn

--HG--
extra : commitid : Hir2YBOuC1J
extra : rebase_source : 6c8d9df502979615e9f72a47b035b15d17f9c518
This commit is contained in:
Markus Stange 2015-12-31 00:04:18 +01:00
parent 8ac683bf41
commit 901b7c53e8

View file

@ -2530,10 +2530,6 @@ ScrollFrameHelper::ScrollToImpl(nsPoint aPt, const nsRect& aRange, nsIAtom* aOri
needImageVisibilityUpdate = true;
}
if (needImageVisibilityUpdate) {
presContext->PresShell()->ScheduleImageVisibilityUpdate();
}
// notify the listeners.
for (uint32_t i = 0; i < mListeners.Length(); i++) {
mListeners[i]->ScrollPositionWillChange(pt.x, pt.y);
@ -2564,9 +2560,17 @@ ScrollFrameHelper::ScrollToImpl(nsPoint aPt, const nsRect& aRange, nsIAtom* aOri
if (!displayPort.IsEqualEdges(oldDisplayPort)) {
mOuter->SchedulePaint();
if (needImageVisibilityUpdate) {
presContext->PresShell()->ScheduleImageVisibilityUpdate();
}
}
} else {
mOuter->SchedulePaint();
if (needImageVisibilityUpdate) {
presContext->PresShell()->ScheduleImageVisibilityUpdate();
}
}
if (mOuter->ChildrenHavePerspective()) {