Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(867)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java

Issue 888793002: Make content_browsertests for Chrome on Android running with valid Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
index 950ea3bb211e9737ad1c3ba9ffe95b321919c65b..994cf247bbb9923ea5a8bdc328cf06dc18606c71 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
@@ -103,6 +103,18 @@ public class ContentViewRenderView extends FrameLayout {
mContentReadbackHandler.initNativeContentReadbackHandler();
}
+ @Override
+ protected void onSizeChanged(int wPix, int hPix, int owPix, int ohPix) {
+ // If mContentViewCore was initialized too early, physical backing size is empty.
+ // In this case, we should resize it before viewport size is set.
+ // TODO(jaekyun): Remove this workaround when more proper fix is landed.
+ if (mContentViewCore != null && mContentViewCore.getPhysicalBackingWidthPix() == 0
+ && mContentViewCore.getPhysicalBackingHeightPix() == 0) {
+ mContentViewCore.onPhysicalBackingSizeChanged(wPix, hPix);
+ }
+ super.onSizeChanged(wPix, hPix, owPix, ohPix);
+ }
+
/**
* @return The content readback handler.
*/

Powered by Google App Engine
This is Rietveld 408576698