Closed Bug 308733 Opened 19 years ago Closed 9 years ago

{inc} Floated DIVs with display:block/none overlapping and not repositioning correctly

Categories

(Core :: Layout: Floats, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: pvh, Unassigned)

References

()

Details

(Keywords: css2, testcase)

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050912 Firefox/1.0.6 StumbleUpon/1.999 (Ubuntu package 1.0.6)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050912 Firefox/1.0.6 StumbleUpon/1.999 (Ubuntu package 1.0.6)

In the test case I have created, the divs should fold and unfold as the mouse is
rolled over them. Some of the following divs move down out of the way of the
newly revealed content, and others do not, remaining just where they are and
overlapping the newly visible "display: block" div.

Reproducible: Always

Steps to Reproduce:
1. Go to URL given as part of bug.
2. Scrub mouse over notes on right-hand side of page.


Actual Results:  
Divs overlap each other strangely. Some are repositioned, others stay in place.

Expected Results:  
Divs should fold and unfold moving subsequent divs down out of the way. This
correct behaviour is found in Konqueror/Safari and IE.
Bug has been reproduced by me and various other people on Windows, OSX and
Linux, and is present in a fresh Deer Park as September 05.
Assignee: dbaron → nobody
Component: Style System (CSS) → Layout: Floats
QA Contact: ian → layout.floats
Attached file Reporter's testcase β€”
Attached file Testcase β€”
Attachment #196278 - Attachment is obsolete: true
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: css2, testcase
Summary: Floated DIVs with display:block/none overlapping and not repositioning correctly → {inc} Floated DIVs with display:block/none overlapping and not repositioning correctly
So I tried playing a bit with the testcase, and just changing the height of the middle floating div dynamically causes the bug too (resizing that div doesn't affect the one after it).  Removing the first div does cause the bug to disappear.

roc, any ideas what's up here?
Flags: blocking1.9a1?
I don't see this behavior on

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060316 Firefox/1.6a1
I still see the problem just fine in a 2006-03-28 Gecko trunk build.
Flags: blocking1.9a1? → blocking1.9-
Whiteboard: [wanted-1.9]
I see no difference in the Testcase between:
- Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/2006120606 Minefield/3.0a (pre-reflow branch)
- Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/2006120804 Minefield/3.0a1 (post-reflow branch)
Attachment #196278 - Attachment is obsolete: false
I can still reproduce with "Reporter's testcase" using SeaMonkey 2006120701 (pre reflow branch) on Linux.
SeaMonkey 2006120801 (post reflow branch) seems better but I still see the
scrollbar thumb move when I:
1. load "Reporter's testcase" (or the URL)
2. scroll about 20% down
3. hover the content in the right column and look for scrollbar changes...
Okay, I did a bit of debugging; as it turns out, we don't check floats for damage at all!

An extremely hacky solution would be to change PropagateFloatDamage to use the line's overflow height rather than its height; this would encompass any floats on the line as well, and it would maintain correctness because the check is supposed to be conservative in the first place.
Actually, nevermind about the hacky solution; it would solve most cases, but it would fail in some edge cases.
Attached file testcase2 β€”
This testcase was minimized from http://www.css3.info/selectors-test/test.html
On that site, the box with RSS Feed and Search is not pushed down below the tests when the window size is small (<1024px).
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
Flags: wanted1.9-
Flags: wanted1.9+
Flags: wanted-next+
this (both testcases) WFM with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1a1pre) Gecko/2008071903
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: