Skip to content
Permalink
Browse files
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):

Canonical link: https://commits.webkit.org/77632@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@88189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eaenet committed Jun 6, 2011
1 parent e35e3e1 commit 88fa05219202ea429a2f917f98d7f59702c6e779
Showing 6 changed files with 25 additions and 6 deletions.
@@ -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.
@@ -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
@@ -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;
@@ -350,7 +350,7 @@ class RenderBox : public RenderBoxModelObject {
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&);
@@ -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)
@@ -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)

0 comments on commit 88fa052

Please sign in to comment.