Diff
Modified: trunk/Source/WebCore/ChangeLog (88197 => 88198)
--- trunk/Source/WebCore/ChangeLog 2011-06-06 22:28:33 UTC (rev 88197)
+++ trunk/Source/WebCore/ChangeLog 2011-06-06 23:01:25 UTC (rev 88198)
@@ -1,3 +1,22 @@
+2011-06-06 Emil A Eklund <[email protected]>
+
+ Reviewed by Eric Seidel.
+
+ Convert RenderBox::pushContentsClip to IntPoint
+ https://bugs.webkit.org/show_bug.cgi?id=62133
+
+ Covered by existing tests.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::Covered by existing tests.RenderBlock::paint):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::pushContentsClip):
+ * rendering/RenderBox.h:
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::paint):
+ * rendering/RenderTableSection.cpp:
+ (WebCore::RenderTableSection::paint):
+
2011-06-06 Levi Weintraub <[email protected]>
Reviewed by Eric Seidel.
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (88197 => 88198)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2011-06-06 22:28:33 UTC (rev 88197)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2011-06-06 23:01:25 UTC (rev 88198)
@@ -2257,7 +2257,7 @@
return;
}
- bool pushedClip = pushContentsClip(paintInfo, tx, ty);
+ bool pushedClip = pushContentsClip(paintInfo, IntPoint(tx, ty));
paintObject(paintInfo, IntPoint(tx, ty));
if (pushedClip)
popContentsClip(paintInfo, phase, IntPoint(tx, ty));
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (88197 => 88198)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2011-06-06 22:28:33 UTC (rev 88197)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2011-06-06 23:01:25 UTC (rev 88198)
@@ -1096,7 +1096,7 @@
#endif
-bool RenderBox::pushContentsClip(PaintInfo& paintInfo, int tx, int ty)
+bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const IntPoint& accumulatedOffset)
{
if (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == PaintPhaseSelfOutline || paintInfo.phase == PaintPhaseMask)
return false;
@@ -1111,13 +1111,13 @@
paintInfo.phase = PaintPhaseChildOutlines;
else if (paintInfo.phase == PaintPhaseChildBlockBackground) {
paintInfo.phase = PaintPhaseBlockBackground;
- paintObject(paintInfo, IntPoint(tx, ty));
+ paintObject(paintInfo, accumulatedOffset);
paintInfo.phase = PaintPhaseChildBlockBackgrounds;
}
- IntRect clipRect(isControlClip ? controlClipRect(IntPoint(tx, ty)) : overflowClipRect(IntPoint(tx, ty)));
+ IntRect clipRect(isControlClip ? controlClipRect(accumulatedOffset) : overflowClipRect(accumulatedOffset));
paintInfo.context->save();
if (style()->hasBorderRadius())
- paintInfo.context->addRoundedRectClip(style()->getRoundedBorderFor(IntRect(tx, ty, width(), height())));
+ paintInfo.context->addRoundedRectClip(style()->getRoundedBorderFor(IntRect(accumulatedOffset, size())));
paintInfo.context->clip(clipRect);
return true;
}
Modified: trunk/Source/WebCore/rendering/RenderBox.h (88197 => 88198)
--- trunk/Source/WebCore/rendering/RenderBox.h 2011-06-06 22:28:33 UTC (rev 88197)
+++ trunk/Source/WebCore/rendering/RenderBox.h 2011-06-06 23:01:25 UTC (rev 88198)
@@ -349,7 +349,7 @@
IntRect clipRect(const IntPoint& location);
virtual bool hasControlClip() const { return false; }
virtual IntRect controlClipRect(const IntPoint&) const { return IntRect(); }
- bool pushContentsClip(PaintInfo&, int tx, int ty);
+ bool pushContentsClip(PaintInfo&, const IntPoint& accumulatedOffset);
void popContentsClip(PaintInfo&, PaintPhase originalPhase, const IntPoint& accumulatedOffset);
virtual void paintObject(PaintInfo&, const IntPoint&) { ASSERT_NOT_REACHED(); }
Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (88197 => 88198)
--- trunk/Source/WebCore/rendering/RenderTable.cpp 2011-06-06 22:28:33 UTC (rev 88197)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp 2011-06-06 23:01:25 UTC (rev 88198)
@@ -467,7 +467,7 @@
return;
}
- bool pushedClip = pushContentsClip(paintInfo, tx, ty);
+ bool pushedClip = pushContentsClip(paintInfo, IntPoint(tx, ty));
paintObject(paintInfo, IntPoint(tx, ty));
if (pushedClip)
popContentsClip(paintInfo, paintPhase, IntPoint(tx, ty));
Modified: trunk/Source/WebCore/rendering/RenderTableSection.cpp (88197 => 88198)
--- trunk/Source/WebCore/rendering/RenderTableSection.cpp 2011-06-06 22:28:33 UTC (rev 88197)
+++ trunk/Source/WebCore/rendering/RenderTableSection.cpp 2011-06-06 23:01:25 UTC (rev 88198)
@@ -903,7 +903,7 @@
ty += y();
PaintPhase phase = paintInfo.phase;
- bool pushedClip = pushContentsClip(paintInfo, tx, ty);
+ bool pushedClip = pushContentsClip(paintInfo, IntPoint(tx, ty));
paintObject(paintInfo, IntPoint(tx, ty));
if (pushedClip)
popContentsClip(paintInfo, phase, IntPoint(tx, ty));