mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Don't resize widgets to negative sizes. Bug 397871, r+sr=roc, a=beltzner.
This commit is contained in:
parent
39e2a45b3f
commit
ff237c9fd5
@ -562,8 +562,15 @@ nsSubDocumentFrame::ReflowFinished()
|
||||
nsSize innerSize(GetSize());
|
||||
if (IsInline()) {
|
||||
nsMargin usedBorderPadding = GetUsedBorderAndPadding();
|
||||
|
||||
// Sadly, XUL smacks the frame size without changing the used
|
||||
// border and padding, so we can't trust those. Subtracting
|
||||
// them might make things negative.
|
||||
innerSize.width -= usedBorderPadding.LeftRight();
|
||||
innerSize.width = PR_MAX(innerSize.width, 0);
|
||||
|
||||
innerSize.height -= usedBorderPadding.TopBottom();
|
||||
innerSize.height = PR_MAX(innerSize.height, 0);
|
||||
}
|
||||
|
||||
PRInt32 cx = presContext->AppUnitsToDevPixels(innerSize.width);
|
||||
|
Loading…
Reference in New Issue
Block a user