Bug 1258470 - Part 4: MOZ_ANDROID_APZ implies no need for functional getDisplayPort.
MozReview-Commit-ID: 6JV9mTGIsjU
--- a/mobile/android/base/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
+++ b/mobile/android/base/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
@@ -412,29 +412,17 @@ class GeckoLayerClient implements LayerV
setViewportMetrics(newMetrics, type == ViewportMessageType.UPDATE);
mDisplayPort = DisplayPortCalculator.calculate(getViewportMetrics(), null);
}
return mDisplayPort;
}
@WrapForJNI
DisplayPortMetrics getDisplayPort(boolean pageSizeUpdate, boolean isBrowserContentDisplayed, int tabId, ImmutableViewportMetrics metrics) {
- Tabs tabs = Tabs.getInstance();
- if (isBrowserContentDisplayed && tabs.isSelectedTabId(tabId)) {
- // for foreground tabs, send the viewport update unless the document
- // displayed is different from the content document. In that case, just
- // calculate the display port.
- return handleViewportMessage(metrics, pageSizeUpdate ? ViewportMessageType.PAGE_SIZE : ViewportMessageType.UPDATE);
- } else {
- // for background tabs, request a new display port calculation, so that
- // when we do switch to that tab, we have the correct display port and
- // don't need to draw twice (once to allow the first-paint viewport to
- // get to java, and again once java figures out the display port).
- return DisplayPortCalculator.calculate(metrics, null);
- }
+ return null;
}
@WrapForJNI
void contentDocumentChanged() {
mContentDocumentIsDisplayed = false;
}
@WrapForJNI
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -3866,20 +3866,16 @@ Tab.prototype = {
return viewport;
},
sendViewportUpdate: function(aPageSizeUpdate) {
if (AppConstants.MOZ_ANDROID_APZ) {
return;
}
- let viewport = this.getViewport();
- let displayPort = Services.androidBridge.getDisplayPort(aPageSizeUpdate, BrowserApp.isBrowserContentDocumentDisplayed(), this.id, viewport);
- if (displayPort != null)
- this.setDisplayPort(displayPort);
},
// These constants are used to prioritize high quality metadata over low quality data, so that
// we can collect data as we find meta tags, and replace low quality metadata with higher quality
// matches. For instance a msApplicationTile icon is a better tile image than an og:image tag.
METADATA_GOOD_MATCH: 10,
METADATA_NORMAL_MATCH: 1,