Set inflation container to null during parts of intrinsic sizing that should not have inflation applied. (Bug 706609, patch 4) r=roc

This is the first of two patches to honor inflation during intrinsic
width calculation (which we need to do to make some form controls
inflate correctly).
This commit is contained in:
L. David Baron
2012-01-24 17:21:29 -08:00
parent ccb7b28d3f
commit 1d98076bbe
22 changed files with 338 additions and 2 deletions

View File

@@ -48,6 +48,9 @@
#include "nsGkAtoms.h"
#include "SpanningCellSorter.h"
using namespace mozilla;
using namespace mozilla::layout;
namespace css = mozilla::css;
#undef DEBUG_TABLE_STRATEGY
@@ -110,6 +113,10 @@ GetWidthInfo(nsRenderingContext *aRenderingContext,
{
nscoord minCoord, prefCoord;
if (aIsCell) {
// If aFrame is a container for font size inflation, then shrink
// wrapping inside of it should not apply font size inflation.
AutoMaybeNullInflationContainer an(aFrame);
minCoord = aFrame->GetMinWidth(aRenderingContext);
prefCoord = aFrame->GetPrefWidth(aRenderingContext);
} else {