Closed Bug 126213 Opened 23 years ago Closed 22 years ago

[FIX]fixed or absolute positioned div with { bottom: 0 } does not render flush against bottom of viewport (leaves space) [CSS/stylesheet bug]

Categories

(Core :: Layout, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.1beta

People

(Reporter: m_mozilla, Assigned: bzbarsky)

References

()

Details

(Whiteboard: parity-ie)

Attachments

(3 files, 3 obsolete files)

try test case http://wickline.org/mozilla/2002021800/ in mozilla 2002021413 footer block (grey) should render flush with bottom/right corner. It renders flush with the right edge, but not with the bottom edge (note body background color showing through at bottom of viewport. MSIE 5.x for the mac handles this correctly. (is there some parity keyword or something for that?) -matt
bug 80904 sounds kinda simmilar, but is about XUL stuff. Is there any connection?
Confirmed on Linux 2002-02-18-08. Decreasing the padding on the div moves it closer to the edge for some reason (why???) but there is always a 6px or so gap there.
I hope that's correct usage of the status whiteboard... saw it in bug 126213 fixing typo in summary, adding more words to make it more findable -matt
Summary: div { bottom: 0 } leaves does not render flush against bottom of viewport (leaves space) → foat'ed div with { bottom: 0 } does not render flush against bottom of viewport (leaves space) [CSS/stylesheet bug]
Whiteboard: parity-ie
errr.... saw it in bug 58305 rather (recursive humor completely accidental ;)
Target Milestone: --- → Future
Summary: foat'ed div with { bottom: 0 } does not render flush against bottom of viewport (leaves space) [CSS/stylesheet bug] → float'ed div with { bottom: 0 } does not render flush against bottom of viewport (leaves space) [CSS/stylesheet bug]
that div is not floated
Summary: float'ed div with { bottom: 0 } does not render flush against bottom of viewport (leaves space) [CSS/stylesheet bug] → fixed positioned div with { bottom: 0 } does not render flush against bottom of viewport (leaves space) [CSS/stylesheet bug]
Priority: -- → P4
Blocks: 134518
update: still seeing this in 1.0 trunk build 2002051205 Mac OS X I don't know if this is a coincidence, but it *looks* like the offset from the bottom of the viewport is the same height as a window's horizontal scrollbar. Is there some math error allowing room for an extra scrollbar? Normally when I view the example, my window has no scrollbar. If I resize the window to be narrow enough to cause a horizontal scrollbar to appear, we still have the same amount of extra space. It is not the case that there is room left for a scrollbar, which then gets filled by the scrollbar when available. If the scrollbar is at all related, it just seems to be that mozilla consistently leaves space for an extra one. -matt
Attached patch Patch v 1.0 (obsolete) — Splinter Review
So the problem is that the HTMLReflowMetrics' width and height members are the width and height _including_ the padding and borders (see how we size the rect for the frame). So the code we had was double-counting them when determining the computed value of "auto" top/bottom. As a result, the frame was placed too high by border-top + padding-top + +padding-bottom + border-bottom.
This testcase is based on bug 134518, with position:absolute instead of position:fixed.
Attached patch Patch v1.5 (obsolete) — Splinter Review
Fix abs pos as well. As a note (I forgot this in comment 9) the reason I moved the "// XXX" code in nsViewportFrame is that we should be using the height we will use for the frame rect in calculating the frame rect's origin....
Attachment #83918 - Attachment is obsolete: true
No longer blocks: 134518
*** Bug 134518 has been marked as a duplicate of this bug. ***
taking bug
Assignee: attinasi → bzbarsky
Priority: P4 → P1
Target Milestone: Future → mozilla1.1beta
Comment on attachment 83923 [details] [diff] [review] Patch v1.5 r=dbaron if you change all of the things of this form: >+ kidDesiredSize.height = kidReflowState.mComputedHeight; >+ kidDesiredSize.height += kidReflowState.mComputedBorderPadding.top + >+ kidReflowState.mComputedBorderPadding.bottom; to kidDesiredSize.height = kidReflowState.mComputedHeight + kidReflowState.mComputedBorderPadding.top + kidReflowState.mComputedBorderPadding.bottom;
Attachment #83923 - Flags: review+
Attached patch Patch v1.51Splinter Review
make that cosmetic change
Attachment #83923 - Attachment is obsolete: true
Comment on attachment 83932 [details] [diff] [review] Patch v1.51 sr=attinasi (and carrying over dbaron's r= to this patch as well)
Attachment #83932 - Flags: superreview+
Attachment #83932 - Flags: review+
Checked in on the trunk.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Summary: fixed positioned div with { bottom: 0 } does not render flush against bottom of viewport (leaves space) [CSS/stylesheet bug] → [FIX]fixed positioned div with { bottom: 0 } does not render flush against bottom of viewport (leaves space) [CSS/stylesheet bug]
*** Bug 147109 has been marked as a duplicate of this bug. ***
Summary: [FIX]fixed positioned div with { bottom: 0 } does not render flush against bottom of viewport (leaves space) [CSS/stylesheet bug] → [FIX]fixed or absolute positioned div with { bottom: 0 } does not render flush against bottom of viewport (leaves space) [CSS/stylesheet bug]
verified fixed Mac OS X trunk build 2002052103 -matt
Status: RESOLVED → VERIFIED
request sent for approval to land on the branch for 1.0.1...
Keywords: mozilla1.0.1
please checkin to the 1.0.1 branch ASAP. once there please remove the mozilla1.0.1+ keyword and add the fixed1.0.1 keyword.
Attachment #83932 - Flags: approval+
fixed on 1.0.1 branch
Verified in the branch OS X (2002-07-16-05) and Windows ME (2002-07-16-08).
Keywords: verified1.0.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: