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

Issue 451983004: Fix rtl text shifting in PopupListBox (Closed)

Created:
6 years, 4 months ago by keishi
Modified:
6 years, 4 months ago
Reviewers:
tkent
CC:
blink-reviews
Project:
blink
Visibility:
Public.

Description

Fix rtl text shifting in PopupListBox What is happening is: 1. User opens popup 2. PopupListBox::layout measure's row width 2-1. text width is calculated as ltr 2-2. this width for ltr is registered to the WidthCache 3. PopupListBox::paintRow is called 3-1. WidthCache has a interval mechanism so the cached ltr width is not used 3-2. text width is calculated as rtl 3-3. Text is drawn as rtl 4. User hovers over items 5. PopupListBox::paintRow is called each time the selection changes 5-1. WidthCache's cached ltr width is used 5-2. Text is drawn as rtl (rtl width is shorter than the rtl width so there is extra space on the right side) There are two problems - PopupListBox::layout is measuring row width using ltr always - WidthCache is returning ltr width for rtl text This just fixes PopupListBox::layout. BUG=398929 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179906

Patch Set 1 #

Patch Set 2 : Added test #

Total comments: 4

Patch Set 3 : #

Patch Set 4 : #

Total comments: 5

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -7 lines) Patch
M Source/web/PopupListBox.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M Source/web/PopupListBox.cpp View 1 2 chunks +12 lines, -7 lines 0 comments Download
M Source/web/tests/PopupMenuTest.cpp View 1 2 3 4 2 chunks +63 lines, -0 lines 0 comments Download
A Source/web/tests/data/popup/select_rtl_width.html View 1 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
keishi
What is happening is: 1. User opens popup 2. PopupListBox::layout measure's row width 2-1. text ...
6 years, 4 months ago (2014-08-08 07:05:36 UTC) #1
tkent
On 2014/08/08 07:05:36, keishi wrote: > What is happening is: > 1. User opens popup ...
6 years, 4 months ago (2014-08-08 07:10:05 UTC) #2
keishi
On 2014/08/08 07:10:05, tkent wrote: > On 2014/08/08 07:05:36, keishi wrote: > > What is ...
6 years, 4 months ago (2014-08-08 14:27:30 UTC) #3
tkent
https://codereview.chromium.org/451983004/diff/20001/Source/web/tests/SelectPopupMenuStyleTest.cpp File Source/web/tests/SelectPopupMenuStyleTest.cpp (right): https://codereview.chromium.org/451983004/diff/20001/Source/web/tests/SelectPopupMenuStyleTest.cpp#newcode1 Source/web/tests/SelectPopupMenuStyleTest.cpp:1: // Copyright 2014 The Chromium Authors. All rights reserved. ...
6 years, 4 months ago (2014-08-11 01:35:29 UTC) #4
keishi
https://codereview.chromium.org/451983004/diff/20001/Source/web/tests/SelectPopupMenuStyleTest.cpp File Source/web/tests/SelectPopupMenuStyleTest.cpp (right): https://codereview.chromium.org/451983004/diff/20001/Source/web/tests/SelectPopupMenuStyleTest.cpp#newcode1 Source/web/tests/SelectPopupMenuStyleTest.cpp:1: // Copyright 2014 The Chromium Authors. All rights reserved. ...
6 years, 4 months ago (2014-08-11 03:08:52 UTC) #5
tkent
lgtm https://codereview.chromium.org/451983004/diff/60001/Source/web/tests/PopupMenuTest.cpp File Source/web/tests/PopupMenuTest.cpp (right): https://codereview.chromium.org/451983004/diff/60001/Source/web/tests/PopupMenuTest.cpp#newcode560 Source/web/tests/PopupMenuTest.cpp:560: virtual void SetUp() OVERRIDE https://codereview.chromium.org/451983004/diff/60001/Source/web/tests/PopupMenuTest.cpp#newcode565 Source/web/tests/PopupMenuTest.cpp:565: virtual void ...
6 years, 4 months ago (2014-08-11 03:16:08 UTC) #6
keishi
https://codereview.chromium.org/451983004/diff/60001/Source/web/tests/PopupMenuTest.cpp File Source/web/tests/PopupMenuTest.cpp (right): https://codereview.chromium.org/451983004/diff/60001/Source/web/tests/PopupMenuTest.cpp#newcode560 Source/web/tests/PopupMenuTest.cpp:560: virtual void SetUp() On 2014/08/11 03:16:07, tkent wrote: > ...
6 years, 4 months ago (2014-08-11 03:33:21 UTC) #7
keishi
The CQ bit was checked by keishi@chromium.org
6 years, 4 months ago (2014-08-11 03:33:25 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/keishi@chromium.org/451983004/80001
6 years, 4 months ago (2014-08-11 03:33:42 UTC) #9
commit-bot: I haz the power
6 years, 4 months ago (2014-08-11 04:30:17 UTC) #10
Message was sent while issue was closed.
Change committed as 179906

Powered by Google App Engine
This is Rietveld 408576698