Bug 1237754 part 1 - [css-grid][css-align] Make 'align-content:normal' behave as 'stretch' for Grid containers. r=dholbert

Change due to CSSWG decision:
https://lists.w3.org/Archives/Public/www-style/2016Jan/0031.html
This commit is contained in:
Mats Palmgren 2016-01-17 19:44:05 +01:00
Родитель 0d1f6a74d4
Коммит 36a12be95a
1 изменённых файлов: 6 добавлений и 4 удалений

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

@ -2936,15 +2936,17 @@ nsGridContainerFrame::Tracks::AlignJustifyContent(
const bool isAlign = mAxis == eLogicalAxisBlock;
auto stylePos = aReflowState.mStylePosition;
const auto valueAndFallback = isAlign ?
stylePos->ComputedAlignContent() :
stylePos->ComputedJustifyContent();
auto valueAndFallback = isAlign ? stylePos->ComputedAlignContent() :
stylePos->ComputedJustifyContent();
WritingMode wm = aReflowState.GetWritingMode();
bool overflowSafe;
auto alignment = ::GetAlignJustifyValue(valueAndFallback, wm, isAlign,
&overflowSafe);
if (alignment == NS_STYLE_ALIGN_NORMAL) {
alignment = NS_STYLE_ALIGN_START;
MOZ_ASSERT(valueAndFallback == NS_STYLE_ALIGN_NORMAL,
"*-content:normal cannot be specified with explicit fallback");
alignment = isAlign ? NS_STYLE_ALIGN_STRETCH : NS_STYLE_ALIGN_START;
valueAndFallback = alignment; // we may need a fallback for 'stretch' below
}
// Compute the free space and count auto-sized tracks.