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

Issue 1866403005: Fix rtl shelf overflow bubble (Closed)

Created:
4 years, 8 months ago by Greg Levin
Modified:
4 years, 7 months ago
Reviewers:
msw, sky
CC:
chromium-reviews, msw+watch_chromium.org, sadrul, tfarina, groby+bubble_chromium.org, hcarmona+bubble_chromium.org, kalyank, rouslan+bubble_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix rtl shelf overflow bubble BUG=551712 TEST=Set Chrome OS with rtl language (e.g. Hebrew), position shelf on left, add icons to shelf until it overflows. Click on overflow button, observe that overflow shelf bubble is shown. Committed: https://crrev.com/8e44a16c274b3cb9d1e6aa9d8cb96c7aa9b6d510 Cr-Commit-Position: refs/heads/master@{#390884}

Patch Set 1 #

Total comments: 15

Patch Set 2 : Review: rename var, improve comment #

Total comments: 8

Patch Set 3 : Move inset swapping to BubbleBorder #

Total comments: 4

Patch Set 4 : Move fix from BubbleBorder back to BubbleFrameView #

Total comments: 2

Patch Set 5 : Swap lines of code #

Patch Set 6 : Merge (bubble_delegate -> bubble_dialog_delegate) #

Patch Set 7 : Add unit test #

Total comments: 2

Patch Set 8 : Move RTL adjustment (bubble_frame_view -> non_client_view) #

Total comments: 4

Patch Set 9 : Small review fixes (and merge) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -4 lines) Patch
M ash/shelf/overflow_bubble_view.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M ash/shelf/shelf_view_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -2 lines 0 comments Download
M ash/test/overflow_bubble_view_test_api.h View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
M ash/test/overflow_bubble_view_test_api.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/bubble/bubble_dialog_delegate.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 0 comments Download
M ui/views/bubble/bubble_dialog_delegate.cc View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -1 line 0 comments Download
M ui/views/window/non_client_view.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M ui/views/window/non_client_view.cc View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -1 line 0 comments Download

Messages

