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

Issue 819273003: View: Resizing a layer in RTL now correctly repositions its children. (Closed)

Created:
5 years, 11 months ago by Matt Giuca
Modified:
5 years, 11 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina, tdanderson+views_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

View: Resizing a layer in RTL now correctly repositions its children. Split View::BoundsChanged into a new method MirroredBoundsChanged, which recursively calls MirroredBoundsChanged on children in RTL mode if the parent's width has changed. This causes the children to be correctly updated with respect to their new mirrored bounds. BUG=446407 Committed: https://crrev.com/a0f351d875b4d278883761ac6ffa9e02279391a4 Cr-Commit-Position: refs/heads/master@{#311011}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Move recursive call out of MirroredBoundsChanged (equivalent). #

Total comments: 4

Patch Set 3 : Directly call UpdateChildLayerBounds instead of a new method. #

Total comments: 2

Patch Set 4 : Simplify logic; separate and expand tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -0 lines) Patch
M ui/views/view.cc View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
M ui/views/view_unittest.cc View 1 2 3 1 chunk +63 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (2 generated)
Matt Giuca
Hi Scott, PTAL. Thanks!
5 years, 11 months ago (2015-01-06 07:08:26 UTC) #2
sky
https://codereview.chromium.org/819273003/diff/1/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/819273003/diff/1/ui/views/view.cc#newcode1927 ui/views/view.cc:1927: if (base::i18n::IsRTL() && bounds_.width() != previous_bounds.width()) { I get ...
5 years, 11 months ago (2015-01-06 16:45:50 UTC) #3
Matt Giuca
https://codereview.chromium.org/819273003/diff/1/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/819273003/diff/1/ui/views/view.cc#newcode1927 ui/views/view.cc:1927: if (base::i18n::IsRTL() && bounds_.width() != previous_bounds.width()) { You can't ...
5 years, 11 months ago (2015-01-07 00:48:44 UTC) #4
sky
https://codereview.chromium.org/819273003/diff/1/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/819273003/diff/1/ui/views/view.cc#newcode1927 ui/views/view.cc:1927: if (base::i18n::IsRTL() && bounds_.width() != previous_bounds.width()) { On 2015/01/07 ...
5 years, 11 months ago (2015-01-07 16:55:57 UTC) #5
Matt Giuca
https://codereview.chromium.org/819273003/diff/1/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/819273003/diff/1/ui/views/view.cc#newcode1927 ui/views/view.cc:1927: if (base::i18n::IsRTL() && bounds_.width() != previous_bounds.width()) { Hmm, yeah ...
5 years, 11 months ago (2015-01-07 23:30:00 UTC) #6
sky
https://codereview.chromium.org/819273003/diff/20001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/819273003/diff/20001/ui/views/view.cc#newcode1897 ui/views/view.cc:1897: void View::MirroredBoundsChanged(const gfx::Rect& previous_bounds) { I'm still against a ...
5 years, 11 months ago (2015-01-08 03:33:28 UTC) #7
Matt Giuca
https://codereview.chromium.org/819273003/diff/20001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/819273003/diff/20001/ui/views/view.cc#newcode1897 ui/views/view.cc:1897: void View::MirroredBoundsChanged(const gfx::Rect& previous_bounds) { Is this what you ...
5 years, 11 months ago (2015-01-08 04:22:15 UTC) #8
sky
https://codereview.chromium.org/819273003/diff/20001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/819273003/diff/20001/ui/views/view.cc#newcode1897 ui/views/view.cc:1897: void View::MirroredBoundsChanged(const gfx::Rect& previous_bounds) { On 2015/01/08 04:22:15, Matt ...
5 years, 11 months ago (2015-01-08 22:05:02 UTC) #9
Matt Giuca
https://codereview.chromium.org/819273003/diff/20001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/819273003/diff/20001/ui/views/view.cc#newcode1897 ui/views/view.cc:1897: void View::MirroredBoundsChanged(const gfx::Rect& previous_bounds) { OK I see how ...
5 years, 11 months ago (2015-01-09 03:28:05 UTC) #10
Matt Giuca
Note: Removed mention of the app launcher, and the app_list bug (http://crbug.com/441962) in the CL ...
5 years, 11 months ago (2015-01-09 03:30:57 UTC) #11
sky
LGTM Layer's are painted separately from views. So moving layers around triggers the appropriate repaint ...
5 years, 11 months ago (2015-01-09 16:56:38 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/819273003/60001
5 years, 11 months ago (2015-01-11 23:54:21 UTC) #14
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 11 months ago (2015-01-12 00:03:34 UTC) #15
commit-bot: I haz the power
5 years, 11 months ago (2015-01-12 00:04:36 UTC) #16
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/a0f351d875b4d278883761ac6ffa9e02279391a4
Cr-Commit-Position: refs/heads/master@{#311011}

Powered by Google App Engine
This is Rietveld 408576698