Bug 389663: CSS test crashes Firefox. r+sr=dbaron/bz

This commit is contained in:
sharparrow1@yahoo.com 2007-07-26 13:20:30 -07:00
parent 2ccd5c8afc
commit 9ad46c47f5

View File

@ -599,6 +599,11 @@ nsImageDocument::CreateSyntheticDocument()
nsresult
nsImageDocument::CheckOverflowing(PRBool changeState)
{
/* Create a scope so that the style context gets destroyed before we might
* call ClearStyleDataAndReflow. Also, holding onto pointers to the
* presentatation through style resolution is potentially dangerous.
*/
{
nsIPresShell *shell = GetPrimaryShell();
if (!shell) {
@ -627,6 +632,7 @@ nsImageDocument::CheckOverflowing(PRBool changeState)
mVisibleWidth = nsPresContext::AppUnitsToIntCSSPixels(visibleArea.width);
mVisibleHeight = nsPresContext::AppUnitsToIntCSSPixels(visibleArea.height);
}
PRBool imageWasOverflowing = mImageIsOverflowing;
mImageIsOverflowing =