Bug 6881 - Block with position:absolute bottom:0 doesn't always move when height of containing block changes (affects Safari RSS)
Summary: Block with position:absolute bottom:0 doesn't always move when height of cont...
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
: 5948 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-27 15:38 PST by mitz
Modified: 2006-09-15 16:21 PDT (History)
1 user (show)

See Also:


Attachments
Testcase (467 bytes, text/html)
2006-01-27 15:42 PST, mitz
no flags Details
Relayout positioned children if the containing block's height changed (6.31 KB, patch)
2006-01-27 16:17 PST, mitz
hyatt: review-
Details | Formatted Diff | Diff
Updated patch (8.71 KB, patch)
2006-01-28 01:56 PST, mitz
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2006-01-27 15:38:41 PST
In the testcase, clicking Test grows the blue div, which causes the outer div to grow, but the grey div that should stick to the outer div's bottom doesn't move until you resize the window to force relayout.

In Safari RSS, this happens with the white article footers, for example if an article contains an image that takes some time to load and resizes it when it's loaded.
Comment 1 mitz 2006-01-27 15:42:27 PST
Created attachment 6028 [details]
Testcase
Comment 2 mitz 2006-01-27 16:17:01 PST
Created attachment 6032 [details]
Relayout positioned children if the containing block's height changed
Comment 3 Darin Adler 2006-01-27 20:37:01 PST
Comment on attachment 6032 [details]
Relayout positioned children if the containing block's height changed

r=me
Comment 4 Dave Hyatt 2006-01-27 22:25:59 PST
Actually, the relayoutChildren = true in the if clause to which you added the else clause is incorrect.  That code was the attempt to get the behavior you have now (correctly) added, so I believe that line can also be removed.  Could that be added to the patch?
Comment 5 Dave Hyatt 2006-01-27 22:29:11 PST
(Your new clause then doesn't have to be an else... it can just be a standalone if statement underneath the previous if statement.)
Comment 6 Dave Hyatt 2006-01-27 22:47:18 PST
You also neglected to patch render_flexbox.cpp, which suffers from the same bug.
Comment 7 mitz 2006-01-28 01:56:00 PST
Created attachment 6038 [details]
Updated patch

Addressed Dave's comments.
Comment 8 Darin Adler 2006-01-29 08:53:06 PST
Comment on attachment 6038 [details]
Updated patch

This does seem to address Hyatt's comment, and looks great to me. r=me
Comment 9 Dave Hyatt 2006-01-29 16:12:20 PST
Yup. r=me too
Comment 10 mitz 2006-02-03 04:08:11 PST
Verified in r12540 nightly
Comment 11 mitz 2006-02-13 22:32:09 PST
*** Bug 5948 has been marked as a duplicate of this bug. ***
Comment 12 Eric Seidel (no email) 2006-09-15 16:21:59 PDT
I think this bug (or a similar one) is affecting our application.  We float images in div blocks, given the blocks a fixed width, but no height.  3 fit to a row, and there is a footer at the bottom.  The footer always draws randomly in the middle of the images in Safari.  FireFox, IE, Opera all draw the footer correctly at the bottom after all of the floated images.

Any workaround suggestions would be most welcome.