Remove IntRect::pixelSnapped* and its enclosingRect since they are no longer used
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jun 2013 07:34:42 +0000 (07:34 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jun 2013 07:34:42 +0000 (07:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=117494

Reviewed by Darin Adler.

Merge: https://chromium.googlesource.com/chromium/blink/+/9433dc00e882e2808ac1db3c1fd89090896d7b58
       https://chromium.googlesource.com/chromium/blink/+/7beaa73aa099170cb2cad02c12c5e0a448b12c21

* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::update):
* platform/graphics/IntRect.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::hitTestCulledInline):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintUsingContainer):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151425 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorLayerTreeAgent.cpp
Source/WebCore/inspector/InspectorOverlay.cpp
Source/WebCore/platform/graphics/IntRect.h
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderObject.cpp

index 6c7a1fd..c440696 100644 (file)
@@ -1,3 +1,23 @@
+2013-06-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Remove IntRect::pixelSnapped* and its enclosingRect since they are no longer used
+        https://bugs.webkit.org/show_bug.cgi?id=117494
+
+        Reviewed by Darin Adler.
+
+        Merge: https://chromium.googlesource.com/chromium/blink/+/9433dc00e882e2808ac1db3c1fd89090896d7b58
+               https://chromium.googlesource.com/chromium/blink/+/7beaa73aa099170cb2cad02c12c5e0a448b12c21
+
+        * inspector/InspectorLayerTreeAgent.cpp:
+        (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
+        * inspector/InspectorOverlay.cpp:
+        (WebCore::InspectorOverlay::update):
+        * platform/graphics/IntRect.h:
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::hitTestCulledInline):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::repaintUsingContainer):
+
 2013-06-11  Sergio Villar Senin  <svillar@igalia.com>
 
         Autoclose braces and parentheses at the end of style sheet
index 89ee858..8fa0f5e 100644 (file)
@@ -178,7 +178,7 @@ PassRefPtr<TypeBuilder::LayerTree::Layer> InspectorLayerTreeAgent::buildObjectFo
     RefPtr<TypeBuilder::LayerTree::Layer> layerObject = TypeBuilder::LayerTree::Layer::create()
         .setLayerId(bind(renderLayer))
         .setNodeId(idForNode(errorString, node))
-        .setBounds(buildObjectForIntRect(enclosingIntRect(renderer->absoluteBoundingBoxRect())))
+        .setBounds(buildObjectForIntRect(renderer->absoluteBoundingBoxRect()))
         .setMemory(backing->backingStoreMemoryEstimate())
         .setCompositedBounds(buildObjectForIntRect(backing->compositedBounds()))
         .setPaintCount(backing->graphicsLayer()->repaintCount());
index 71e258f..8007e4e 100644 (file)
@@ -284,8 +284,8 @@ void InspectorOverlay::update()
         return;
 
     FrameView* overlayView = overlayPage()->mainFrame()->view();
-    IntSize viewportSize = enclosingIntRect(view->visibleContentRect()).size();
-    IntSize frameViewFullSize = enclosingIntRect(view->visibleContentRect(ScrollableArea::IncludeScrollbars)).size();
+    IntSize viewportSize = view->visibleContentRect().size();
+    IntSize frameViewFullSize = view->visibleContentRect(ScrollableArea::IncludeScrollbars).size();
     IntSize size = m_size.isEmpty() ? frameViewFullSize : m_size;
     overlayPage()->setPageScaleFactor(m_page->pageScaleFactor(), IntPoint());
     size.scale(m_page->pageScaleFactor());
index f718939..c01cab9 100644 (file)
@@ -95,17 +95,6 @@ public:
     int width() const { return m_size.width(); }
     int height() const { return m_size.height(); }
 
-    // FIXME: These methods are here only to ease the transition to sub-pixel layout. They should
-    // be removed when we close http://webkit.org/b/60318
-    int pixelSnappedX() const { return m_location.x(); }
-    int pixelSnappedY() const { return m_location.y(); }
-    int pixelSnappedMaxX() const { return x() + width(); }
-    int pixelSnappedMaxY() const { return y() + height(); }
-    int pixelSnappedWidth() const { return m_size.width(); }
-    int pixelSnappedHeight() const { return m_size.height(); }
-    IntPoint pixelSnappedLocation() const { return location(); }
-    IntSize pixelSnappedSize() const { return size(); }
-
     void setX(int x) { m_location.setX(x); }
     void setY(int y) { m_location.setY(y); }
     void setWidth(int width) { m_size.setWidth(width); }
@@ -250,13 +239,6 @@ inline bool operator!=(const IntRect& a, const IntRect& b)
     return a.location() != b.location() || a.size() != b.size();
 }
 
-// FIXME: This method is here only to ease the transition to sub-pixel layout. It should
-// be removed when we close http://webkit.org/b/60318
-inline IntRect enclosingIntRect(const IntRect& rect)
-{
-    return rect;
-}
-
 #if USE(CG)
 IntRect enclosingIntRect(const CGRect&);
 #endif
index 128ee87..93ececa 100644 (file)
@@ -803,7 +803,7 @@ bool RenderInline::hitTestCulledInline(const HitTestRequest& request, HitTestRes
         // We can not use addNodeToRectBasedTestResult to determine if we fully enclose the hit-test area
         // because it can only handle rectangular targets.
         result.addNodeToRectBasedTestResult(node(), request, locationInContainer);
-        return regionResult.contains(enclosingIntRect(tmpLocation.boundingBox()));
+        return regionResult.contains(tmpLocation.boundingBox());
     }
     return false;
 }
index 242ed54..2d3ac04 100644 (file)
@@ -1340,10 +1340,7 @@ void RenderObject::repaintUsingContainer(const RenderLayerModelObject* repaintCo
         ASSERT(repaintContainer == v);
         bool viewHasCompositedLayer = v->hasLayer() && v->layer()->isComposited();
         if (!viewHasCompositedLayer || v->layer()->backing()->paintsIntoWindow()) {
-            LayoutRect repaintRectangle = r;
-            if (viewHasCompositedLayer &&  v->layer()->transform())
-                repaintRectangle = enclosingIntRect(v->layer()->transform()->mapRect(r));
-            v->repaintViewRectangle(repaintRectangle, immediate);
+            v->repaintViewRectangle(viewHasCompositedLayer && v->layer()->transform() ? v->layer()->transform()->mapRect(r) : r, immediate);
             return;
         }
     }