Closed Bug 389553 Opened 17 years ago Closed 17 years ago

overflow: hidden; for print causes firefox to hang on print or print preview

Categories

(Core :: Layout, defect)

1.8 Branch
x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 285608

People

(Reporter: henry, Unassigned)

References

()

Details

(Keywords: hang)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5

The referenced URL and others (but not all) on wikipedia cause Firefox to hang when printed or on print preview.  CPU goes to 100% and memory slowly climbs.  I left it running for a half hour and then canceled, closing Firefox.

Making a local copy of that file and its associated css files, I narrowed this down to the file http://en.wikipedia.org/skins-1.5/common/commonPrint.css.  Further testing showed that the final line (overflow) of this block is the culprit:

div.thumb {
    margin-bottom: 0.5em;
    border-style: solid;
    border-color: White;
    width: auto;
    overflow: hidden;
}

When I comment out that line, all is well.  With that line, the browser hangs.  overflow: hidden is valid CSS.



Reproducible: Always

Steps to Reproduce:
1. Go to http://en.wikipedia.org/wiki/Paros
2. Print or Print Preview


Actual Results:  
Firefox Hangs

Expected Results:  
Should print or produce preview
Note that there are two other instances of the overflow property being set in the css file, one of which is also set to hidden (the other is auto).  In this case, however, neither of those refer to elements that are present in the document.  The first is for the pre tag (overflow: auto) and the other for div.townBox.  However, adding 'pre' and 'div class="townBox"' elements does not cause the problem (as long as the div.thumb is commented out.
Sorry to break this up into multiple comments.  The div elements with a class of thumb in the referenced document also have a class of tright (i.e. <div class="thumb tright">) and it seems that the problem is an interaction between 'overflow: hidden' and 'clear: right'

div.thumb {
    margin-bottom: 0.5em;
    border-style: solid;
    border-color: White;
    width: auto;
    overflow: hidden;
}
div.tright {
    float: right;
    clear: right;
    border-width: 0.5em 0 0.8em 1.4em;
}

If either the overflow or clear properties are commented out in the css code, the page prints (and previews).  With both properties present, Firefox hangs.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a7pre) Gecko/2007072405 Minefield/3.0a7pre

This works for me in a trunk build (what will become Firefox 3). I tested in a trunk build from 2007-06-26-04 and saw this hang, so I'm guessing Eli's patch in bug 285608 fixed this.
Severity: normal → major
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Component: General → Layout
Keywords: hang
Product: Firefox → Core
QA Contact: general → layout
Resolution: --- → DUPLICATE
Version: unspecified → 1.8 Branch
You need to log in before you can comment on or make changes to this bug.