[webkit-dev] Scrollbar proportions

Artem Ananiev Artem.Ananiev at Sun.COM
Fri Oct 26 10:40:10 PDT 2007


Hi,

I have a page with scrollable text area. By default, its vertical scrollbar is 
off, and WebKit turns it on only when I insert more lines than the area can 
show.

The number of lines in the area is 4. When I insert 5th line, WebKit creates a 
vertical scrollbar and call its updateThumbProportions() method. In this 
method I see the following values:

    m_totalSize = 75 (5 lines)
    m_visibleSize = 60 (4 lines)
    m_lineStep = 40
    m_pageStep = 20
    m_pixelStep = 1.0

Each time I press scrollbar buttons, it should be scrolled by 15, but I can't 
see how I can get/calculate 15 from the values above to set scrollbar's unit 
increment.

Thanks,

Artem


More information about the webkit-dev mailing list