зеркало из https://github.com/mozilla/gecko-dev.git
Bug 186752 - Crash during background painting when there is no scrollable frame. Add a null check.
r+sr=dbaron
This commit is contained in:
Родитель
b0be1c8d3b
Коммит
681064b65e
|
@ -2929,8 +2929,7 @@ nsCSSRendering::PaintBackgroundWithSC(nsIPresContext* aPresContext,
|
||||||
scrollableFrame = GetRootScrollableFrame(aPresContext, rootFrame);
|
scrollableFrame = GetRootScrollableFrame(aPresContext, rootFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_ASSERTION(scrollableFrame, "no scrollable frame");
|
if (scrollableFrame) {
|
||||||
|
|
||||||
// Now, account for scrollbars, if we have any.
|
// Now, account for scrollbars, if we have any.
|
||||||
PRBool verticalVisible;
|
PRBool verticalVisible;
|
||||||
PRBool horizontalVisible;
|
PRBool horizontalVisible;
|
||||||
|
@ -2951,6 +2950,7 @@ nsCSSRendering::PaintBackgroundWithSC(nsIPresContext* aPresContext,
|
||||||
viewportArea.height -= horizontalHeight;
|
viewportArea.height -= horizontalHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Get the anchor point
|
// Get the anchor point
|
||||||
ComputeBackgroundAnchorPoint(aColor, viewportArea, viewportArea, tileWidth, tileHeight, anchor);
|
ComputeBackgroundAnchorPoint(aColor, viewportArea, viewportArea, tileWidth, tileHeight, anchor);
|
||||||
|
|
|
@ -2929,8 +2929,7 @@ nsCSSRendering::PaintBackgroundWithSC(nsIPresContext* aPresContext,
|
||||||
scrollableFrame = GetRootScrollableFrame(aPresContext, rootFrame);
|
scrollableFrame = GetRootScrollableFrame(aPresContext, rootFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_ASSERTION(scrollableFrame, "no scrollable frame");
|
if (scrollableFrame) {
|
||||||
|
|
||||||
// Now, account for scrollbars, if we have any.
|
// Now, account for scrollbars, if we have any.
|
||||||
PRBool verticalVisible;
|
PRBool verticalVisible;
|
||||||
PRBool horizontalVisible;
|
PRBool horizontalVisible;
|
||||||
|
@ -2951,6 +2950,7 @@ nsCSSRendering::PaintBackgroundWithSC(nsIPresContext* aPresContext,
|
||||||
viewportArea.height -= horizontalHeight;
|
viewportArea.height -= horizontalHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Get the anchor point
|
// Get the anchor point
|
||||||
ComputeBackgroundAnchorPoint(aColor, viewportArea, viewportArea, tileWidth, tileHeight, anchor);
|
ComputeBackgroundAnchorPoint(aColor, viewportArea, viewportArea, tileWidth, tileHeight, anchor);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче