Backed out changeset 04c819d845d5 (bug 1229437)

--HG--
extra : commitid : 7mKaiGMvXOG
This commit is contained in:
Nigel Babu 2016-01-27 11:19:50 +05:30
Родитель d22ea976a4
Коммит 89cf5102fe
1 изменённых файлов: 4 добавлений и 33 удалений

Просмотреть файл

@ -724,7 +724,7 @@ nsRubyBaseContainerFrame::PullOneColumn(nsLineLayout* aLineLayout,
nsIFrame* nextBase = GetNextInFlowChild(aPullFrameState.mBase);
MOZ_ASSERT(!nextBase || nextBase->GetType() == nsGkAtoms::rubyBaseFrame);
aColumn.mBaseFrame = static_cast<nsRubyBaseFrame*>(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<nsRubyTextFrame*>(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.