Closed Bug 543383 Opened 14 years ago Closed 14 years ago

CSS2.1 Section 10.1 Rule #4: Containing block not being calculated correctly

Categories

(Core :: Layout: Positioned, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 489100

People

(Reporter: mackyle, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6

Using the attached sample html file, the containing block for a "position:absolute" span contained within a "position:relative" span is being calculated incorrectly.

This bug is sensitive to the prior contents of the file.  Please test using the attached .html file.

It displays the problem.  If the browser is working correctly, the arrow will point to "PASSED", when the containing box is calculated incorrectly, it points to "FAILED".

Reproducible: Always

Steps to Reproduce:
1. Open the firefox_bug.html attachment in Firefox 3.5 or 3.6 on Mac OS X, Ubuntu Linux 0910, or Windows XP SP2 (haven't tested any other platforms or versions but suspect it's universal since it happens all those three).
2. Observe the arrow pointing to "FAILED"
3. Read the explanation.  View the same file in Safari and notice the arrow points to "PASSED"
Actual Results:  
You need to use the attached example HTML file.  Something very strange is going on and this bug is not easily reproduced if you modify the html source.  It looks like the containing box is being calculated as the first line's inline box rather than correctly as detailed in the CSS 2.1 section 10.1 rule #4 specification.

However, sometimes firefox does calculate it correctly.  The attached firefox_bug.html seems to always reproduce the problem successfully.

Expected Results:  
Load the attached .html file in a WebKit-based browser to see what's expected.  The arrow will always correctly point to "PASSED".

The relevant part of the specification can be found here:

http://www.w3.org/TR/CSS21/visudet.html#containing-block-details

in rule #4.
Here's the firefox_bug.html file that demonstrates the problem.  Open it with Firefox.
Component: General → Layout: R & A Pos
Product: Firefox → Core
QA Contact: general → layout.r-and-a-pos
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: