Bug 867685 - Use getLock() instead of this when modifying the viewport metrics for clarity. r=Cwiiis
This commit is contained in:
@@ -357,7 +357,7 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
|
||||
|
||||
/** Viewport message handler. */
|
||||
private DisplayPortMetrics handleViewportMessage(ImmutableViewportMetrics messageMetrics, ViewportMessageType type) {
|
||||
synchronized (this) {
|
||||
synchronized (getLock()) {
|
||||
ImmutableViewportMetrics newMetrics;
|
||||
ImmutableViewportMetrics oldMetrics = getViewportMetrics();
|
||||
|
||||
@@ -531,7 +531,7 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
|
||||
public void setFirstPaintViewport(float offsetX, float offsetY, float zoom,
|
||||
float pageLeft, float pageTop, float pageRight, float pageBottom,
|
||||
float cssPageLeft, float cssPageTop, float cssPageRight, float cssPageBottom) {
|
||||
synchronized (this) {
|
||||
synchronized (getLock()) {
|
||||
ImmutableViewportMetrics currentMetrics = getViewportMetrics();
|
||||
|
||||
Tab tab = Tabs.getInstance().getSelectedTab();
|
||||
@@ -584,7 +584,7 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
|
||||
* function will be invoked before syncViewportInfo.
|
||||
*/
|
||||
public void setPageRect(float cssPageLeft, float cssPageTop, float cssPageRight, float cssPageBottom) {
|
||||
synchronized (this) {
|
||||
synchronized (getLock()) {
|
||||
RectF cssPageRect = new RectF(cssPageLeft, cssPageTop, cssPageRight, cssPageBottom);
|
||||
float ourZoom = getViewportMetrics().zoomFactor;
|
||||
setPageRect(RectUtils.scale(cssPageRect, ourZoom), cssPageRect);
|
||||
|
||||
Reference in New Issue
Block a user