From 9a2f5780e90918ce497884faf828067785d09179 Mon Sep 17 00:00:00 2001 From: "dbaron%dbaron.org" Date: Thu, 8 Feb 2007 19:21:58 +0000 Subject: [PATCH] Stop rounding widths to pixel boundaries to fix reftest failures on Mac, which does subpixel positioning and sizing of text. b=369318 r=bernd sr=roc --- layout/tables/BasicTableLayoutStrategy.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/layout/tables/BasicTableLayoutStrategy.cpp b/layout/tables/BasicTableLayoutStrategy.cpp index b6ea101ad2fd..dd137d79faef 100644 --- a/layout/tables/BasicTableLayoutStrategy.cpp +++ b/layout/tables/BasicTableLayoutStrategy.cpp @@ -222,11 +222,10 @@ void BasicTableLayoutStrategy::ComputeColumnIntrinsicWidths(nsIRenderingContext* aRenderingContext) { nsTableFrame *tableFrame = mTableFrame; - nsPresContext *presContext = tableFrame->GetPresContext(); nsTableCellMap *cellMap = tableFrame->GetCellMap(); nscoord spacing = tableFrame->GetCellSpacingX(); - SpanningCellSorter spanningCells(presContext->PresShell()); + SpanningCellSorter spanningCells(tableFrame->GetPresContext()->PresShell()); // Loop over the columns to consider the columns and cells *without* // a colspan. @@ -246,8 +245,6 @@ BasicTableLayoutStrategy::ComputeColumnIntrinsicWidths(nsIRenderingContext* aRen // Consider the widths on the column. CellWidthInfo colInfo = GetColWidthInfo(aRenderingContext, colFrame); - colInfo.minCoord = nsTableFrame::RoundToPixel(colInfo.minCoord); - colInfo.prefCoord = nsTableFrame::RoundToPixel(colInfo.prefCoord); colFrame->AddMinCoord(colInfo.minCoord); colFrame->AddPrefCoord(colInfo.prefCoord, colInfo.hasSpecifiedWidth); colFrame->AddPrefPercent(colInfo.prefPercent); @@ -260,8 +257,6 @@ BasicTableLayoutStrategy::ComputeColumnIntrinsicWidths(nsIRenderingContext* aRen nsGkAtoms::tableColGroupFrame, "expected a column-group"); colInfo = GetColWidthInfo(aRenderingContext, colFrame->GetParent()); - colInfo.minCoord = nsTableFrame::RoundToPixel(colInfo.minCoord); - colInfo.prefCoord = nsTableFrame::RoundToPixel(colInfo.prefCoord); colFrame->AddMinCoord(colInfo.minCoord); colFrame->AddPrefCoord(colInfo.prefCoord, colInfo.hasSpecifiedWidth); colFrame->AddPrefPercent(colInfo.prefPercent); @@ -279,9 +274,6 @@ BasicTableLayoutStrategy::ComputeColumnIntrinsicWidths(nsIRenderingContext* aRen CellWidthInfo info = GetCellWidthInfo(aRenderingContext, cellFrame); - info.minCoord = nsTableFrame::RoundToPixel(info.minCoord); - info.prefCoord = nsTableFrame::RoundToPixel(info.prefCoord); - colFrame->AddMinCoord(info.minCoord); colFrame->AddPrefCoord(info.prefCoord, info.hasSpecifiedWidth); colFrame->AddPrefPercent(info.prefPercent); @@ -591,10 +583,6 @@ BasicTableLayoutStrategy::ComputeIntrinsicWidths(nsIRenderingContext* aRendering pref_pct_expand += add; } - min = nsTableFrame::RoundToPixel(min); - pref = nsTableFrame::RoundToPixel(pref); - pref_pct_expand = nsTableFrame::RoundToPixel(pref_pct_expand); - mMinWidth = min; mPrefWidth = pref; mPrefWidthPctExpand = pref_pct_expand;