RESOLVED DUPLICATE of bug 71541 21462
Overflow auto in div element shows obsolete scrollbars when content size is reduced
https://bugs.webkit.org/show_bug.cgi?id=21462
Summary Overflow auto in div element shows obsolete scrollbars when content size is r...
Matti Tahvonen
Reported 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)
Attachments
Patch for taking existing scrollbars into account (790 bytes, patch)
2008-12-14 22:12 PST, Artur Signell
no flags
Updated patch including a webkit test (2.03 KB, patch)
2009-01-04 03:55 PST, Artur Signell
no flags
Patch + test case + changelog entry (3.02 KB, patch)
2009-01-04 22:37 PST, Artur Signell
eric: review-
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
Updated patch (coding style, against latest revision) (3.37 KB, patch)
2009-06-16 09:20 PDT, Artur Signell
hyatt: review-
Artur Signell
Comment 1 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.
Artur Signell
Comment 2 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)
Artur Signell
Comment 3 2008-12-14 22:12:49 PST
Created attachment 26022 [details] Patch for taking existing scrollbars into account
Matti Tahvonen
Comment 4 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.
Artur Signell
Comment 5 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.
Darin Adler
Comment 6 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.
Artur Signell
Comment 7 2009-01-04 22:37:14 PST
Created attachment 26424 [details] Patch + test case + changelog entry
Artur Signell
Comment 8 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?
Eric Seidel (no email)
Comment 9 2009-05-11 05:31:04 PDT
Created attachment 30184 [details] A (slightly) cleaned up version of the test case
Eric Seidel (no email)
Comment 10 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.
Eric Seidel (no email)
Comment 11 2009-05-19 22:03:07 PDT
Adding Hyatt for his comments on this patch.
Eric Seidel (no email)
Comment 12 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
Matti Tahvonen
Comment 13 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.
Artur Signell
Comment 14 2009-06-16 09:20:49 PDT
Created attachment 31351 [details] Updated patch (coding style, against latest revision)
Dave Hyatt
Comment 15 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.
Matti Tahvonen
Comment 16 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
SravanKumar S(:sravan)
Comment 17 2012-04-10 03:20:19 PDT
*** This bug has been marked as a duplicate of bug 71541 ***
Note You need to log in before you can comment on or make changes to this bug.