Bug 47975

Summary: Max width of a floated container with floated children calculated incorrectly
Product: WebKit Reporter: Bruno Couto <bmcouto>
Component: CSSAssignee: Robert Hogan <robert>
Status: RESOLVED FIXED    
Severity: Major CC: bmcouto, dglazkov, donggwan.kim, eric, ojan.autocc, robert, s.choi, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
URL: http://jsfiddle.net/Trn8M/
Attachments:
Description Flags
Patch
none
Patch none

Description Bruno Couto 2010-10-20 02:16:22 PDT
Please see the demo url - http://jsfiddle.net/Trn8M/ - for details. It doesn't happen on Firefox and in any IE version, only on webkit browsers like Chrome and Safari.
The issue is clear, when removing (or setting another value to letter-spacing on '.label'. Please check behavior on a webkit browser, like chrome, and others.
Comment 1 Robert Hogan 2012-10-08 11:40:20 PDT
This looks fine in Chromium20. Closing - but please comment here if you can still recreate it.
Comment 2 Bruno Couto 2012-10-08 11:47:50 PDT
Still happens on Chrome Version 22.0.1229.79
Comment 3 Robert Hogan 2012-10-08 12:48:54 PDT
Can you be more specific about the problem so? I don't know what the broken rendering looks like.
Comment 4 Bruno Couto 2012-10-08 12:53:37 PDT
Just go to the jsfiddle, and change letter-spacing:normal; in .label class to another value or even remove it. You will notice that the width of it's container change to weird values without reason. Only happens on webkit browsers.
Comment 5 Robert Hogan 2012-10-08 13:09:32 PDT
I see it now - thanks for the clarification.
Comment 6 Bruno Couto 2012-10-08 13:19:09 PDT
Happy to help! Hope it's an easy fix.
Comment 7 Robert Hogan 2012-12-22 10:57:27 PST
Created attachment 180605 [details]
Patch
Comment 8 Levi Weintraub 2013-01-03 13:38:01 PST
Comment on attachment 180605 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=180605&action=review

Patch doesn't apply to ToT :(

r=me after the nits are addressed.

> Source/WebCore/ChangeLog:3
> +        letter-spacing set's weird width when clearing floats

Update the title to describe the actual bug, since letter-spacing isn't the issue here.

> LayoutTests/fast/block/float/max-width-clear-float-with-overflow-hidden.html:1
> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

Why the long doctype instead of just !DOCTYPE html?
Comment 9 Robert Hogan 2013-01-04 11:33:25 PST
Created attachment 181345 [details]
Patch
Comment 10 WebKit Review Bot 2013-01-05 12:27:38 PST
Comment on attachment 181345 [details]
Patch

Clearing flags on attachment: 181345

Committed r138899: <http://trac.webkit.org/changeset/138899>
Comment 11 WebKit Review Bot 2013-01-05 12:27:41 PST
All reviewed patches have been landed.  Closing bug.
Comment 12 Dimitri Glazkov (Google) 2013-01-07 10:25:01 PST
For some reason, the added test has been failing on MoLion ever since it was added: http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=fast%2Fblock%2Ffloat%2Fmax-width-clear-float-with-overflow-hidden.html
Comment 13 Dimitri Glazkov (Google) 2013-01-09 13:50:29 PST
(In reply to comment #12)
> For some reason, the added test has been failing on MoLion ever since it was added: http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=fast%2Fblock%2Ffloat%2Fmax-width-clear-float-with-overflow-hidden.html

Anyone? Bueller?...
Comment 14 Robert Hogan 2013-01-09 14:05:12 PST
(In reply to comment #13)
> (In reply to comment #12)
> > For some reason, the added test has been failing on MoLion ever since it was added: http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=fast%2Fblock%2Ffloat%2Fmax-width-clear-float-with-overflow-hidden.html
> 
> Anyone? Bueller?...

I looked and figured it must be something to do with Ahem on that platform. Is it OK to skip it for now and assign a bug to me to turn it into a text test?
Comment 15 Dimitri Glazkov (Google) 2013-01-10 15:01:56 PST
(In reply to comment #14)
> (In reply to comment #13)
> > (In reply to comment #12)
> > > For some reason, the added test has been failing on MoLion ever since it was added: http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=fast%2Fblock%2Ffloat%2Fmax-width-clear-float-with-overflow-hidden.html
> > 
> > Anyone? Bueller?...
> 
> I looked and figured it must be something to do with Ahem on that platform. Is it OK to skip it for now and assign a bug to me to turn it into a text test?

Okay.