зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
cb37d2aa26
Коммит
5a1ac360be
|
@ -344,7 +344,7 @@ public class GeckoLayerClient
|
||||||
mGeckoViewport = newMetrics;
|
mGeckoViewport = newMetrics;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
setViewportMetrics(newMetrics);
|
setViewportMetrics(newMetrics, type == ViewportMessageType.UPDATE);
|
||||||
mDisplayPort = DisplayPortCalculator.calculate(getViewportMetrics(), null);
|
mDisplayPort = DisplayPortCalculator.calculate(getViewportMetrics(), null);
|
||||||
}
|
}
|
||||||
mReturnDisplayPort = mDisplayPort;
|
mReturnDisplayPort = mDisplayPort;
|
||||||
|
@ -623,9 +623,13 @@ public class GeckoLayerClient
|
||||||
* You must hold the monitor while calling this.
|
* You must hold the monitor while calling this.
|
||||||
*/
|
*/
|
||||||
public void setViewportMetrics(ViewportMetrics viewport) {
|
public void setViewportMetrics(ViewportMetrics viewport) {
|
||||||
|
setViewportMetrics(viewport, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setViewportMetrics(ViewportMetrics viewport, boolean notifyGecko) {
|
||||||
mViewportMetrics = new ImmutableViewportMetrics(viewport);
|
mViewportMetrics = new ImmutableViewportMetrics(viewport);
|
||||||
mView.requestRender();
|
mView.requestRender();
|
||||||
if (mGeckoIsReady) {
|
if (notifyGecko && mGeckoIsReady) {
|
||||||
geometryChanged();
|
geometryChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче