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

Unified Diff: ui/app_list/views/contents_view.cc

Issue 844883002: App list: Fixed rendering issues upon opening the window in RTL mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rewrite calamity TODO in the other file. Created 5 years, 11 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 | « ui/app_list/views/apps_grid_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/contents_view.cc
diff --git a/ui/app_list/views/contents_view.cc b/ui/app_list/views/contents_view.cc
index 069afa01d921e6bed28db5f6f4395d369bd8bc67..40d18f1f44b750c3e780d956b572212acb5ff413 100644
--- a/ui/app_list/views/contents_view.cc
+++ b/ui/app_list/views/contents_view.cc
@@ -494,6 +494,17 @@ void ContentsView::Layout() {
if (rect.IsEmpty())
return;
+ // TODO(mgiuca): Temporary work-around for http://crbug.com/441962 and
+ // http://crbug.com/446978. This will first be called while ContentsView is
+ // 0x0, which means that the child views will be positioned incorrectly in RTL
+ // mode (the position is based on the parent's size). When the parent is later
+ // resized, the children are not repositioned due to http://crbug.com/446407.
+ // Therefore, we must not position the children until the parent is the
+ // correct size.
+ // NOTE: There is a similar hack in AppsGridView::CalculateIdealBounds; both
+ // should be removed once http://crbug.com/446407 is resolved.
+ if (GetContentsBounds().IsEmpty())
+ return;
gfx::Rect offscreen_target(rect);
offscreen_target.set_x(-rect.width());
« no previous file with comments | « ui/app_list/views/apps_grid_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698