From ad0d549d4cc13433f77c1ac8f0ab379c83d93f28 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 24 Feb 2012 16:36:50 +0100 Subject: Imported WebKit commit bb52bf3c0119e8a128cd93afe5572413a8617de9 (http://svn.webkit.org/repository/webkit/trunk@108790) --- Source/WebCore/rendering/RenderFrameSet.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'Source/WebCore/rendering/RenderFrameSet.cpp') diff --git a/Source/WebCore/rendering/RenderFrameSet.cpp b/Source/WebCore/rendering/RenderFrameSet.cpp index fc2c97f17..bcce93ef8 100644 --- a/Source/WebCore/rendering/RenderFrameSet.cpp +++ b/Source/WebCore/rendering/RenderFrameSet.cpp @@ -80,7 +80,7 @@ static Color borderFillColor() return Color(208, 208, 208); } -void RenderFrameSet::paintColumnBorder(const PaintInfo& paintInfo, const LayoutRect& borderRect) +void RenderFrameSet::paintColumnBorder(const PaintInfo& paintInfo, const IntRect& borderRect) { if (!paintInfo.rect.intersects(borderRect)) return; @@ -100,7 +100,7 @@ void RenderFrameSet::paintColumnBorder(const PaintInfo& paintInfo, const LayoutR } } -void RenderFrameSet::paintRowBorder(const PaintInfo& paintInfo, const LayoutRect& borderRect) +void RenderFrameSet::paintRowBorder(const PaintInfo& paintInfo, const IntRect& borderRect) { if (!paintInfo.rect.intersects(borderRect)) return; @@ -142,7 +142,7 @@ void RenderFrameSet::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) child->paint(paintInfo, adjustedPaintOffset); xPos += m_cols.m_sizes[c]; if (borderThickness && m_cols.m_allowBorder[c + 1]) { - paintColumnBorder(paintInfo, LayoutRect(adjustedPaintOffset.x() + xPos, adjustedPaintOffset.y() + yPos, borderThickness, height())); + paintColumnBorder(paintInfo, pixelSnappedIntRect(LayoutRect(adjustedPaintOffset.x() + xPos, adjustedPaintOffset.y() + yPos, borderThickness, height()))); xPos += borderThickness; } child = child->nextSibling(); @@ -151,7 +151,7 @@ void RenderFrameSet::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) } yPos += m_rows.m_sizes[r]; if (borderThickness && m_rows.m_allowBorder[r + 1]) { - paintRowBorder(paintInfo, LayoutRect(adjustedPaintOffset.x(), adjustedPaintOffset.y() + yPos, width(), borderThickness)); + paintRowBorder(paintInfo, pixelSnappedIntRect(LayoutRect(adjustedPaintOffset.x(), adjustedPaintOffset.y() + yPos, width(), borderThickness))); yPos += borderThickness; } } @@ -571,7 +571,7 @@ void RenderFrameSet::positionFramesWithFlattening() int height = m_rows.m_sizes[r]; for (int c = 0; c < cols; c++) { - IntRect oldFrameRect = child->frameRect(); + IntRect oldFrameRect = pixelSnappedIntRect(child->frameRect()); int width = m_cols.m_sizes[c]; @@ -619,7 +619,7 @@ void RenderFrameSet::positionFramesWithFlattening() xPos = 0; for (int c = 0; c < cols; c++) { // ensure the rows and columns are filled - IntRect oldRect = child->frameRect(); + IntRect oldRect = pixelSnappedIntRect(child->frameRect()); child->setLocation(IntPoint(xPos, yPos)); child->setHeight(m_rows.m_sizes[r]); @@ -802,11 +802,12 @@ bool RenderFrameSet::isChildAllowed(RenderObject* child, RenderStyle*) const CursorDirective RenderFrameSet::getCursor(const LayoutPoint& point, Cursor& cursor) const { - if (canResizeRow(point)) { + IntPoint roundedPoint = roundedIntPoint(point); + if (canResizeRow(roundedPoint)) { cursor = rowResizeCursor(); return SetCursor; } - if (canResizeColumn(point)) { + if (canResizeColumn(roundedPoint)) { cursor = columnResizeCursor(); return SetCursor; } -- cgit v1.2.1