Bug 15987

Summary: Float issue in combination with left aligned image and text block
Product: WebKit Reporter: Robert Blaut <webkit>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: jacob.refstrup, mitz, phiw2, robert
Priority: P2 Keywords: HasReduction
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
URL: http://bugs.blaut.biz/webkit/webkit-float-issue.htm
Description Flags
minimal test case none

Description Robert Blaut 2007-11-14 10:46:23 PST

This bug shows inconsistency in float handling between Webkit and other browsers like Internet Explorer 7, Firefox 2 and Opera 9. This bug is strictly related to combination: left aligned image and div box with text without spaces inside it. Both elements are placed inside floated box.

Steps to reproduce:

1) Open a page: http://bugs.blaut.biz/webkit/webkit-float-issue.htm with lates nightly.
2) Notice improperly rendered test case.
3) Compare with other browsers.

Expected result:
The test text on the page should NOT be placed below image.

Current result:
The test text on the test page is placed below image.
Comment 1 Robert Blaut 2007-11-14 10:47:52 PST
Created attachment 17272 [details]
minimal test case
Comment 2 Jacob Refstrup 2009-05-28 18:43:41 PDT
I suspect what's going on here is that the pref width calculation doesn't take into consideration the floating object -- the line of text in 'minimal test case' is unbreakable (no spaces) and matches the exact width of the containing float which has width: auto.
Comment 3 Robert Hogan 2013-03-02 13:32:29 PST
Rendering matches FF which has the same pref widths model as WebKit now. We should probably close this as it's not possible in principle to deal with all situations like this.