Bug 1744895 Part 3 - Fix justify-*:{left|right} mapping for abspos children of flex containers. r=dholbert

Differential Revision: https://phabricator.services.mozilla.com/D133169
This commit is contained in:
Ting-Yu Lin 2021-12-10 17:42:23 +00:00
Родитель fd68e79da7
Коммит 5909d5b7f3
2 изменённых файлов: 2 добавлений и 15 удалений

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

@ -1324,14 +1324,8 @@ StyleAlignFlags nsFlexContainerFrame::CSSAlignmentForAbsPosChild(
alignment = isAxisReversed ? StyleAlignFlags::START : StyleAlignFlags::END; alignment = isAxisReversed ? StyleAlignFlags::START : StyleAlignFlags::END;
} else if (alignment == StyleAlignFlags::LEFT || } else if (alignment == StyleAlignFlags::LEFT ||
alignment == StyleAlignFlags::RIGHT) { alignment == StyleAlignFlags::RIGHT) {
if (aLogicalAxis == eLogicalAxisInline) { MOZ_ASSERT(isMainAxis, "Only justify-* can have 'left' and 'right'!");
const bool isLeft = (alignment == StyleAlignFlags::LEFT); alignment = axisTracker.ResolveJustifyLeftRight(alignment);
alignment = (isLeft == GetWritingMode().IsBidiLTR())
? StyleAlignFlags::START
: StyleAlignFlags::END;
} else {
alignment = StyleAlignFlags::START;
}
} else if (alignment == StyleAlignFlags::BASELINE) { } else if (alignment == StyleAlignFlags::BASELINE) {
alignment = StyleAlignFlags::START; alignment = StyleAlignFlags::START;
} else if (alignment == StyleAlignFlags::LAST_BASELINE) { } else if (alignment == StyleAlignFlags::LAST_BASELINE) {

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

@ -1,7 +0,0 @@
[flex-abspos-staticpos-justify-content-vertWM-002.html]
[.container > div 11]
expected: FAIL
[.container > div 23]
expected: FAIL