diff --git a/layout/reftests/bugs/387866-ref.html b/layout/reftests/bugs/387866-ref.html new file mode 100644 --- /dev/null +++ b/layout/reftests/bugs/387866-ref.html @@ -0,0 +1,9 @@ + + + +
+ + +
X
+
+ diff --git a/layout/reftests/bugs/387866.html b/layout/reftests/bugs/387866.html new file mode 100644 --- /dev/null +++ b/layout/reftests/bugs/387866.html @@ -0,0 +1,9 @@ + + + +
+ + +
X
+
+ diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -690,16 +690,17 @@ fails == 386147-1.html 386147-1-ref.html == 386470-1c.html 386470-1-ref.html == 386920-1.html 386920-1-ref.html == 387201-1.html 387201-1-ref.html == 387201-2.html about:blank # Really an assertion test rather than a rendering test == 387201-3.html about:blank # Really an assertion test rather than a rendering test == 387227-1.html 387227-1-ref.html == 387227-2.html 387227-2-ref.html == 387344-1.html 387344-1-ref.html +== 387866.html 387866-ref.html == 387876-1.html 387876-1-ref.html random == 387876-2.html 387876-2-ref.html # bug 471630 == 387876-3a.html 387876-3-ref.html == 387876-3b.html 387876-3-ref.html == 388026-1.html 388026-1-ref.html == 388367-1.html about:blank == 388980-1.html 388980-1-ref.html == 389074-1.html 389074-1-ref.html diff --git a/layout/tables/FixedTableLayoutStrategy.cpp b/layout/tables/FixedTableLayoutStrategy.cpp --- a/layout/tables/FixedTableLayoutStrategy.cpp +++ b/layout/tables/FixedTableLayoutStrategy.cpp @@ -145,25 +145,18 @@ FixedTableLayoutStrategy::GetMinWidth(ns return (mMinWidth = result); } /* virtual */ nscoord FixedTableLayoutStrategy::GetPrefWidth(nsIRenderingContext* aRenderingContext, PRBool aComputingSize) { - // It's theoretically possible to do something much better here that - // depends only on the columns and the first row (where we look at - // intrinsic widths inside the first row and then reverse the - // algorithm to find the narrowest width that would hold all of - // those intrinsic widths), but it wouldn't be compatible with other - // browsers. - nscoord result = nscoord_MAX; - DISPLAY_PREF_WIDTH(mTableFrame, result); - return result; + // The min width is the preferred width for table-layout:fixed + return GetMinWidth(aRenderingContext); } /* virtual */ void FixedTableLayoutStrategy::MarkIntrinsicWidthsDirty() { mMinWidth = NS_INTRINSIC_WIDTH_UNKNOWN; mLastCalcWidth = nscoord_MIN; }