Bug 1174450 part 4 - Rename the remaining AddIntrinsicSizeOffset params to follow the aName standard. Also rename local var 'w' to 'size' since it may be either a width or height. r=jfkthame

This commit is contained in:
Mats Palmgren 2015-06-16 11:21:03 +00:00
Родитель dce55818e6
Коммит f91985ca0c
1 изменённых файлов: 8 добавлений и 6 удалений

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

@ -4325,8 +4325,8 @@ AddIntrinsicSizeOffset(nsRenderingContext* aRenderingContext,
const nsIFrame::IntrinsicISizeOffsetData& aOffsets,
nsLayoutUtils::IntrinsicISizeType aType,
uint8_t aBoxSizing,
nscoord result,
nscoord min,
nscoord aContentSize,
nscoord aContentMinSize,
const nsStyleCoord& aStyleSize,
const nsStyleCoord& aStyleMinSize,
const nsStyleCoord& aStyleMaxSize,
@ -4340,6 +4340,8 @@ AddIntrinsicSizeOffset(nsRenderingContext* aRenderingContext,
// percentages do not operate linearly.
// Doing this is ok because although percentages aren't handled
// linearly, they are handled monotonically.
nscoord result = aContentSize;
nscoord min = aContentMinSize;
nscoord coordOutsideSize = 0;
float pctOutsideSize = 0;
float pctTotal = 0.0f;
@ -4376,11 +4378,11 @@ AddIntrinsicSizeOffset(nsRenderingContext* aRenderingContext,
result = NSCoordSaturatingAdd(result, coordOutsideSize);
pctTotal += pctOutsideSize;
nscoord w;
if (GetAbsoluteCoord(aStyleSize, w) ||
nscoord size;
if (GetAbsoluteCoord(aStyleSize, size) ||
GetIntrinsicCoord(aStyleSize, aRenderingContext, aFrame,
PROP_WIDTH, w)) {
result = AddPercents(aType, w + coordOutsideSize, pctOutsideSize);
PROP_WIDTH, size)) {
result = AddPercents(aType, size + coordOutsideSize, pctOutsideSize);
}
else if (aType == nsLayoutUtils::MIN_ISIZE &&
// The only cases of coord-percent-calc() units that