Closed Bug 177331 Opened 22 years ago Closed 22 years ago

{inc}multiple left floats containing images have extra space preceding

Categories

(Core :: Layout: Floats, defect, P1)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.4alpha

People

(Reporter: elanthis, Assigned: dbaron)

References

()

Details

(Keywords: testcase)

Attachments

(1 file, 1 obsolete file)

Going to the given URL, on initial page load, sometimes the icons in the page (all divs with float:left in their styles) are shifted downward. This happens with Mozilla1.0 all the way up to the latest snapshot. After reloading the page, and icons are no longer shifted downwards. Leaving the page and returning, it also works right - only on the first view in the session will it happen. In IE6, the icons are never shifted downward at all.
Confirmed under Linux 2002102804. They are DIVs of class button; the CSS says: div.button{float: left; text-align: center; padding: 3px; margin: 4px; width: 120px;}
Attached file simplified testcase (deleted) —
Using a bogus image seems to make things even more reliable due to the incremental reflow from the image replacement. I think this (for the URL above) is happening due to the incremental reflows from the image loads, which is why it's most reliable on shift-reload.
Keywords: testcase
I have a very, very similar problem with this website: http://ashitaka.home.attbi.com/ Mozilla seems confused as to where the floating div should go, and puts it a few dozen pixels north of the proper location. When I reload or re-render (pressing [enter] on the location bar), it shows up properly, as it does in Internet Explorer 4 and 6.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P4
Priority: P4 → P3
Summary: misplaced floats → {inc}misplaced floats
Target Milestone: --- → Future
Summary: {inc}misplaced floats → {inc}multiple left floats containing images have extra space preceding
*** Bug 179428 has been marked as a duplicate of this bug. ***
http://ashitaka.home.attbi.com/ testcase is fixed in recent builds. Must have been a different problem.
I'm seeing this in some work I'm doing for our online homebase product. Is there a work around that anyone has found? It appears as though the height of the elements is being added inside the table. Is it possible for someone to take a look at this before "Future"?
Keywords: oeone
Attached patch simple fix (obsolete) (deleted) — Splinter Review
This is the obvious fix, although the idea of mLastFloaterY is inherently broken, since it needs to be stored on the space manager so that it applies across blocks. (I assume we have other bugs on that problem.)
Attachment #116871 - Flags: superreview?(roc+moz)
Attachment #116871 - Flags: review?(roc+moz)
I filed the mLastFloaterY issue as bug 196919. I may attach a patch there that supersedes this one, depending on how ambitious I am and how clean my tree is in the relevant areas...
Comment on attachment 116871 [details] [diff] [review] simple fix looks good. But should the space manager PushState/PopState save and restore mLastFloaterY?
Attachment #116871 - Flags: superreview?(roc+moz)
Attachment #116871 - Flags: superreview+
Attachment #116871 - Flags: review?(roc+moz)
Attachment #116871 - Flags: review+
They should, once it's in the space manager, which it will be once I attach the patch.
Depends on: 196919
Taking, although the patch is now elsewhere.
Assignee: float → dbaron
Priority: P3 → P1
Target Milestone: Future → mozilla1.4alpha
Attachment #116871 - Attachment is obsolete: true
Fix checked in to trunk, 2003-03-11 15:56 PST (see bug 196919).
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Blocks: 193809
*** Bug 193809 has been marked as a duplicate of this bug. ***
*** Bug 165699 has been marked as a duplicate of this bug. ***
*** Bug 167481 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: