Bug 1696721 part 1 - Fix incorrect span sizing on ruby with border / padding. r=dholbert

This issue is revealed by the test for this bug in a later part, so it's also covered by that test.

Differential Revision: https://phabricator.services.mozilla.com/D109226
This commit is contained in:
Xidorn Quan 2021-03-23 10:26:16 +00:00
Родитель ca2819c13c
Коммит 2de293553b
1 изменённых файлов: 3 добавлений и 4 удалений

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

@ -129,10 +129,9 @@ void nsRubyFrame::Reflow(nsPresContext* aPresContext,
}
NS_ASSERTION(aReflowInput.AvailableISize() != NS_UNCONSTRAINEDSIZE,
"should no longer use available widths");
nscoord availableISize = aReflowInput.AvailableISize();
availableISize -= startEdge + borderPadding.IEnd(frameWM);
aReflowInput.mLineLayout->BeginSpan(this, &aReflowInput, startEdge,
availableISize, &mBaseline);
nscoord endEdge = aReflowInput.AvailableISize() - borderPadding.IEnd(frameWM);
aReflowInput.mLineLayout->BeginSpan(this, &aReflowInput, startEdge, endEdge,
&mBaseline);
for (RubySegmentEnumerator e(this); !e.AtEnd(); e.Next()) {
ReflowSegment(aPresContext, aReflowInput, aDesiredSize.BlockStartAscent(),