Title: [146377] trunk/Source/WebCore
Revision
146377
Author
o...@chromium.org
Date
2013-03-20 12:22:17 -0700 (Wed, 20 Mar 2013)

Log Message

Move repaint methods from RenderObject to RenderBox
https://bugs.webkit.org/show_bug.cgi?id=112773

Reviewed by Julien Chaffraix.

repaintOverhangingFloats and repaintDuringLayoutIfMoved are only ever called
on RenderBoxes, so don't need to be on RenderObject. This also lets us
devirtualize repaintDuringLayoutIfMoved.

* rendering/RenderBox.h:
(WebCore::RenderBox::repaintOverhangingFloats):
* rendering/RenderObject.cpp:
* rendering/RenderObject.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (146376 => 146377)


--- trunk/Source/WebCore/ChangeLog	2013-03-20 19:22:00 UTC (rev 146376)
+++ trunk/Source/WebCore/ChangeLog	2013-03-20 19:22:17 UTC (rev 146377)
@@ -1,3 +1,19 @@
+2013-03-20  Ojan Vafai  <o...@chromium.org>
+
+        Move repaint methods from RenderObject to RenderBox
+        https://bugs.webkit.org/show_bug.cgi?id=112773
+
+        Reviewed by Julien Chaffraix.
+
+        repaintOverhangingFloats and repaintDuringLayoutIfMoved are only ever called
+        on RenderBoxes, so don't need to be on RenderObject. This also lets us
+        devirtualize repaintDuringLayoutIfMoved.
+
+        * rendering/RenderBox.h:
+        (WebCore::RenderBox::repaintOverhangingFloats):
+        * rendering/RenderObject.cpp:
+        * rendering/RenderObject.h:
+
 2013-03-20  Christian Biesinger  <cbiesin...@chromium.org>
 
         Add a feature observer for RenderDeprecatedFlexibleBox

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (146376 => 146377)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2013-03-20 19:22:00 UTC (rev 146376)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2013-03-20 19:22:17 UTC (rev 146377)
@@ -2845,7 +2845,7 @@
         // condition is replaced with being a descendant of us.
         if (logicalBottomForFloat(r) > logicalHeight() && ((paintAllDescendants && r->m_renderer->isDescendantOf(this)) || r->shouldPaint()) && !r->m_renderer->hasSelfPaintingLayer()) {
             r->m_renderer->repaint();
-            r->m_renderer->repaintOverhangingFloats();
+            r->m_renderer->repaintOverhangingFloats(false);
         }
     }
 }

Modified: trunk/Source/WebCore/rendering/RenderBlock.h (146376 => 146377)


--- trunk/Source/WebCore/rendering/RenderBlock.h	2013-03-20 19:22:00 UTC (rev 146376)
+++ trunk/Source/WebCore/rendering/RenderBlock.h	2013-03-20 19:22:17 UTC (rev 146377)
@@ -612,7 +612,7 @@
     virtual LayoutUnit collapsedMarginBefore() const { return maxPositiveMarginBefore() - maxNegativeMarginBefore(); }
     virtual LayoutUnit collapsedMarginAfter() const { return maxPositiveMarginAfter() - maxNegativeMarginAfter(); }
 
-    virtual void repaintOverhangingFloats(bool paintAllDescendants);
+    virtual void repaintOverhangingFloats(bool paintAllDescendants) OVERRIDE;
 
     void layoutBlockChildren(bool relayoutChildren, LayoutUnit& maxFloatLogicalBottom);
     void layoutInlineChildren(bool relayoutChildren, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom);

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (146376 => 146377)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2013-03-20 19:22:00 UTC (rev 146376)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2013-03-20 19:22:17 UTC (rev 146377)
@@ -2013,6 +2013,10 @@
     }
 }
 
+void RenderBox::repaintOverhangingFloats(bool)
+{
+}
+
 void RenderBox::updateLogicalWidth()
 {
     LogicalExtentComputedValues computedValues;

Modified: trunk/Source/WebCore/rendering/RenderBox.h (146376 => 146377)


--- trunk/Source/WebCore/rendering/RenderBox.h	2013-03-20 19:22:00 UTC (rev 146376)
+++ trunk/Source/WebCore/rendering/RenderBox.h	2013-03-20 19:22:17 UTC (rev 146377)
@@ -377,9 +377,9 @@
 
     virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const OVERRIDE;
     virtual void computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect&, bool fixed = false) const OVERRIDE;
+    void repaintDuringLayoutIfMoved(const LayoutRect&);
+    virtual void repaintOverhangingFloats(bool paintAllDescendants);
 
-    virtual void repaintDuringLayoutIfMoved(const LayoutRect&);
-
     virtual LayoutUnit containingBlockLogicalWidthForContent() const;
     LayoutUnit containingBlockLogicalHeightForContent(AvailableLogicalHeightType) const;
 

Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (146376 => 146377)


--- trunk/Source/WebCore/rendering/RenderObject.cpp	2013-03-20 19:22:00 UTC (rev 146376)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp	2013-03-20 19:22:17 UTC (rev 146377)
@@ -1510,14 +1510,6 @@
     return false;
 }
 
-void RenderObject::repaintDuringLayoutIfMoved(const LayoutRect&)
-{
-}
-
-void RenderObject::repaintOverhangingFloats(bool)
-{
-}
-
 bool RenderObject::checkForRepaintDuringLayout() const
 {
     return !document()->view()->needsFullRepaint() && !hasLayer() && everHadLayout();

Modified: trunk/Source/WebCore/rendering/RenderObject.h (146376 => 146377)


--- trunk/Source/WebCore/rendering/RenderObject.h	2013-03-20 19:22:00 UTC (rev 146376)
+++ trunk/Source/WebCore/rendering/RenderObject.h	2013-03-20 19:22:17 UTC (rev 146377)
@@ -844,12 +844,6 @@
     // Repaint only if our old bounds and new bounds are different. The caller may pass in newBounds and newOutlineBox if they are known.
     bool repaintAfterLayoutIfNeeded(const RenderLayerModelObject* repaintContainer, const LayoutRect& oldBounds, const LayoutRect& oldOutlineBox, const LayoutRect* newBoundsPtr = 0, const LayoutRect* newOutlineBoxPtr = 0);
 
-    // Repaint only if the object moved.
-    virtual void repaintDuringLayoutIfMoved(const LayoutRect&);
-
-    // Called to repaint a block's floats.
-    virtual void repaintOverhangingFloats(bool paintAllDescendants = false);
-
     bool checkForRepaintDuringLayout() const;
 
     // Returns the rect that should be repainted whenever this object changes.  The rect is in the view's
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to