fix table margins - remove redundancy in margin handling, bug 83786
r=karnaze sr=attinasi a=dbaron
This commit is contained in:
@@ -3932,9 +3932,7 @@ nsTableFrame::CalcBorderBoxWidth(const nsHTMLReflowState& aState)
|
|||||||
width = aState.availableWidth;
|
width = aState.availableWidth;
|
||||||
}
|
}
|
||||||
if (NS_UNCONSTRAINEDSIZE != aState.availableWidth) {
|
if (NS_UNCONSTRAINEDSIZE != aState.availableWidth) {
|
||||||
nsMargin margin(0,0,0,0);
|
width = aState.availableWidth;
|
||||||
aState.mStyleMargin->GetMargin(margin);
|
|
||||||
width = aState.availableWidth - margin.left - margin.right;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (width != NS_UNCONSTRAINEDSIZE) {
|
else if (width != NS_UNCONSTRAINEDSIZE) {
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ nsTableOuterFrame::GetChildAvailWidth(nsIPresContext* aPresContext,
|
|||||||
GetMarginPadding(aPresContext, aOuterRS, aChildFrame, marginIgnore, aMarginNoAuto, aPadding);
|
GetMarginPadding(aPresContext, aOuterRS, aChildFrame, marginIgnore, aMarginNoAuto, aPadding);
|
||||||
nscoord width = aOuterWidth;
|
nscoord width = aOuterWidth;
|
||||||
if (NS_UNCONSTRAINEDSIZE != width) {
|
if (NS_UNCONSTRAINEDSIZE != width) {
|
||||||
width = aOuterWidth - aMarginNoAuto.left + aMarginNoAuto.right;
|
width = aOuterWidth - aMarginNoAuto.left - aMarginNoAuto.right;
|
||||||
width = PR_MAX(width, mMinCaptionWidth);
|
width = PR_MAX(width, mMinCaptionWidth);
|
||||||
}
|
}
|
||||||
return width;
|
return width;
|
||||||
|
|||||||
@@ -3932,9 +3932,7 @@ nsTableFrame::CalcBorderBoxWidth(const nsHTMLReflowState& aState)
|
|||||||
width = aState.availableWidth;
|
width = aState.availableWidth;
|
||||||
}
|
}
|
||||||
if (NS_UNCONSTRAINEDSIZE != aState.availableWidth) {
|
if (NS_UNCONSTRAINEDSIZE != aState.availableWidth) {
|
||||||
nsMargin margin(0,0,0,0);
|
width = aState.availableWidth;
|
||||||
aState.mStyleMargin->GetMargin(margin);
|
|
||||||
width = aState.availableWidth - margin.left - margin.right;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (width != NS_UNCONSTRAINEDSIZE) {
|
else if (width != NS_UNCONSTRAINEDSIZE) {
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ nsTableOuterFrame::GetChildAvailWidth(nsIPresContext* aPresContext,
|
|||||||
GetMarginPadding(aPresContext, aOuterRS, aChildFrame, marginIgnore, aMarginNoAuto, aPadding);
|
GetMarginPadding(aPresContext, aOuterRS, aChildFrame, marginIgnore, aMarginNoAuto, aPadding);
|
||||||
nscoord width = aOuterWidth;
|
nscoord width = aOuterWidth;
|
||||||
if (NS_UNCONSTRAINEDSIZE != width) {
|
if (NS_UNCONSTRAINEDSIZE != width) {
|
||||||
width = aOuterWidth - aMarginNoAuto.left + aMarginNoAuto.right;
|
width = aOuterWidth - aMarginNoAuto.left - aMarginNoAuto.right;
|
||||||
width = PR_MAX(width, mMinCaptionWidth);
|
width = PR_MAX(width, mMinCaptionWidth);
|
||||||
}
|
}
|
||||||
return width;
|
return width;
|
||||||
|
|||||||
Reference in New Issue
Block a user