Bug 1145036 part 1 - Rename mBorderSpacingX/Y to mBorderSpacingCol/Row. r=heycam

--HG--
extra : source : 4f0a5e14993dd26e4a25d5f05ea1ec274bebe4e6
This commit is contained in:
Xidorn Quan 2015-03-20 15:16:00 +11:00
Родитель d2405f9465
Коммит b4efb87d4a
6 изменённых файлов: 23 добавлений и 23 удалений

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

@ -3017,8 +3017,8 @@ StyleAnimationValue::ExtractComputedValue(nsCSSProperty aProperty,
const nsStyleTableBorder *styleTableBorder =
static_cast<const nsStyleTableBorder*>(styleStruct);
nsAutoPtr<nsCSSValuePair> pair(new nsCSSValuePair);
nscoordToCSSValue(styleTableBorder->mBorderSpacingX, pair->mXValue);
nscoordToCSSValue(styleTableBorder->mBorderSpacingY, pair->mYValue);
nscoordToCSSValue(styleTableBorder->mBorderSpacingCol, pair->mXValue);
nscoordToCSSValue(styleTableBorder->mBorderSpacingRow, pair->mYValue);
aComputedValue.SetAndAdoptCSSValuePairValue(pair.forget(),
eUnit_CSSValuePair);
break;

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

@ -2517,8 +2517,8 @@ nsComputedDOMStyle::DoGetBorderSpacing()
valueList->AppendCSSValue(ySpacing);
const nsStyleTableBorder *border = StyleTableBorder();
xSpacing->SetAppUnits(border->mBorderSpacingX);
ySpacing->SetAppUnits(border->mBorderSpacingY);
xSpacing->SetAppUnits(border->mBorderSpacingCol);
ySpacing->SetAppUnits(border->mBorderSpacingRow);
return valueList;
}

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

@ -7906,26 +7906,26 @@ nsRuleNode::ComputeTableBorderData(void* aStartStruct,
NS_STYLE_BORDER_SEPARATE, 0, 0, 0, 0);
const nsCSSValue* borderSpacingValue = aRuleData->ValueForBorderSpacing();
// border-spacing: pair(length), inherit
if (borderSpacingValue->GetUnit() != eCSSUnit_Null) {
// border-spacing-x/y: length, inherit
nsStyleCoord parentX(parentTable->mBorderSpacingX,
nsStyleCoord::CoordConstructor);
nsStyleCoord parentY(parentTable->mBorderSpacingY,
nsStyleCoord::CoordConstructor);
nsStyleCoord coordX, coordY;
nsStyleCoord parentCol(parentTable->mBorderSpacingCol,
nsStyleCoord::CoordConstructor);
nsStyleCoord parentRow(parentTable->mBorderSpacingRow,
nsStyleCoord::CoordConstructor);
nsStyleCoord coordCol, coordRow;
#ifdef DEBUG
bool result =
#endif
SetPairCoords(*borderSpacingValue,
coordX, coordY, parentX, parentY,
coordCol, coordRow, parentCol, parentRow,
SETCOORD_LH | SETCOORD_INITIAL_ZERO |
SETCOORD_CALC_LENGTH_ONLY |
SETCOORD_CALC_CLAMP_NONNEGATIVE | SETCOORD_UNSET_INHERIT,
aContext, mPresContext, canStoreInRuleTree);
NS_ASSERTION(result, "malformed table border value");
table->mBorderSpacingX = coordX.GetCoordValue();
table->mBorderSpacingY = coordY.GetCoordValue();
table->mBorderSpacingCol = coordCol.GetCoordValue();
table->mBorderSpacingRow = coordRow.GetCoordValue();
}
// caption-side: enum, inherit, initial

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

@ -1677,8 +1677,8 @@ nsStyleTableBorder::nsStyleTableBorder()
mEmptyCells = NS_STYLE_TABLE_EMPTY_CELLS_SHOW;
mCaptionSide = NS_STYLE_CAPTION_SIDE_TOP;
mBorderSpacingX = 0;
mBorderSpacingY = 0;
mBorderSpacingCol = 0;
mBorderSpacingRow = 0;
}
nsStyleTableBorder::~nsStyleTableBorder(void)
@ -1687,8 +1687,8 @@ nsStyleTableBorder::~nsStyleTableBorder(void)
}
nsStyleTableBorder::nsStyleTableBorder(const nsStyleTableBorder& aSource)
: mBorderSpacingX(aSource.mBorderSpacingX)
, mBorderSpacingY(aSource.mBorderSpacingY)
: mBorderSpacingCol(aSource.mBorderSpacingCol)
, mBorderSpacingRow(aSource.mBorderSpacingRow)
, mBorderCollapse(aSource.mBorderCollapse)
, mCaptionSide(aSource.mCaptionSide)
, mEmptyCells(aSource.mEmptyCells)
@ -1707,8 +1707,8 @@ nsChangeHint nsStyleTableBorder::CalcDifference(const nsStyleTableBorder& aOther
}
if ((mCaptionSide == aOther.mCaptionSide) &&
(mBorderSpacingX == aOther.mBorderSpacingX) &&
(mBorderSpacingY == aOther.mBorderSpacingY)) {
(mBorderSpacingCol == aOther.mBorderSpacingCol) &&
(mBorderSpacingRow == aOther.mBorderSpacingRow)) {
if (mEmptyCells == aOther.mEmptyCells)
return NS_STYLE_HINT_NONE;
return NS_STYLE_HINT_VISUAL;

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

@ -2300,8 +2300,8 @@ struct nsStyleTableBorder {
nsChangeHint_ClearAncestorIntrinsics);
}
nscoord mBorderSpacingX;// [inherited]
nscoord mBorderSpacingY;// [inherited]
nscoord mBorderSpacingCol;// [inherited]
nscoord mBorderSpacingRow;// [inherited]
uint8_t mBorderCollapse;// [inherited]
uint8_t mCaptionSide; // [inherited]
uint8_t mEmptyCells; // [inherited]

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

@ -3552,7 +3552,7 @@ nscoord nsTableFrame::GetCellSpacingX()
if (IsBorderCollapse())
return 0;
return StyleTableBorder()->mBorderSpacingX;
return StyleTableBorder()->mBorderSpacingCol;
}
// XXX: could cache this. But be sure to check style changes if you do!
@ -3585,7 +3585,7 @@ nscoord nsTableFrame::GetCellSpacingY()
if (IsBorderCollapse())
return 0;
return StyleTableBorder()->mBorderSpacingY;
return StyleTableBorder()->mBorderSpacingRow;
}
// XXX: could cache this. But be sure to check style changes if you do!