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-11 22:48:31 +00:00
Родитель e84b2037c0
Коммит 847cb4d965
1 изменённых файлов: 6 добавлений и 6 удалений

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

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