зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1310015: Change MainAxisTracker to consistently use NS_STYLE_JUSTIFY constants. r=mats
MozReview-Commit-ID: F8VfIuZJqFa --HG-- extra : rebase_source : c013d6b4e25daf8dbcb010720eb2ea42ffd0ae35
This commit is contained in:
Родитель
3f4bce8633
Коммит
8455bc616a
|
@ -2617,19 +2617,19 @@ MainAxisPositionTracker::
|
|||
}
|
||||
|
||||
// Map 'left'/'right' to 'start'/'end'
|
||||
if (mJustifyContent == NS_STYLE_ALIGN_LEFT ||
|
||||
mJustifyContent == NS_STYLE_ALIGN_RIGHT) {
|
||||
if (mJustifyContent == NS_STYLE_JUSTIFY_LEFT ||
|
||||
mJustifyContent == NS_STYLE_JUSTIFY_RIGHT) {
|
||||
if (aAxisTracker.IsColumnOriented()) {
|
||||
// Container's alignment axis is not parallel to the inline axis,
|
||||
// so we map both 'left' and 'right' to 'start'.
|
||||
mJustifyContent = NS_STYLE_ALIGN_START;
|
||||
mJustifyContent = NS_STYLE_JUSTIFY_START;
|
||||
} else {
|
||||
// Row-oriented, so we map 'left' and 'right' to 'start' or 'end',
|
||||
// depending on left-to-right writing mode.
|
||||
const bool isLTR = aAxisTracker.GetWritingMode().IsBidiLTR();
|
||||
const bool isAlignLeft = (mJustifyContent == NS_STYLE_ALIGN_LEFT);
|
||||
mJustifyContent = (isAlignLeft == isLTR) ? NS_STYLE_ALIGN_START
|
||||
: NS_STYLE_ALIGN_END;
|
||||
const bool isJustifyLeft = (mJustifyContent == NS_STYLE_JUSTIFY_LEFT);
|
||||
mJustifyContent = (isJustifyLeft == isLTR) ? NS_STYLE_JUSTIFY_START
|
||||
: NS_STYLE_JUSTIFY_END;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче