Bug 1232194 part 2 - [writing-mode] Make ConsumedBSize() return the block-axis size, not the physical height. r=dholbert

This commit is contained in:
Mats Palmgren 2017-01-04 00:56:19 +01:00
Родитель 10150aa1b7
Коммит 4cb897b943
2 изменённых файлов: 5 добавлений и 4 удалений

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

@ -209,11 +209,11 @@ nsSplittableFrame::RemoveFromFlow(nsIFrame* aFrame)
nscoord
nsSplittableFrame::ConsumedBSize(WritingMode aWM) const
{
nscoord height = 0;
nscoord bSize = 0;
for (nsIFrame* prev = GetPrevInFlow(); prev; prev = prev->GetPrevInFlow()) {
height += prev->GetContentRectRelativeToSelf().height;
bSize += prev->ContentBSize(aWM);
}
return height;
return bSize;
}
nscoord

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

@ -81,7 +81,8 @@ protected:
{}
/**
* Determine the height consumed by our previous-in-flows.
* Return the sum of the block-axis content size of our prev-in-flows.
* @param aWM a writing-mode to determine the block-axis
*
* @note (bz) This makes laying out a splittable frame with N in-flows
* O(N^2)! So, use this function with caution and minimize the number