Modified: trunk/Source/WebCore/ChangeLog (164531 => 164532)
--- trunk/Source/WebCore/ChangeLog 2014-02-22 07:20:16 UTC (rev 164531)
+++ trunk/Source/WebCore/ChangeLog 2014-02-22 07:24:45 UTC (rev 164532)
@@ -1,3 +1,18 @@
+2014-02-21 Zalan Bujtas <[email protected]>
+
+ REGRESSION(r164412): Pixel cracks when zooming in to any web content.
+ https://bugs.webkit.org/show_bug.cgi?id=129195
+
+ Reviewed by Simon Fraser.
+
+ Integral clipping of the repaint rect was prematurely removed in RenderLayerBacking::paintContents().
+ Repaint rects needs a uniform, device pixel precise clipping across the painting flow including RenderLayer,
+ RenderView and TileController.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::paintContents):
+ (WebCore::RenderLayerBacking::compositedBoundsIncludingMargin):
+
2014-02-21 Jer Noble <[email protected]>
Unreviewed Mac build fix after r164529.
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (164531 => 164532)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2014-02-22 07:20:16 UTC (rev 164531)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2014-02-22 07:24:45 UTC (rev 164532)
@@ -2172,7 +2172,7 @@
}
void RenderLayerBacking::paintIntoLayer(const GraphicsLayer* graphicsLayer, GraphicsContext* context,
- const LayoutRect& paintDirtyRect, // In the coords of rootLayer.
+ const IntRect& paintDirtyRect, // In the coords of rootLayer.
PaintBehavior paintBehavior, GraphicsLayerPaintingPhase paintingPhase)
{
if (paintsIntoWindow() || paintsIntoCompositedAncestor()) {
@@ -2239,8 +2239,7 @@
#endif
// The dirtyRect is in the coords of the painting root.
- LayoutRect dirtyRect(clip);
- IntRect pixelSnappedRectForIntegralPositionedItems = pixelSnappedIntRect(dirtyRect);
+ IntRect dirtyRect = enclosingIntRect(clip);
if (graphicsLayer == m_graphicsLayer.get()
|| graphicsLayer == m_foregroundLayer.get()
@@ -2257,9 +2256,9 @@
InspectorInstrumentation::didPaint(&renderer(), &context, dirtyRect);
} else if (graphicsLayer == layerForHorizontalScrollbar()) {
- paintScrollbar(m_owningLayer.horizontalScrollbar(), context, pixelSnappedRectForIntegralPositionedItems);
+ paintScrollbar(m_owningLayer.horizontalScrollbar(), context, dirtyRect);
} else if (graphicsLayer == layerForVerticalScrollbar()) {
- paintScrollbar(m_owningLayer.verticalScrollbar(), context, pixelSnappedRectForIntegralPositionedItems);
+ paintScrollbar(m_owningLayer.verticalScrollbar(), context, dirtyRect);
} else if (graphicsLayer == layerForScrollCorner()) {
const LayoutRect& scrollCornerAndResizer = m_owningLayer.scrollCornerAndResizerRect();
context.save();
@@ -2537,8 +2536,8 @@
LayoutUnit leftMarginWidth = tiledBacking->leftMarginWidth();
LayoutUnit topMarginHeight = tiledBacking->topMarginHeight();
- boundsIncludingMargin.moveBy(IntPoint(-leftMarginWidth, -topMarginHeight));
- boundsIncludingMargin.expand(leftMarginWidth + (LayoutUnit)tiledBacking->rightMarginWidth(), topMarginHeight + (LayoutUnit)tiledBacking->bottomMarginHeight());
+ boundsIncludingMargin.moveBy(LayoutPoint(-leftMarginWidth, -topMarginHeight));
+ boundsIncludingMargin.expand(leftMarginWidth + tiledBacking->rightMarginWidth(), topMarginHeight + tiledBacking->bottomMarginHeight());
return boundsIncludingMargin;
}
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.h (164531 => 164532)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.h 2014-02-22 07:20:16 UTC (rev 164531)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.h 2014-02-22 07:24:45 UTC (rev 164532)
@@ -283,7 +283,7 @@
bool hasTiledBackingFlatteningLayer() const { return (m_childContainmentLayer && m_usingTiledCacheLayer); }
GraphicsLayer* tileCacheFlatteningLayer() const { return m_usingTiledCacheLayer ? m_childContainmentLayer.get() : 0; }
- void paintIntoLayer(const GraphicsLayer*, GraphicsContext*, const LayoutRect& paintDirtyRect, PaintBehavior, GraphicsLayerPaintingPhase);
+ void paintIntoLayer(const GraphicsLayer*, GraphicsContext*, const IntRect& paintDirtyRect, PaintBehavior, GraphicsLayerPaintingPhase);
// Helper function for updateGraphicsLayerGeometry.
void adjustAncestorCompositingBoundsForFlowThread(LayoutRect& ancestorCompositingBounds, const RenderLayer* compositingAncestor) const;