зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1141919 part 2 - Drain overflow list of ruby content frame if line break suppression fails somewhere. r=dbaron
--HG-- extra : source : 53e33afd621af625133b87eb5d44fa521570c40d
This commit is contained in:
Родитель
5193b10097
Коммит
6b6684aace
|
@ -766,8 +766,13 @@ nsRubyBaseContainerFrame::ReflowOneColumn(const ReflowState& aReflowState,
|
|||
nsLineLayout* lineLayout = textReflowStates[i]->mLineLayout;
|
||||
nscoord textIStart = lineLayout->GetCurrentICoord();
|
||||
lineLayout->ReflowFrame(textFrame, reflowStatus, nullptr, pushedFrame);
|
||||
MOZ_ASSERT(!NS_INLINE_IS_BREAK(reflowStatus) && !pushedFrame,
|
||||
"Any line break inside ruby box should has been suppressed");
|
||||
if (MOZ_UNLIKELY(NS_INLINE_IS_BREAK(reflowStatus) || pushedFrame)) {
|
||||
MOZ_ASSERT_UNREACHABLE(
|
||||
"Any line break inside ruby box should have been suppressed");
|
||||
// For safety, always drain the overflow list, so that
|
||||
// no frames are left there after reflow.
|
||||
textFrame->DrainSelfOverflowList();
|
||||
}
|
||||
nscoord textISize = lineLayout->GetCurrentICoord() - textIStart;
|
||||
columnISize = std::max(columnISize, textISize);
|
||||
}
|
||||
|
@ -783,8 +788,13 @@ nsRubyBaseContainerFrame::ReflowOneColumn(const ReflowState& aReflowState,
|
|||
nscoord baseIStart = lineLayout->GetCurrentICoord();
|
||||
lineLayout->ReflowFrame(aColumn.mBaseFrame, reflowStatus,
|
||||
nullptr, pushedFrame);
|
||||
MOZ_ASSERT(!NS_INLINE_IS_BREAK(reflowStatus) && !pushedFrame,
|
||||
"Any line break inside ruby box should has been suppressed");
|
||||
if (MOZ_UNLIKELY(NS_INLINE_IS_BREAK(reflowStatus) || pushedFrame)) {
|
||||
MOZ_ASSERT_UNREACHABLE(
|
||||
"Any line break inside ruby box should have been suppressed");
|
||||
// For safety, always drain the overflow list, so that
|
||||
// no frames are left there after reflow.
|
||||
aColumn.mBaseFrame->DrainSelfOverflowList();
|
||||
}
|
||||
nscoord baseISize = lineLayout->GetCurrentICoord() - baseIStart;
|
||||
columnISize = std::max(columnISize, baseISize);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче