From d10593fcc408a1c7d50bfd5bd5f2803b52ca89ee Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Mon, 10 May 1999 22:59:03 +0000 Subject: [PATCH] bug 6185 - absolutely positioned target nsHTMLFrameInnerFrames don't get processed by InitAbsoluteConstraints. git-svn-id: svn://10.0.0.236/trunk@31017 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsHTMLReflowState.cpp | 11 +++++++++-- mozilla/layout/html/base/src/nsHTMLReflowState.cpp | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/mozilla/layout/generic/nsHTMLReflowState.cpp b/mozilla/layout/generic/nsHTMLReflowState.cpp index 8c7a7fbc506..30ee46f48dc 100644 --- a/mozilla/layout/generic/nsHTMLReflowState.cpp +++ b/mozilla/layout/generic/nsHTMLReflowState.cpp @@ -954,8 +954,15 @@ nsHTMLReflowState::InitConstraints(nsIPresContext& aPresContext) mComputedMaxWidth = mComputedMaxHeight = NS_UNCONSTRAINEDSIZE; } else if (NS_FRAME_GET_TYPE(frameType) == NS_CSS_FRAME_TYPE_ABSOLUTE) { - InitAbsoluteConstraints(aPresContext, cbrs, containingBlockWidth, - containingBlockHeight); + // XXX not sure if this belongs here or somewhere else - cwk + // an nsHTMLFrameInnerFrame doesn't get a placeholder frame, the nsHTMLFrameOuterFrame does + nsIAtom* targetFrameType; + frame->GetFrameType(&targetFrameType); + if (nsLayoutAtoms::htmlFrameInnerFrame != targetFrameType) { + InitAbsoluteConstraints(aPresContext, cbrs, containingBlockWidth, + containingBlockHeight); + } + NS_IF_RELEASE(targetFrameType); } else if (NS_CSS_FRAME_TYPE_INLINE == frameType) { // Inline non-replaced elements do not have computed widths or heights // XXX add this check to HaveFixedContentHeight/Width too diff --git a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp index 8c7a7fbc506..30ee46f48dc 100644 --- a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp +++ b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp @@ -954,8 +954,15 @@ nsHTMLReflowState::InitConstraints(nsIPresContext& aPresContext) mComputedMaxWidth = mComputedMaxHeight = NS_UNCONSTRAINEDSIZE; } else if (NS_FRAME_GET_TYPE(frameType) == NS_CSS_FRAME_TYPE_ABSOLUTE) { - InitAbsoluteConstraints(aPresContext, cbrs, containingBlockWidth, - containingBlockHeight); + // XXX not sure if this belongs here or somewhere else - cwk + // an nsHTMLFrameInnerFrame doesn't get a placeholder frame, the nsHTMLFrameOuterFrame does + nsIAtom* targetFrameType; + frame->GetFrameType(&targetFrameType); + if (nsLayoutAtoms::htmlFrameInnerFrame != targetFrameType) { + InitAbsoluteConstraints(aPresContext, cbrs, containingBlockWidth, + containingBlockHeight); + } + NS_IF_RELEASE(targetFrameType); } else if (NS_CSS_FRAME_TYPE_INLINE == frameType) { // Inline non-replaced elements do not have computed widths or heights // XXX add this check to HaveFixedContentHeight/Width too