[Webkit-unassigned] [Bug 38226] Full width spaces are collapsed in option element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 5 18:22:52 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=38226


Xianzhu Wang <phnixwxz at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dglazkov at chromium.org




--- Comment #2 from Xianzhu Wang <phnixwxz at gmail.com>  2010-05-05 18:22:52 PST ---
The reason that full-width spaces are collapsed is that the option element uses
String::stripWhiteSpace() and String::simplifyWhiteSpace() which handle the set
of white spaces different from the set of collapsable white spaces defined in
HTML/CSS spec.

I think there are two ways of solutions:

1. Add String::stringHTMLWhiteSpace() and String::simplifyHTMLWhiteSpace() and
call them from OptionElement. In this way, the code change is small, but we
can't share the same code with existing HTML/CSS white space handling.

2. Refactor rendering of select element and option element, let option elements
be rendered as text blocks, thus take advantage of existing HTML/CSS white
space handling. In this way, we can also allow the style of select/option to be
controlled by CSS, such as text wrapping, word breaking, hover color, margin
and padding, etc. Some hard-coded features, such as optgroup indentation, can
also be implemented with CSS.

I'd like to hear more opinions.

-- 
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