[Webkit-unassigned] [Bug 50969] <option> should support the dir attribute and be displayed accordingly both in the dropdown and after being chosen

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 8 16:16:25 PST 2011


--- Comment #16 from Xiaomei Ji <xji at chromium.org>  2011-02-08 16:16:24 PST ---
A summary of the changes in case I made Csaba and Martin confused in IRC.

1. This bug is about in what directionality <select>/<option> should be rendered. It is standardized in HTML5. 
Basically, the items should be displayed according to its directionality defined in <option> in both button text (when chosen) and in drop-down menu.

As to how <select>/<option> should be aligned, it seems not defined in standard. Webkit currently alignes item in drop-down box and in button text (when chosen) according to <select>'s directionality. It disregards text-align attribute in <select>. Please refer to mitz's comment in  https://bugs.webkit.org/show_bug.cgi?id=19785#c19.

2. Mitz implemented rendering button text according to its directionality defined in <option> and aligning button text based on <select>'s directionality in r76983.
The implementation is exposed through ChromeClient::selectItemAlignmentFollowsMenuWritingDirection().

In the same changset, Mitz also implemented rending the items in drop-down box using its directionality defined in <option> and aligning items in drop-down box using <select>'s directionality for Mac OS X Snow leopard.

3. Other ports need to do the following to achieve the same behavior:
3.1 override selectItemAlignmentFollowsMenuWritingDirection() as true  and override selectItemWritingDirectionIsNatural() as false so that button text is rendered correctly on both directionality and alignment.
3.2  implement rendering of items in drop-down box using <option>'s directionality and aligning by <select>'s writing direction as what mitz did in webkit2 or platform/mac/PopupMenuMac.mm.
Chromium already implemented aligning items in drop-down box using <select>'s writing direction in WebCore/platform/chromium/PopupMenuChromium.cpp a while back. It also has implementation ready to render items in drop-down using item's directionality, and it just needs to turn on the switch. So, the chromium's patch for Windows and Linux committed here basically do not have any implementation of 3.2.

4. I added fast/text/international/pop-up-button-text-alignment-and-direction, which *only* test the rendering of button text.
It's skipped in gtk and qt for now. ossy and mrobinson will take care of qt and gtk ports.
To check the correctness, the button text should be rendered the same as the text below it per directionality and alignment as specified in the 1st line in the test.

5. We should add automatic test for drop-down box as well.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list