зеркало из https://github.com/mozilla/gecko-dev.git
Bug 735612 - Add missing synchronization around viewport manipulation. r=Cwiiis
This commit is contained in:
Родитель
deb4135b71
Коммит
b93a9723c8
|
@ -232,8 +232,10 @@ public class PanZoomController
|
|||
case NOTHING:
|
||||
// Don't do animations here; they're distracting and can cause flashes on page
|
||||
// transitions.
|
||||
synchronized (mController) {
|
||||
mController.setViewportMetrics(getValidViewportMetrics());
|
||||
mController.notifyLayerClientOfGeometryChange();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -241,6 +243,7 @@ public class PanZoomController
|
|||
/** This must be called on the UI thread. */
|
||||
public void pageSizeUpdated() {
|
||||
if (mState == PanZoomState.NOTHING) {
|
||||
synchronized (mController) {
|
||||
ViewportMetrics validated = getValidViewportMetrics();
|
||||
if (! (new ViewportMetrics(mController.getViewportMetrics())).fuzzyEquals(validated)) {
|
||||
// page size changed such that we are now in overscroll. snap to the
|
||||
|
@ -250,6 +253,7 @@ public class PanZoomController
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Panning/scrolling
|
||||
|
|
Загрузка…
Ссылка в новой задаче