зеркало из https://github.com/mozilla/gecko-dev.git
Bug 520992, Followup 1: Simplify code in nsDOMComputedStyle for box-sizing adjustment for clarity. [r=me]
This commit is contained in:
Родитель
2093345fc9
Коммит
8a3d69f370
|
@ -386,26 +386,17 @@ nsComputedDOMStyle::GetAdjustedValuesForBoxSizing()
|
|||
nscoord borderPaddingTop = 0;
|
||||
nscoord borderPaddingBottom = 0;
|
||||
|
||||
nsMargin border = mInnerFrame->GetUsedBorder();
|
||||
nsMargin padding = mInnerFrame->GetUsedPadding();
|
||||
|
||||
nsMargin adjustment;
|
||||
switch(stylePos->mBoxSizing) {
|
||||
case NS_STYLE_BOX_SIZING_BORDER:
|
||||
borderPaddingLeft += border.left;
|
||||
borderPaddingRight += border.right;
|
||||
borderPaddingTop += border.top;
|
||||
borderPaddingBottom += border.bottom;
|
||||
adjustment += mInnerFrame->GetUsedBorder();
|
||||
// fall through
|
||||
|
||||
case NS_STYLE_BOX_SIZING_PADDING:
|
||||
borderPaddingLeft += padding.left;
|
||||
borderPaddingRight += padding.right;
|
||||
borderPaddingTop += padding.top;
|
||||
borderPaddingBottom += padding.bottom;
|
||||
adjustment += mInnerFrame->GetUsedPadding();
|
||||
}
|
||||
|
||||
return nsMargin(borderPaddingTop, borderPaddingRight, borderPaddingBottom,
|
||||
borderPaddingLeft);
|
||||
return adjustment;
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
|
Загрузка…
Ссылка в новой задаче