Bug 31831

Summary: [Android] The select elements do not reflect the actual choice the user makes.
Product: WebKit Reporter: Andrei Popescu <andreip>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: android-webkit-unforking, benm
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Other   
Attachments:
Description Flags
Handle the drawing of ListBoxes in Android code. Also fix exisiting style issues. dglazkov: review+

Description Andrei Popescu 2009-11-24 06:57:19 PST
<select multiple="multiple"> elements always show the first of the available choices instead of the first item that was actually selected by the user.
Comment 1 Andrei Popescu 2009-11-25 07:47:07 PST
Created attachment 43846 [details]
Handle the drawing of ListBoxes in Android code. Also fix exisiting style issues.
Comment 2 Dimitri Glazkov (Google) 2009-11-25 08:01:50 PST
Comment on attachment 43846 [details]
Handle the drawing of ListBoxes in Android code. Also fix exisiting style issues.

Thanks for cleaning up the old code!

r=me, except:

>  bool RenderThemeAndroid::paintTextArea(RenderObject* obj, const RenderObject::PaintInfo& info, const IntRect& rect)
>  {
> -    if (obj->isMenuList())
> -        return paintCombo(obj, info, rect);
> +    if (obj->isListBox()) {
> +        paintCombo(obj, info, rect);

Can this be just an early return?
Comment 3 Ben Murdoch 2009-11-25 08:31:09 PST
(In reply to comment #2)
> (From update of attachment 43846 [details])
> Thanks for cleaning up the old code!
> 
> r=me, except:
> 
> >  bool RenderThemeAndroid::paintTextArea(RenderObject* obj, const RenderObject::PaintInfo& info, const IntRect& rect)
> >  {
> > -    if (obj->isMenuList())
> > -        return paintCombo(obj, info, rect);
> > +    if (obj->isListBox()) {
> > +        paintCombo(obj, info, rect);
> 
> Can this be just an early return?

I can make this change on landing.
Comment 4 Ben Murdoch 2009-11-25 08:51:12 PST
Landed as r51386.