Ignore:
Timestamp:
Oct 5, 2013, 4:58:30 AM (12 years ago)
Author:
Antti Koivisto
Message:

Move paint() to RenderElement
https://bugs.webkit.org/show_bug.cgi?id=122371

Reviewed by Darin Adler.

RenderText does not paint itself (text is painted by line boxes). We can move paint() down
to RenderElement.

This also requires some type tightening elsewhere in the code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r156905 r156952  
    10951095// --------------------- painting stuff -------------------------------
    10961096
    1097 void RenderBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
    1098 {
    1099     LayoutPoint adjustedPaintOffset = paintOffset + location();
    1100     // default implementation. Just pass paint through to the children
    1101     PaintInfo childInfo(paintInfo);
    1102     childInfo.updateSubtreePaintRootForChildren(this);
    1103     for (RenderObject* child = firstChild(); child; child = child->nextSibling())
    1104         child->paint(childInfo, adjustedPaintOffset);
    1105 }
    1106 
    11071097void RenderBox::paintRootBoxFillLayers(const PaintInfo& paintInfo)
    11081098{
     
    11551145void RenderBox::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
    11561146{
    1157     if (!paintInfo.shouldPaintWithinRoot(this))
     1147    if (!paintInfo.shouldPaintWithinRoot(*this))
    11581148        return;
    11591149
     
    13761366void RenderBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
    13771367{
    1378     if (!paintInfo.shouldPaintWithinRoot(this) || style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask || paintInfo.context->paintingDisabled())
     1368    if (!paintInfo.shouldPaintWithinRoot(*this) || style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask || paintInfo.context->paintingDisabled())
    13791369        return;
    13801370
Note: See TracChangeset for help on using the changeset viewer.