2011-06-28 Levi Weintraub <leviw@chromium.org>
Reviewed by Eric Seidel.
Switch paintObject and paintReplaced to new layout types
https://bugs.webkit.org/show_bug.cgi?id=63585
Switching paintObject and paintReplaced to layout type abstractions from more integral types.
No new tests as this is just moving to an abstraction.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject):
* rendering/RenderBlock.h:
* rendering/RenderBox.h:
(WebCore::RenderBox::paintObject):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintReplaced):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
* rendering/RenderFileUploadControl.h:
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paintReplaced):
* rendering/RenderHTMLCanvas.h:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
* rendering/RenderImage.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintObject):
* rendering/RenderListBox.h:
* rendering/RenderReplaced.h:
(WebCore::RenderReplaced::paintReplaced):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintObject):
* rendering/RenderTable.h:
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::paintObject):
* rendering/RenderTableSection.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::paintObject):
* rendering/RenderTextControl.h:
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::paintReplaced):
* rendering/RenderVideo.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@89983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/rendering/RenderTableSection.cpp b/Source/WebCore/rendering/RenderTableSection.cpp
index eb07e81..7c2edea 100644
--- a/Source/WebCore/rendering/RenderTableSection.cpp
+++ b/Source/WebCore/rendering/RenderTableSection.cpp
@@ -947,7 +947,7 @@
cell->paint(paintInfo, cellPoint);
}
-void RenderTableSection::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderTableSection::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
// Check which rows and cols are visible and only paint these.
// FIXME: Could use a binary search here.
@@ -956,11 +956,11 @@
PaintPhase paintPhase = paintInfo.phase;
- int os = 2 * maximalOutlineSize(paintPhase);
+ LayoutUnit os = 2 * maximalOutlineSize(paintPhase);
unsigned startrow = 0;
unsigned endrow = totalRows;
- IntRect localRepaintRect = paintInfo.rect;
+ LayoutRect localRepaintRect = paintInfo.rect;
localRepaintRect.moveBy(-paintOffset);
if (style()->isFlippedBlocksWritingMode()) {
if (style()->isHorizontalWritingMode())
@@ -971,7 +971,7 @@
// If some cell overflows, just paint all of them.
if (!m_hasOverflowingCell) {
- int before = (style()->isHorizontalWritingMode() ? localRepaintRect.y() : localRepaintRect.x()) - os;
+ LayoutUnit before = (style()->isHorizontalWritingMode() ? localRepaintRect.y() : localRepaintRect.x()) - os;
// binary search to find a row
startrow = std::lower_bound(m_rowPos.begin(), m_rowPos.end(), before) - m_rowPos.begin();
@@ -981,7 +981,7 @@
if (startrow == m_rowPos.size() || (startrow > 0 && (m_rowPos[startrow] > before)))
--startrow;
- int after = (style()->isHorizontalWritingMode() ? localRepaintRect.maxY() : localRepaintRect.maxX()) + os;
+ LayoutUnit after = (style()->isHorizontalWritingMode() ? localRepaintRect.maxY() : localRepaintRect.maxX()) + os;
endrow = std::lower_bound(m_rowPos.begin(), m_rowPos.end(), after) - m_rowPos.begin();
if (endrow == m_rowPos.size())
--endrow;
@@ -994,13 +994,13 @@
unsigned endcol = totalCols;
// FIXME: Implement RTL.
if (!m_hasOverflowingCell && style()->isLeftToRightDirection()) {
- int start = (style()->isHorizontalWritingMode() ? localRepaintRect.x() : localRepaintRect.y()) - os;
+ LayoutUnit start = (style()->isHorizontalWritingMode() ? localRepaintRect.x() : localRepaintRect.y()) - os;
Vector<int>& columnPos = table()->columnPositions();
startcol = std::lower_bound(columnPos.begin(), columnPos.end(), start) - columnPos.begin();
if ((startcol == columnPos.size()) || (startcol > 0 && (columnPos[startcol] > start)))
--startcol;
- int end = (style()->isHorizontalWritingMode() ? localRepaintRect.maxX() : localRepaintRect.maxY()) + os;
+ LayoutUnit end = (style()->isHorizontalWritingMode() ? localRepaintRect.maxX() : localRepaintRect.maxY()) + os;
endcol = std::lower_bound(columnPos.begin(), columnPos.end(), end) - columnPos.begin();
if (endcol == columnPos.size())
--endcol;