mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 520992, Followup 1: Simplify code in nsDOMComputedStyle for box-sizing adjustment for clarity. [r=me]
This commit is contained in:
parent
bff30e6154
commit
1f3eeb1123
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user