[webkit-dev] Widget / Drawing API thoughts

Darin Adler darin at apple.com
Tue Jun 28 10:06:43 PDT 2005

On Jun 27, 2005, at 6:14 PM, Timothy Hatcher wrote:

> If a CSS file starts requesting specific visual changes (aside from  
> margins, and maybe even padding for some controls) switch over to a  
> non-native, fully styleable control (ala the <button> tag vs <input  
> type="button">). In my web design experience it is typically an all  
> or nothing game, either the designer wants to tweak the control in  
> every direction visually, or no form control selectors at all.  
> (This isn't always the case, but likely the majority.)

Yes, this is what we have in mind. Dave Hyatt and I have been talking  
about this basic approach for at least the last couple of years. I  
also think there should be a CSS property that explicitly sets the  
switch. The "automatic switchover" would be the default, but you  
could override the heuristic with the CSS property.

> That mix-and-match middle ground is where it gets shaky. Mac OS X  
> native elements can control text-color and background (color only).  
> So does that mean you would or would-not switch to non-native if  
> the native controls are capable of handling the style request?  
> (This would obviously be platform dependent, with Mac OS X controls  
> being the least styleable of most platforms.)

Also consider that WebKit could easily have Mac OS X styled controls  
that are even more styleable than the native ones. It is indeed a  
complicated issue when to switch over to "more-generic" controls.  
It's not even clear that there's a true concept of "more-generic- 
looking". In practice maximum compatibility probably means something  
more like "make the controls look exactly like Windows".

> And if one form control is styled, but the rest of the controls  
> aren't, do you use the same control drawing API for all? (I would  
> assume yes, to be semi-consistent. Most designers would style all  
> controls typically.)

At the moment, the style of one element doesn't affect the appearance  
of other elements on the same page. So some page-wide heuristic is  
tricky, but I can see how that would be nice.

     -- Darin

More information about the webkit-dev mailing list