Bug 1322570 Part 2 - Resolve {align,justify}-self using StyleContext from alignment container frame in ReflowInput::InitConstraints(). r=dholbert
Per bug 1322570 comment 46, it's not easy to replace ComputedJustifyItems() and UsedJustifySelf()'s internal nsStyleContext::GetParent() without correctness penalty, so we use GetParentAllowServo() for now. Also, fix the reftest.list added in bug 1334403 which incorrectly wrote test page as reference page. MozReview-Commit-ID: 6kAAWSFojd5
This commit is contained in:
@@ -1678,8 +1678,8 @@ nsStylePosition::ComputedJustifyItems(nsStyleContext* aParent) const
|
||||
return mJustifyItems;
|
||||
}
|
||||
if (MOZ_LIKELY(aParent)) {
|
||||
auto inheritedJustifyItems =
|
||||
aParent->StylePosition()->ComputedJustifyItems(aParent->GetParent());
|
||||
auto inheritedJustifyItems = aParent->StylePosition()->ComputedJustifyItems(
|
||||
aParent->GetParentAllowServo());
|
||||
// "If the inherited value of justify-items includes the 'legacy' keyword,
|
||||
// 'auto' computes to the inherited value." Otherwise, 'normal'.
|
||||
if (inheritedJustifyItems & NS_STYLE_JUSTIFY_LEGACY) {
|
||||
@@ -1696,8 +1696,8 @@ nsStylePosition::UsedJustifySelf(nsStyleContext* aParent) const
|
||||
return mJustifySelf;
|
||||
}
|
||||
if (MOZ_LIKELY(aParent)) {
|
||||
auto inheritedJustifyItems = aParent->StylePosition()->
|
||||
ComputedJustifyItems(aParent->GetParent());
|
||||
auto inheritedJustifyItems = aParent->StylePosition()->ComputedJustifyItems(
|
||||
aParent->GetParentAllowServo());
|
||||
return inheritedJustifyItems & ~NS_STYLE_JUSTIFY_LEGACY;
|
||||
}
|
||||
return NS_STYLE_JUSTIFY_NORMAL;
|
||||
|
||||
Reference in New Issue
Block a user