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

Unified Diff: ui/android/view_android.cc

Issue 2890713002: Fix a bug in updating physical backing size (Closed)
Patch Set: comment Created 3 years, 7 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
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/FullscreenWebContentsActivityTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/view_android.cc
diff --git a/ui/android/view_android.cc b/ui/android/view_android.cc
index 8503cf837fff15a87f1cad682ea9519ffae8e002..489a1b930c6ed2995f824e310d458b041b3a5302 100644
--- a/ui/android/view_android.cc
+++ b/ui/android/view_android.cc
@@ -126,7 +126,11 @@ void ViewAndroid::AddChild(ViewAndroid* child) {
if (child->parent_)
child->RemoveFromParent();
child->parent_ = this;
- child->OnPhysicalBackingSizeChanged(physical_size_);
+
+ // Empty physical backing size need not propagating down since it can
+ // accidentally overwrite the valid ones in the children.
+ if (!physical_size_.IsEmpty())
+ child->OnPhysicalBackingSizeChanged(physical_size_);
}
// static
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/FullscreenWebContentsActivityTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698