Bug 1591925 - When resolving min-size:auto on the main axis of flex items, treat `overflow:-moz-hidden-unscrollable` the same as `overflow:visible`. r=dholbert

Differential Revision: https://phabricator.services.mozilla.com/D52401

--HG--
extra : moz-landing-system : lando
This commit is contained in:
alaskanemily 2019-11-13 23:57:39 +00:00
Родитель d4fff93546
Коммит 510d08b4e6
1 изменённых файлов: 7 добавлений и 6 удалений

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

@ -2093,18 +2093,19 @@ void FlexItem::CheckForMinSizeAuto(const ReflowInput& aFlexItemReflowInput,
// the flex container's main axis) iff:
// (a) its computed value is "auto"
// (b) the "overflow" sub-property in the same axis (the main axis) has a
// computed value of "visible"
// computed value of "visible" and the item does not create a scroll
// container.
const auto& mainMinSize = aAxisTracker.IsRowOriented()
? pos->MinISize(aAxisTracker.GetWritingMode())
: pos->MinBSize(aAxisTracker.GetWritingMode());
// NOTE: Technically we should be checking the 'overflow' subproperty in the
// main axis. But since we only care whether it's 'visible', we can check
// either subproperty -- because they must be BOTH 'visible' or BOTH
// non-'visible' due to the way the subproperties interact.
// If the scrollable overflow makes us create a scroll container, then we
// don't need to do any extra resolution for our `min-size:auto` value.
// We don't need to check for scrollable overflow in a particular axis
// because this will be true for both or neither axis.
mNeedsMinSizeAutoResolution =
IsAutoOrEnumOnBSize(mainMinSize, IsInlineAxisMainAxis()) &&
disp->mOverflowX == StyleOverflow::Visible;
!disp->IsScrollableOverflow();
}
nscoord FlexItem::GetBaselineOffsetFromOuterCrossEdge(