Skip to content
Permalink
Browse files
LayoutTests:
        Reviewed by Darin.

        - updated results for http://bugs.webkit.org/show_bug.cgi?id=12777
          REGRESSION (r18574): User profile pages display incorrectly at ebay.ca

        * tables/mozilla/bugs/bug45486-expected.checksum:
        * tables/mozilla/bugs/bug45486-expected.png:
        * tables/mozilla/bugs/bug45486-expected.txt:
        * tables/mozilla_expected_failures/core/col_span2-expected.txt:

WebCore:

        Reviewed by Darin.

        - http://bugs.webkit.org/show_bug.cgi?id=12777
          REGRESSION (r18574): User profile pages display incorrectly at ebay.ca

        Fixes existing layout tests: tables/mozilla/bugs/bug45486.html
                                     tables/mozilla_expected_failures/core/col_span2.html

        * rendering/AutoTableLayout.cpp:
        (WebCore::AutoTableLayout::calcEffectiveWidth): Fixed a mismatch between which
        columns count as percentage columns when adding up the total percent and
        which columns count as percentage columns when converting non-percentage
        columns to effectively-percentage.



Canonical link: https://commits.webkit.org/16516@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Sam Weinig committed Feb 15, 2007
1 parent 3cd9413 commit 3303f65e4256164ba8b7fe07e4e482156ba1c397
Showing 7 changed files with 65 additions and 70 deletions.
@@ -1,3 +1,15 @@
2007-02-15 Mitz Pettel <mitz@webkit.org>

Reviewed by Darin.

- updated results for http://bugs.webkit.org/show_bug.cgi?id=12777
REGRESSION (r18574): User profile pages display incorrectly at ebay.ca

* tables/mozilla/bugs/bug45486-expected.checksum:
* tables/mozilla/bugs/bug45486-expected.png:
* tables/mozilla/bugs/bug45486-expected.txt:
* tables/mozilla_expected_failures/core/col_span2-expected.txt:

2007-02-14 Adam Roben <aroben@apple.com>

