Index: content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java b/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java |
index be362fb406aa1aad726a44dd2d769e11976cad9d..abb6ffc1a0d916bb8d7f78d93ecbd68056c5259d 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java |
@@ -271,6 +271,14 @@ public class RenderCoordinates { |
public boolean hasFixedPageScale() { return mMinPageScaleFactor == mMaxPageScaleFactor; } |
/** |
+ * @return True if the page has a width=device-width or narrower viewport. |
+ */ |
+ public boolean hasMobileViewport() { |
+ float windowWidthDip = mPageScaleFactor * mLastFrameViewportWidthCss; |
+ return mContentWidthCss <= windowWidthDip; |
+ } |
+ |
+ /** |
* @return Maximum possible horizontal scroll in physical pixels. |
*/ |
public float getMaxHorizontalScrollPix() { |