[webkit-dev] Render path for <select> form controls; layout path for buttons

Darin Adler darin at apple.com
Wed Jul 2 15:49:38 PDT 2008


On Jul 2, 2008, at 1:26 PM, Joshua Chia wrote:

> I know that for radio buttons and check boxes, the painting and size  
> setting are done in RenderTheme.  For <select> controls, both the  
> drop-down version and the list version, where are these things  
> done?  Which functions are called?

The renderers for these are RenderMenuList and RenderListBox. And the  
menu is PopupMenu. You can find the code in those source files and see  
what comes from the theme. For example for RenderMenuList it's some  
functions that provide internal padding and a minimum list size. And  
in RenderListBox it's some colors that come from the theme.

> Also, for regular buttons, what do I need to do to implement them,  
> i.e. which functions do I implement to set the size, position, etc  
> correctly according to the text content?  The only thing I know is  
> that they are painted with RenderTheme::paintButton().

adjustButtonStyle and setButtonSize.

     -- Darin



More information about the webkit-dev mailing list