Closed Bug 454310 Opened 16 years ago Closed 16 years ago

<pre> blocks rendered wrong because of tab width miscalculation

Categories

(Firefox :: General, defect)

x86
Windows Vista
defect
Not set
minor

Tracking

()

VERIFIED DUPLICATE of bug 411059

People

(Reporter: binrapt, Unassigned)

References

()

Details

User-Agent:       Opera/9.26 (Windows NT 6.0; U; en)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1

Scroll down to the "The First Steps" section and the you should see the first code block that gets misrendered in Firefox. It is rendered correctly in Opera 9, IE7 and Chrome. The <pre> blocks inside the table actually get rendered outside the table. It appears that the width of <pre> blocks is calculated wrong. Whereas a tab actually takes up the space of 8 spaces it is counted as only one space for the width of the table. So the table ends up being too small and it does not cover the background of the <pre> blocks as it should.

Reproducible: Always

Steps to Reproduce:
1. Open site specified in the post URL 
2. Scroll down to the "The First Steps" section of the document
Actual Results:  
Admire the misrendered code blocks where <pre> blocks are drawn outside of their containers.

Expected Results:  
It should have rendered the table correctly so the text isn't drawn outside its container.

The only workaround we currently have is to generate special documents for Firefox which contains whitespace hacks to avoid this misrendering. Remove the no_fix=1 part to see what my temporary fix looks like.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.