diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index b2b965213c6..16b7be2e572 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -3355,6 +3355,7 @@ nsCSSFrameConstructor::GetParentFrame(nsTableCreator& aTableCreator, return rv; } +#endif static PRBool IsSpecialContent(nsIContent* aContent, @@ -3515,6 +3516,7 @@ IsSpecialContent(nsIContent* aContent, return PR_FALSE; } +#ifdef CSS_TABLES nsresult nsCSSFrameConstructor::AdjustParentFrame(nsFrameConstructorState& aState, nsIContent* aChildContent, @@ -7161,12 +7163,14 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsFrameConstructorState& aSta ProcessPseudoFrames(aState, aFrameItems); } // Create the inline frame - rv = NS_NewInlineFrame(mPresShell, &newFrame); - if (NS_SUCCEEDED(rv)) { // That worked so construct the inline and its children + newFrame = NS_NewInlineFrame(mPresShell); + if (newFrame) { // That worked so construct the inline and its children // Note that we want to insert the inline after processing kids, since // processing of kids may split the inline. rv = ConstructInline(aState, aDisplay, aContent, aParentFrame, aStyleContext, PR_FALSE, newFrame); + } else { + rv = NS_ERROR_OUT_OF_MEMORY; } // To keep the hash table small don't add inline frames (they're @@ -9215,7 +9219,11 @@ nsCSSFrameConstructor::NeedSpecialFrameReframe(nsIContent* aParent1, nsRefPtr styleContext; styleContext = ResolveStyleContext(aParentFrame, aChild); const nsStyleDisplay* display = styleContext->GetStyleDisplay(); - childIsBlock = display->IsBlockLevel() || IsTableRelated(display->mDisplay, PR_TRUE); + childIsBlock = display->IsBlockLevel() +#ifdef CSS_TABLES + || IsTableRelated(display->mDisplay, PR_TRUE) +#endif + ; } nsIFrame* prevParent; // parent of prev sibling nsIFrame* nextParent; // parent of next sibling diff --git a/mozilla/layout/generic/nsAbsoluteContainingBlock.cpp b/mozilla/layout/generic/nsAbsoluteContainingBlock.cpp index 6b45a3366b7..7c9787ecb6f 100644 --- a/mozilla/layout/generic/nsAbsoluteContainingBlock.cpp +++ b/mozilla/layout/generic/nsAbsoluteContainingBlock.cpp @@ -412,7 +412,7 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat // if the frame moved, then the view would have invalidated everything so // we don't need to do any invalidation here. if (oldRect.TopLeft() == rect.TopLeft() && - aReason != eReflowReason_Initial && + !(aDelegatingFrame->GetStateBits() & NS_FRAME_FIRST_REFLOW) && oldRect.Size() != rect.Size()) { // Invalidate the area where the frame changed size. We can't // rely on the view to do this ... the view size might not change even diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index a3948b0a04d..9046a3d22af 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -5034,10 +5034,6 @@ nsFrame::RefreshSizeCache(nsBoxLayoutState& aState) metrics->mBlockPrefSize.width = GetPrefWidth(rendContext) + bp.LeftRight(); metrics->mBlockMinSize.width = GetMinWidth(rendContext) + bp.LeftRight(); - // a line layout from outside the box shouldn't be used for inline - // frames inside the box - childReflowState.mLineLayout = nsnull; - // do the nasty. nsHTMLReflowMetrics desiredSize; rv = BoxReflow(aState, presContext, desiredSize, rendContext, diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index be36d9848e1..776cc74ab39 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/layout/generic/nsTextFrame.cpp @@ -5900,7 +5900,7 @@ nsTextFrame::AddInlineMinWidth(nsIRenderingContext *aRenderingContext, nsresult rv; nsPresContext *presContext = GetPresContext(); - TextStyle ts(presContext, *aRenderingContext, mStyleContext); + nsTextStyle ts(presContext, *aRenderingContext, mStyleContext); if (!ts.mFont->mSize) // XXX If font size is zero, we still need to figure out whether we've // got non-whitespace text and whether we end in whitespace. @@ -5990,7 +5990,7 @@ nsTextFrame::AddInlinePrefWidth(nsIRenderingContext *aRenderingContext, nsresult rv; nsPresContext *presContext = GetPresContext(); - TextStyle ts(presContext, *aRenderingContext, mStyleContext); + nsTextStyle ts(presContext, *aRenderingContext, mStyleContext); if (!ts.mFont->mSize) // XXX If font size is zero, we still need to figure out whether we've // got non-whitespace text and whether we end in whitespace.