Bug 970070 - Update the last-dispatched-paint metrics when we get a scroll update from layout. r=botond

This commit is contained in:
Kartikaya Gupta 2014-02-12 09:04:38 -05:00
parent 5482f44527
commit 2e248d5abc

View File

@ -1705,6 +1705,12 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aLayerMetri
// scroll offset updates from APZ until we acknowledge the update it sent.
// This prevents APZ updates from clobbering scroll updates from other
// more "legitimate" sources like content scripts.
// Furthermore, any inflight paint requests we have already dispatched are
// going to be ignored by layout, and so mLastDispatchedPaintMetrics
// becomes incorrect for the purposes of calculating the LD transform. To
// correct this we need to update mLastDispatchedPaintMetrics to be the
// last thing we know was painted by Gecko.
mLastDispatchedPaintMetrics = aLayerMetrics;
nsRefPtr<GeckoContentController> controller = GetGeckoContentController();
if (controller) {
controller->AcknowledgeScrollUpdate(aLayerMetrics.mScrollId,