Bug 16975

Summary: Unexpected rendering of page
Product: WebKit Reporter: jonathanjohnsson
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal    
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.5   
URL: http://www.jsdk.se/080120_kursbilder_son_web/index.html

Description jonathanjohnsson 2008-01-22 10:46:42 PST
In the web page, the main content can not be viewed as intended, since it does not fit within its containing element. View the page in Firefox to see how it is intended to look. This is in the latest release of Safari.
Comment 1 Dave Hyatt 2008-01-22 11:36:24 PST
This is the positioning change from css2.1.  I think Safari's rendering is correct according to spec, but as I said in the other bug filed on this, the spec in this case is stupid.

Comment 2 Dave Hyatt 2008-01-22 11:40:15 PST
Specifically this section:

http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width

You determine the intrinsic width.  Then essentially step 6 says that because you know left, right, and width, you discard right (since you're LTR).  I will continue my campaign to get this changed in the spec.

Comment 3 Dave Hyatt 2008-01-22 11:41:17 PST
Note that Firefox 3 now breaks on this page as well.

Comment 4 Brad 2008-02-23 10:13:47 PST
I agree that the spec should be changed. Its hardly useful to have a page totally ignore the author's intentions. Personally, I think Safari should just ignore the spec in this case, same as other browsers do, and eventually the spec will have to change to reflect real world needs and the software that fulfills them.

For what it's worth, there is a workaround that I have used. Instead of positioning the 4 sides of the iframe, position the 4 sides of a container (like a DIV, for instance, with no padding) around the iframe instead. Then use 100% width and 100% height on the iframe (with no border or margin). That seems to work in HTML 4.01 Transitional at least. Not sure about with strict DTD.

Why a browser should allow the width and height to be set by percentage but not by positioning all four edges is beyond me.