Bug 1693409 Part 1 - Assert nsTableFrame::ComputeSize()'s aWM parameter is the same as the frame's writing mode. r=dholbert

Differential Revision: https://phabricator.services.mozilla.com/D105684
This commit is contained in:
Ting-Yu Lin 2021-02-19 22:12:19 +00:00
Родитель 1106f750e1
Коммит bd20c4341d
1 изменённых файлов: 4 добавлений и 7 удалений

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

@ -1525,17 +1525,14 @@ nsIFrame::SizeComputationResult nsTableFrame::ComputeSize(
nscoord aAvailableISize, const LogicalSize& aMargin,
const LogicalSize& aBorderPadding, const StyleSizeOverrides& aSizeOverrides,
ComputeSizeFlags aFlags) {
// Only table wrapper calls this method, and it should use our writing mode.
MOZ_ASSERT(aWM == GetWritingMode(),
"aWM should be the same as our writing mode!");
auto result = nsContainerFrame::ComputeSize(
aRenderingContext, aWM, aCBSize, aAvailableISize, aMargin, aBorderPadding,
aSizeOverrides, aFlags);
// XXX The code below doesn't make sense if the caller's writing mode
// is orthogonal to this frame's. Not sure yet what should happen then;
// for now, just bail out.
if (aWM.IsVertical() != GetWritingMode().IsVertical()) {
return result;
}
// If we're a container for font size inflation, then shrink
// wrapping inside of us should not apply font size inflation.
AutoMaybeDisableFontInflation an(this);