Bug 1166728 - Remove box-sizing: padding-box, as per CSS WG. r=dholbert

This commit is contained in:
Kyle Zentner
2015-05-27 09:57:00 -04:00
parent 72ecb1f11c
commit e085cc0fac
43 changed files with 42 additions and 514 deletions

View File

@@ -113,25 +113,13 @@ GetWidthInfo(nsRenderingContext *aRenderingContext,
// for height).
// For this reason, we also do not use box-sizing for just one of
// them, as this may be confusing.
if (isQuirks) {
if (isQuirks || stylePos->mBoxSizing == NS_STYLE_BOX_SIZING_CONTENT) {
boxSizingToBorderEdge = offsets.hPadding + offsets.hBorder;
}
else {
switch (stylePos->mBoxSizing) {
case NS_STYLE_BOX_SIZING_CONTENT:
boxSizingToBorderEdge = offsets.hPadding + offsets.hBorder;
break;
case NS_STYLE_BOX_SIZING_PADDING:
minCoord += offsets.hPadding;
prefCoord += offsets.hPadding;
boxSizingToBorderEdge = offsets.hBorder;
break;
default:
// NS_STYLE_BOX_SIZING_BORDER
minCoord += offsets.hPadding + offsets.hBorder;
prefCoord += offsets.hPadding + offsets.hBorder;
break;
}
// NS_STYLE_BOX_SIZING_BORDER and standards-mode
minCoord += offsets.hPadding + offsets.hBorder;
prefCoord += offsets.hPadding + offsets.hBorder;
}
} else {
minCoord = 0;