From 9beb2ed86205cd8b8a7f25a92cc90594464a340f Mon Sep 17 00:00:00 2001 From: "dholbert%cs.stanford.edu" Date: Thu, 24 Apr 2008 18:48:35 +0000 Subject: [PATCH] Bug 428521: Allow DistributeWidthToColumns to complete BTLS_PREF_WIDTH runs in situations with guess_min < aWidth <= guess_pref. (Reverts optimization from 368504 in which I'd thought that a run with aWidth <= guess_pref would be skippable) r+sr=dbaron a=beltzner git-svn-id: svn://10.0.0.236/trunk@250759 18797224-902f-48f8-a5cc-f745e15eee43 --- .../layout/reftests/bugs/428521-1-ref.html | 28 +++++++++++++++++++ mozilla/layout/reftests/bugs/428521-1a.html | 28 +++++++++++++++++++ mozilla/layout/reftests/bugs/428521-1b.html | 28 +++++++++++++++++++ mozilla/layout/reftests/bugs/428521-1c.html | 28 +++++++++++++++++++ mozilla/layout/reftests/bugs/reftest.list | 3 ++ .../tables/BasicTableLayoutStrategy.cpp | 3 +- 6 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 mozilla/layout/reftests/bugs/428521-1-ref.html create mode 100644 mozilla/layout/reftests/bugs/428521-1a.html create mode 100644 mozilla/layout/reftests/bugs/428521-1b.html create mode 100644 mozilla/layout/reftests/bugs/428521-1c.html diff --git a/mozilla/layout/reftests/bugs/428521-1-ref.html b/mozilla/layout/reftests/bugs/428521-1-ref.html new file mode 100644 index 00000000000..62050a45cb9 --- /dev/null +++ b/mozilla/layout/reftests/bugs/428521-1-ref.html @@ -0,0 +1,28 @@ + + + + + +The blue and green divs should be on the same line. + + +
+ + + + + + + + +
a
b
c
d
+
+ + diff --git a/mozilla/layout/reftests/bugs/428521-1a.html b/mozilla/layout/reftests/bugs/428521-1a.html new file mode 100644 index 00000000000..615c412bc38 --- /dev/null +++ b/mozilla/layout/reftests/bugs/428521-1a.html @@ -0,0 +1,28 @@ + + + + + +The blue and green divs should be on the same line. + + +
+ + + + + + + + +
a
b
c
d
+
+ + diff --git a/mozilla/layout/reftests/bugs/428521-1b.html b/mozilla/layout/reftests/bugs/428521-1b.html new file mode 100644 index 00000000000..9f6a80f4dba --- /dev/null +++ b/mozilla/layout/reftests/bugs/428521-1b.html @@ -0,0 +1,28 @@ + + + + + +The blue and green divs should be on the same line. + + +
+ + + + + + + + +
a
b
c
d
+
+ + diff --git a/mozilla/layout/reftests/bugs/428521-1c.html b/mozilla/layout/reftests/bugs/428521-1c.html new file mode 100644 index 00000000000..6633fcc1ffc --- /dev/null +++ b/mozilla/layout/reftests/bugs/428521-1c.html @@ -0,0 +1,28 @@ + + + + + +The blue and green divs should be on the same line. + + +
+ + + + + + + + +
a
b
c
d
+
+ + diff --git a/mozilla/layout/reftests/bugs/reftest.list b/mozilla/layout/reftests/bugs/reftest.list index 177bde52e78..1683a8f5efb 100644 --- a/mozilla/layout/reftests/bugs/reftest.list +++ b/mozilla/layout/reftests/bugs/reftest.list @@ -812,5 +812,8 @@ fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") == 424074-1-ref2.xul 424074-1-ref3.xul == 427730-1.html 427730-1-ref.html == 428423-1a.html 428423-1-ref.html == 428423-1b.html 428423-1-ref.html +== 428521-1a.html 428521-1-ref.html +== 428521-1b.html 428521-1-ref.html +== 428521-1c.html 428521-1-ref.html == 430412-1.html 430412-1-ref.html diff --git a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp index cfd0e78e930..fdbd99ddc06 100644 --- a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp +++ b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp @@ -774,8 +774,7 @@ BasicTableLayoutStrategy::DistributeWidthToColumns(nscoord aWidth, float f; } basis; // the sum of the statistic over columns to divide it if (aWidth < guess_pref) { - if ((aWidthType == BTLS_MIN_WIDTH && aWidth <= guess_min) || - (aWidthType == BTLS_PREF_WIDTH && aWidth <= guess_pref)) { + if (aWidthType != BTLS_FINAL_WIDTH && aWidth <= guess_min) { // Return early -- we don't have any extra space to distribute. return; }