Bug 11946

Summary: Quirksmode: Absolutely-positioned elements stretch to accomodate floats
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: mitz, robert, sam, webkit
Priority: P2 Keywords: HasReduction
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://www.quirksmode.org/bugreports/archives/2006/12/Absolutely_positioned_elements_stretch_to_accomoda.html
Bug Depends on: 45274    
Bug Blocks: 9610    
Attachments:
Description Flags
Test page
none
odd issue with floating none

Description David Kilzer (:ddkilzer) 2006-12-23 06:05:31 PST
Placing a right-floated element in a left-positioned absolutely-positioned element causes the following behavior:

- Opera and iCab display correctly (I think); the absolutely-positioned element is sized to fit the float or other nodes of the element, whichever is wider

- Gecko stretches the absolutely-positioned element to the maximum width allowed by the containing block

- KHTML stretches the absolutely-positioned element to the sum of the width of the float and the other child nodes
(ppknote: IE behaves as Firefox)

My understanding of the box model spec is that Opera and iCab's behavior is correct; if anyone can corroborate this it would be greatly appreciated.

Reported on 12 December 2006.

Test page: http://fuxupyo.us/testcases/absolutestretch.html

Tested on locally-built debug build of WebKit r18401 with Safari 2.0.4 (419.3) on Mac OS X 10.4.8 (8N1037).
Comment 1 David Kilzer (:ddkilzer) 2006-12-23 06:07:16 PST
Created attachment 11985 [details]
Test page
Comment 2 Dave Hyatt 2006-12-23 10:13:00 PST
WebCore gets the width right.  The right float should be up with the left text though and the height should be smaller.  Every single browser is wrong right now  Opera/iCab are not right IMO.

Comment 3 Robert Blaut 2008-02-11 13:17:41 PST
Created attachment 19079 [details]
odd issue with floating
Comment 4 Robert Blaut 2008-02-11 13:27:49 PST
After checking the test today I found that Opera, Minefield (Gecko) changed its behavior. It seems that only Opera displays it without problem. However I found a detail - a space - which is responsible for rendering float below the text line. Check above a new test case and compare it with Minefield and Opera. Opera is the only browser not affected by the "space" issue. Without space on the end all three engines displays the test case correctly.
Comment 5 Robert Blaut 2008-02-11 13:31:34 PST
I was wrong. Gecko always renders flow below the text line. So the space issue preventing only Webkit from correctly displaying the first test case.
Comment 6 Robert Hogan 2012-10-18 12:52:33 PDT
This is a duplicate of 45274 - which has a patch for review.
Comment 7 Robert Hogan 2013-07-24 10:47:00 PDT
This was fixed by 45274. Please re-open if I'm wrong!