Reviewed by Darin.
@@ -1 +1 @@
fb832145fb96aa76248fa45c07203a82
b2829d4b0b75dd973e34eb9af83207fe
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -6,46 +6,46 @@ layer at (0,0) size 800x600
RenderTable {TABLE} at (0,0) size 784x124 [border: (1px outset #808080)]
RenderTableSection {TBODY} at (1,1) size 782x122
RenderTableRow {TR} at (0,2) size 782x22
RenderTableCell {TD} at (2,2) size 109x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderTableCell {TD} at (2,2) size 77x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderText {#text} at (2,2) size 29x18
text run at (2,2) width 29: "10%"
RenderTableCell {TD} at (113,2) size 667x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=5]
RenderTableCell {TD} at (81,2) size 699x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=5]
RenderText {#text} at (2,2) size 93x18
text run at (2,2) width 93: "90% colspan 5"
RenderTableRow {TR} at (0,26) size 782x22
RenderTableCell {TD} at (2,26) size 331x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=2]
RenderTableCell {TD} at (2,26) size 233x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=2]
RenderText {#text} at (2,2) size 93x18
text run at (2,2) width 93: "30% colspan 2"
RenderTableCell {TD} at (335,26) size 222x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=3]
RenderTableCell {TD} at (237,26) size 388x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=3]
RenderText {#text} at (2,2) size 93x18
text run at (2,2) width 93: "50% colspan 3"
RenderTableCell {TD} at (559,26) size 221x22 [border: (1px inset #808080)] [r=1 c=5 rs=1 cs=1]
RenderTableCell {TD} at (627,26) size 153x22 [border: (1px inset #808080)] [r=1 c=5 rs=1 cs=1]
RenderText {#text} at (2,2) size 29x18
text run at (2,2) width 29: "20%"
RenderTableRow {TR} at (0,50) size 782x22
RenderTableCell {TD} at (2,50) size 387x22 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=3]
RenderTableCell {TD} at (2,50) size 312x22 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=3]
RenderText {#text} at (2,2) size 93x18
text run at (2,2) width 93: "40% colspan 3"
RenderTableCell {TD} at (391,50) size 166x22 [border: (1px inset #808080)] [r=2 c=3 rs=1 cs=2]
RenderTableCell {TD} at (316,50) size 309x22 [border: (1px inset #808080)] [r=2 c=3 rs=1 cs=2]
RenderText {#text} at (2,2) size 93x18
text run at (2,2) width 93: "40% colspan 2"
RenderTableCell {TD} at (559,50) size 221x22 [border: (1px inset #808080)] [r=2 c=5 rs=1 cs=1]
RenderTableCell {TD} at (627,50) size 153x22 [border: (1px inset #808080)] [r=2 c=5 rs=1 cs=1]
RenderText {#text} at (2,2) size 29x18
text run at (2,2) width 29: "20%"
RenderTableRow {TR} at (0,74) size 782x22
RenderTableCell {TD} at (2,74) size 443x22 [border: (1px inset #808080)] [r=3 c=0 rs=1 cs=4]
RenderTableCell {TD} at (2,74) size 545x22 [border: (1px inset #808080)] [r=3 c=0 rs=1 cs=4]
RenderText {#text} at (2,2) size 93x18
text run at (2,2) width 93: "70% colspan 4"
RenderTableCell {TD} at (447,74) size 110x22 [border: (1px inset #808080)] [r=3 c=4 rs=1 cs=1]
RenderTableCell {TD} at (549,74) size 76x22 [border: (1px inset #808080)] [r=3 c=4 rs=1 cs=1]
RenderText {#text} at (2,2) size 29x18
text run at (2,2) width 29: "10%"
RenderTableCell {TD} at (559,74) size 221x22 [border: (1px inset #808080)] [r=3 c=5 rs=1 cs=1]
RenderTableCell {TD} at (627,74) size 153x22 [border: (1px inset #808080)] [r=3 c=5 rs=1 cs=1]
RenderText {#text} at (2,2) size 29x18
text run at (2,2) width 29: "20%"
RenderTableRow {TR} at (0,98) size 782x22
RenderTableCell {TD} at (2,98) size 555x22 [border: (1px inset #808080)] [r=4 c=0 rs=1 cs=5]
RenderTableCell {TD} at (2,98) size 623x22 [border: (1px inset #808080)] [r=4 c=0 rs=1 cs=5]
RenderText {#text} at (2,2) size 93x18
text run at (2,2) width 93: "80% colspan 5"
RenderTableCell {TD} at (559,98) size 221x22 [border: (1px inset #808080)] [r=4 c=5 rs=1 cs=1]
RenderTableCell {TD} at (627,98) size 153x22 [border: (1px inset #808080)] [r=4 c=5 rs=1 cs=1]
RenderText {#text} at (2,2) size 29x18
text run at (2,2) width 29: "20%"
@@ -662,83 +662,83 @@ layer at (0,0) size 785x5451
RenderTable {TABLE} at (0,2637) size 500x88 [border: (1px outset #808080)]
RenderTableSection {TBODY} at (1,1) size 498x86
RenderTableRow {TR} at (0,5) size 498x22
RenderTableCell {TD} at (5,5) size 252x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
RenderTableCell {TD} at (5,5) size 435x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
RenderText {#text} at (2,2) size 95x18
text run at (2,2) width 95: "90% 90% 90%"
RenderTableCell {TD} at (262,5) size 231x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
RenderTableCell {TD} at (445,5) size 48x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
RenderText {#text} at (2,2) size 27x18
text run at (2,2) width 27: "auto"
RenderTableRow {TR} at (0,32) size 498x22
RenderTableCell {TD} at (5,32) size 124x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
RenderTableCell {TD} at (5,32) size 215x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
RenderText {#text} at (2,2) size 27x18
text run at (2,2) width 27: "auto"
RenderTableCell {TD} at (134,32) size 123x22 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
RenderTableCell {TD} at (225,32) size 215x22 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
RenderText {#text} at (2,2) size 27x18
text run at (2,2) width 27: "auto"
RenderTableCell {TD} at (262,32) size 231x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
RenderTableCell {TD} at (445,32) size 48x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
RenderText {#text} at (2,2) size 27x18
text run at (2,2) width 27: "auto"
RenderTableRow {TR} at (0,59) size 498x22
RenderTableCell {TD} at (5,59) size 124x22 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=1]
RenderTableCell {TD} at (5,59) size 215x22 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=1]
RenderText {#text} at (2,2) size 27x18
text run at (2,2) width 27: "auto"
RenderTableCell {TD} at (134,59) size 359x22 [border: (1px inset #808080)] [r=2 c=1 rs=1 cs=2]
RenderTableCell {TD} at (225,59) size 268x22 [border: (1px inset #808080)] [r=2 c=1 rs=1 cs=2]
RenderText {#text} at (2,2) size 95x18
text run at (2,2) width 95: "90% 90% 90%"
RenderBlock (anonymous) at (0,2725) size 769x18
RenderBR {BR} at (0,0) size 0x18
RenderTable {TABLE} at (0,2743) size 500x88 [border: (1px outset #808080)]
RenderTableSection {TBODY} at (1,1) size 498x86
RenderTableRow {TR} at (0,5) size 498x22
RenderTableCell {TD} at (5,5) size 292x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
RenderTableCell {TD} at (5,5) size 436x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
RenderText {#text} at (2,2) size 95x18
text run at (2,2) width 95: "90% 90% 90%"
RenderTableCell {TD} at (302,5) size 191x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
RenderTableCell {TD} at (446,5) size 47x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
RenderText {#text} at (2,2) size 27x18
text run at (2,2) width 27: "auto"
RenderTableRow {TR} at (0,32) size 498x22
RenderTableCell {TD} at (5,32) size 144x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
RenderTableCell {TD} at (5,32) size 287x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
RenderText {#text} at (2,2) size 27x18
text run at (2,2) width 27: "auto"
RenderTableCell {TD} at (154,32) size 143x22 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
RenderTableCell {TD} at (297,32) size 144x22 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
RenderText {#text} at (2,2) size 27x18
text run at (2,2) width 27: "auto"
RenderTableCell {TD} at (302,32) size 191x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
RenderTableCell {TD} at (446,32) size 47x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
RenderText {#text} at (2,2) size 29x18
text run at (2,2) width 29: "60%"
RenderTableRow {TR} at (0,59) size 498x22
RenderTableCell {TD} at (5,59) size 144x22 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=1]
RenderTableCell {TD} at (5,59) size 287x22 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=1]
RenderText {#text} at (2,2) size 27x18
text run at (2,2) width 27: "auto"
RenderTableCell {TD} at (154,59) size 339x22 [border: (1px inset #808080)] [r=2 c=1 rs=1 cs=2]
RenderTableCell {TD} at (297,59) size 196x22 [border: (1px inset #808080)] [r=2 c=1 rs=1 cs=2]
RenderText {#text} at (2,2) size 95x18
text run at (2,2) width 95: "90% 90% 90%"
RenderBlock (anonymous) at (0,2831) size 769x18
RenderBR {BR} at (0,0) size 0x18
RenderTable {TABLE} at (0,2849) size 500x88 [border: (1px outset #808080)]
RenderTableSection {TBODY} at (1,1) size 498x86
RenderTableRow {TR} at (0,5) size 498x22
RenderTableCell {TD} at (5,5) size 292x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
RenderTableCell {TD} at (5,5) size 436x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2]
RenderText {#text} at (2,2) size 95x18
text run at (2,2) width 95: "90% 90% 90%"
RenderTableCell {TD} at (302,5) size 191x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
RenderTableCell {TD} at (446,5) size 47x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
RenderText {#text} at (2,2) size 29x18
text run at (2,2) width 29: "60%"
RenderTableRow {TR} at (0,32) size 498x22
RenderTableCell {TD} at (5,32) size 144x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
RenderTableCell {TD} at (5,32) size 287x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
RenderText {#text} at (2,2) size 27x18
text run at (2,2) width 27: "auto"
RenderTableCell {TD} at (154,32) size 143x22 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
RenderTableCell {TD} at (297,32) size 144x22 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
RenderText {#text} at (2,2) size 27x18
text run at (2,2) width 27: "auto"
RenderTableCell {TD} at (302,32) size 191x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
RenderTableCell {TD} at (446,32) size 47x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
RenderText {#text} at (2,2) size 27x18
text run at (2,2) width 27: "auto"
RenderTableRow {TR} at (0,59) size 498x22
RenderTableCell {TD} at (5,59) size 144x22 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=1]
RenderTableCell {TD} at (5,59) size 287x22 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=1]
RenderText {#text} at (2,2) size 27x18
text run at (2,2) width 27: "auto"
RenderTableCell {TD} at (154,59) size 339x22 [border: (1px inset #808080)] [r=2 c=1 rs=1 cs=2]
RenderTableCell {TD} at (297,59) size 196x22 [border: (1px inset #808080)] [r=2 c=1 rs=1 cs=2]
RenderText {#text} at (2,2) size 95x18
text run at (2,2) width 95: "90% 90% 90%"
RenderBlock (anonymous) at (0,2937) size 769x18
@@ -1,3 +1,19 @@
2007-02-15 Mitz Pettel <mitz@webkit.org>

Reviewed by Darin.

- http://bugs.webkit.org/show_bug.cgi?id=12777
REGRESSION (r18574): User profile pages display incorrectly at ebay.ca

Fixes existing layout tests: tables/mozilla/bugs/bug45486.html
tables/mozilla_expected_failures/core/col_span2.html

* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::calcEffectiveWidth): Fixed a mismatch between which
columns count as percentage columns when adding up the total percent and
which columns count as percentage columns when converting non-percentage
columns to effectively-percentage.

2007-02-14 Mitz Pettel <mitz@webkit.org>

Reviewed by Sam Weinig!
@@ -328,9 +328,6 @@ int AutoTableLayout::calcEffectiveWidth()
bool allColsAreFixed = true;
bool haveAuto = false;
int fixedWidth = 0;
#ifdef DEBUG_LAYOUT
int cSpan = span;
#endif
while (lastCol < nEffCols && span > 0) {
switch (m_layoutStruct[lastCol].width.type()) {
case Percent:
@@ -372,9 +369,6 @@ int AutoTableLayout::calcEffectiveWidth()
cMinWidth -= hspacing;
cMaxWidth -= hspacing;
}
#ifdef DEBUG_LAYOUT
qDebug(" colspan cell %p at effCol %d, span %d, type %d, value %d cmin=%d min=%d fixedwidth=%d", cell, col, cSpan, w.type, w.value, cMinWidth, minWidth, fixedWidth);
#endif

// adjust table max width if needed
if (w.isPercent()) {
@@ -383,25 +377,19 @@ int AutoTableLayout::calcEffectiveWidth()
w = Length();
} else {
int spanMax = max(maxWidth, cMaxWidth);
#ifdef DEBUG_LAYOUT
qDebug(" adjusting tMaxWidth (%d): spanMax=%d, value=%d, totalPercent=%d", tMaxWidth, spanMax, w.value, totalPercent);
#endif
tMaxWidth = max(tMaxWidth, spanMax * 100 * percentScaleFactor / w.rawValue());

// all non percent columns in the span get percent vlaues to sum up correctly.
int percentMissing = w.rawValue() - totalPercent;
int totalWidth = 0;
for (unsigned int pos = col; pos < lastCol; pos++) {
if (!(m_layoutStruct[pos].width.isPercent()))
if (!(m_layoutStruct[pos].effWidth.isPercent()))
totalWidth += m_layoutStruct[pos].effMaxWidth;
}

for (unsigned int pos = col; pos < lastCol && totalWidth > 0; pos++) {
if (!(m_layoutStruct[pos].width.isPercent())) {
if (!(m_layoutStruct[pos].effWidth.isPercent())) {
int percent = percentMissing * m_layoutStruct[pos].effMaxWidth / totalWidth;
#ifdef DEBUG_LAYOUT
qDebug(" col %d: setting percent value %d effMaxWidth=%d totalWidth=%d", pos, percent, m_layoutStruct[pos].effMaxWidth, totalWidth);
#endif
totalWidth -= m_layoutStruct[pos].effMaxWidth;
percentMissing -= percent;
if (percent > 0)
@@ -417,23 +405,14 @@ int AutoTableLayout::calcEffectiveWidth()
// make sure minWidth and maxWidth of the spanning cell are honoured
if (cMinWidth > minWidth) {
if (allColsAreFixed) {
#ifdef DEBUG_LAYOUT
qDebug("extending minWidth of cols %d-%d to %dpx currentMin=%d accroding to fixed sum %d", col, lastCol-1, cMinWidth, minWidth, fixedWidth);
#endif
for (unsigned int pos = col; fixedWidth > 0 && pos < lastCol; pos++) {
int w = max(m_layoutStruct[pos].effMinWidth, cMinWidth * m_layoutStruct[pos].width.value() / fixedWidth);
#ifdef DEBUG_LAYOUT
qDebug(" col %d: min=%d, effMin=%d, new=%d", pos, m_layoutStruct[pos].effMinWidth, m_layoutStruct[pos].effMinWidth, w);
#endif
fixedWidth -= m_layoutStruct[pos].width.value();
cMinWidth -= w;
m_layoutStruct[pos].effMinWidth = w;
}

} else {
#ifdef DEBUG_LAYOUT
qDebug("extending minWidth of cols %d-%d to %dpx currentMin=%d", col, lastCol-1, cMinWidth, minWidth);
#endif
int maxw = maxWidth;
int minw = minWidth;

@@ -443,9 +422,6 @@ int AutoTableLayout::calcEffectiveWidth()
int w = max(m_layoutStruct[pos].effMinWidth, m_layoutStruct[pos].width.value());
fixedWidth -= m_layoutStruct[pos].width.value();
minw -= m_layoutStruct[pos].effMinWidth;
#ifdef DEBUG_LAYOUT
qDebug(" col %d: min=%d, effMin=%d, new=%d", pos, m_layoutStruct[pos].effMinWidth, m_layoutStruct[pos].effMinWidth, w);
#endif
maxw -= m_layoutStruct[pos].effMaxWidth;
cMinWidth -= w;
m_layoutStruct[pos].effMinWidth = w;
@@ -457,9 +433,6 @@ int AutoTableLayout::calcEffectiveWidth()
int w = max(m_layoutStruct[pos].effMinWidth, maxw ? (cMinWidth * m_layoutStruct[pos].effMaxWidth / maxw) : cMinWidth);
w = min(m_layoutStruct[pos].effMinWidth+(cMinWidth-minw), w);

#ifdef DEBUG_LAYOUT
qDebug(" col %d: min=%d, effMin=%d, new=%d", pos, m_layoutStruct[pos].effMinWidth, m_layoutStruct[pos].effMinWidth, w);
#endif
maxw -= m_layoutStruct[pos].effMaxWidth;
minw -= m_layoutStruct[pos].effMinWidth;
cMinWidth -= w;
@@ -470,14 +443,8 @@ int AutoTableLayout::calcEffectiveWidth()
}
if (!(w.isPercent())) {
if (cMaxWidth > maxWidth) {
#ifdef DEBUG_LAYOUT
qDebug("extending maxWidth of cols %d-%d to %dpx", col, lastCol-1, cMaxWidth);
#endif
for (unsigned int pos = col; maxWidth >= 0 && pos < lastCol; pos++) {
int w = max(m_layoutStruct[pos].effMaxWidth, maxWidth ? (cMaxWidth * m_layoutStruct[pos].effMaxWidth / maxWidth) : cMaxWidth);
#ifdef DEBUG_LAYOUT
qDebug(" col %d: max=%d, effMax=%d, new=%d", pos, m_layoutStruct[pos].effMaxWidth, m_layoutStruct[pos].effMaxWidth, w);
#endif
maxWidth -= m_layoutStruct[pos].effMaxWidth;
cMaxWidth -= w;
m_layoutStruct[pos].effMaxWidth = w;

0 comments on commit 3303f65

Please sign in to comment.