From 29e63f503a7a200a0dcb35de104c6386ac7e0a56 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Tue, 18 Aug 2015 14:27:19 -0400 Subject: [PATCH] Bug 1180295 - Store the viewport width and height as integers instead of floats in ImmutableViewportMetrics. r=rbarker --HG-- extra : commitid : 8UdQhaVHspN --- mobile/android/base/BrowserApp.java | 2 +- .../base/gfx/DisplayPortCalculator.java | 20 ++--- mobile/android/base/gfx/GeckoLayerClient.java | 8 +- .../base/gfx/ImmutableViewportMetrics.java | 85 +++++++++++-------- .../base/gfx/LayerMarginsAnimator.java | 4 +- widget/android/AndroidBridge.cpp | 5 +- widget/android/GeneratedJNIWrappers.cpp | 2 +- widget/android/GeneratedJNIWrappers.h | 8 +- widget/android/nsIAndroidBridge.idl | 6 +- 9 files changed, 77 insertions(+), 63 deletions(-) diff --git a/mobile/android/base/BrowserApp.java b/mobile/android/base/BrowserApp.java index f859859d08c6..f8d5dd60272f 100644 --- a/mobile/android/base/BrowserApp.java +++ b/mobile/android/base/BrowserApp.java @@ -1602,7 +1602,7 @@ public class BrowserApp extends GeckoApp boolean shortPage = metrics.getPageHeight() < metrics.getHeight(); boolean toolbarMostlyVisible = toolbarTranslation < (mToolbarHeight / 2); - boolean atBottomOfLongPage = (metrics.pageRectBottom == metrics.viewportRectBottom) + boolean atBottomOfLongPage = (metrics.pageRectBottom == metrics.viewportRectBottom()) && (metrics.pageRectBottom > 2 * metrics.getHeight()); Log.v(LOGTAG, "On pan/zoom stopped, short page: " + shortPage + "; toolbarMostlyVisible: " + toolbarMostlyVisible diff --git a/mobile/android/base/gfx/DisplayPortCalculator.java b/mobile/android/base/gfx/DisplayPortCalculator.java index 3f56c2a3666f..2eaa8371ee3e 100644 --- a/mobile/android/base/gfx/DisplayPortCalculator.java +++ b/mobile/android/base/gfx/DisplayPortCalculator.java @@ -181,8 +181,8 @@ final class DisplayPortCalculator { private static DisplayPortMetrics getTileAlignedDisplayPortMetrics(RectF margins, float zoom, ImmutableViewportMetrics metrics) { float left = metrics.viewportRectLeft - margins.left; float top = metrics.viewportRectTop - margins.top; - float right = metrics.viewportRectRight + margins.right; - float bottom = metrics.viewportRectBottom + margins.bottom; + float right = metrics.viewportRectRight() + margins.right; + float bottom = metrics.viewportRectBottom() + margins.bottom; left = (float) Math.max(metrics.pageRectLeft, TILE_SIZE * Math.floor(left / TILE_SIZE)); top = (float) Math.max(metrics.pageRectTop, TILE_SIZE * Math.floor(top / TILE_SIZE)); right = (float) Math.min(metrics.pageRectRight, TILE_SIZE * Math.ceil(right / TILE_SIZE)); @@ -201,9 +201,9 @@ final class DisplayPortCalculator { // and rightOverflow can be greater than zero, and at most one of topOverflow and bottomOverflow // can be greater than zero, because of the assumption described in the method javadoc. float leftOverflow = metrics.pageRectLeft - (metrics.viewportRectLeft - margins.left); - float rightOverflow = (metrics.viewportRectRight + margins.right) - metrics.pageRectRight; + float rightOverflow = (metrics.viewportRectRight() + margins.right) - metrics.pageRectRight; float topOverflow = metrics.pageRectTop - (metrics.viewportRectTop - margins.top); - float bottomOverflow = (metrics.viewportRectBottom + margins.bottom) - metrics.pageRectBottom; + float bottomOverflow = (metrics.viewportRectBottom() + margins.bottom) - metrics.pageRectBottom; // if the margins overflow the page bounds, shift them to other side on the same axis if (leftOverflow > 0) { @@ -246,8 +246,8 @@ final class DisplayPortCalculator { public DisplayPortMetrics calculate(ImmutableViewportMetrics metrics, PointF velocity) { return new DisplayPortMetrics(metrics.viewportRectLeft, metrics.viewportRectTop, - metrics.viewportRectRight, - metrics.viewportRectBottom, + metrics.viewportRectRight(), + metrics.viewportRectBottom(), metrics.zoomFactor); } @@ -445,8 +445,8 @@ final class DisplayPortCalculator { RectF adjustedViewport = new RectF( metrics.viewportRectLeft - dangerMargins.left, metrics.viewportRectTop - dangerMargins.top, - metrics.viewportRectRight + dangerMargins.right, - metrics.viewportRectBottom + dangerMargins.bottom); + metrics.viewportRectRight() + dangerMargins.right, + metrics.viewportRectBottom() + dangerMargins.bottom); return !displayPort.contains(adjustedViewport); } @@ -588,8 +588,8 @@ final class DisplayPortCalculator { DisplayPortMetrics dpMetrics = new DisplayPortMetrics( metrics.viewportRectLeft - margins.left, metrics.viewportRectTop - margins.top, - metrics.viewportRectRight + margins.right, - metrics.viewportRectBottom + margins.bottom, + metrics.viewportRectRight() + margins.right, + metrics.viewportRectBottom() + margins.bottom, displayResolution); return dpMetrics; } diff --git a/mobile/android/base/gfx/GeckoLayerClient.java b/mobile/android/base/gfx/GeckoLayerClient.java index 765a82d23170..a1a7d52592e7 100644 --- a/mobile/android/base/gfx/GeckoLayerClient.java +++ b/mobile/android/base/gfx/GeckoLayerClient.java @@ -408,7 +408,7 @@ class GeckoLayerClient implements LayerView.Listener, PanZoomTarget default: case UPDATE: // Keep the old viewport size - newMetrics = messageMetrics.setViewportSize(oldMetrics.getWidth(), oldMetrics.getHeight()); + newMetrics = messageMetrics.setViewportSize(oldMetrics.viewportRectWidth, oldMetrics.viewportRectHeight); if (!oldMetrics.fuzzyEquals(newMetrics)) { abortPanZoomAnimation(); } @@ -547,8 +547,8 @@ class GeckoLayerClient implements LayerView.Listener, PanZoomTarget // the page fall outside of the display-port. if (Math.max(viewportMetrics.viewportRectLeft, viewportMetrics.pageRectLeft) + 1 < x || Math.max(viewportMetrics.viewportRectTop, viewportMetrics.pageRectTop) + 1 < y || - Math.min(viewportMetrics.viewportRectRight, viewportMetrics.pageRectRight) - 1 > x + width || - Math.min(viewportMetrics.viewportRectBottom, viewportMetrics.pageRectBottom) - 1 > y + height) { + Math.min(viewportMetrics.viewportRectRight(), viewportMetrics.pageRectRight) - 1 > x + width || + Math.min(viewportMetrics.viewportRectBottom(), viewportMetrics.pageRectBottom) - 1 > y + height) { Log.d(LOGTAG, "Aborting update due to viewport not in display-port"); mProgressiveUpdateData.abort = true; @@ -850,7 +850,7 @@ class GeckoLayerClient implements LayerView.Listener, PanZoomTarget // updated is in GeckoLayerClient.setViewportSize, and the only place the margins should // ever be updated is in GeckoLayerClient.setFixedLayerMargins; both of these assign to // mViewportMetrics directly. - metrics = metrics.setViewportSize(mViewportMetrics.getWidth(), mViewportMetrics.getHeight()); + metrics = metrics.setViewportSize(mViewportMetrics.viewportRectWidth, mViewportMetrics.viewportRectHeight); metrics = metrics.setMarginsFrom(mViewportMetrics); mViewportMetrics = metrics; diff --git a/mobile/android/base/gfx/ImmutableViewportMetrics.java b/mobile/android/base/gfx/ImmutableViewportMetrics.java index 656b3408509a..31f0a290e01d 100644 --- a/mobile/android/base/gfx/ImmutableViewportMetrics.java +++ b/mobile/android/base/gfx/ImmutableViewportMetrics.java @@ -31,8 +31,9 @@ public class ImmutableViewportMetrics { public final float cssPageRectBottom; public final float viewportRectLeft; public final float viewportRectTop; - public final float viewportRectRight; - public final float viewportRectBottom; + public final int viewportRectWidth; + public final int viewportRectHeight; + public final float marginLeft; public final float marginTop; public final float marginRight; @@ -43,8 +44,10 @@ public class ImmutableViewportMetrics { public ImmutableViewportMetrics(DisplayMetrics metrics) { viewportRectLeft = pageRectLeft = cssPageRectLeft = 0; viewportRectTop = pageRectTop = cssPageRectTop = 0; - viewportRectRight = pageRectRight = cssPageRectRight = metrics.widthPixels; - viewportRectBottom = pageRectBottom = cssPageRectBottom = metrics.heightPixels; + viewportRectWidth = metrics.widthPixels; + viewportRectHeight = metrics.heightPixels; + pageRectRight = cssPageRectRight = metrics.widthPixels; + pageRectBottom = cssPageRectBottom = metrics.heightPixels; marginLeft = marginTop = marginRight = marginBottom = 0; zoomFactor = 1.0f; isRTL = false; @@ -57,21 +60,21 @@ public class ImmutableViewportMetrics { public ImmutableViewportMetrics(float aPageRectLeft, float aPageRectTop, float aPageRectRight, float aPageRectBottom, float aCssPageRectLeft, float aCssPageRectTop, float aCssPageRectRight, float aCssPageRectBottom, - float aViewportRectLeft, float aViewportRectTop, float aViewportRectRight, - float aViewportRectBottom, float aZoomFactor) + float aViewportRectLeft, float aViewportRectTop, int aViewportRectWidth, + int aViewportRectHeight, float aZoomFactor) { this(aPageRectLeft, aPageRectTop, aPageRectRight, aPageRectBottom, aCssPageRectLeft, aCssPageRectTop, aCssPageRectRight, aCssPageRectBottom, - aViewportRectLeft, aViewportRectTop, aViewportRectRight, - aViewportRectBottom, 0.0f, 0.0f, 0.0f, 0.0f, aZoomFactor, false); + aViewportRectLeft, aViewportRectTop, aViewportRectWidth, + aViewportRectHeight, 0.0f, 0.0f, 0.0f, 0.0f, aZoomFactor, false); } private ImmutableViewportMetrics(float aPageRectLeft, float aPageRectTop, float aPageRectRight, float aPageRectBottom, float aCssPageRectLeft, float aCssPageRectTop, float aCssPageRectRight, float aCssPageRectBottom, - float aViewportRectLeft, float aViewportRectTop, float aViewportRectRight, - float aViewportRectBottom, float aMarginLeft, + float aViewportRectLeft, float aViewportRectTop, int aViewportRectWidth, + int aViewportRectHeight, float aMarginLeft, float aMarginTop, float aMarginRight, float aMarginBottom, float aZoomFactor, boolean aIsRTL) { @@ -85,8 +88,8 @@ public class ImmutableViewportMetrics { cssPageRectBottom = aCssPageRectBottom; viewportRectLeft = aViewportRectLeft; viewportRectTop = aViewportRectTop; - viewportRectRight = aViewportRectRight; - viewportRectBottom = aViewportRectBottom; + viewportRectWidth = aViewportRectWidth; + viewportRectHeight = aViewportRectHeight; marginLeft = aMarginLeft; marginTop = aMarginTop; marginRight = aMarginRight; @@ -96,19 +99,27 @@ public class ImmutableViewportMetrics { } public float getWidth() { - return viewportRectRight - viewportRectLeft; + return viewportRectWidth; } public float getHeight() { - return viewportRectBottom - viewportRectTop; + return viewportRectHeight; + } + + public float viewportRectRight() { + return viewportRectLeft + viewportRectWidth; + } + + public float viewportRectBottom() { + return viewportRectTop + viewportRectHeight; } public float getWidthWithoutMargins() { - return viewportRectRight - viewportRectLeft - marginLeft - marginRight; + return viewportRectWidth - marginLeft - marginRight; } public float getHeightWithoutMargins() { - return viewportRectBottom - viewportRectTop - marginTop - marginBottom; + return viewportRectHeight - marginTop - marginBottom; } public PointF getOrigin() { @@ -123,14 +134,14 @@ public class ImmutableViewportMetrics { } public FloatSize getSize() { - return new FloatSize(viewportRectRight - viewportRectLeft, viewportRectBottom - viewportRectTop); + return new FloatSize(viewportRectWidth, viewportRectHeight); } public RectF getViewport() { return new RectF(viewportRectLeft, viewportRectTop, - viewportRectRight, - viewportRectBottom); + viewportRectRight(), + viewportRectBottom()); } public RectF getCssViewport() { @@ -164,8 +175,8 @@ public class ImmutableViewportMetrics { public RectF getOverscroll() { return new RectF(Math.max(0, pageRectLeft - viewportRectLeft), Math.max(0, pageRectTop - viewportRectTop), - Math.max(0, viewportRectRight - pageRectRight), - Math.max(0, viewportRectBottom - pageRectBottom)); + Math.max(0, viewportRectRight() - pageRectRight), + Math.max(0, viewportRectBottom() - pageRectBottom)); } /* @@ -185,8 +196,8 @@ public class ImmutableViewportMetrics { FloatUtils.interpolate(cssPageRectBottom, to.cssPageRectBottom, t), FloatUtils.interpolate(viewportRectLeft, to.viewportRectLeft, t), FloatUtils.interpolate(viewportRectTop, to.viewportRectTop, t), - FloatUtils.interpolate(viewportRectRight, to.viewportRectRight, t), - FloatUtils.interpolate(viewportRectBottom, to.viewportRectBottom, t), + (int)FloatUtils.interpolate(viewportRectWidth, to.viewportRectWidth, t), + (int)FloatUtils.interpolate(viewportRectHeight, to.viewportRectHeight, t), FloatUtils.interpolate(marginLeft, to.marginLeft, t), FloatUtils.interpolate(marginTop, to.marginTop, t), FloatUtils.interpolate(marginRight, to.marginRight, t), @@ -195,15 +206,15 @@ public class ImmutableViewportMetrics { t >= 0.5 ? to.isRTL : isRTL); } - public ImmutableViewportMetrics setViewportSize(float width, float height) { - if (FloatUtils.fuzzyEquals(width, getWidth()) && FloatUtils.fuzzyEquals(height, getHeight())) { + public ImmutableViewportMetrics setViewportSize(int width, int height) { + if (width == viewportRectWidth && height == viewportRectHeight) { return this; } return new ImmutableViewportMetrics( pageRectLeft, pageRectTop, pageRectRight, pageRectBottom, cssPageRectLeft, cssPageRectTop, cssPageRectRight, cssPageRectBottom, - viewportRectLeft, viewportRectTop, viewportRectLeft + width, viewportRectTop + height, + viewportRectLeft, viewportRectTop, width, height, marginLeft, marginTop, marginRight, marginBottom, zoomFactor, isRTL); } @@ -212,7 +223,7 @@ public class ImmutableViewportMetrics { return new ImmutableViewportMetrics( pageRectLeft, pageRectTop, pageRectRight, pageRectBottom, cssPageRectLeft, cssPageRectTop, cssPageRectRight, cssPageRectBottom, - newOriginX, newOriginY, newOriginX + getWidth(), newOriginY + getHeight(), + newOriginX, newOriginY, viewportRectWidth, viewportRectHeight, marginLeft, marginTop, marginRight, marginBottom, zoomFactor, isRTL); } @@ -221,7 +232,7 @@ public class ImmutableViewportMetrics { return new ImmutableViewportMetrics( pageRectLeft, pageRectTop, pageRectRight, pageRectBottom, cssPageRectLeft, cssPageRectTop, cssPageRectRight, cssPageRectBottom, - viewportRectLeft, viewportRectTop, viewportRectRight, viewportRectBottom, + viewportRectLeft, viewportRectTop, viewportRectWidth, viewportRectHeight, marginLeft, marginTop, marginRight, marginBottom, newZoomFactor, isRTL); } @@ -245,7 +256,7 @@ public class ImmutableViewportMetrics { return new ImmutableViewportMetrics( pageRect.left, pageRect.top, pageRect.right, pageRect.bottom, cssPageRect.left, cssPageRect.top, cssPageRect.right, cssPageRect.bottom, - viewportRectLeft, viewportRectTop, viewportRectRight, viewportRectBottom, + viewportRectLeft, viewportRectTop, viewportRectWidth, viewportRectHeight, marginLeft, marginTop, marginRight, marginBottom, zoomFactor, isRTL); } @@ -261,7 +272,7 @@ public class ImmutableViewportMetrics { return new ImmutableViewportMetrics( pageRectLeft, pageRectTop, pageRectRight, pageRectBottom, cssPageRectLeft, cssPageRectTop, cssPageRectRight, cssPageRectBottom, - viewportRectLeft, viewportRectTop, viewportRectRight, viewportRectBottom, + viewportRectLeft, viewportRectTop, viewportRectWidth, viewportRectHeight, left, top, right, bottom, zoomFactor, isRTL); } @@ -280,7 +291,7 @@ public class ImmutableViewportMetrics { return new ImmutableViewportMetrics( pageRectLeft, pageRectTop, pageRectRight, pageRectBottom, cssPageRectLeft, cssPageRectTop, cssPageRectRight, cssPageRectBottom, - viewportRectLeft, viewportRectTop, viewportRectRight, viewportRectBottom, + viewportRectLeft, viewportRectTop, viewportRectWidth, viewportRectHeight, marginLeft, marginTop, marginRight, marginBottom, zoomFactor, aIsRTL); } @@ -304,7 +315,7 @@ public class ImmutableViewportMetrics { return new ImmutableViewportMetrics( newPageRectLeft, newPageRectTop, newPageRectRight, newPageRectBottom, cssPageRectLeft, cssPageRectTop, cssPageRectRight, cssPageRectBottom, - origin.x, origin.y, origin.x + getWidth(), origin.y + getHeight(), + origin.x, origin.y, viewportRectWidth, viewportRectHeight, marginLeft, marginTop, marginRight, marginBottom, newZoomFactor, isRTL); } @@ -326,10 +337,12 @@ public class ImmutableViewportMetrics { if (newViewport.top < pageRectTop) newViewport.offset(0, pageRectTop - newViewport.top); + // Note that since newViewport is only translated around, the viewport's + // width and height are unchanged. return new ImmutableViewportMetrics( pageRectLeft, pageRectTop, pageRectRight, pageRectBottom, cssPageRectLeft, cssPageRectTop, cssPageRectRight, cssPageRectBottom, - newViewport.left, newViewport.top, newViewport.right, newViewport.bottom, + newViewport.left, newViewport.top, viewportRectWidth, viewportRectHeight, marginLeft, marginTop, marginRight, marginBottom, zoomFactor, isRTL); } @@ -356,15 +369,15 @@ public class ImmutableViewportMetrics { && FloatUtils.fuzzyEquals(cssPageRectBottom, other.cssPageRectBottom) && FloatUtils.fuzzyEquals(viewportRectLeft, other.viewportRectLeft) && FloatUtils.fuzzyEquals(viewportRectTop, other.viewportRectTop) - && FloatUtils.fuzzyEquals(viewportRectRight, other.viewportRectRight) - && FloatUtils.fuzzyEquals(viewportRectBottom, other.viewportRectBottom) + && viewportRectWidth == other.viewportRectWidth + && viewportRectHeight == other.viewportRectHeight && FloatUtils.fuzzyEquals(zoomFactor, other.zoomFactor); } @Override public String toString() { return "ImmutableViewportMetrics v=(" + viewportRectLeft + "," + viewportRectTop + "," - + viewportRectRight + "," + viewportRectBottom + ") p=(" + pageRectLeft + "," + + viewportRectWidth + "x" + viewportRectHeight + ") p=(" + pageRectLeft + "," + pageRectTop + "," + pageRectRight + "," + pageRectBottom + ") c=(" + cssPageRectLeft + "," + cssPageRectTop + "," + cssPageRectRight + "," + cssPageRectBottom + ") m=(" + marginLeft + "," diff --git a/mobile/android/base/gfx/LayerMarginsAnimator.java b/mobile/android/base/gfx/LayerMarginsAnimator.java index 6ef7c59dc1d8..0c5e7adad9d6 100644 --- a/mobile/android/base/gfx/LayerMarginsAnimator.java +++ b/mobile/android/base/gfx/LayerMarginsAnimator.java @@ -233,7 +233,7 @@ public class LayerMarginsAnimator { aDx = scrollMargin(newMarginsX, aDx, overscroll.left, overscroll.right, mTouchTravelDistance.x, - aMetrics.viewportRectLeft, aMetrics.viewportRectRight, + aMetrics.viewportRectLeft, aMetrics.viewportRectRight(), aMetrics.pageRectLeft, aMetrics.pageRectRight, mMaxMargins.left, mMaxMargins.right, aMetrics.isRTL); @@ -242,7 +242,7 @@ public class LayerMarginsAnimator { aDy = scrollMargin(newMarginsY, aDy, overscroll.top, overscroll.bottom, mTouchTravelDistance.y, - aMetrics.viewportRectTop, aMetrics.viewportRectBottom, + aMetrics.viewportRectTop, aMetrics.viewportRectBottom(), aMetrics.pageRectTop, aMetrics.pageRectBottom, mMaxMargins.top, mMaxMargins.bottom, false); diff --git a/widget/android/AndroidBridge.cpp b/widget/android/AndroidBridge.cpp index 03a031579a5e..45d691aa6069 100644 --- a/widget/android/AndroidBridge.cpp +++ b/widget/android/AndroidBridge.cpp @@ -1888,7 +1888,8 @@ AndroidBridge::GetDisplayPort(bool aPageSizeUpdate, bool aIsBrowserContentDispla JNIEnv* const env = jni::GetGeckoThreadEnv(); AutoLocalJNIFrame jniFrame(env, 1); - float x, y, width, height, + int width, height; + float x, y, pageLeft, pageTop, pageRight, pageBottom, cssPageLeft, cssPageTop, cssPageRight, cssPageBottom, zoom; @@ -1909,7 +1910,7 @@ AndroidBridge::GetDisplayPort(bool aPageSizeUpdate, bool aIsBrowserContentDispla auto jmetrics = ImmutableViewportMetrics::New( pageLeft, pageTop, pageRight, pageBottom, cssPageLeft, cssPageTop, cssPageRight, cssPageBottom, - x, y, x + width, y + height, + x, y, width, height, zoom); DisplayPortMetrics::LocalRef displayPortMetrics = mLayerClient->GetDisplayPort( diff --git a/widget/android/GeneratedJNIWrappers.cpp b/widget/android/GeneratedJNIWrappers.cpp index f1e400138362..19bd31b281c0 100644 --- a/widget/android/GeneratedJNIWrappers.cpp +++ b/widget/android/GeneratedJNIWrappers.cpp @@ -1137,7 +1137,7 @@ constexpr char ImmutableViewportMetrics::name[]; constexpr char ImmutableViewportMetrics::New_t::name[]; constexpr char ImmutableViewportMetrics::New_t::signature[]; -auto ImmutableViewportMetrics::New(float a0, float a1, float a2, float a3, float a4, float a5, float a6, float a7, float a8, float a9, float a10, float a11, float a12) -> ImmutableViewportMetrics::LocalRef +auto ImmutableViewportMetrics::New(float a0, float a1, float a2, float a3, float a4, float a5, float a6, float a7, float a8, float a9, int32_t a10, int32_t a11, float a12) -> ImmutableViewportMetrics::LocalRef { return mozilla::jni::Constructor::Call(nullptr, nullptr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); } diff --git a/widget/android/GeneratedJNIWrappers.h b/widget/android/GeneratedJNIWrappers.h index 9276ae7f6058..4bc377a354ad 100644 --- a/widget/android/GeneratedJNIWrappers.h +++ b/widget/android/GeneratedJNIWrappers.h @@ -2739,19 +2739,19 @@ public: float, float, float, - float, - float, + int32_t, + int32_t, float> Args; static constexpr char name[] = ""; static constexpr char signature[] = - "(FFFFFFFFFFFFF)V"; + "(FFFFFFFFFFIIF)V"; static const bool isStatic = false; static const bool isMultithreaded = true; static const mozilla::jni::ExceptionMode exceptionMode = mozilla::jni::ExceptionMode::ABORT; }; - static auto New(float, float, float, float, float, float, float, float, float, float, float, float, float) -> ImmutableViewportMetrics::LocalRef; + static auto New(float, float, float, float, float, float, float, float, float, float, int32_t, int32_t, float) -> ImmutableViewportMetrics::LocalRef; }; diff --git a/widget/android/nsIAndroidBridge.idl b/widget/android/nsIAndroidBridge.idl index 841e216fa0d0..382d52764abf 100644 --- a/widget/android/nsIAndroidBridge.idl +++ b/widget/android/nsIAndroidBridge.idl @@ -38,12 +38,12 @@ interface nsIAndroidBrowserApp : nsISupports { nsIUITelemetryObserver getUITelemetryObserver(); }; -[scriptable, uuid(59cfcb35-69b7-47b2-8155-32b193272666)] +[scriptable, uuid(92ae801d-da9c-4a24-b2b6-344c4af7008b)] interface nsIAndroidViewport : nsISupports { readonly attribute float x; readonly attribute float y; - readonly attribute float width; - readonly attribute float height; + readonly attribute int32_t width; + readonly attribute int32_t height; readonly attribute float pageLeft; readonly attribute float pageTop; readonly attribute float pageRight;