Title: [117476] trunk/Source/WebCore
- Revision
- 117476
- Author
- e...@chromium.org
- Date
- 2012-05-17 12:04:53 -0700 (Thu, 17 May 2012)
Log Message
Fix rounding in RenderFlowThread::paintIntoRegion
https://bugs.webkit.org/show_bug.cgi?id=86695
Reviewed by Eric Seidel.
Fix rounding of offset in paintIntoRegion to ensure that we paint on
device pixel boundaries.
Covered by existing tests in fast/regions.
* platform/graphics/FractionalLayoutPoint.h:
(WebCore::roundedIntPoint):
Add roundedIntPoint(FractionalLayoutSize) function.
(WebCore):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::paintIntoRegion):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (117475 => 117476)
--- trunk/Source/WebCore/ChangeLog 2012-05-17 19:04:08 UTC (rev 117475)
+++ trunk/Source/WebCore/ChangeLog 2012-05-17 19:04:53 UTC (rev 117476)
@@ -1,3 +1,22 @@
+2012-05-17 Emil A Eklund <e...@chromium.org>
+
+ Fix rounding in RenderFlowThread::paintIntoRegion
+ https://bugs.webkit.org/show_bug.cgi?id=86695
+
+ Reviewed by Eric Seidel.
+
+ Fix rounding of offset in paintIntoRegion to ensure that we paint on
+ device pixel boundaries.
+
+ Covered by existing tests in fast/regions.
+
+ * platform/graphics/FractionalLayoutPoint.h:
+ (WebCore::roundedIntPoint):
+ Add roundedIntPoint(FractionalLayoutSize) function.
+ (WebCore):
+ * rendering/RenderFlowThread.cpp:
+ (WebCore::RenderFlowThread::paintIntoRegion):
+
2012-05-17 Andreas Kling <kl...@webkit.org>
Parser: Avoid unnecessary ref count churn in token constructors.
Modified: trunk/Source/WebCore/platform/graphics/FractionalLayoutPoint.h (117475 => 117476)
--- trunk/Source/WebCore/platform/graphics/FractionalLayoutPoint.h 2012-05-17 19:04:08 UTC (rev 117475)
+++ trunk/Source/WebCore/platform/graphics/FractionalLayoutPoint.h 2012-05-17 19:04:53 UTC (rev 117476)
@@ -167,6 +167,11 @@
return IntPoint(point.x().round(), point.y().round());
}
+inline IntPoint roundedIntPoint(const FractionalLayoutSize& size)
+{
+ return IntPoint(size.width().round(), size.height().round());
+}
+
inline IntPoint ceiledIntPoint(const FractionalLayoutPoint& point)
{
return IntPoint(point.x().ceil(), point.y().ceil());
Modified: trunk/Source/WebCore/rendering/RenderFlowThread.cpp (117475 => 117476)
--- trunk/Source/WebCore/rendering/RenderFlowThread.cpp 2012-05-17 19:04:08 UTC (rev 117475)
+++ trunk/Source/WebCore/rendering/RenderFlowThread.cpp 2012-05-17 19:04:53 UTC (rev 117476)
@@ -292,16 +292,16 @@
// RenderFlowThread should start painting its content in a position that is offset
// from the region rect's current position. The amount of offset is equal to the location of
// region in flow coordinates.
- LayoutPoint renderFlowThreadOffset;
+ IntPoint renderFlowThreadOffset;
if (style()->isFlippedBlocksWritingMode()) {
LayoutRect flippedRegionRect(regionRect);
flipForWritingMode(flippedRegionRect);
- renderFlowThreadOffset = LayoutPoint(paintOffset - flippedRegionRect.location());
+ renderFlowThreadOffset = roundedIntPoint(paintOffset - flippedRegionRect.location());
} else
- renderFlowThreadOffset = LayoutPoint(paintOffset - regionRect.location());
+ renderFlowThreadOffset = roundedIntPoint(paintOffset - regionRect.location());
context->translate(renderFlowThreadOffset.x(), renderFlowThreadOffset.y());
- info.rect.moveBy(-roundedIntPoint(renderFlowThreadOffset));
+ info.rect.moveBy(-renderFlowThreadOffset);
layer()->paint(context, info.rect, 0, 0, region, RenderLayer::PaintLayerTemporaryClipRects);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes