Title: [107597] branches/subpixellayout/Source/WebCore
Revision
107597
Author
[email protected]
Date
2012-02-13 13:16:15 -0800 (Mon, 13 Feb 2012)

Log Message

Renaming convertToRoundedLayerCoords to convertToPixelSnappedLayerCoords, which better describes what's being done. Also, adding const to AppUnit's abs, round, ceil, and floor methods.

Modified Paths

Diff

Modified: branches/subpixellayout/Source/WebCore/platform/AppUnit.h (107596 => 107597)


--- branches/subpixellayout/Source/WebCore/platform/AppUnit.h	2012-02-13 21:07:08 UTC (rev 107596)
+++ branches/subpixellayout/Source/WebCore/platform/AppUnit.h	2012-02-13 21:16:15 UTC (rev 107597)
@@ -62,21 +62,21 @@
     inline int rawValue() const { return m_value; }
     inline void setRawValue(int value) { m_value = value; }
 
-    inline AppUnit abs()
+    inline AppUnit abs() const
     {
         AppUnit returnValue;
         returnValue.setRawValue(::abs(m_value));
         return returnValue;
     }
 #if OS(DARWIN)
-    inline int wtf_ceil()
+    inline int wtf_ceil() const
 #else
-    inline int ceil()
+    inline int ceil() const
 #endif
     {
         return (m_value > 0 ? m_value + kFixedPointDenominator - 1 : m_value - kFixedPointDenominator + 1) / kFixedPointDenominator;
     }
-    inline int round()
+    inline int round() const
     {
         if (m_value > 0)
             return (m_value + (kFixedPointDenominator / 2)) / kFixedPointDenominator;
@@ -84,7 +84,7 @@
             return (m_value - (kFixedPointDenominator / 2)) / kFixedPointDenominator;
     }
 
-    inline int floor()
+    inline int floor() const
     {
         return toInt();
     }

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp (107596 => 107597)


--- branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp	2012-02-13 21:07:08 UTC (rev 107596)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp	2012-02-13 21:16:15 UTC (rev 107597)
@@ -1237,14 +1237,14 @@
     clearClipRectsIncludingDescendants();
 }
 
-void RenderLayer::convertToRoundedLayerCoords(const RenderLayer* ancestorLayer, IntPoint& roundedLocation) const
+void RenderLayer::convertToPixelSnappedLayerCoords(const RenderLayer* ancestorLayer, IntPoint& roundedLocation) const
 {
     LayoutPoint location = roundedLocation;
     convertToLayerCoords(ancestorLayer, location);
     roundedLocation = roundedIntPoint(location);
 }
 
-void RenderLayer::convertToRoundedLayerCoords(const RenderLayer* ancestorLayer, IntRect& roundedRect) const
+void RenderLayer::convertToPixelSnappedLayerCoords(const RenderLayer* ancestorLayer, IntRect& roundedRect) const
 {
     LayoutRect rect = roundedRect;
     convertToLayerCoords(ancestorLayer, rect);
@@ -3776,7 +3776,7 @@
             backgroundRect.intersect(layerBoundsWithVisualOverflow);
         } else {
             // Shift the bounds to be for our region only.
-            LayoutRect bounds = pixelSnappedIntRect(renderBox()->borderBoxRectInRegion(region));
+            LayoutRect bounds = renderBox()->borderBoxRectInRegion(region);
             bounds.moveBy(offset);
             backgroundRect.intersect(bounds);
         }

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderLayer.h (107596 => 107597)


--- branches/subpixellayout/Source/WebCore/rendering/RenderLayer.h	2012-02-13 21:07:08 UTC (rev 107596)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderLayer.h	2012-02-13 21:16:15 UTC (rev 107597)
@@ -427,8 +427,8 @@
     RenderLayer* ancestorCompositingLayer() const { return enclosingCompositingLayer(false); }
 #endif
 
-    void convertToRoundedLayerCoords(const RenderLayer* ancestorLayer, IntPoint& location) const;
-    void convertToRoundedLayerCoords(const RenderLayer* ancestorLayer, IntRect&) const;
+    void convertToPixelSnappedLayerCoords(const RenderLayer* ancestorLayer, IntPoint& location) const;
+    void convertToPixelSnappedLayerCoords(const RenderLayer* ancestorLayer, IntRect&) const;
     void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutPoint& location) const;
     void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutRect&) const;
 

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderLayerBacking.cpp (107596 => 107597)


--- branches/subpixellayout/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-02-13 21:07:08 UTC (rev 107596)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-02-13 21:16:15 UTC (rev 107597)
@@ -251,7 +251,7 @@
             clippingBounds.intersect(m_owningLayer->backgroundClipRect(rootLayer, 0, true).rect()); // FIXME: Incorrect for CSS regions.
 
         IntPoint delta;
-        m_owningLayer->convertToRoundedLayerCoords(rootLayer, delta);
+        m_owningLayer->convertToPixelSnappedLayerCoords(rootLayer, delta);
         clippingBounds.move(-delta.x(), -delta.y());
 
         layerBounds.intersect(clippingBounds);
@@ -426,7 +426,7 @@
 
     IntRect relativeCompositingBounds(localCompositingBounds);
     IntPoint delta;
-    m_owningLayer->convertToRoundedLayerCoords(compAncestor, delta);
+    m_owningLayer->convertToPixelSnappedLayerCoords(compAncestor, delta);
     relativeCompositingBounds.moveBy(delta);
 
     LayoutPoint graphicsLayerParentLocation;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to