зеркало из https://github.com/mozilla/gecko-dev.git
Bug 899810 - Ensure that mFrameMetrics is updated properly in NotifyLayersUpdated. r=bbondy
In some cases the mScrollOffset was getting updated on the mFrameMetrics before the IsDefault() check, so the IsDefault() check would return false when it should have returned true. Calling IsDefault() on the mFrameMetrics before writing stuff into it fixes this.
This commit is contained in:
Родитель
2616b9851c
Коммит
6228032f7b
|
@ -1169,6 +1169,7 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aLayerMetri
|
|||
|
||||
mLastContentPaintMetrics = aLayerMetrics;
|
||||
|
||||
bool isDefault = mFrameMetrics.IsDefault();
|
||||
mFrameMetrics.mMayHaveTouchListeners = aLayerMetrics.mMayHaveTouchListeners;
|
||||
|
||||
// TODO: Once a mechanism for calling UpdateScrollOffset() when content does
|
||||
|
@ -1207,7 +1208,7 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aLayerMetri
|
|||
needContentRepaint |= (previousResolution != newResolution);
|
||||
}
|
||||
|
||||
if (aIsFirstPaint || mFrameMetrics.IsDefault()) {
|
||||
if (aIsFirstPaint || isDefault) {
|
||||
mPaintThrottler.ClearHistory();
|
||||
mPaintThrottler.SetMaxDurations(gNumPaintDurationSamples);
|
||||
|
||||
|
@ -1217,7 +1218,7 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aLayerMetri
|
|||
// XXX If this is the very first time we're getting a layers update we need to
|
||||
// trigger another repaint, or the B2G browser shows stale content. This needs
|
||||
// to be investigated and fixed.
|
||||
needContentRepaint |= (mFrameMetrics.IsDefault() && !aLayerMetrics.IsDefault());
|
||||
needContentRepaint |= (isDefault && !aLayerMetrics.IsDefault());
|
||||
|
||||
mFrameMetrics = aLayerMetrics;
|
||||
mState = NOTHING;
|
||||
|
|
Загрузка…
Ссылка в новой задаче