2011-06-06 Emil A Eklund <eae@chromium.org>
authoreae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Jun 2011 21:30:42 +0000 (21:30 +0000)
committereae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Jun 2011 21:30:42 +0000 (21:30 +0000)
        Reviewed by Eric Seidel.

        Convert RenderBox::popContentsClip to IntPoint
        https://bugs.webkit.org/show_bug.cgi?id=62132

        Covered by existing tests.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paint):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::popContentsClip):
        * rendering/RenderBox.h:
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::paint):
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::paint):

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h
Source/WebCore/rendering/RenderTable.cpp
Source/WebCore/rendering/RenderTableSection.cpp

index 05e6093..aea1b37 100644 (file)
@@ -1,3 +1,22 @@
+2011-06-06  Emil A Eklund  <eae@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Convert RenderBox::popContentsClip to IntPoint
+        https://bugs.webkit.org/show_bug.cgi?id=62132
+
+        Covered by existing tests.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::paint):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::popContentsClip):
+        * rendering/RenderBox.h:
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::paint):
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::paint):
+
 2011-06-06  Levi Weintraub  <leviw@chromium.org>
 
         Reviewed by Eric Seidel.
index 93ccf28..07d5693 100644 (file)
@@ -2260,7 +2260,7 @@ void RenderBlock::paint(PaintInfo& paintInfo, int tx, int ty)
     bool pushedClip = pushContentsClip(paintInfo, tx, ty);
     paintObject(paintInfo, IntPoint(tx, ty));
     if (pushedClip)
-        popContentsClip(paintInfo, phase, tx, ty);
+        popContentsClip(paintInfo, phase, IntPoint(tx, ty));
 
     // Our scrollbar widgets paint exactly when we tell them to, so that they work properly with
     // z-index.  We paint after we painted the background/border, so that the scrollbars will
index 0a16bad..4617a18 100644 (file)
@@ -1122,14 +1122,14 @@ bool RenderBox::pushContentsClip(PaintInfo& paintInfo, int tx, int ty)
     return true;
 }
 
-void RenderBox::popContentsClip(PaintInfo& paintInfo, PaintPhase originalPhase, int tx, int ty)
+void RenderBox::popContentsClip(PaintInfo& paintInfo, PaintPhase originalPhase, const IntPoint& accumulatedOffset)
 {
     ASSERT(hasControlClip() || (hasOverflowClip() && !layer()->isSelfPaintingLayer()));
 
     paintInfo.context->restore();
     if (originalPhase == PaintPhaseOutline) {
         paintInfo.phase = PaintPhaseSelfOutline;
-        paintObject(paintInfo, IntPoint(tx, ty));
+        paintObject(paintInfo, accumulatedOffset);
         paintInfo.phase = originalPhase;
     } else if (originalPhase == PaintPhaseChildBlockBackground)
         paintInfo.phase = originalPhase;
index 8f3332b..fb74013 100644 (file)
@@ -350,7 +350,7 @@ public:
     virtual bool hasControlClip() const { return false; }
     virtual IntRect controlClipRect(const IntPoint&) const { return IntRect(); }
     bool pushContentsClip(PaintInfo&, int tx, int ty);
-    void popContentsClip(PaintInfo&, PaintPhase originalPhase, int tx, int ty);
+    void popContentsClip(PaintInfo&, PaintPhase originalPhase, const IntPoint& accumulatedOffset);
 
     virtual void paintObject(PaintInfo&, const IntPoint&) { ASSERT_NOT_REACHED(); }
     virtual void paintBoxDecorations(PaintInfo&, const IntPoint&);
index 2e475ce..0d890e4 100644 (file)
@@ -470,7 +470,7 @@ void RenderTable::paint(PaintInfo& paintInfo, int tx, int ty)
     bool pushedClip = pushContentsClip(paintInfo, tx, ty);    
     paintObject(paintInfo, IntPoint(tx, ty));
     if (pushedClip)
-        popContentsClip(paintInfo, paintPhase, tx, ty);
+        popContentsClip(paintInfo, paintPhase, IntPoint(tx, ty));
 }
 
 void RenderTable::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset)
index 89decec..93209af 100644 (file)
@@ -906,7 +906,7 @@ void RenderTableSection::paint(PaintInfo& paintInfo, int tx, int ty)
     bool pushedClip = pushContentsClip(paintInfo, tx, ty);
     paintObject(paintInfo, IntPoint(tx, ty));
     if (pushedClip)
-        popContentsClip(paintInfo, phase, tx, ty);
+        popContentsClip(paintInfo, phase, IntPoint(tx, ty));
 }
 
 static inline bool compareCellPositions(RenderTableCell* elem1, RenderTableCell* elem2)