From 89cf5102fec6affcbee1a03588b6c3bf13637d95 Mon Sep 17 00:00:00 2001 From: Nigel Babu Date: Wed, 27 Jan 2016 11:19:50 +0530 Subject: [PATCH] Backed out changeset 04c819d845d5 (bug 1229437) --HG-- extra : commitid : 7mKaiGMvXOG --- layout/generic/nsRubyBaseContainerFrame.cpp | 37 +++------------------ 1 file changed, 4 insertions(+), 33 deletions(-) diff --git a/layout/generic/nsRubyBaseContainerFrame.cpp b/layout/generic/nsRubyBaseContainerFrame.cpp index 047e0cd27aec..67a659536004 100644 --- a/layout/generic/nsRubyBaseContainerFrame.cpp +++ b/layout/generic/nsRubyBaseContainerFrame.cpp @@ -724,7 +724,7 @@ nsRubyBaseContainerFrame::PullOneColumn(nsLineLayout* aLineLayout, nsIFrame* nextBase = GetNextInFlowChild(aPullFrameState.mBase); MOZ_ASSERT(!nextBase || nextBase->GetType() == nsGkAtoms::rubyBaseFrame); aColumn.mBaseFrame = static_cast(nextBase); - bool foundFrame = !!aColumn.mBaseFrame; + aIsComplete = !aColumn.mBaseFrame; bool pullingIntraLevelWhitespace = aColumn.mBaseFrame && aColumn.mBaseFrame->IsIntraLevelWhitespace(); @@ -735,17 +735,13 @@ nsRubyBaseContainerFrame::PullOneColumn(nsLineLayout* aLineLayout, MOZ_ASSERT(!nextText || nextText->GetType() == nsGkAtoms::rubyTextFrame); nsRubyTextFrame* textFrame = static_cast(nextText); aColumn.mTextFrames.AppendElement(textFrame); - foundFrame = foundFrame || nextText; + // If there exists any frame in continations, we haven't + // completed the reflow process. + aIsComplete = aIsComplete && !nextText; if (nextText && !pullingIntraLevelWhitespace) { pullingIntraLevelWhitespace = textFrame->IsIntraLevelWhitespace(); } } - // If there exists any frame in continations, we haven't - // completed the reflow process. - aIsComplete = !foundFrame; - if (!foundFrame) { - return; - } aColumn.mIsIntraLevelWhitespace = pullingIntraLevelWhitespace; if (pullingIntraLevelWhitespace) { @@ -761,31 +757,6 @@ nsRubyBaseContainerFrame::PullOneColumn(nsLineLayout* aLineLayout, textFrame = nullptr; } } - } else { - // We are not pulling an intra-level whitespace, which means all - // elements we are going to pull can have non-whitespace content, - // which may contain float which we need to reparent. - nsBlockFrame* oldFloatCB = nullptr; - for (nsIFrame* frame : aColumn) { - oldFloatCB = nsLayoutUtils::GetFloatContainingBlock(frame); - break; - } -#ifdef DEBUG - MOZ_ASSERT(oldFloatCB, "Must have found a float containing block"); - for (nsIFrame* frame : aColumn) { - MOZ_ASSERT(nsLayoutUtils::GetFloatContainingBlock(frame) == oldFloatCB, - "All frames in the same ruby column should share " - "the same old float containing block"); - } -#endif - nsBlockFrame* newFloatCB = - nsLayoutUtils::GetAsBlock(aLineLayout->LineContainerFrame()); - MOZ_ASSERT(newFloatCB, "Must have a float containing block"); - if (oldFloatCB != newFloatCB) { - for (nsIFrame* frame : aColumn) { - newFloatCB->ReparentFloats(frame, oldFloatCB, false); - } - } } // Pull the frames of this column.