зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1157569 - part 12 - Convert physical values from BCPropertyData to logical when returning from Get[Included]OuterBCBorder. r=roc
This commit is contained in:
Родитель
24200db09a
Коммит
84d9d4e6f1
|
@ -95,4 +95,4 @@
|
|||
== bordercolor-4.html bordercolor-4-ref.html
|
||||
== empty-toprow.html empty-toprow-ref.html
|
||||
== double_borders.html double_borders_ref.html
|
||||
fails == border-collapse-rtl.html border-collapse-rtl-ref.html # see bug 1157569
|
||||
== border-collapse-rtl.html border-collapse-rtl-ref.html
|
||||
|
|
|
@ -2605,39 +2605,39 @@ DivideBCBorderSize(BCPixelSize aPixelSize,
|
|||
LogicalMargin
|
||||
nsTableFrame::GetOuterBCBorder(const WritingMode aWM) const
|
||||
{
|
||||
if (NeedToCalcBCBorders())
|
||||
if (NeedToCalcBCBorders()) {
|
||||
const_cast<nsTableFrame*>(this)->CalcBCBorders();
|
||||
}
|
||||
|
||||
int32_t p2t = nsPresContext::AppUnitsPerCSSPixel();
|
||||
BCPropertyData* propData = GetBCProperty();
|
||||
if (propData) {
|
||||
return LogicalMargin(
|
||||
aWM,
|
||||
BC_BORDER_START_HALF_COORD(p2t, propData->mTopBorderWidth),
|
||||
BC_BORDER_END_HALF_COORD(p2t, propData->mRightBorderWidth),
|
||||
BC_BORDER_END_HALF_COORD(p2t, propData->mBottomBorderWidth),
|
||||
BC_BORDER_START_HALF_COORD(p2t, propData->mLeftBorderWidth));
|
||||
nsMargin r(BC_BORDER_START_HALF_COORD(p2t, propData->mTopBorderWidth),
|
||||
BC_BORDER_END_HALF_COORD(p2t, propData->mRightBorderWidth),
|
||||
BC_BORDER_END_HALF_COORD(p2t, propData->mBottomBorderWidth),
|
||||
BC_BORDER_START_HALF_COORD(p2t, propData->mLeftBorderWidth));
|
||||
return LogicalMargin(aWM, r);
|
||||
}
|
||||
return LogicalMargin(GetWritingMode());
|
||||
return LogicalMargin(aWM);
|
||||
}
|
||||
|
||||
LogicalMargin
|
||||
nsTableFrame::GetIncludedOuterBCBorder(const WritingMode aWM) const
|
||||
{
|
||||
if (NeedToCalcBCBorders())
|
||||
if (NeedToCalcBCBorders()) {
|
||||
const_cast<nsTableFrame*>(this)->CalcBCBorders();
|
||||
}
|
||||
|
||||
int32_t p2t = nsPresContext::AppUnitsPerCSSPixel();
|
||||
BCPropertyData* propData = GetBCProperty();
|
||||
if (propData) {
|
||||
return LogicalMargin(
|
||||
aWM,
|
||||
BC_BORDER_START_HALF_COORD(p2t, propData->mTopBorderWidth),
|
||||
BC_BORDER_END_HALF_COORD(p2t, propData->mRightCellBorderWidth),
|
||||
BC_BORDER_END_HALF_COORD(p2t, propData->mBottomBorderWidth),
|
||||
BC_BORDER_START_HALF_COORD(p2t, propData->mLeftCellBorderWidth));
|
||||
nsMargin r(BC_BORDER_START_HALF_COORD(p2t, propData->mTopBorderWidth),
|
||||
BC_BORDER_END_HALF_COORD(p2t, propData->mRightCellBorderWidth),
|
||||
BC_BORDER_END_HALF_COORD(p2t, propData->mBottomBorderWidth),
|
||||
BC_BORDER_START_HALF_COORD(p2t, propData->mLeftCellBorderWidth));
|
||||
return LogicalMargin(aWM, r);
|
||||
}
|
||||
return LogicalMargin(GetWritingMode());
|
||||
return LogicalMargin(aWM);
|
||||
}
|
||||
|
||||
LogicalMargin
|
||||
|
|
Загрузка…
Ссылка в новой задаче