зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1158290 part 2: Use logical (not physical) skipsides & borderpadding when chipping away from available BSize. r=mats
This commit is contained in:
Родитель
f82cdd0c52
Коммит
44b034651d
|
@ -3533,14 +3533,16 @@ nsFlexContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||||
const FlexboxAxisTracker axisTracker(aReflowState.mStylePosition,
|
const FlexboxAxisTracker axisTracker(aReflowState.mStylePosition,
|
||||||
aReflowState.GetWritingMode());
|
aReflowState.GetWritingMode());
|
||||||
|
|
||||||
// If we're being fragmented into a constrained height, subtract off
|
// If we're being fragmented into a constrained BSize, then subtract off
|
||||||
// borderpadding-top from it, to get the available height for our
|
// borderpadding BStart from that constrained BSize, to get the available
|
||||||
// content box. (Don't subtract if we're skipping top border/padding,
|
// BSize for our content box. (No need to subtract the borderpadding BStart
|
||||||
// though.)
|
// if we're already skipping it via GetLogicalSkipSides, though.)
|
||||||
nscoord availableBSizeForContent = aReflowState.AvailableBSize();
|
nscoord availableBSizeForContent = aReflowState.AvailableBSize();
|
||||||
if (availableBSizeForContent != NS_UNCONSTRAINEDSIZE &&
|
if (availableBSizeForContent != NS_UNCONSTRAINEDSIZE &&
|
||||||
!GetSkipSides().Top()) {
|
!(GetLogicalSkipSides(&aReflowState).BStart())) {
|
||||||
availableBSizeForContent -= aReflowState.ComputedPhysicalBorderPadding().top;
|
WritingMode wm = aReflowState.GetWritingMode();
|
||||||
|
availableBSizeForContent -=
|
||||||
|
aReflowState.ComputedLogicalBorderPadding().BStart(wm);
|
||||||
// (Don't let that push availableBSizeForContent below zero, though):
|
// (Don't let that push availableBSizeForContent below zero, though):
|
||||||
availableBSizeForContent = std::max(availableBSizeForContent, 0);
|
availableBSizeForContent = std::max(availableBSizeForContent, 0);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче