Title: [113441] trunk/Source/WebCore
Revision
113441
Author
[email protected]
Date
2012-04-06 08:33:56 -0700 (Fri, 06 Apr 2012)

Log Message

Unreviewed, rolling out r113431.
http://trac.webkit.org/changeset/113431
https://bugs.webkit.org/show_bug.cgi?id=83372

for breaking at least Chromium compilation (Requested by
pfeldman on #webkit).

Patch by Sheriff Bot <[email protected]> on 2012-04-06

* rendering/RenderView.cpp:
(WebCore::RenderView::paint):
(WebCore::RenderView::shouldRepaint):
(WebCore::RenderView::repaintViewRectangle):
(WebCore::RenderView::repaintRectangleInViewAndCompositedLayers):
(WebCore::RenderView::computeRectForRepaint):
(WebCore::RenderView::selectionBounds):
(WebCore::RenderView::viewRect):
(WebCore::RenderView::unscaledDocumentRect):
* rendering/RenderView.h:
(RenderView):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (113440 => 113441)


--- trunk/Source/WebCore/ChangeLog	2012-04-06 15:30:18 UTC (rev 113440)
+++ trunk/Source/WebCore/ChangeLog	2012-04-06 15:33:56 UTC (rev 113441)
@@ -1,3 +1,24 @@
+2012-04-06  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r113431.
+        http://trac.webkit.org/changeset/113431
+        https://bugs.webkit.org/show_bug.cgi?id=83372
+
+        for breaking at least Chromium compilation (Requested by
+        pfeldman on #webkit).
+
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::paint):
+        (WebCore::RenderView::shouldRepaint):
+        (WebCore::RenderView::repaintViewRectangle):
+        (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers):
+        (WebCore::RenderView::computeRectForRepaint):
+        (WebCore::RenderView::selectionBounds):
+        (WebCore::RenderView::viewRect):
+        (WebCore::RenderView::unscaledDocumentRect):
+        * rendering/RenderView.h:
+        (RenderView):
+
 2012-04-06  Peter Rybin  <[email protected]>
 
         Web Inspector: CodeGeneratorInspector.py: completely switch all domains to 'strict' mode

Modified: trunk/Source/WebCore/rendering/RenderView.cpp (113440 => 113441)


--- trunk/Source/WebCore/rendering/RenderView.cpp	2012-04-06 15:30:18 UTC (rev 113440)
+++ trunk/Source/WebCore/rendering/RenderView.cpp	2012-04-06 15:33:56 UTC (rev 113441)
@@ -217,8 +217,6 @@
 {
     // If we ever require layout but receive a paint anyway, something has gone horribly wrong.
     ASSERT(!needsLayout());
-    // RenderViews should never be called to paint with an offset not on device pixels.
-    ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffset);
     paintObject(paintInfo, paintOffset);
 }
 
@@ -296,7 +294,7 @@
     }
 }
 
-bool RenderView::shouldRepaint(const LayoutRect& r) const
+bool RenderView::shouldRepaint(const IntRect& r) const
 {
     if (printing() || r.width() == 0 || r.height() == 0)
         return false;
@@ -310,7 +308,7 @@
     return true;
 }
 
-void RenderView::repaintViewRectangle(const LayoutRect& ur, bool immediate)
+void RenderView::repaintViewRectangle(const IntRect& ur, bool immediate)
 {
     if (!shouldRepaint(ur))
         return;
@@ -319,22 +317,23 @@
     // or even invisible.
     Element* elt = document()->ownerElement();
     if (!elt)
-        m_frameView->repaintContentRectangle(pixelSnappedIntRect(ur), immediate);
+        m_frameView->repaintContentRectangle(ur, immediate);
     else if (RenderBox* obj = elt->renderBox()) {
-        LayoutRect vr = viewRect();
-        LayoutRect r = intersection(ur, vr);
+        IntRect vr = viewRect();
+        IntRect r = intersection(ur, vr);
         
         // Subtract out the contentsX and contentsY offsets to get our coords within the viewing
         // rectangle.
         r.moveBy(-vr.location());
-
+        
         // FIXME: Hardcoded offsets here are not good.
-        r.moveBy(obj->contentBoxRect().location());
+        r.move(obj->borderLeft() + obj->paddingLeft(),
+               obj->borderTop() + obj->paddingTop());
         obj->repaintRectangle(r, immediate);
     }
 }
 
-void RenderView::repaintRectangleInViewAndCompositedLayers(const LayoutRect& ur, bool immediate)
+void RenderView::repaintRectangleInViewAndCompositedLayers(const IntRect& ur, bool immediate)
 {
     if (!shouldRepaint(ur))
         return;
@@ -343,11 +342,11 @@
     
 #if USE(ACCELERATED_COMPOSITING)
     if (compositor()->inCompositingMode())
-        compositor()->repaintCompositedLayersAbsoluteRect(pixelSnappedIntRect(ur));
+        compositor()->repaintCompositedLayersAbsoluteRect(ur);
 #endif
 }
 
-void RenderView::computeRectForRepaint(RenderBoxModelObject* repaintContainer, LayoutRect& rect, bool fixed) const
+void RenderView::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& rect, bool fixed) const
 {
     // If a container was specified, and was not 0 or the RenderView,
     // then we should have found it by now.
@@ -421,12 +420,12 @@
     }
 
     // Now create a single bounding box rect that encloses the whole selection.
-    LayoutRect selRect;
+    IntRect selRect;
     SelectionMap::iterator end = selectedObjects.end();
     for (SelectionMap::iterator i = selectedObjects.begin(); i != end; ++i) {
         RenderSelectionInfo* info = i->second;
         // RenderSelectionInfo::rect() is in the coordinates of the repaintContainer, so map to page coordinates.
-        LayoutRect currRect = info->rect();
+        IntRect currRect = info->rect();
         if (RenderBoxModelObject* repaintContainer = info->repaintContainer()) {
             FloatQuad absQuad = repaintContainer->localToAbsoluteQuad(FloatRect(currRect));
             currRect = absQuad.enclosingBoundingBox(); 
@@ -434,7 +433,7 @@
         selRect.unite(currRect);
         delete info;
     }
-    return pixelSnappedIntRect(selRect);
+    return selRect;
 }
 
 #if USE(ACCELERATED_COMPOSITING)
@@ -707,21 +706,21 @@
     releaseWidgets(renderWidgets);
 }
 
-LayoutRect RenderView::viewRect() const
+IntRect RenderView::viewRect() const
 {
     if (printing())
-        return LayoutRect(LayoutPoint(), size());
+        return IntRect(IntPoint(), size());
     if (m_frameView)
         return m_frameView->visibleContentRect();
-    return LayoutRect();
+    return IntRect();
 }
 
 
 IntRect RenderView::unscaledDocumentRect() const
 {
-    LayoutRect overflowRect(layoutOverflowRect());
+    IntRect overflowRect(layoutOverflowRect());
     flipForWritingMode(overflowRect);
-    return pixelSnappedIntRect(overflowRect);
+    return overflowRect;
 }
 
 LayoutRect RenderView::backgroundRect(RenderBox* backgroundRenderer) const

Modified: trunk/Source/WebCore/rendering/RenderView.h (113440 => 113441)


--- trunk/Source/WebCore/rendering/RenderView.h	2012-04-06 15:30:18 UTC (rev 113440)
+++ trunk/Source/WebCore/rendering/RenderView.h	2012-04-06 15:33:56 UTC (rev 113441)
@@ -68,14 +68,14 @@
 
     FrameView* frameView() const { return m_frameView; }
 
-    virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, LayoutRect&, bool fixed = false) const OVERRIDE;
-    virtual void repaintViewRectangle(const LayoutRect&, bool immediate = false) OVERRIDE;
+    virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed = false) const;
+    virtual void repaintViewRectangle(const IntRect&, bool immediate = false);
     // Repaint the view, and all composited layers that intersect the given absolute rectangle.
     // FIXME: ideally we'd never have to do this, if all repaints are container-relative.
-    virtual void repaintRectangleInViewAndCompositedLayers(const LayoutRect&, bool immediate = false) OVERRIDE;
+    virtual void repaintRectangleInViewAndCompositedLayers(const IntRect&, bool immediate = false);
 
     virtual void paint(PaintInfo&, const LayoutPoint&);
-    virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&) OVERRIDE;
+    virtual void paintBoxDecorations(PaintInfo&, const IntPoint&);
 
     enum SelectionRepaintMode { RepaintNewXOROld, RepaintNewMinusOld, RepaintNothing };
     void setSelection(RenderObject* start, int startPos, RenderObject* end, int endPos, SelectionRepaintMode = RepaintNewXOROld);
@@ -98,7 +98,7 @@
 #endif
     int maximalOutlineSize() const { return m_maximalOutlineSize; }
 
-    virtual LayoutRect viewRect() const OVERRIDE;
+    virtual IntRect viewRect() const;
 
     void updateWidgetPositions();
     void addWidget(RenderWidget*);
@@ -201,7 +201,7 @@
     virtual void calcColumnWidth() OVERRIDE;
     virtual ColumnInfo::PaginationUnit paginationUnit() const OVERRIDE;
 
-    bool shouldRepaint(const LayoutRect&) const;
+    bool shouldRepaint(const IntRect& r) const;
 
     // These functions may only be accessed by LayoutStateMaintainer.
     void pushLayoutState(RenderFlowThread*, bool regionsChanged);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to