Bug 787322 - Don't send viewport updates back to gecko on page-size updates, since Gecko already knows about it. r=Cwiiis

This commit is contained in:
Kartikaya Gupta 2012-09-04 09:52:02 -04:00
parent 1d67969a6c
commit 44d76037fb

View File

@ -344,7 +344,7 @@ public class GeckoLayerClient
mGeckoViewport = newMetrics;
}
});
setViewportMetrics(newMetrics);
setViewportMetrics(newMetrics, type == ViewportMessageType.UPDATE);
mDisplayPort = DisplayPortCalculator.calculate(getViewportMetrics(), null);
}
mReturnDisplayPort = mDisplayPort;
@ -623,9 +623,13 @@ public class GeckoLayerClient
* You must hold the monitor while calling this.
*/
public void setViewportMetrics(ViewportMetrics viewport) {
setViewportMetrics(viewport, true);
}
private void setViewportMetrics(ViewportMetrics viewport, boolean notifyGecko) {
mViewportMetrics = new ImmutableViewportMetrics(viewport);
mView.requestRender();
if (mGeckoIsReady) {
if (notifyGecko && mGeckoIsReady) {
geometryChanged();
}
}