Total messages: 42 (8 generated)
Greg Levin
msw@, I've just sent you an email with more details on what I'm trying to ...
4 years, 8 months ago (2016-04-08 19:02:21 UTC) #2
msw
Also, check if BubbleBorder::GetInsets() is using the wrong arrow... https://codereview.chromium.org/1866403005/diff/1/ash/shelf/overflow_bubble_view.cc File ash/shelf/overflow_bubble_view.cc (right): https://codereview.chromium.org/1866403005/diff/1/ash/shelf/overflow_bubble_view.cc#newcode45 ash/shelf/overflow_bubble_view.cc:45: ...
4 years, 8 months ago (2016-04-08 19:23:08 UTC) #3
Greg Levin
> Also, check if BubbleBorder::GetInsets() is using the wrong arrow... BubbleBorder has the arrow that's ...
4 years, 8 months ago (2016-04-12 17:51:38 UTC) #4
msw
I also wonder why the bubble is placed offscreen without any of these changes; why ...
4 years, 8 months ago (2016-04-12 18:58:19 UTC) #5
Greg Levin
To clarify, there are two problems here (possibly related, but not directly): 1) RTL mirrors ...
4 years, 8 months ago (2016-04-12 23:06:20 UTC) #6
msw
https://codereview.chromium.org/1866403005/diff/1/ash/shelf/overflow_bubble_view.cc File ash/shelf/overflow_bubble_view.cc (right): https://codereview.chromium.org/1866403005/diff/1/ash/shelf/overflow_bubble_view.cc#newcode45 ash/shelf/overflow_bubble_view.cc:45: set_arrow(GetBubbleArrow()); On 2016/04/12 23:06:20, Greg Levin wrote: > On ...
4 years, 8 months ago (2016-04-13 18:03:47 UTC) #7
Greg Levin
Please have another look! https://codereview.chromium.org/1866403005/diff/1/ash/shelf/overflow_bubble_view.cc File ash/shelf/overflow_bubble_view.cc (right): https://codereview.chromium.org/1866403005/diff/1/ash/shelf/overflow_bubble_view.cc#newcode45 ash/shelf/overflow_bubble_view.cc:45: set_arrow(GetBubbleArrow()); On 2016/04/13 18:03:47, msw ...
4 years, 8 months ago (2016-04-13 21:16:03 UTC) #8
msw
lgtm with nits, but +sky for heads up / review. https://codereview.chromium.org/1866403005/diff/20001/ui/views/bubble/bubble_delegate.h File ui/views/bubble/bubble_delegate.h (right): https://codereview.chromium.org/1866403005/diff/20001/ui/views/bubble/bubble_delegate.h#newcode191 ...
4 years, 8 months ago (2016-04-14 02:03:06 UTC) #10
sky
https://codereview.chromium.org/1866403005/diff/20001/ui/views/bubble/bubble_frame_view.cc File ui/views/bubble/bubble_frame_view.cc (right): https://codereview.chromium.org/1866403005/diff/20001/ui/views/bubble/bubble_frame_view.cc#newcode124 ui/views/bubble/bubble_frame_view.cc:124: // After GetBoundsForClientView() returns, RTL code will swap these ...
4 years, 8 months ago (2016-04-14 16:06:30 UTC) #11
Greg Levin
https://codereview.chromium.org/1866403005/diff/20001/ui/views/bubble/bubble_frame_view.cc File ui/views/bubble/bubble_frame_view.cc (right): https://codereview.chromium.org/1866403005/diff/20001/ui/views/bubble/bubble_frame_view.cc#newcode124 ui/views/bubble/bubble_frame_view.cc:124: // After GetBoundsForClientView() returns, RTL code will swap these ...
4 years, 8 months ago (2016-04-14 16:20:40 UTC) #12
sky
Not sure. You'll have to investigate that. On Thu, Apr 14, 2016 at 9:20 AM, ...
4 years, 8 months ago (2016-04-14 16:32:56 UTC) #13
Greg Levin
On 2016/04/14 16:32:56, sky wrote: > Not sure. You'll have to investigate that. > > ...
4 years, 8 months ago (2016-04-14 16:47:03 UTC) #14
sky
Is the automatic mirroring when in rtl in views causing the problem? On Thu, Apr ...
4 years, 8 months ago (2016-04-14 17:27:26 UTC) #15
Greg Levin
On 2016/04/14 17:27:26, sky wrote: > Is the automatic mirroring when in rtl in views ...
4 years, 8 months ago (2016-04-14 17:32:52 UTC) #16
sky
I don't believe so. If that is causing the problem, then the class that is ...
4 years, 8 months ago (2016-04-14 20:23:16 UTC) #17
Greg Levin
> I don't believe so. If that is causing the problem, then > the class ...
4 years, 8 months ago (2016-04-19 16:42:25 UTC) #18
sky
https://codereview.chromium.org/1866403005/diff/40001/ui/views/bubble/bubble_border.cc File ui/views/bubble/bubble_border.cc (right): https://codereview.chromium.org/1866403005/diff/40001/ui/views/bubble/bubble_border.cc#newcode273 ui/views/bubble/bubble_border.cc:273: if (swap_insets_rtl_ && !is_arrow_on_horizontal(arrow_)) Combine this with previous if ...
4 years, 8 months ago (2016-04-19 19:07:44 UTC) #19
sky
Also, be sure and add test coverage.
4 years, 8 months ago (2016-04-19 19:07:53 UTC) #20
Greg Levin
https://codereview.chromium.org/1866403005/diff/40001/ui/views/bubble/bubble_border.cc File ui/views/bubble/bubble_border.cc (right): https://codereview.chromium.org/1866403005/diff/40001/ui/views/bubble/bubble_border.cc#newcode273 ui/views/bubble/bubble_border.cc:273: if (swap_insets_rtl_ && !is_arrow_on_horizontal(arrow_)) On 2016/04/19 19:07:44, sky wrote: ...
4 years, 8 months ago (2016-04-19 20:04:55 UTC) #21
sky
Is it perhaps different depending upon whether the view is in a widget or not? ...
4 years, 8 months ago (2016-04-20 19:20:52 UTC) #22
Greg Levin
I'm reverting this back to a version closer to Patch #2, with the fix in ...
4 years, 7 months ago (2016-04-27 21:00:28 UTC) #23
sky
https://codereview.chromium.org/1866403005/diff/60001/ui/views/bubble/bubble_frame_view.cc File ui/views/bubble/bubble_frame_view.cc (right): https://codereview.chromium.org/1866403005/diff/60001/ui/views/bubble/bubble_frame_view.cc#newcode128 ui/views/bubble/bubble_frame_view.cc:128: client_bounds.set_x(GetMirroredXForRect(client_bounds)); Why do you swap here and not after ...
4 years, 7 months ago (2016-04-27 23:41:33 UTC) #24
Greg Levin
https://codereview.chromium.org/1866403005/diff/60001/ui/views/bubble/bubble_frame_view.cc File ui/views/bubble/bubble_frame_view.cc (right): https://codereview.chromium.org/1866403005/diff/60001/ui/views/bubble/bubble_frame_view.cc#newcode128 ui/views/bubble/bubble_frame_view.cc:128: client_bounds.set_x(GetMirroredXForRect(client_bounds)); On 2016/04/27 23:41:33, sky wrote: > Why do ...
4 years, 7 months ago (2016-04-28 15:14:34 UTC) #25
Greg Levin
Patch 7 adds a basic unit test for arrow direction under RTL, which was the ...
4 years, 7 months ago (2016-04-28 19:39:04 UTC) #26
msw
lgtm with a nit, but really deferring to Scott's review, and noting that it would ...
4 years, 7 months ago (2016-04-28 20:16:34 UTC) #27
sky
On Thu, Apr 28, 2016 at 8:14 AM, <glevin@chromium.org> wrote: > > https://codereview.chromium.org/1866403005/diff/60001/ui/views/bubble/bubble_frame_view.cc > File ...
4 years, 7 months ago (2016-04-29 00:29:47 UTC) #28
Greg Levin
>> Would I put a "bool no_rtl_mirror_client_" member in NonClientView, then >> (a) apply it ...
4 years, 7 months ago (2016-04-29 14:32:04 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1866403005/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1866403005/140001
4 years, 7 months ago (2016-04-29 14:47:44 UTC) #31
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-29 15:44:29 UTC) #33
sky
LGTM https://codereview.chromium.org/1866403005/diff/140001/ash/shelf/shelf_view_unittest.cc File ash/shelf/shelf_view_unittest.cc (right): https://codereview.chromium.org/1866403005/diff/140001/ash/shelf/shelf_view_unittest.cc#newcode1012 ash/shelf/shelf_view_unittest.cc:1012: EXPECT_EQ(bubble_view_api.GetBubbleFrameView()->bubble_border()->arrow(), nit: order for assertions is expected, actual. ...
4 years, 7 months ago (2016-04-29 17:17:28 UTC) #34
Greg Levin
https://codereview.chromium.org/1866403005/diff/140001/ash/shelf/shelf_view_unittest.cc File ash/shelf/shelf_view_unittest.cc (right): https://codereview.chromium.org/1866403005/diff/140001/ash/shelf/shelf_view_unittest.cc#newcode1012 ash/shelf/shelf_view_unittest.cc:1012: EXPECT_EQ(bubble_view_api.GetBubbleFrameView()->bubble_border()->arrow(), On 2016/04/29 17:17:27, sky wrote: > nit: order ...
4 years, 7 months ago (2016-05-02 00:49:19 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1866403005/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1866403005/160001
4 years, 7 months ago (2016-05-02 00:49:32 UTC) #38
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 7 months ago (2016-05-02 01:40:55 UTC) #39
commit-bot: I haz the power
4 years, 7 months ago (2016-05-02 01:42:34 UTC) #41
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/8e44a16c274b3cb9d1e6aa9d8cb96c7aa9b6d510
Cr-Commit-Position: refs/heads/master@{#390884}

Powered by Google App Engine
This is Rietveld 408576698