summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderTableSection.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-11-07 11:22:47 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-11-07 11:22:47 +0100
commitcfd86b747d32ac22246a1aa908eaa720c63a88c1 (patch)
tree24d68c6f61c464ecba1e05670b80390ea3b0e50c /Source/WebCore/rendering/RenderTableSection.cpp
parent69d7c744c9de19d152dbe2d8e46eb7dfd4511d1a (diff)
downloadqtwebkit-cfd86b747d32ac22246a1aa908eaa720c63a88c1.tar.gz
Imported WebKit commit 20271caf2e2c016d5cef40184cddeefeac4f1876 (http://svn.webkit.org/repository/webkit/trunk@133733)
New snapshot that contains all previous fixes as well as build fix for latest QtMultimedia API changes.
Diffstat (limited to 'Source/WebCore/rendering/RenderTableSection.cpp')
-rw-r--r--Source/WebCore/rendering/RenderTableSection.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/WebCore/rendering/RenderTableSection.cpp b/Source/WebCore/rendering/RenderTableSection.cpp
index 1d628fe59..c8452a47c 100644
--- a/Source/WebCore/rendering/RenderTableSection.cpp
+++ b/Source/WebCore/rendering/RenderTableSection.cpp
@@ -987,6 +987,7 @@ LayoutRect RenderTableSection::logicalRectForWritingModeAndDirection(const Layou
tableAlignedRect = tableAlignedRect.transposedRect();
const Vector<int>& columnPos = table()->columnPositions();
+ // FIXME: The table's direction should determine our row's direction, not the section's (see bug 96691).
if (!style()->isLeftToRightDirection())
tableAlignedRect.setX(columnPos[columnPos.size() - 1] - tableAlignedRect.maxX());
@@ -1266,16 +1267,14 @@ unsigned RenderTableSection::numColumns() const
const BorderValue& RenderTableSection::borderAdjoiningStartCell(const RenderTableCell* cell) const
{
- ASSERT_UNUSED(cell, !table()->cellBefore(cell));
- // FIXME: https://webkit.org/b/79272 - Add support for mixed directionality at the cell level.
- return style()->borderStart();
+ ASSERT(cell->isFirstOrLastCellInRow());
+ return hasSameDirectionAs(cell) ? style()->borderStart() : style()->borderEnd();
}
const BorderValue& RenderTableSection::borderAdjoiningEndCell(const RenderTableCell* cell) const
{
- ASSERT_UNUSED(cell, !table()->cellAfter(cell));
- // FIXME: https://webkit.org/b/79272 - Add support for mixed directionality at the cell level.
- return style()->borderEnd();
+ ASSERT(cell->isFirstOrLastCellInRow());
+ return hasSameDirectionAs(cell) ? style()->borderEnd() : style()->borderStart();
}
const RenderTableCell* RenderTableSection::firstRowCellAdjoiningTableStart() const
@@ -1429,7 +1428,8 @@ void RenderTableSection::setLogicalPositionForCell(RenderTableCell* cell, unsign
LayoutPoint cellLocation(0, m_rowPos[cell->rowIndex()]);
int horizontalBorderSpacing = table()->hBorderSpacing();
- if (!cell->styleForCellFlow()->isLeftToRightDirection())
+ // FIXME: The table's direction should determine our row's direction, not the section's (see bug 96691).
+ if (!style()->isLeftToRightDirection())
cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - table()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] + horizontalBorderSpacing);
else
cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizontalBorderSpacing);