Title: [107323] branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp
Revision
107323
Author
[email protected]
Date
2012-02-09 17:24:07 -0800 (Thu, 09 Feb 2012)

Log Message

Correcting remaining usage of enclosingIntRect in RenderLayer.cpp. These should all be pixel snapped.

Modified Paths

Diff

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp (107322 => 107323)


--- branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp	2012-02-10 01:23:12 UTC (rev 107322)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp	2012-02-10 01:24:07 UTC (rev 107323)
@@ -1862,7 +1862,7 @@
     bool hasVerticalBar = verticalScrollbar();
     bool hasResizer = renderer()->style()->resize() != RESIZE_NONE;
     if ((hasHorizontalBar && hasVerticalBar) || (hasResizer && (hasHorizontalBar || hasVerticalBar)))
-        return cornerRect(this, enclosingIntRect(renderBox()->borderBoxRect()));
+        return cornerRect(this, pixelSnappedIntRect(renderBox()->borderBoxRect()));
     return IntRect();
 }
 
@@ -1881,7 +1881,7 @@
         return IntRect();
     IntRect scrollCornerAndResizer = scrollCornerRect();
     if (scrollCornerAndResizer.isEmpty())
-        scrollCornerAndResizer = resizerCornerRect(this, enclosingIntRect(box->borderBoxRect()));
+        scrollCornerAndResizer = resizerCornerRect(this, pixelSnappedIntRect(box->borderBoxRect()));
     return scrollCornerAndResizer;
 }
 
@@ -2541,7 +2541,7 @@
     RenderBox* box = renderBox();
     ASSERT(box);
 
-    IntRect absRect = resizerCornerRect(this, enclosingIntRect(box->borderBoxRect()));
+    IntRect absRect = resizerCornerRect(this, pixelSnappedIntRect(box->borderBoxRect()));
     absRect.moveBy(paintOffset);
     if (!absRect.intersects(damageRect))
         return;
@@ -2596,7 +2596,7 @@
     
     IntRect resizeControlRect;
     if (renderer()->style()->resize() != RESIZE_NONE) {
-        resizeControlRect = resizerCornerRect(this, enclosingIntRect(box->borderBoxRect()));
+        resizeControlRect = resizerCornerRect(this, pixelSnappedIntRect(box->borderBoxRect()));
         if (resizeControlRect.contains(localPoint))
             return true;
     }
@@ -2674,7 +2674,7 @@
     if (clipRect.rect() == paintDirtyRect)
         return;
     context->save();
-    context->clip(enclosingIntRect(clipRect.rect()));
+    context->clip(pixelSnappedIntRect(clipRect.rect()));
     
     if (!clipRect.hasRadius())
         return;
@@ -3141,7 +3141,7 @@
     
     IntRect hitTestArea = renderer()->view()->documentRect();
     if (!request.ignoreClipping())
-        hitTestArea.intersect(enclosingIntRect(frameVisibleRect(renderer())));
+        hitTestArea.intersect(pixelSnappedIntRect(frameVisibleRect(renderer())));
 
     RenderLayer* insideLayer = hitTestLayer(this, 0, request, result, hitTestArea, result.point(), false);
     if (!insideLayer) {
@@ -4298,7 +4298,7 @@
         if (view)
             view->repaintViewRectangle(absRect);
     } else
-        backing()->setContentsNeedDisplayInRect(enclosingIntRect(r));
+        backing()->setContentsNeedDisplayInRect(pixelSnappedIntRect(r));
 }
 
 // Since we're only painting non-composited layers, we know that they all share the same repaintContainer.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to