Title: [98869] branches/subpixellayout/Source/WebCore

Diff

Modified: branches/subpixellayout/Source/WebCore/page/mac/FrameMac.mm (98868 => 98869)


--- branches/subpixellayout/Source/WebCore/page/mac/FrameMac.mm	2011-10-31 18:54:42 UTC (rev 98868)
+++ branches/subpixellayout/Source/WebCore/page/mac/FrameMac.mm	2011-10-31 19:06:13 UTC (rev 98869)
@@ -79,7 +79,7 @@
         GraphicsContext graphicsContext((CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]);        
         graphicsContext.save();
         graphicsContext.translate(-rect.origin.x, -rect.origin.y);
-        m_view->paintContents(&graphicsContext, IntRect(rect));
+        m_view->paintContents(&graphicsContext, FixedRect(rect));
         graphicsContext.restore();
 
         [resultImage unlockFocus];

Modified: branches/subpixellayout/Source/WebCore/platform/graphics/FixedPoint.h (98868 => 98869)


--- branches/subpixellayout/Source/WebCore/platform/graphics/FixedPoint.h	2011-10-31 18:54:42 UTC (rev 98868)
+++ branches/subpixellayout/Source/WebCore/platform/graphics/FixedPoint.h	2011-10-31 19:06:13 UTC (rev 98869)
@@ -229,6 +229,11 @@
     return FixedSize(a.x(), a.y());
 }
 
