Closed Bug 393528 Opened 13 years ago Closed 7 years ago

[reflow branch] shrink-to-fit float is made too wide to fit next to previous float

Categories

(Core :: Layout: Floats, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: kevin.heart, Unassigned)

References

()

Details

(Keywords: regression, testcase)

Attachments

(4 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070723 Iceweasel/2.0.0.6 (Debian-2.0.0.6-0etch1)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a8pre) Gecko/2007082201 SeaMonkey/2.0a1pre

the layout of the page can not be rendered properly.

Reproducible: Always

Steps to Reproduce:
1.open http://chat.icq.com

Actual Results:  
the layout of the page is broken

Expected Results:  
page is rendered properly
Attached file Testcase #1
It's a regression from bug 300030.  I think we're calculating the
"available width" in 10.3.5 wrong - we should subtract the width of the
first float ("d1-2").
http://www.w3.org/TR/CSS21/visudet.html#float-width
Assignee: general → nobody
Severity: minor → normal
Component: General → Layout: Floats
Keywords: regression, testcase
OS: Linux → All
Product: Mozilla Application Suite → Core
QA Contact: general → layout.floats
Hardware: PC → All
Summary: the layout of the page is broken → [reflow branch] shrink-to-fit float is made too wide to fit next to previous float
Version: unspecified → Trunk
The available width very clearly doesn't say to subtract widths of other floats.  If that happens at all, it should be quirks mode only.  It causes very bad behavior with multiple floats.

That said, that's not the only possible reason other browsers might behave differently on that testcase.
(In reply to comment #3)
> The available width very clearly doesn't say to subtract widths of other
> floats.  

Right, I missed that somehow... So, the current layout looks to be
in accordance with the spec then.  FWIW, Safari/Webkit have the same layout
as Firefox trunk.  IE7 and Opera 9.20 places the floats to the right as
Firefox 1.5/2.0.
No longer blocks: reflow-refactor
Depends on: reflow-refactor
Keywords: regression
Attached file Testcase #2
Slightly more reduced testcase.
Attached patch reftestSplinter Review
I made a reftest from Testcase #2
It seems to me this is the bug why http://www.flexmarkt.nl/ is looking wrong now in current trunk build.
Status: UNCONFIRMED → NEW
No longer depends on: reflow-refactor
Ever confirmed: true
Flags: blocking1.9?
Keywords: regression
(In reply to comment #7)

> It seems to me this is the bug why http://www.flexmarkt.nl/ is looking wrong
> now in current trunk build.

fwiw, that site displays the same in Safari 2.04, Safari 3beta and latest WebKit builds as it does on current Gecko trunk builds. 

Flags: blocking1.9? → blocking1.9-
(In reply to comment #7)
> Created an attachment (id=285356) [details]
> testcase, deduced from flexmarkt.nl
> 
> It seems to me this is the bug why http://www.flexmarkt.nl/ is looking wrong
> now in current trunk build.
> 

So, just trying to understand this bug. 

The CSS 2.0 specifications recommend to give a width for every floated element. Actually in this testcase, if you give a width to the floated element, it will render properly.
According to CSS 2.1 specifications, this isn't necessary anymore and browsers should render it properly, meaning the floated element should take the width from content.

Since FF3.0 get parent's width I consider this is a bug...
CSS2.1 specifically says what information is used in the shrink-to-fit algorithm (although it doesn't define the algorithm precisely); the available width inside the containing block is used; the positions of other floats or space next to them are not.

Doing what you propose has very bad consequences when pages are resized, since floats can become very tall and narrow before "wrapping", breaking the layout much more severely than it would be if they "wrapped" earlier.
Duplicate of this bug: 430500
Duplicate of this bug: 457706
All the testcases look exactly the same on Nightly, Chrome 31 and IE 11.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
I think INVALID is more accurate here, since we're choosing not to fix the bug as reported, and choosing not to fix matches the relevant specs (and other browsers).
Resolution: WORKSFORME → INVALID
You need to log in before you can comment on or make changes to this bug.