diff options
Diffstat (limited to 'Source/WebCore/rendering/FixedTableLayout.cpp')
-rw-r--r-- | Source/WebCore/rendering/FixedTableLayout.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/WebCore/rendering/FixedTableLayout.cpp b/Source/WebCore/rendering/FixedTableLayout.cpp index 3285d15..b1a61b5 100644 --- a/Source/WebCore/rendering/FixedTableLayout.cpp +++ b/Source/WebCore/rendering/FixedTableLayout.cpp @@ -118,7 +118,8 @@ int FixedTableLayout::calcWidthArray(int) spanInCurrentEffectiveColumn = m_table->spanOfEffCol(currentEffectiveColumn); } if ((w.isFixed() || w.isPercent()) && w.isPositive()) { - m_width[currentEffectiveColumn].setRawValue(w.type(), w.rawValue() * spanInCurrentEffectiveColumn); + m_width[currentEffectiveColumn] = w; + m_width[currentEffectiveColumn] *= spanInCurrentEffectiveColumn; usedWidth += effWidth * spanInCurrentEffectiveColumn; } span -= spanInCurrentEffectiveColumn; @@ -164,10 +165,11 @@ int FixedTableLayout::calcWidthArray(int) int usedSpan = 0; int i = 0; while (usedSpan < span && cCol + i < nEffCols) { - int eSpan = m_table->spanOfEffCol(cCol + i); + float eSpan = m_table->spanOfEffCol(cCol + i); // Only set if no col element has already set it. if (m_width[cCol + i].isAuto() && w.type() != Auto) { - m_width[cCol + i].setRawValue(w.type(), w.rawValue() * eSpan / span); + m_width[cCol + i] = w; + m_width[cCol + i] *= eSpan / span; usedWidth += effWidth * eSpan / span; } usedSpan += eSpan; @@ -234,7 +236,7 @@ void FixedTableLayout::layout() int autoSpan = 0; int totalFixedWidth = 0; int totalPercentWidth = 0; - int totalRawPercent = 0; + float totalPercent = 0; // Compute requirements and try to satisfy fixed and percent widths. // Percentages are of the table's width, so for example @@ -247,7 +249,7 @@ void FixedTableLayout::layout() } else if (m_width[i].isPercent()) { calcWidth[i] = m_width[i].calcValue(tableLogicalWidth); totalPercentWidth += calcWidth[i]; - totalRawPercent += m_width[i].rawValue(); + totalPercent += m_width[i].percent(); } else if (m_width[i].isAuto()) { numAuto++; autoSpan += m_table->spanOfEffCol(i); @@ -270,11 +272,11 @@ void FixedTableLayout::layout() } } } - if (totalRawPercent) { + if (totalPercent) { totalPercentWidth = 0; for (int i = 0; i < nEffCols; i++) { if (m_width[i].isPercent()) { - calcWidth[i] = m_width[i].rawValue() * (tableLogicalWidth - totalFixedWidth) / totalRawPercent; + calcWidth[i] = m_width[i].percent() * (tableLogicalWidth - totalFixedWidth) / totalPercent; totalPercentWidth += calcWidth[i]; } } |