summaryrefslogtreecommitdiff
path: root/layout/style/nsRuleNode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layout/style/nsRuleNode.cpp')
-rw-r--r--layout/style/nsRuleNode.cpp38
1 files changed, 14 insertions, 24 deletions
diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp
index e59c10cd2f..e824e77211 100644
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -8873,25 +8873,27 @@ nsRuleNode::ComputePositionData(void* aStartStruct,
parentPos->mGridRowEnd,
conditions);
- // grid-column-gap
- if (SetCoord(*aRuleData->ValueForGridColumnGap(),
- pos->mGridColumnGap, parentPos->mGridColumnGap,
- SETCOORD_LPH | SETCOORD_INITIAL_ZERO | SETCOORD_STORE_CALC |
- SETCOORD_CALC_CLAMP_NONNEGATIVE | SETCOORD_UNSET_INITIAL,
+ // column-gap: normal, length, percent, calc, inherit, initial
+ if (SetCoord(*aRuleData->ValueForColumnGap(),
+ pos->mColumnGap, parentPos->mColumnGap,
+ SETCOORD_LPH | SETCOORD_NORMAL | SETCOORD_INITIAL_NORMAL |
+ SETCOORD_STORE_CALC | SETCOORD_CALC_CLAMP_NONNEGATIVE |
+ SETCOORD_UNSET_INITIAL,
aContext, mPresContext, conditions)) {
} else {
- MOZ_ASSERT(aRuleData->ValueForGridColumnGap()->GetUnit() == eCSSUnit_Null,
+ MOZ_ASSERT(aRuleData->ValueForColumnGap()->GetUnit() == eCSSUnit_Null,
"unexpected unit");
}
- // grid-row-gap
- if (SetCoord(*aRuleData->ValueForGridRowGap(),
- pos->mGridRowGap, parentPos->mGridRowGap,
- SETCOORD_LPH | SETCOORD_INITIAL_ZERO | SETCOORD_STORE_CALC |
- SETCOORD_CALC_CLAMP_NONNEGATIVE | SETCOORD_UNSET_INITIAL,
+ // row-gap: normal, length, percent, calc, inherit, initial
+ if (SetCoord(*aRuleData->ValueForRowGap(),
+ pos->mRowGap, parentPos->mRowGap,
+ SETCOORD_LPH | SETCOORD_NORMAL | SETCOORD_INITIAL_NORMAL |
+ SETCOORD_STORE_CALC | SETCOORD_CALC_CLAMP_NONNEGATIVE |
+ SETCOORD_UNSET_INITIAL,
aContext, mPresContext, conditions)) {
} else {
- MOZ_ASSERT(aRuleData->ValueForGridRowGap()->GetUnit() == eCSSUnit_Null,
+ MOZ_ASSERT(aRuleData->ValueForRowGap()->GetUnit() == eCSSUnit_Null,
"unexpected unit");
}
@@ -9298,18 +9300,6 @@ nsRuleNode::ComputeColumnData(void* aStartStruct,
SETCOORD_UNSET_INITIAL,
aContext, mPresContext, conditions);
- // column-gap: length, inherit, normal
- SetCoord(*aRuleData->ValueForColumnGap(),
- column->mColumnGap, parent->mColumnGap,
- SETCOORD_LH | SETCOORD_NORMAL | SETCOORD_INITIAL_NORMAL |
- SETCOORD_CALC_LENGTH_ONLY | SETCOORD_UNSET_INITIAL,
- aContext, mPresContext, conditions);
- // clamp negative calc() to 0
- if (column->mColumnGap.GetUnit() == eStyleUnit_Coord) {
- column->mColumnGap.SetCoordValue(
- std::max(column->mColumnGap.GetCoordValue(), 0));
- }
-
// column-count: auto, integer, inherit
const nsCSSValue* columnCountValue = aRuleData->ValueForColumnCount();
if (eCSSUnit_Auto == columnCountValue->GetUnit() ||