[MARGIN-C] table doesn't clear past float it doesn't fit next to if its top margin would have been pulled out prior to float

RESOLVED DUPLICATE of bug 478834

Status

()

Core
Layout: Block and Inline
RESOLVED DUPLICATE of bug 478834
5 years ago
5 years ago

People

(Reporter: Hong Xu, Unassigned)

Tracking

18 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:18.0) Gecko/20100101 Firefox/18.0
Build ID: 20130116073211

Steps to reproduce:

Open this webpage ( https://housing.usc.edu/Portal/Default.aspx?Params=L9ezxPcQnQsKfjb%2fN3ih6r%2bT%2fUHqWA5N ) with firefox 18 on Mac OS X Mountain Lion.


Actual results:

The webpage is not displayed properly.


Expected results:

This web page should be displayed properly. It is displayed properly on Chrome. But I am unsure whether this is a problem of the web page or Firefox.

Comment 1

5 years ago
The effect comes from the page using float left on the header and "modulemenu" class without containing the floating elements or using css clear. So it is the page causing it (removing the float: left on .header and .modulemenu fixes it).

That said; not sure if firefox follows the spec here, as those elements has width: 100% and it could be argued that the following elements should wrap.

Leaving as UNCONFIRMED as I'm not sure what direction is the correct one.

Comment 2

5 years ago
opps it was id's not classes:

BTW STR:
  1. Load the page
  2. See where the content is positioned

Actual results:
The middle element is positioned in a row after #header and #moduilemenu


Expected results:
#modulemenu and #middle's positioned is wrapped and positioned on separate rows like in chrome.
Component: Untriaged → Layout
Product: Firefox → Core
(Reporter)

Comment 3

5 years ago
Nice to hear that you guys find the reason. Thanks!
Flags: needinfo?(dbaron)
It looks (didn't check too carefully, though) like nsBlockFrame::ReflowBlockFrame isn't getting to either of its aState.ClearFloats() calls.  (And I have the patch to bug 376365 in my tree... though I probably shouldn't, so that's not it.)
Flags: needinfo?(dbaron)
Created attachment 704859 [details]
simplified testcase
Retitling very approximately; I'm not sure of the exact conditions.  This also may well be a duplicate.
Component: Layout → Layout: Block and Inline
OS: Mac OS X → All
Hardware: x86 → All
Summary: Inproper display for this web page: https://housing.usc.edu/Portal/Default.aspx?Params=L9ezxPcQnQsKfjb%2fN3ih6r%2bT%2fUHqWA5N → [MARGIN-C] table doesn't clear past float it doesn't fit next to if its top margin would have been pulled out prior to float
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 478834
You need to log in before you can comment on or make changes to this bug.