+inline IntPoint flooredIntPoint(const FixedPoint& point)
+{
+    return IntPoint(point.x().toInt(), point.y().toInt());
+}
+
 inline IntPoint roundedIntPoint(const FixedPoint& point)
 {
     return IntPoint(point.x().round(), point.y().round());

Modified: branches/subpixellayout/Source/WebCore/platform/graphics/IntRect.cpp (98868 => 98869)


--- branches/subpixellayout/Source/WebCore/platform/graphics/IntRect.cpp	2011-10-31 18:54:42 UTC (rev 98868)
+++ branches/subpixellayout/Source/WebCore/platform/graphics/IntRect.cpp	2011-10-31 19:06:13 UTC (rev 98869)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "IntRect.h"
 
+#include "FixedRect.h"
 #include "FloatRect.h"
 #include <algorithm>
 
@@ -40,6 +41,12 @@
 {
 }
 
+IntRect::IntRect(const FixedRect& r)
+    : m_location(flooredIntPoint(r.location()))
+    , m_size(flooredIntSize(r.size()))
+{
+}
+
 bool IntRect::intersects(const IntRect& other) const
 {
     // Checking emptiness handles negative widths as well as zero.

Modified: branches/subpixellayout/Source/WebCore/platform/graphics/IntRect.h (98868 => 98869)


--- branches/subpixellayout/Source/WebCore/platform/graphics/IntRect.h	2011-10-31 18:54:42 UTC (rev 98868)
+++ branches/subpixellayout/Source/WebCore/platform/graphics/IntRect.h	2011-10-31 19:06:13 UTC (rev 98869)
@@ -71,6 +71,7 @@
 namespace WebCore {
 
 class FloatRect;
+class FixedRect;
 
 class IntRect {
 public:
@@ -81,6 +82,7 @@
         : m_location(IntPoint(x, y)), m_size(IntSize(width, height)) { }
 
     explicit IntRect(const FloatRect& rect); // don't do this implicitly since it's lossy
+    explicit IntRect(const FixedRect& rect); // don't do this implicitly since it's lossy
         
     IntPoint location() const { return m_location; }
     IntSize size() const { return m_size; }

Modified: branches/subpixellayout/Source/WebCore/platform/mac/WidgetMac.mm (98868 => 98869)


--- branches/subpixellayout/Source/WebCore/platform/mac/WidgetMac.mm	2011-10-31 18:54:42 UTC (rev 98868)
+++ branches/subpixellayout/Source/WebCore/platform/mac/WidgetMac.mm	2011-10-31 19:06:13 UTC (rev 98869)
@@ -284,7 +284,7 @@
         return IntRect(rect);
 
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
-    return IntRect([rootWidget->platformWidget() convertRect:rect toView:nil]);
+    return IntRect(FloatRect([rootWidget->platformWidget() convertRect:rect toView:nil]));
     END_BLOCK_OBJC_EXCEPTIONS;
 
     return rect;
@@ -296,7 +296,7 @@
         return rect;
 
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
-    return IntRect([rootWidget->platformWidget() convertRect:rect toView:nil]);
+    return IntRect(FloatRect([rootWidget->platformWidget() convertRect:rect toView:nil]));
     END_BLOCK_OBJC_EXCEPTIONS;
 
     return rect;

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp (98868 => 98869)


--- branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp	2011-10-31 18:54:42 UTC (rev 98868)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp	2011-10-31 19:06:13 UTC (rev 98869)
@@ -2776,7 +2776,7 @@
         clipToRect(rootLayer, p, paintDirtyRect, damageRect, DoNotIncludeSelfForBorderRadius); // Background painting will handle clipping to self.
 
         // Paint the background.
-        PaintInfo paintInfo(p, damageRect.rect(), PaintPhaseBlockBackground, false, paintingRootForRenderer, region, 0);
+        PaintInfo paintInfo(p, enclosingIntRect(damageRect.rect()), PaintPhaseBlockBackground, false, paintingRootForRenderer, region, 0);
         renderer()->paint(paintInfo, paintOffset);
 
         // Restore the clip.
@@ -2794,7 +2794,7 @@
 
         // Set up the clip used when painting our children.
         clipToRect(rootLayer, p, paintDirtyRect, clipRectToApply);
-        PaintInfo paintInfo(p, clipRectToApply.rect(), 
+        PaintInfo paintInfo(p, enclosingIntRect(clipRectToApply.rect()),
                             selectionOnly ? PaintPhaseSelection : PaintPhaseChildBlockBackgrounds,
                             forceBlackText, paintingRootForRenderer, region, 0);
         renderer()->paint(paintInfo, paintOffset);
@@ -2814,7 +2814,7 @@
     
     if (!outlineRect.isEmpty() && isSelfPaintingLayer() && !paintingOverlayScrollbars) {
         // Paint our own outline
-        PaintInfo paintInfo(p, outlineRect.rect(), PaintPhaseSelfOutline, false, paintingRootForRenderer, region, 0);
+        PaintInfo paintInfo(p, enclosingIntRect(outlineRect.rect()), PaintPhaseSelfOutline, false, paintingRootForRenderer, region, 0);
         clipToRect(rootLayer, p, paintDirtyRect, outlineRect, DoNotIncludeSelfForBorderRadius);
         renderer()->paint(paintInfo, paintOffset);
         restoreClip(p, paintDirtyRect, outlineRect);
@@ -2830,7 +2830,7 @@
         clipToRect(rootLayer, p, paintDirtyRect, damageRect, DoNotIncludeSelfForBorderRadius); // Mask painting will handle clipping to self.
 
         // Paint the mask.
-        PaintInfo paintInfo(p, damageRect.rect(), PaintPhaseMask, false, paintingRootForRenderer, region, 0);
+        PaintInfo paintInfo(p, enclosingIntRect(damageRect.rect()), PaintPhaseMask, false, paintingRootForRenderer, region, 0);
         renderer()->paint(paintInfo, paintOffset);
         
         // Restore the clip.

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderLayerBacking.cpp (98868 => 98869)


--- branches/subpixellayout/Source/WebCore/rendering/RenderLayerBacking.cpp	2011-10-31 18:54:42 UTC (rev 98868)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderLayerBacking.cpp	2011-10-31 19:06:13 UTC (rev 98869)
@@ -1125,7 +1125,7 @@
     if (shouldPaint && (paintingPhase & GraphicsLayerPaintForeground)) {
         // Set up the clip used when painting our children.
         m_owningLayer->clipToRect(rootLayer, context, paintDirtyRect, clipRectToApply);
-        PaintInfo paintInfo(context, clipRectToApply.rect(), 
+        PaintInfo paintInfo(context, enclosingIntRect(clipRectToApply.rect()),
                             selectionOnly ? PaintPhaseSelection : PaintPhaseChildBlockBackgrounds,
                             forceBlackText, paintingRootForRenderer, 0, 0);
         renderer()->paint(paintInfo, paintOffset);
@@ -1146,7 +1146,7 @@
 
         if (!outlineRect.isEmpty()) {
             // Paint our own outline
-            PaintInfo paintInfo(context, outlineRect.rect(), PaintPhaseSelfOutline, false, paintingRootForRenderer, 0, 0);
+            PaintInfo paintInfo(context, enclosingIntRect(outlineRect.rect()), PaintPhaseSelfOutline, false, paintingRootForRenderer, 0, 0);
             m_owningLayer->clipToRect(rootLayer, context, paintDirtyRect, outlineRect, DoNotIncludeSelfForBorderRadius);
             renderer()->paint(paintInfo, paintOffset);
             m_owningLayer->restoreClip(context, paintDirtyRect, outlineRect);
@@ -1164,7 +1164,7 @@
             m_owningLayer->clipToRect(rootLayer, context, paintDirtyRect, damageRect, DoNotIncludeSelfForBorderRadius);
 
             // Paint the mask.
-            PaintInfo paintInfo(context, damageRect.rect(), PaintPhaseMask, false, paintingRootForRenderer, 0, 0);
+            PaintInfo paintInfo(context, enclosingIntRect(damageRect.rect()), PaintPhaseMask, false, paintingRootForRenderer, 0, 0);
             renderer()->paint(paintInfo, paintOffset);
             
             // Restore the clip.

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderScrollbarPart.cpp (98868 => 98869)


--- branches/subpixellayout/Source/WebCore/rendering/RenderScrollbarPart.cpp	2011-10-31 18:54:42 UTC (rev 98868)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderScrollbarPart.cpp	2011-10-31 19:06:13 UTC (rev 98869)
@@ -170,7 +170,7 @@
         return;
 
     // Now do the paint.
-    PaintInfo paintInfo(graphicsContext, rect, PaintPhaseBlockBackground, false, 0, 0, 0);
+    PaintInfo paintInfo(graphicsContext, enclosingIntRect(rect), PaintPhaseBlockBackground, false, 0, 0, 0);
     paint(paintInfo, paintOffset);
     paintInfo.phase = PaintPhaseChildBlockBackgrounds;
     paint(paintInfo, paintOffset);

Modified: branches/subpixellayout/Source/WebCore/rendering/svg/RenderSVGText.cpp (98868 => 98869)


--- branches/subpixellayout/Source/WebCore/rendering/svg/RenderSVGText.cpp	2011-10-31 18:54:42 UTC (rev 98868)
+++ branches/subpixellayout/Source/WebCore/rendering/svg/RenderSVGText.cpp	2011-10-31 19:06:13 UTC (rev 98869)
@@ -243,7 +243,7 @@
     PaintInfo blockInfo(paintInfo);
     GraphicsContextStateSaver stateSaver(*blockInfo.context);
     blockInfo.applyTransform(localToParentTransform());
-    RenderBlock::paint(blockInfo, IntPoint());
+    RenderBlock::paint(blockInfo, LayoutPoint());
 }
 
 FloatRect RenderSVGText::strokeBoundingBox() const

Modified: branches/subpixellayout/Source/WebCore/rendering/svg/SVGImageBufferTools.cpp (98868 => 98869)


--- branches/subpixellayout/Source/WebCore/rendering/svg/SVGImageBufferTools.cpp	2011-10-31 18:54:42 UTC (rev 98868)
+++ branches/subpixellayout/Source/WebCore/rendering/svg/SVGImageBufferTools.cpp	2011-10-31 19:06:13 UTC (rev 98869)
@@ -81,7 +81,7 @@
     ASSERT(image);
     ASSERT(image->context());
 
-    PaintInfo info(image->context(), LayoutRect::infiniteRect(), PaintPhaseForeground, 0, 0, 0, 0);
+    PaintInfo info(image->context(), IntRect(LayoutRect::infiniteRect()), PaintPhaseForeground, 0, 0, 0, 0);
 
     AffineTransform& contentTransformation = currentContentTransformation();
     AffineTransform savedContentTransformation = contentTransformation;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to