Commit 351bc646 authored by eae@chromium.org's avatar eae@chromium.org

Revert TableSection cell and border calculations to integers

https://bugs.webkit.org/show_bug.cgi?id=77918

Reviewed by Eric Seidel.

Change RenderTableSection cell width, row height and border calculations
back to use integers. Table layout is done on integer bounds to comply
with the specification and to ensure that columns given the same width,
including percentage widths, are rendered with identical widths. The same
applies to heights.

No new tests.

* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::setCellLogicalWidths):
(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::calcOuterBorderBefore):
(WebCore::RenderTableSection::calcOuterBorderAfter):
(WebCore::RenderTableSection::calcOuterBorderStart):
(WebCore::RenderTableSection::calcOuterBorderEnd):
(WebCore::RenderTableSection::paintObject):
(WebCore::RenderTableSection::nodeAtPoint):
* rendering/RenderTableSection.h:
(RenderTableSection):
(WebCore::RenderTableSection::RowStruct::RowStruct):
(WebCore::RenderTableSection::outerBorderBefore):
(WebCore::RenderTableSection::outerBorderAfter):
(WebCore::RenderTableSection::outerBorderStart):
(WebCore::RenderTableSection::outerBorderEnd):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6c7a390c
2012-02-07 Emil A Eklund <eae@chromium.org>
Revert TableSection cell and border calculations to integers
https://bugs.webkit.org/show_bug.cgi?id=77918
Reviewed by Eric Seidel.
Change RenderTableSection cell width, row height and border calculations
back to use integers. Table layout is done on integer bounds to comply
with the specification and to ensure that columns given the same width,
including percentage widths, are rendered with identical widths. The same
applies to heights.
No new tests.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::setCellLogicalWidths):
(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::calcOuterBorderBefore):
(WebCore::RenderTableSection::calcOuterBorderAfter):
(WebCore::RenderTableSection::calcOuterBorderStart):
(WebCore::RenderTableSection::calcOuterBorderEnd):
(WebCore::RenderTableSection::paintObject):
(WebCore::RenderTableSection::nodeAtPoint):
* rendering/RenderTableSection.h:
(RenderTableSection):
(WebCore::RenderTableSection::RowStruct::RowStruct):
(WebCore::RenderTableSection::outerBorderBefore):
(WebCore::RenderTableSection::outerBorderAfter):
(WebCore::RenderTableSection::outerBorderStart):
(WebCore::RenderTableSection::outerBorderEnd):
2012-02-07 Robert Kroeger <rjkroege@chromium.org>
[chromium] Remove the no longer necessary Chromium gesture recognizer.
......@@ -55,8 +55,8 @@ public:
void addCell(RenderTableCell*, RenderTableRow* row);
void setCellLogicalWidths();
LayoutUnit calcRowLogicalHeight();
LayoutUnit layoutRows(LayoutUnit logicalHeight);
int calcRowLogicalHeight();
int layoutRows(int logicalHeight);
RenderTable* table() const { return toRenderTable(parent()); }
......@@ -87,7 +87,7 @@ public:
struct RowStruct {
RowStruct()
: rowRenderer(0)
, baseline(0)
, baseline()
{
}
......@@ -108,16 +108,16 @@ public:
void appendColumn(unsigned pos);
void splitColumn(unsigned pos, unsigned first);
LayoutUnit calcOuterBorderBefore() const;
LayoutUnit calcOuterBorderAfter() const;
LayoutUnit calcOuterBorderStart() const;
LayoutUnit calcOuterBorderEnd() const;
int calcOuterBorderBefore() const;
int calcOuterBorderAfter() const;
int calcOuterBorderStart() const;
int calcOuterBorderEnd() const;
void recalcOuterBorder();
LayoutUnit outerBorderBefore() const { return m_outerBorderBefore; }
LayoutUnit outerBorderAfter() const { return m_outerBorderAfter; }
LayoutUnit outerBorderStart() const { return m_outerBorderStart; }
LayoutUnit outerBorderEnd() const { return m_outerBorderEnd; }
int outerBorderBefore() const { return m_outerBorderBefore; }
int outerBorderAfter() const { return m_outerBorderAfter; }
int outerBorderStart() const { return m_outerBorderStart; }
int outerBorderEnd() const { return m_outerBorderEnd; }
unsigned numRows() const { return m_grid.size(); }
unsigned numColumns() const;
......@@ -173,16 +173,16 @@ private:
RenderObjectChildList m_children;
Vector<RowStruct> m_grid;
Vector<LayoutUnit> m_rowPos;
Vector<int> m_rowPos;
// the current insertion position
unsigned m_cCol;
unsigned m_cRow;
LayoutUnit m_outerBorderStart;
LayoutUnit m_outerBorderEnd;
LayoutUnit m_outerBorderBefore;
LayoutUnit m_outerBorderAfter;
int m_outerBorderStart;
int m_outerBorderEnd;
int m_outerBorderBefore;
int m_outerBorderAfter;
bool m_needsCellRecalc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment