Bug 20103 - Scroll bar spacer appears before scroll bar itself (when height it based on liquid elements)
Summary: Scroll bar spacer appears before scroll bar itself (when height it based on l...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: Mac OS X 10.5
: P2 Major
Assignee: Nobody
URL: http://pastie.org/236769
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2008-07-18 15:02 PDT by Phillip Sauerbeck
Modified: 2022-07-11 16:27 PDT (History)
5 users (show)

See Also:


Attachments
Test case for scroll bug (2.32 KB, text/html)
2008-07-25 12:34 PDT, Phillip Sauerbeck
no flags Details
Change in updateScrollers algorithm (4.62 KB, patch)
2008-08-03 07:06 PDT, Arne
hyatt: review-
Details | Formatted Diff | Diff
Test case for scroll bug, placed within iframe (589 bytes, text/html)
2008-08-06 10:58 PDT, Phillip Sauerbeck
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Phillip Sauerbeck 2008-07-18 15:02:11 PDT
When the browser window crops a container that has its dimensions based on liquid elements, a scroll bar spacer appears before the scroll bar itself.  I have produced a sample test case here: http://pastie.org/236769  there is also an associated video that I have uploaded so that you can see the bug in action: http://vimeo.com/1365917 

Many thanks
Comment 1 Phillip Sauerbeck 2008-07-18 15:05:24 PDT
actually, download the video here: http://www.box.net/shared/mqm7b3sw0s 

Comment 2 Phillip Sauerbeck 2008-07-25 12:34:44 PDT
Created attachment 22476 [details]
Test case for scroll bug

there is also a video of this bug in action here: http://vimeo.com/1366292
Comment 3 Arne 2008-08-03 07:06:35 PDT
Created attachment 22624 [details]
Change in updateScrollers algorithm

The current algorithm for calculating if the scrollbars should be shown misbehaves in this case.

The page is constructed such that its height is dependent on its with, so when the window is made smaller, the vertical scrollbar is needed. But with a re-layout, the page shrinks, and the vertical scrollbar is no longer needed. But after this, a re-layout is not made, and white bars show up around the page.

I have written an algorithm that detects these scrollbar on/off loops explicitly, and then uses all scrollbars needed at each point in the loop. It then re-layouts the page. This will show up as unusable scrollbars in some cases, i.e. no blue part. But I believe this is a better solution than the previous algorithm.

Due to this, some testcases have changed their output for me. When I have looked at them, they seem to still be good, but the scrollbar behavior has changed, and therefore their rendertree. On my build they are:
accessibility/bounds-for-range.html
css2.1/t0803-c5502-mrgn-r-02-c.html
css2.1/t0803-c5505-mrgn-02-c.html
fast/block/float/013.html
fast/flexbox/016.html
fast/lists/001.html
svg/webarchive/svg-script-subresouces.svg
Comment 4 Eric Seidel (no email) 2008-08-04 01:32:34 PDT
Watching the vimeo video makes the bug clear.  I guess Hyatt is probably the first person to ask to comment on a scrollbar bug?
Comment 5 Eric Seidel (no email) 2008-08-04 20:54:52 PDT
Comment on attachment 22624 [details]
Change in updateScrollers algorithm

Assigning to hyatt for comment.  Obviously anyone who feels comfortable with this code should feel welcome to review this.
Comment 6 Dave Hyatt 2008-08-04 21:31:18 PDT
Comment on attachment 22624 [details]
Change in updateScrollers algorithm

A change to this algorithm will require extensive testing.   I can't r+ this without some kind of testing plan / test cases.
Comment 7 Dave Hyatt 2008-08-04 21:43:10 PDT
Also note this algorithm is duplicated on other platforms, so they all need to be changed to be kept in sync.
Comment 8 Eric Seidel (no email) 2008-08-05 00:50:13 PDT
I would encourage you to make a DumpRenderTree compatible test case which shows this bug (a single web page which when loaded shows this bug).  That's probably possible using an iframe sized to a certain size.  The test case should be stand-alone and all the required files should be possible to add to LayoutTests:
http://trac.webkit.org/browser/trunk/LayoutTests/

More information about writing tests can be found here:
http://webkit.org/quality/testwriting.html

I'm sure that we already have some amount of Scrolling test cases.  Those will be run whenever you use "run-webkit-tests".  Your new test case(s) would also be run by run-webkit-tests when you place them in LayoutTests/
Comment 9 Phillip Sauerbeck 2008-08-06 10:58:20 PDT
Created attachment 22684 [details]
Test case for scroll bug, placed within iframe

As requested, here is a test case that demonstrates the scroll-bar bug on page load (without having to resize the page.

FYI, FF3 has problems with this as well
Comment 10 Phillip Sauerbeck 2008-08-06 11:08:28 PDT
When you access the attachment #22684 [details] (2008-08-06) from the link within comment #9, or from the attachment table the bug does not appear and seems resolved.  Instead, if you save the page source as html and open it fresh, the bug is correctly demonstrated.

go figure.

thanks,
phillip
Comment 11 Brent Fulgham 2022-07-11 16:26:39 PDT
Safari, Chrome, and Firefox show the same rendering behavior for this test case. I do not believe any further compatibility issue remains.
Comment 12 Radar WebKit Bug Importer 2022-07-11 16:27:15 PDT
<rdar://problem/96849827>