RESOLVED FIXED 13632
Overflow scrolling doesn't account for bottom padding
https://bugs.webkit.org/show_bug.cgi?id=13632
Summary Overflow scrolling doesn't account for bottom padding
Timothy Hatcher
Reported 2007-05-08 21:52:20 PDT
An overflow area that has padding will only scroll to the bottom of the content box, not the bottom of the padding box. See the attached test-case.
Attachments
Test case. (212 bytes, text/html)
2007-05-08 21:52 PDT, Timothy Hatcher
no flags
Patch (3.48 KB, patch)
2009-03-12 13:31 PDT, Dave Hyatt
hyatt: review-
Patch (4.06 KB, patch)
2009-03-12 13:33 PDT, Dave Hyatt
eric: review-
Patch (3.91 KB, patch)
2009-03-12 15:49 PDT, Dave Hyatt
no flags
Patch (3.93 KB, patch)
2009-03-13 12:10 PDT, Dave Hyatt
eric: review+
Timothy Hatcher
Comment 1 2007-05-08 21:52:41 PDT
Created attachment 14422 [details] Test case.
Timothy Hatcher
Comment 2 2007-05-08 21:53:18 PDT
This is visible in a Web Inspector change I am working on.
Dave Hyatt
Comment 3 2007-05-08 22:02:27 PDT
Yeah, this is a known bug. I think it's filed already. We need to clean up lowest/rightmost/leftmost position to be smarter about using the layer tree instead of groveling around the whole render tree.
Dave Hyatt
Comment 4 2007-05-08 22:02:55 PDT
Note that the bottom margin of a child element is also potentially ignored.
Gérard Talbot (no longer involved)
Comment 5 2007-06-23 22:39:13 PDT
*** Bug 14342 has been marked as a duplicate of this bug. ***
Dave Hyatt
Comment 6 2009-03-12 13:31:14 PDT
Created attachment 28545 [details] Patch Many test results change (for both horizontal and vertical cases). I verified that all of the tests are progressing. Especially nice are single line text fields, which now show their right padding (resulting in a more pleasing right edge when you autoscroll one while select-dragging).
Dave Hyatt
Comment 7 2009-03-12 13:32:45 PDT
Comment on attachment 28545 [details] Patch Oops. Forgot to remove some code in rightmostPosition.
Dave Hyatt
Comment 8 2009-03-12 13:33:10 PDT
Dave Hyatt
Comment 9 2009-03-12 15:49:14 PDT
Eric Seidel (no email)
Comment 10 2009-03-12 15:54:02 PDT
Comment on attachment 28546 [details] Patch I'd like to see "bottom" and "right" renamed to lowestPosition and rightmostPosition to match the function names. But I'm not holding my breath (or holding you from committing), given that you're trying to make this patch as small as possible. All of your lp and rp variables I would have given clearer names: int lp = lastLineBox()->y() + lastLineBox()->height(); int bottomOfLastLineBox = ... I'm surprised this isn't already a method on RenderBox: + RenderBox* currBox = lastChildBox(); + while (currBox && currBox->isFloatingOrPositioned()) + currBox = currBox->previousSiblingBox(); RenderBox* lastNormalFlowChildBox(); the collapsedMarginBottom code is wrong (as discussed on IRC). The paddingBottom() addition here bottom = max(bottom, lp + paddingBottom()); , shoudl just move above into this line: int lp = currBox->y() + currBox->height(); I guess if you're going to rename "int lp" to "int bottomOfLastLinebox" then the padding addition makes sense in the max line instead. The if here is not needed: if (firstLineBox()) { for (InlineRunBox* currBox = firstLineBox(); currBox; currBox = currBox->nextLineBox()) { the for already has the if implicit in it. The caret hack seems like it should be abstracted into some other place. This can't be the only place that wants paddingBoxWidthPlusCaret. Is the caret always 1px? Happy to review the next round.
Eric Seidel (no email)
Comment 11 2009-03-12 15:54:32 PDT
Comment on attachment 28561 [details] Patch We got out of sync here. :) Gonna let you read my other comments first.
Dave Hyatt
Comment 12 2009-03-13 12:10:30 PDT
Eric Seidel (no email)
Comment 13 2009-03-13 12:12:13 PDT
Comment on attachment 28589 [details] Patch Looks great! Thank you so much for the cleanup!
Dave Hyatt
Comment 14 2009-03-16 14:34:46 PDT
Fixed in r41742.
Note You need to log in before you can comment on or make changes to this bug.