On Sun, Dec 30, 2007 at 07:52:35AM +0000, Jeremy Henty wrote:
This patch adds (partial) support for SELECT controls in forms.
Good work Jeremy, committed! I was also eager to have this working. :-)
Please note:
* SELECTED and DISABLED are supported.
* If no item is selected in the HTML source then the first item is selected by default. This means the code must delay adding any items until the SELECT is closed, since the DW API forces us to choose whether to select an item when creating it and won't let us change that later.
* MULTI and SIZE are not supported: we render all SELECT controls as option menus that allow only one choice. I believe more work needs to be done on the DW ListResource before we can support multiple selections.
* I added IN_OPTION to the HTML parsing flags. The code is also more careful than before to set/unset IN_FORM, IN_TEXTAREA, IN_SELECT and IN_OPTION. This may be a little redundant but I wanted to be sure that HTML tag soup can't make the flags inconsistent. I doubt the overhead of the extra bit-flipping is significant.
A more detailed comment probably next year. I just wanted to commit this cookie!. -- Cheers Jorge.-