Make sure that <frame>s don't fall through to nsLeafFrame sizing, unlike <iframe>s. Bug 414322, r+sr=dbaron, a=schrep.

This commit is contained in:
bzbarsky@mit.edu 2008-02-19 09:53:46 -08:00
Родитель b688617577
Коммит f982e5e6cf
1 изменённых файлов: 23 добавлений и 0 удалений

Просмотреть файл

@ -145,6 +145,11 @@ public:
virtual nsSize GetIntrinsicRatio();
virtual nsSize ComputeAutoSize(nsIRenderingContext *aRenderingContext,
nsSize aCBSize, nscoord aAvailableWidth,
nsSize aMargin, nsSize aBorder,
nsSize aPadding, PRBool aShrinkWrap);
virtual nsSize ComputeSize(nsIRenderingContext *aRenderingContext,
nsSize aCBSize, nscoord aAvailableWidth,
nsSize aMargin, nsSize aBorder, nsSize aPadding,
@ -448,6 +453,24 @@ nsSubDocumentFrame::GetIntrinsicRatio()
return nsLeafFrame::GetIntrinsicRatio();
}
/* virtual */ nsSize
nsSubDocumentFrame::ComputeAutoSize(nsIRenderingContext *aRenderingContext,
nsSize aCBSize, nscoord aAvailableWidth,
nsSize aMargin, nsSize aBorder,
nsSize aPadding, PRBool aShrinkWrap)
{
if (!IsInline()) {
return nsFrame::ComputeAutoSize(aRenderingContext, aCBSize,
aAvailableWidth, aMargin, aBorder,
aPadding, aShrinkWrap);
}
return nsLeafFrame::ComputeAutoSize(aRenderingContext, aCBSize,
aAvailableWidth, aMargin, aBorder,
aPadding, aShrinkWrap);
}
/* virtual */ nsSize
nsSubDocumentFrame::ComputeSize(nsIRenderingContext *aRenderingContext,
nsSize aCBSize, nscoord aAvailableWidth,