From 99faa8a63aac478d15986e39108c8cb55b4b7635 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Fri, 24 Oct 2003 07:31:50 +0000 Subject: [PATCH] Fix regression bug 223394 -- percent-height replaced inlines that only have auto-height ancestors should get intrinsic height instead of 0, even in quirks mode. r+sr=roc, a=asa --- layout/generic/nsHTMLReflowState.cpp | 9 +++------ layout/html/base/src/nsHTMLReflowState.cpp | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/layout/generic/nsHTMLReflowState.cpp b/layout/generic/nsHTMLReflowState.cpp index 7d652db9b098..93a6179e3e04 100644 --- a/layout/generic/nsHTMLReflowState.cpp +++ b/layout/generic/nsHTMLReflowState.cpp @@ -1809,16 +1809,13 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext, if (eCompatibility_NavQuirks == mode) { if (!IS_TABLE_CELL(fType)) { aContainingBlockHeight = CalcQuirkContainingBlockHeight(*cbrs); + if (aContainingBlockHeight == NS_AUTOHEIGHT) { + heightUnit = eStyleUnit_Auto; + } } else { heightUnit = eStyleUnit_Auto; } - // NOTE: since here we really do NEED the computed height of the containing block, - // we pass PR_FALSE for the aRestrictToFirstLevel argument, allowing the method - // to walk up the frame tree arbitrarily far to find a real height. This is NOT - // default behavior, since it is an additional performance hit and is not usually - // necessary (see other call in ComputeContainingBlockRectangle). - // This is an IE emulation for %-height images - see bug 85016 } // in standard mode, use the cb height. if it's "auto", as will be the case // by default in BODY, use auto height as per CSS2 spec. diff --git a/layout/html/base/src/nsHTMLReflowState.cpp b/layout/html/base/src/nsHTMLReflowState.cpp index 7d652db9b098..93a6179e3e04 100644 --- a/layout/html/base/src/nsHTMLReflowState.cpp +++ b/layout/html/base/src/nsHTMLReflowState.cpp @@ -1809,16 +1809,13 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext, if (eCompatibility_NavQuirks == mode) { if (!IS_TABLE_CELL(fType)) { aContainingBlockHeight = CalcQuirkContainingBlockHeight(*cbrs); + if (aContainingBlockHeight == NS_AUTOHEIGHT) { + heightUnit = eStyleUnit_Auto; + } } else { heightUnit = eStyleUnit_Auto; } - // NOTE: since here we really do NEED the computed height of the containing block, - // we pass PR_FALSE for the aRestrictToFirstLevel argument, allowing the method - // to walk up the frame tree arbitrarily far to find a real height. This is NOT - // default behavior, since it is an additional performance hit and is not usually - // necessary (see other call in ComputeContainingBlockRectangle). - // This is an IE emulation for %-height images - see bug 85016 } // in standard mode, use the cb height. if it's "auto", as will be the case // by default in BODY, use auto height as per CSS2 spec.