Bug 21462 - Overflow auto in div element shows obsolete scrollbars when content size is reduced
Summary: Overflow auto in div element shows obsolete scrollbars when content size is r...
Status: RESOLVED DUPLICATE of bug 71541
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://dev.itmill.com/raw-attachment/...
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2008-10-08 01:44 PDT by Matti Tahvonen
Modified: 2014-10-17 06:51 PDT (History)
8 users (show)

See Also:


Attachments
Patch for taking existing scrollbars into account (790 bytes, patch)
2008-12-14 22:12 PST, Artur Signell
no flags Details | Formatted Diff | Diff
Updated patch including a webkit test (2.03 KB, patch)
2009-01-04 03:55 PST, Artur Signell
no flags Details | Formatted Diff | Diff
Patch + test case + changelog entry (3.02 KB, patch)
2009-01-04 22:37 PST, Artur Signell
eric: review-
Details | Formatted Diff | Diff
A (slightly) cleaned up version of the test case (936 bytes, text/html)
2009-05-11 05:31 PDT, Eric Seidel (no email)
no flags Details
Updated patch (coding style, against latest revision) (3.37 KB, patch)
2009-06-16 09:20 PDT, Artur Signell
hyatt: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matti Tahvonen 2008-10-08 01:44:37 PDT
When content becomes small enough to fit into container, scrollbars are not removed.

Reduced test case in URL field will show the case clearly (works in FF, IE, Opera. Bugs in Safari (both mac & win) and also in Chrome)
Comment 1 Artur Signell 2008-11-20 04:08:45 PST
Confirming the bug in latest nightly build r38492/windows. This has been bugging me also for some time.
Comment 2 Artur Signell 2008-12-14 22:11:30 PST
The problem seems to be that to RenderLayer::computeScrollDimensions uses clientHeight/clientWidth from the parent DIV to determine the amount of available space for the child DIV. ClientHeight/Width does not include the scrollbar sizes and thus it is wrongly determined that the child DIV will not fit inside the parent without scrollbars. I'm not sure if this should be fixed in computeScrollDimensions like done in the patch or if the scrollbars should be removed before calling computeScrollDimensions (called through RenderLayer::updateScrollInfoAfterLayout)
Comment 3 Artur Signell 2008-12-14 22:12:49 PST
Created attachment 26022 [details]
Patch for taking existing scrollbars into account
Comment 4 Matti Tahvonen 2008-12-17 08:39:56 PST
Hi!

Somebody with decent powers, please confirm this bug. This bugzilla seems to be so full that it is impossible to get tickets handled without it.
Comment 5 Artur Signell 2009-01-04 03:55:28 PST
Created attachment 26409 [details]
Updated patch including a webkit test

Contains patch and a test case which fails with trunk version and succeeds when the patch is used.
Comment 6 Darin Adler 2009-01-04 10:14:32 PST
The patch needs a change log entry too.

Please see http://webkit.org/coding/contributing.html for details.
Comment 7 Artur Signell 2009-01-04 22:37:14 PST
Created attachment 26424 [details]
Patch + test case + changelog entry
Comment 8 Artur Signell 2009-01-30 07:44:25 PST
Bug report, test case, test for webkit, suggested patch. What more can one do to get a bug fixed?
Comment 9 Eric Seidel (no email) 2009-05-11 05:31:04 PDT
Created attachment 30184 [details]
A (slightly) cleaned up version of the test case
Comment 10 Eric Seidel (no email) 2009-05-11 05:34:13 PDT
Comment on attachment 26424 [details]
Patch + test case + changelog entry

This patch uses tabs (which will cause the commit to fail.  This patch also adds extra { } which violate the style guidelines:
http://webkit.org/coding/coding-style.html

I cleaned up the test case slightly to use the "blue means you need to look at the test case to understand the results; green means pass and red means fail" system.

Otherwise, the patch looks sane to me.  Hyatt really needs to weigh in here though.  Ideally you'd update the patch to fix the style issues.  Also I would probably have used // for the clientHeight/clientWidth comment and would have broken it into two lines.  But I think /* is OK too, I'd have to check the style guidelines to be sure.
Comment 11 Eric Seidel (no email) 2009-05-19 22:03:07 PDT
Adding Hyatt for his comments on this patch.
Comment 12 Eric Seidel (no email) 2009-05-19 22:04:15 PDT
Comment on attachment 26424 [details]
Patch + test case + changelog entry

Great bug to fix.  r- for the style issues.  Added Hyatt to the CC list so he can also rubber-stamp.  Please post a copy with fixed style.

http://webkit.org/coding/coding-style.html
Comment 13 Matti Tahvonen 2009-06-16 02:27:32 PDT
Our "official workaround" for this bug in Vaadin (formerly IT Mill Toolkit) revealed an other scrollbar related issue. I filled a separate bug report for it: https://bugs.webkit.org/show_bug.cgi?id=26438

Some of you superusers could confirm that too.

BTW. Still eagerly waiting for the fix to land in webkit. I was bit disappointed not to see this in safari 4. We could have removed a lot of dirty code from our product.
Comment 14 Artur Signell 2009-06-16 09:20:49 PDT
Created attachment 31351 [details]
Updated patch (coding style, against latest revision)
Comment 15 Dave Hyatt 2009-06-19 01:02:49 PDT
Comment on attachment 31351 [details]
Updated patch (coding style, against latest revision)

This does not seem quite right to me. I think it will just cause other cases to be wrong.
Comment 16 Matti Tahvonen 2009-12-22 07:32:20 PST
Hi!

If the patch by Artur is not enough, what else can we do to help you to fix this issue?

I have just spent one and a half day fighting with bugs and regressions which are either directly caused by this bug or its workarounds. So I'm really motivated to help fixing this issue. I'd much rather focus on developing new features. It would also enhance our products "feeling" a bit as we would get rid of some flickering caused by our workarounds.

cheers,
matti
Comment 17 SravanKumar S(:sravan) 2012-04-10 03:20:19 PDT

*** This bug has been marked as a duplicate of bug 71541 ***