Summary: | [Chromium] RTL <select> dropdown box expands to right instead of left | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Xiaomei Ji <xji> | ||||||||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | cira, jshin, playmobil, vivianz, xji | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | Windows Vista | ||||||||||||
URL: | http://news.google.com/news?ned=ar_me | ||||||||||||
Attachments: |
|
Description
Xiaomei Ji
2010-04-07 14:23:40 PDT
Created attachment 52783 [details]
expected behavior
related chromium bug: http://code.google.com/p/chromium/issues/detail?id=40582 Created attachment 52994 [details]
patch
Jay reviewed the patch in chromium's codereview site: http://codereview.chromium.org/1621011/show Comment on attachment 52994 [details] patch > > + // Adjust the starting x-axis for RTL dropdown. For RTL dropdown, the right edge > + // of dropdown box should be aligned with the right edge of <select> element box, > + // and the dropdown box should be expanded to left if more space needed. > + bool rightAligned = m_listBox->m_popupClient->menuStyle().textDirection() == RTL; Can m_popupClient be 0 here? > + if (rightAligned) > + move(x() + popupWidth - listBoxWidth, y()); > > invalidate(); > } Created attachment 53899 [details]
patch w/ manual test
(In reply to comment #5) > (From update of attachment 52994 [details]) > > > > + // Adjust the starting x-axis for RTL dropdown. For RTL dropdown, the right edge > > + // of dropdown box should be aligned with the right edge of <select> element box, > > + // and the dropdown box should be expanded to left if more space needed. > > + bool rightAligned = m_listBox->m_popupClient->menuStyle().textDirection() == RTL; > > Can m_popupClient be 0 here? I do not think it can be 0 here. But I added a NULL check for safe. > > > + if (rightAligned) > > + move(x() + popupWidth - listBoxWidth, y()); > > > > invalidate(); > > } Comment on attachment 53899 [details]
patch w/ manual test
ok.
Created attachment 53903 [details]
patch w/ manual test
Comment on attachment 53903 [details]
patch w/ manual test
per author's request.
Manually committed r57992: http://trac.webkit.org/changeset/57992 |