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

Diff

Modified: branches/subpixellayout/Source/WebCore/page/Page.cpp (111229 => 111230)


--- branches/subpixellayout/Source/WebCore/page/Page.cpp	2012-03-19 20:24:14 UTC (rev 111229)
+++ branches/subpixellayout/Source/WebCore/page/Page.cpp	2012-03-19 20:24:32 UTC (rev 111230)
@@ -1046,22 +1046,22 @@
     if (!isCountingRelevantRepaintedObjects())
         return;
 
-    IntRect adjustedPaintRect = pixelSnappedIntRect(objectPaintRect);
-
     // The objects are only relevant if they are being painted within the viewRect().
     if (RenderView* view = object->view()) {
         if (!objectPaintRect.intersects(pixelSnappedIntRect(view->viewRect())))
             return;
     }
 
+    IntRect snappedPaintRect = pixelSnappedIntRect(objectPaintRect);
+
     // If this object was previously counted as an unpainted object, remove it from that HashSet
     // and corresponding Region. FIXME: This doesn't do the right thing if the objects overlap.
     if (m_relevantUnpaintedRenderObjects.contains(object)) {
         m_relevantUnpaintedRenderObjects.remove(object);
-        m_relevantUnpaintedRegion.subtract(adjustedPaintRect);
+        m_relevantUnpaintedRegion.subtract(snappedPaintRect);
     }
 
-    m_relevantPaintedRegion.unite(adjustedPaintRect);
+    m_relevantPaintedRegion.unite(snappedPaintRect);
 
     RenderView* view = object->view();
     if (!view)

Modified: branches/subpixellayout/Source/WebCore/platform/graphics/FractionalLayoutRect.h (111229 => 111230)


--- branches/subpixellayout/Source/WebCore/platform/graphics/FractionalLayoutRect.h	2012-03-19 20:24:14 UTC (rev 111229)
+++ branches/subpixellayout/Source/WebCore/platform/graphics/FractionalLayoutRect.h	2012-03-19 20:24:32 UTC (rev 111230)
@@ -33,8 +33,6 @@
 
 #include "FractionalLayoutPoint.h"
 #include "IntRect.h"
-
-#include <algorithm>
 #include <wtf/Vector.h>
 
 namespace WebCore {

Modified: branches/subpixellayout/Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm (111229 => 111230)


--- branches/subpixellayout/Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm	2012-03-19 20:24:14 UTC (rev 111229)
+++ branches/subpixellayout/Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm	2012-03-19 20:24:32 UTC (rev 111230)
@@ -76,7 +76,7 @@
     RetainPtr<CGMutablePathRef> focusRingPath(AdoptCF, CGPathCreateMutable());
     unsigned rectCount = rects.size();
     for (unsigned i = 0; i < rectCount; i++)
-        CGPathAddRect(focusRingPath.get(), 0, CGRectInset(FloatRect(rects[i]), -offset, -offset));
+        CGPathAddRect(focusRingPath.get(), 0, CGRectInset(rects[i], -offset, -offset));
 
     drawFocusRingToContext(platformContext(), focusRingPath.get(), colorRef, radius);
 }

Modified: branches/subpixellayout/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp (111229 => 111230)


--- branches/subpixellayout/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp	2012-03-19 20:24:14 UTC (rev 111229)
+++ branches/subpixellayout/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp	2012-03-19 20:24:32 UTC (rev 111230)
@@ -276,11 +276,11 @@
         return source;
 
     RefPtr<BitmapTexture> filterSurface(source);
-    LayoutUnit leftOutset, topOutset, bottomOutset, rightOutset;
+    int leftOutset, topOutset, bottomOutset, rightOutset;
     if (filters.hasOutsets()) {
         filters.getOutsets(topOutset, rightOutset, bottomOutset, leftOutset);
         IntRect unfilteredTargetRect(targetRect);
-        targetRect.move(std::max(zeroLayoutUnit, -leftOutset), std::max(zeroLayoutUnit, -topOutset));
+        targetRect.move(std::max(0, -leftOutset), std::max(0, -topOutset));
         targetRect.expand(leftOutset + rightOutset, topOutset + bottomOutset);
         targetRect.unite(unfilteredTargetRect);
         filterSurface = textureMapper->acquireTextureFromPool(targetRect.size());

Modified: branches/subpixellayout/Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp (111229 => 111230)


--- branches/subpixellayout/Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp	2012-03-19 20:24:14 UTC (rev 111229)
+++ branches/subpixellayout/Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp	2012-03-19 20:24:32 UTC (rev 111230)
@@ -136,7 +136,7 @@
 
 // FIXME: This is nearly identical to the GraphicsContext::drawFocusRing function in GraphicsContextMac.mm.
 // The code could move to GraphicsContextCG.cpp and be shared.
-void GraphicsContext::drawFocusRing(const Vector<FractionalLayoutRect>& rects, int width, int offset, const Color& color)
+void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int width, int offset, const Color& color)
 {
     if (paintingDisabled())
         return;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to