Bug 1269046 part 3: Make a grid-specific comment more general, in CSSAlignUtils::AlignJustifySelf. r=mats
MozReview-Commit-ID: GZ35iZ2E1Iz
--- a/layout/generic/CSSAlignUtils.cpp
+++ b/layout/generic/CSSAlignUtils.cpp
@@ -36,20 +36,23 @@ CSSAlignUtils::AlignJustifySelf(uint8_t
case NS_STYLE_ALIGN_SELF_START: // align/justify-self: self-start
aAlignment = MOZ_LIKELY(aSameSide) ? NS_STYLE_ALIGN_START
: NS_STYLE_ALIGN_END;
break;
case NS_STYLE_ALIGN_SELF_END: // align/justify-self: self-end
aAlignment = MOZ_LIKELY(aSameSide) ? NS_STYLE_ALIGN_END
: NS_STYLE_ALIGN_START;
break;
- case NS_STYLE_ALIGN_FLEX_START: // same as 'start' for Grid
+ // flex-start/flex-end are the same as start/end, in most contexts.
+ // (They have special behavior in flex containers, so flex containers
+ // should map them to some other value before calling this method.)
+ case NS_STYLE_ALIGN_FLEX_START:
aAlignment = NS_STYLE_ALIGN_START;
break;
- case NS_STYLE_ALIGN_FLEX_END: // same as 'end' for Grid
+ case NS_STYLE_ALIGN_FLEX_END:
aAlignment = NS_STYLE_ALIGN_END;
break;
}
// XXX try to condense this code a bit by adding the necessary convenience
// methods? (bug 1209710)
// Get the item's margin corresponding to the container's start/end side.