[webkit-dev] progress/meter/input[type=range] orientation and implications in WebKit

Hajime Morita morrita at google.com
Mon Mar 7 03:47:26 PST 2011


Hi,

On Sat, Mar 5, 2011 at 11:24 AM, Dimitri Glazkov <dglazkov at chromium.org> wrote:
> On Fri, Mar 4, 2011 at 12:16 PM, Ian Hickson <ian at hixie.ch> wrote:
>> On Fri, 4 Mar 2011, Dimitri Glazkov wrote:
>>>
>>> Today, we happily use -webkit-appearance to apply platform-specific
>>> appearance to the controls. The trouble is, the value of
>>> -webkit-appearance is going to be different depending on the value of
>>> logical width.
>>
>> Why not have a value of 'appearance' that automatically uses the right
>> orientation, instead of having orientation-specific values?
>
> You are correct, the theme can paint correctly oriented slider
> controls in by looking at the box size it's painting. Hyatt pointed
> out the same thing on #webkit.
>
> However, the issue still exists in the cases of meter and progress.
> They are using plain-old CSS gradient rules, not magic platform
> painter (calked RenderTheme in WebKit).
It's true. I'll add a context here.
For Mac, which has native meter (indicator) components, WebKit uses
platform painter.
But for platforms other than mac,
WebKit use two gradient-filled <div>s (one for the bar and another for
background)
to render the <meter>, because such platforms don't have own native indicators.

Another idea to select the direction explicitly is to refer
writing-mode or box-orient CSS property.
I'm not sure whether this is a good idea though.

Regards.
--
morrita

>
> :DG<
>


More information about the webkit-dev mailing list