Index: ui/views/view.cc |
diff --git a/ui/views/view.cc b/ui/views/view.cc |
index 7bf2ee68bc5512afdb7cb7ecbedbbf1fe6b0de2a..b0a5bf5035bafa1a352a2e8d65d32dc587c2ba67 100644 |
--- a/ui/views/view.cc |
+++ b/ui/views/view.cc |
@@ -1894,7 +1894,7 @@ void View::VisibilityChangedImpl(View* starting_from, bool is_visible) { |
VisibilityChanged(starting_from, is_visible); |
} |
-void View::BoundsChanged(const gfx::Rect& previous_bounds) { |
+void View::MirroredBoundsChanged(const gfx::Rect& previous_bounds) { |
// Mark our bounds as dirty for the paint root, also see if we need to |
// recompute our children's bounds due to origin change. |
bool origin_changed = |
@@ -1922,6 +1922,19 @@ void View::BoundsChanged(const gfx::Rect& previous_bounds) { |
UpdateChildLayerBounds(CalculateOffsetToAncestorWithLayer(NULL)); |
} |
+ // In RTL mode, if our width has changed, our children's mirrored bounds will |
+ // have changed. Notify them, so that they can update their layer bounds, etc. |
+ if (base::i18n::IsRTL() && bounds_.width() != previous_bounds.width()) { |
sky
2015/01/06 16:45:50
I get that you need to do something in this case,
Matt Giuca
2015/01/07 00:48:44
You can't just call UpdateChildLayerBounds on the
sky
2015/01/07 16:55:56
UpdateChildLayerBounds calls SetLayerBounds.
Matt Giuca
2015/01/07 23:30:00
Hmm, yeah it does (didn't notice that before), but
|
+ for (int i = 0; i < child_count(); ++i) { |
+ View* child = child_at(i); |
+ child->MirroredBoundsChanged(child->bounds()); |
+ } |
+ } |
+} |
+ |
+void View::BoundsChanged(const gfx::Rect& previous_bounds) { |
+ MirroredBoundsChanged(previous_bounds); |
+ |
OnBoundsChanged(previous_bounds); |
if (previous_bounds.size() != size()) { |