diff --git a/layout/html/table/src/BasicTableLayoutStrategy.cpp b/layout/html/table/src/BasicTableLayoutStrategy.cpp index 5749485f6b8e..b04c251d002d 100644 --- a/layout/html/table/src/BasicTableLayoutStrategy.cpp +++ b/layout/html/table/src/BasicTableLayoutStrategy.cpp @@ -1320,7 +1320,7 @@ BasicTableLayoutStrategy::CalcPctAdjTableWidth(nsIPresContext& aPresCon } // If there is only one col and it is % based, it won't affect anything if ((1 == numCols) && (numCols == numPerCols)) { - return basis; + return basis + borderPadding.left + borderPadding.right + mCellSpacingTotal; } // compute a basis considering total percentages and the desired width of everything else diff --git a/layout/tables/BasicTableLayoutStrategy.cpp b/layout/tables/BasicTableLayoutStrategy.cpp index 5749485f6b8e..b04c251d002d 100644 --- a/layout/tables/BasicTableLayoutStrategy.cpp +++ b/layout/tables/BasicTableLayoutStrategy.cpp @@ -1320,7 +1320,7 @@ BasicTableLayoutStrategy::CalcPctAdjTableWidth(nsIPresContext& aPresCon } // If there is only one col and it is % based, it won't affect anything if ((1 == numCols) && (numCols == numPerCols)) { - return basis; + return basis + borderPadding.left + borderPadding.right + mCellSpacingTotal; } // compute a basis considering total percentages and the desired width of everything else