Changeset 156954 in webkit


Ignore:
Timestamp:
Oct 5, 2013 8:55:28 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r156952.
http://trac.webkit.org/changeset/156952
https://bugs.webkit.org/show_bug.cgi?id=122381

Made svg/custom/large-image-pattern-crash.html assert
(Requested by ap on #webkit).

  • rendering/InlineBox.cpp:

(WebCore::InlineBox::paint):

  • rendering/InlineBox.h:
  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::paintBoxDecorations):
(WebCore::InlineFlowBox::paintMask):

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::paint):

  • rendering/PaintInfo.h:

(WebCore::PaintInfo::shouldPaintWithinRoot):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::paint):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paint):
(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::paintMask):

  • rendering/RenderBox.h:
  • rendering/RenderElement.h:
  • rendering/RenderFieldset.cpp:

(WebCore::RenderFieldset::paintBoxDecorations):

  • rendering/RenderFrameSet.cpp:

(WebCore::RenderFrameSet::paint):

  • rendering/RenderLineBreak.h:
  • rendering/RenderObject.cpp:

(WebCore::RenderObject::paint):

  • rendering/RenderObject.h:
  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::paint):
(WebCore::RenderReplaced::shouldPaint):

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::paintObject):
(WebCore::RenderTable::paintBoxDecorations):

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::paintCollapsedBorders):
(WebCore::RenderTableCell::paintBackgroundsBehindCell):
(WebCore::RenderTableCell::paintBoxDecorations):

  • rendering/RenderTableCol.h:
  • rendering/RenderText.h:
  • rendering/RenderView.cpp:

(WebCore::RenderView::paint):
(WebCore::RenderView::paintBoxDecorations):

  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::paintEllipsisBox):
(WebCore::RootInlineBox::paintCustomHighlight):

  • rendering/svg/RenderSVGContainer.cpp:

(WebCore::RenderSVGContainer::paint):

  • rendering/svg/RenderSVGGradientStop.h:
  • rendering/svg/RenderSVGResourceClipper.cpp:

(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):

  • rendering/svg/RenderSVGResourceMasker.cpp:

(WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):

  • rendering/svg/RenderSVGResourcePattern.cpp:

(WebCore::RenderSVGResourcePattern::createTileImage):

  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::paintReplaced):

  • rendering/svg/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::paint):

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::renderSubtreeToImageBuffer):

  • rendering/svg/SVGRenderingContext.h:
  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::rendererClipChild):

  • svg/SVGUseElement.h:
  • svg/graphics/filters/SVGFEImage.cpp:

(WebCore::FEImage::platformApplySoftware):

Location:
trunk/Source/WebCore
Files:
34 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r156953 r156954  
     12013-10-05  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r156952.
     4        http://trac.webkit.org/changeset/156952
     5        https://bugs.webkit.org/show_bug.cgi?id=122381
     6
     7        Made svg/custom/large-image-pattern-crash.html assert
     8        (Requested by ap on #webkit).
     9
     10        * rendering/InlineBox.cpp:
     11        (WebCore::InlineBox::paint):
     12        * rendering/InlineBox.h:
     13        * rendering/InlineFlowBox.cpp:
     14        (WebCore::InlineFlowBox::paintBoxDecorations):
     15        (WebCore::InlineFlowBox::paintMask):
     16        * rendering/InlineTextBox.cpp:
     17        (WebCore::InlineTextBox::paint):
     18        * rendering/PaintInfo.h:
     19        (WebCore::PaintInfo::shouldPaintWithinRoot):
     20        * rendering/RenderBlock.cpp:
     21        (WebCore::RenderBlock::paint):
     22        * rendering/RenderBox.cpp:
     23        (WebCore::RenderBox::paint):
     24        (WebCore::RenderBox::paintBoxDecorations):
     25        (WebCore::RenderBox::paintMask):
     26        * rendering/RenderBox.h:
     27        * rendering/RenderElement.h:
     28        * rendering/RenderFieldset.cpp:
     29        (WebCore::RenderFieldset::paintBoxDecorations):
     30        * rendering/RenderFrameSet.cpp:
     31        (WebCore::RenderFrameSet::paint):
     32        * rendering/RenderLineBreak.h:
     33        * rendering/RenderObject.cpp:
     34        (WebCore::RenderObject::paint):
     35        * rendering/RenderObject.h:
     36        * rendering/RenderReplaced.cpp:
     37        (WebCore::RenderReplaced::paint):
     38        (WebCore::RenderReplaced::shouldPaint):
     39        * rendering/RenderTable.cpp:
     40        (WebCore::RenderTable::paintObject):
     41        (WebCore::RenderTable::paintBoxDecorations):
     42        * rendering/RenderTableCell.cpp:
     43        (WebCore::RenderTableCell::paintCollapsedBorders):
     44        (WebCore::RenderTableCell::paintBackgroundsBehindCell):
     45        (WebCore::RenderTableCell::paintBoxDecorations):
     46        * rendering/RenderTableCol.h:
     47        * rendering/RenderText.h:
     48        * rendering/RenderView.cpp:
     49        (WebCore::RenderView::paint):
     50        (WebCore::RenderView::paintBoxDecorations):
     51        * rendering/RootInlineBox.cpp:
     52        (WebCore::RootInlineBox::paintEllipsisBox):
     53        (WebCore::RootInlineBox::paintCustomHighlight):
     54        * rendering/svg/RenderSVGContainer.cpp:
     55        (WebCore::RenderSVGContainer::paint):
     56        * rendering/svg/RenderSVGGradientStop.h:
     57        * rendering/svg/RenderSVGResourceClipper.cpp:
     58        (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
     59        * rendering/svg/RenderSVGResourceMasker.cpp:
     60        (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
     61        * rendering/svg/RenderSVGResourcePattern.cpp:
     62        (WebCore::RenderSVGResourcePattern::createTileImage):
     63        * rendering/svg/RenderSVGRoot.cpp:
     64        (WebCore::RenderSVGRoot::paintReplaced):
     65        * rendering/svg/SVGInlineTextBox.cpp:
     66        (WebCore::SVGInlineTextBox::paintSelectionBackground):
     67        (WebCore::SVGInlineTextBox::paint):
     68        * rendering/svg/SVGRenderingContext.cpp:
     69        (WebCore::SVGRenderingContext::renderSubtreeToImageBuffer):
     70        * rendering/svg/SVGRenderingContext.h:
     71        * svg/SVGUseElement.cpp:
     72        (WebCore::SVGUseElement::rendererClipChild):
     73        * svg/SVGUseElement.h:
     74        * svg/graphics/filters/SVGFEImage.cpp:
     75        (WebCore::FEImage::platformApplySoftware):
     76
    1772013-10-05  Darin Adler  <darin@apple.com>
    278
  • trunk/Source/WebCore/rendering/InlineBox.cpp

    r156952 r156954  
    227227void InlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/)
    228228{
    229     RenderElement& renderer = toRenderElement(this->renderer());
    230     if (!paintInfo.shouldPaintWithinRoot(renderer) || (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection))
     229    if (!paintInfo.shouldPaintWithinRoot(&renderer()) || (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection))
    231230        return;
    232231
    233232    LayoutPoint childPoint = paintOffset;
    234     if (parent()->renderer().style()->isFlippedBlocksWritingMode() && renderer.isBox()) // Faster than calling containingBlock().
    235         childPoint = m_renderer.containingBlock()->flipForWritingModeForChild(&toRenderBox(renderer), childPoint);
     233    if (parent()->renderer().style()->isFlippedBlocksWritingMode() && renderer().isBox()) // Faster than calling containingBlock().
     234        childPoint = m_renderer.containingBlock()->flipForWritingModeForChild(&toRenderBox(renderer()), childPoint);
    236235   
    237236    // Paint all phases of replaced elements atomically, as though the replaced element established its
     
    241240    PaintInfo info(paintInfo);
    242241    info.phase = preservePhase ? paintInfo.phase : PaintPhaseBlockBackground;
    243     renderer.paint(info, childPoint);
     242    m_renderer.paint(info, childPoint);
    244243    if (!preservePhase) {
    245244        info.phase = PaintPhaseChildBlockBackgrounds;
    246         renderer.paint(info, childPoint);
     245        m_renderer.paint(info, childPoint);
    247246        info.phase = PaintPhaseFloat;
    248         renderer.paint(info, childPoint);
     247        m_renderer.paint(info, childPoint);
    249248        info.phase = PaintPhaseForeground;
    250         renderer.paint(info, childPoint);
     249        m_renderer.paint(info, childPoint);
    251250        info.phase = PaintPhaseOutline;
    252         renderer.paint(info, childPoint);
     251        m_renderer.paint(info, childPoint);
    253252    }
    254253}
  • trunk/Source/WebCore/rendering/InlineBox.h

    r156952 r156954  
    182182    InlineBox* prevLeafChildIgnoringLineBreak() const;
    183183
    184     // FIXME: There should be a subclass that returns RenderElement. Plain InlineBox shouldn't be instantiated.
    185184    RenderObject& renderer() const { return m_renderer; }
    186185
  • trunk/Source/WebCore/rendering/InlineFlowBox.cpp

    r156952 r156954  
    12991299void InlineFlowBox::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
    13001300{
    1301     if (!paintInfo.shouldPaintWithinRoot(renderer()) || renderer().style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseForeground)
     1301    if (!paintInfo.shouldPaintWithinRoot(&renderer()) || renderer().style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseForeground)
    13021302        return;
    13031303
     
    13731373void InlineFlowBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
    13741374{
    1375     if (!paintInfo.shouldPaintWithinRoot(renderer()) || renderer().style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask)
     1375    if (!paintInfo.shouldPaintWithinRoot(&renderer()) || renderer().style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask)
    13761376        return;
    13771377
  • trunk/Source/WebCore/rendering/InlineTextBox.cpp

    r156952 r156954  
    519519void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /*lineTop*/, LayoutUnit /*lineBottom*/)
    520520{
    521     if (isLineBreak() || !paintInfo.shouldPaintWithinRoot(renderer()) || renderer().style()->visibility() != VISIBLE
    522         || m_truncation == cFullTruncation || paintInfo.phase == PaintPhaseOutline || !m_len)
     521    if (isLineBreak() || !paintInfo.shouldPaintWithinRoot(&renderer()) || renderer().style()->visibility() != VISIBLE ||
     522        m_truncation == cFullTruncation || paintInfo.phase == PaintPhaseOutline || !m_len)
    523523        return;
    524524
  • trunk/Source/WebCore/rendering/PaintInfo.h

    r156952 r156954  
    8181    }
    8282
    83     bool shouldPaintWithinRoot(const RenderObject& renderer) const
     83    bool shouldPaintWithinRoot(const RenderObject* renderer) const
    8484    {
    85         return !subtreePaintRoot || subtreePaintRoot == &renderer;
     85        return !subtreePaintRoot || subtreePaintRoot == renderer;
    8686    }
    8787
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r156952 r156954  
    22362236    // z-index.  We paint after we painted the background/border, so that the scrollbars will
    22372237    // sit above the background/border.
    2238     if (hasOverflowClip() && style()->visibility() == VISIBLE && (phase == PaintPhaseBlockBackground || phase == PaintPhaseChildBlockBackground) && paintInfo.shouldPaintWithinRoot(*this) && !paintInfo.paintRootBackgroundOnly())
     2238    if (hasOverflowClip() && style()->visibility() == VISIBLE && (phase == PaintPhaseBlockBackground || phase == PaintPhaseChildBlockBackground) && paintInfo.shouldPaintWithinRoot(this) && !paintInfo.paintRootBackgroundOnly())
    22392239        layer()->paintOverflowControls(paintInfo.context, roundedIntPoint(adjustedPaintOffset), paintInfo.rect);
    22402240}
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r156952 r156954  
    10951095// --------------------- painting stuff -------------------------------
    10961096
     1097void 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
    10971107void RenderBox::paintRootBoxFillLayers(const PaintInfo& paintInfo)
    10981108{
     
    11451155void RenderBox::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
    11461156{
    1147     if (!paintInfo.shouldPaintWithinRoot(*this))
     1157    if (!paintInfo.shouldPaintWithinRoot(this))
    11481158        return;
    11491159
     
    13661376void RenderBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
    13671377{
    1368     if (!paintInfo.shouldPaintWithinRoot(*this) || style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask || paintInfo.context->paintingDisabled())
     1378    if (!paintInfo.shouldPaintWithinRoot(this) || style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask || paintInfo.context->paintingDisabled())
    13691379        return;
    13701380
  • trunk/Source/WebCore/rendering/RenderBox.h

    r156952 r156954  
    298298
    299299    virtual void layout();
     300    virtual void paint(PaintInfo&, const LayoutPoint&);
    300301    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;
    301302
  • trunk/Source/WebCore/rendering/RenderElement.h

    r156952 r156954  
    8888    void setNeedsSimplifiedNormalFlowLayout();
    8989
    90     virtual void paint(PaintInfo&, const LayoutPoint&) = 0;
    91 
    9290    // Return the renderer whose background style is used to paint the root background. Should only be called on the renderer for which isRoot() is true.
    9391    RenderElement* rendererForRootBackground();
  • trunk/Source/WebCore/rendering/RenderFieldset.cpp

    r156952 r156954  
    139139void RenderFieldset::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
    140140{
    141     if (!paintInfo.shouldPaintWithinRoot(*this))
     141    if (!paintInfo.shouldPaintWithinRoot(this))
    142142        return;
    143143
  • trunk/Source/WebCore/rendering/RenderFrameSet.cpp

    r156952 r156954  
    141141        LayoutUnit xPos = 0;
    142142        for (size_t c = 0; c < cols; c++) {
    143             toRenderElement(child)->paint(paintInfo, adjustedPaintOffset);
     143            child->paint(paintInfo, adjustedPaintOffset);
    144144            xPos += m_cols.m_sizes[c];
    145145            if (borderThickness && m_cols.m_allowBorder[c + 1]) {
  • trunk/Source/WebCore/rendering/RenderLineBreak.h

    r156952 r156954  
    5656
    5757    virtual bool canHaveChildren() const OVERRIDE { return false; }
    58     virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL { }
    5958
    6059    virtual VisiblePosition positionForPoint(const LayoutPoint&) OVERRIDE;
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r156952 r156954  
    12391239}
    12401240
     1241void RenderObject::paint(PaintInfo&, const LayoutPoint&)
     1242{
     1243}
     1244
    12411245RenderLayerModelObject* RenderObject::containerForRepaint() const
    12421246{
  • trunk/Source/WebCore/rendering/RenderObject.h

    r156952 r156954  
    653653    void setHasTransform(bool b = true) { m_bitfields.setHasTransform(b); }
    654654    void setHasReflection(bool b = true) { m_bitfields.setHasReflection(b); }
     655
     656    virtual void paint(PaintInfo&, const LayoutPoint&);
    655657
    656658    // Recursive function that computes the size and position of this object and all its descendants.
  • trunk/Source/WebCore/rendering/RenderReplaced.cpp

    r156952 r156954  
    130130        return;
    131131   
    132     if (!paintInfo.shouldPaintWithinRoot(*this))
     132    if (!paintInfo.shouldPaintWithinRoot(this))
    133133        return;
    134134   
     
    177177        return false;
    178178
    179     if (!paintInfo.shouldPaintWithinRoot(*this))
     179    if (!paintInfo.shouldPaintWithinRoot(this))
    180180        return false;
    181181       
  • trunk/Source/WebCore/rendering/RenderTable.cpp

    r156952 r156954  
    652652
    653653    for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
    654         if (!child->isBox())
    655             continue;
    656         RenderBox& box = toRenderBox(*child);
    657         if (!box.hasSelfPaintingLayer() && (box.isTableSection() || box.isTableCaption())) {
    658             LayoutPoint childPoint = flipForWritingModeForChild(&box, paintOffset);
    659             box.paint(info, childPoint);
     654        if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || child->isTableCaption())) {
     655            LayoutPoint childPoint = flipForWritingModeForChild(toRenderBox(child), paintOffset);
     656            child->paint(info, childPoint);
    660657        }
    661658    }
     
    701698void RenderTable::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
    702699{
    703     if (!paintInfo.shouldPaintWithinRoot(*this))
     700    if (!paintInfo.shouldPaintWithinRoot(this))
    704701        return;
    705702
  • trunk/Source/WebCore/rendering/RenderTableCell.cpp

    r156952 r156954  
    11571157    ASSERT(paintInfo.phase == PaintPhaseCollapsedTableBorders);
    11581158
    1159     if (!paintInfo.shouldPaintWithinRoot(*this) || style()->visibility() != VISIBLE)
     1159    if (!paintInfo.shouldPaintWithinRoot(this) || style()->visibility() != VISIBLE)
    11601160        return;
    11611161
     
    12671267void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, const LayoutPoint& paintOffset, RenderElement* backgroundObject)
    12681268{
    1269     if (!paintInfo.shouldPaintWithinRoot(*this))
     1269    if (!paintInfo.shouldPaintWithinRoot(this))
    12701270        return;
    12711271
     
    13031303void RenderTableCell::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
    13041304{
    1305     if (!paintInfo.shouldPaintWithinRoot(*this))
     1305    if (!paintInfo.shouldPaintWithinRoot(this))
    13061306        return;
    13071307
  • trunk/Source/WebCore/rendering/RenderTableCol.h

    r156952 r156954  
    8989
    9090    virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OVERRIDE;
    91     virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE { }
    9291
    9392    RenderTable* table() const;
  • trunk/Source/WebCore/rendering/RenderText.h

    r156952 r156954  
    172172    virtual unsigned length() const OVERRIDE FINAL { return textLength(); }
    173173
     174    virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL { ASSERT_NOT_REACHED(); }
    174175    virtual void layout() OVERRIDE FINAL { ASSERT_NOT_REACHED(); }
    175176    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation&, const LayoutPoint&, HitTestAction) OVERRIDE FINAL { ASSERT_NOT_REACHED(); return false; }
  • trunk/Source/WebCore/rendering/RenderView.cpp

    r156952 r156954  
    439439
    440440    // This avoids painting garbage between columns if there is a column gap.
    441     if (frameView().pagination().mode != Pagination::Unpaginated && paintInfo.shouldPaintWithinRoot(*this))
     441    if (frameView().pagination().mode != Pagination::Unpaginated && paintInfo.shouldPaintWithinRoot(this))
    442442        paintInfo.context->fillRect(paintInfo.rect, frameView().baseBackgroundColor(), ColorSpaceDeviceRGB);
    443443
     
    473473void RenderView::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint&)
    474474{
    475     if (!paintInfo.shouldPaintWithinRoot(*this))
     475    if (!paintInfo.shouldPaintWithinRoot(this))
    476476        return;
    477477
  • trunk/Source/WebCore/rendering/RootInlineBox.cpp

    r156952 r156954  
    170170void RootInlineBox::paintEllipsisBox(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom) const
    171171{
    172     if (hasEllipsisBox() && paintInfo.shouldPaintWithinRoot(renderer()) && renderer().style()->visibility() == VISIBLE
     172    if (hasEllipsisBox() && paintInfo.shouldPaintWithinRoot(&renderer()) && renderer().style()->visibility() == VISIBLE
    173173            && paintInfo.phase == PaintPhaseForeground)
    174174        ellipsisBox()->paint(paintInfo, paintOffset, lineTop, lineBottom);
     
    191191void RootInlineBox::paintCustomHighlight(PaintInfo& paintInfo, const LayoutPoint& paintOffset, const AtomicString& highlightType)
    192192{
    193     if (!paintInfo.shouldPaintWithinRoot(renderer()) || renderer().style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseForeground)
     193    if (!paintInfo.shouldPaintWithinRoot(&renderer()) || renderer().style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseForeground)
    194194        return;
    195195
  • trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp

    r156952 r156954  
    140140        if (continueRendering) {
    141141            childPaintInfo.updateSubtreePaintRootForChildren(this);
    142             for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
    143                 if (!child->isRenderElement())
    144                     continue;
    145                 toRenderElement(child)->paint(childPaintInfo, IntPoint());
    146             }
     142            for (RenderObject* child = firstChild(); child; child = child->nextSibling())
     143                child->paint(childPaintInfo, IntPoint());
    147144        }
    148145    }
  • trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.h

    r156952 r156954  
    5555private:
    5656    virtual bool canHaveChildren() const OVERRIDE { return false; }
    57     virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL { }
    5857
    5958    SVGGradientElement* gradientElement() const;
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp

    r156952 r156954  
    2727
    2828#include "AffineTransform.h"
    29 #include "ElementIterator.h"
    3029#include "FloatRect.h"
    3130#include "Frame.h"
     
    222221
    223222    // Draw all clipPath children into a global mask.
    224     auto children = childrenOfType<SVGElement>(&clipPathElement());
    225     for (auto it = children.begin(), end = children.end(); it != end; ++it) {
    226         SVGElement& child = *it;
    227         auto renderer = child.renderer();
    228         if (!renderer)
     223    for (Node* childNode = clipPathElement().firstChild(); childNode; childNode = childNode->nextSibling()) {
     224        RenderObject* renderer = childNode->renderer();
     225        if (!childNode->isSVGElement() || !renderer)
    229226            continue;
    230227        if (renderer->needsLayout()) {
     
    237234
    238235        WindRule newClipRule = style->svgStyle()->clipRule();
    239         bool isUseElement = child.hasTagName(SVGNames::useTag);
     236        bool isUseElement = childNode->hasTagName(SVGNames::useTag);
    240237        if (isUseElement) {
    241             SVGUseElement& useElement = toSVGUseElement(child);
    242             renderer = useElement.rendererClipChild();
     238            SVGUseElement* useElement = toSVGUseElement(childNode);
     239            renderer = useElement->rendererClipChild();
    243240            if (!renderer)
    244241                continue;
    245             if (!useElement.hasAttribute(SVGNames::clip_ruleAttr))
     242            if (!useElement->hasAttribute(SVGNames::clip_ruleAttr))
    246243                newClipRule = renderer->style()->svgStyle()->clipRule();
    247244        }
     
    256253        // We have to pass the <use> renderer itself to renderSubtreeToImageBuffer() to apply it's x/y/transform/etc. values when rendering.
    257254        // So if isUseElement is true, refetch the childNode->renderer(), as renderer got overriden above.
    258         SVGRenderingContext::renderSubtreeToImageBuffer(clipperData->clipMaskImage.get(), isUseElement ? *child.renderer() : *renderer, maskContentTransformation);
     255        SVGRenderingContext::renderSubtreeToImageBuffer(clipperData->clipMaskImage.get(), isUseElement ? childNode->renderer() : renderer, maskContentTransformation);
    259256    }
    260257
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp

    r156952 r156954  
    2525#include "AffineTransform.h"
    2626#include "Element.h"
    27 #include "ElementIterator.h"
    2827#include "FloatPoint.h"
    2928#include "FloatRect.h"
     
    120119
    121120    // Draw the content into the ImageBuffer.
    122     auto children = childrenOfType<SVGElement>(&maskElement());
    123     for (auto it = children.begin(), end = children.end(); it != end; ++it) {
    124         SVGElement& child = *it;
    125         auto renderer = child.renderer();
    126         if (!renderer)
     121    for (Node* node = maskElement().firstChild(); node; node = node->nextSibling()) {
     122        RenderObject* renderer = node->renderer();
     123        if (!node->isSVGElement() || !renderer)
    127124            continue;
    128125        if (renderer->needsLayout())
     
    131128        if (!style || style->display() == NONE || style->visibility() != VISIBLE)
    132129            continue;
    133         SVGRenderingContext::renderSubtreeToImageBuffer(maskerData->maskImage.get(), *renderer, maskContentTransformation);
     130        SVGRenderingContext::renderSubtreeToImageBuffer(maskerData->maskImage.get(), renderer, maskContentTransformation);
    134131    }
    135132
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp

    r156952 r156954  
    2424#include "RenderSVGResourcePattern.h"
    2525
    26 #include "ElementIterator.h"
    2726#include "FrameView.h"
    2827#include "GraphicsContext.h"
     
    273272
    274273    // Draw the content into the ImageBuffer.
    275     auto children = childrenOfType<SVGElement>(attributes.patternContentElement());
    276     for (auto it = children.begin(), end = children.end(); it != end; ++it) {
    277         const SVGElement& child = *it;
    278         auto renderer = child.renderer();
    279         if (!renderer)
     274    for (Node* node = attributes.patternContentElement()->firstChild(); node; node = node->nextSibling()) {
     275        if (!node->isSVGElement() || !node->renderer())
    280276            continue;
    281         if (renderer->needsLayout())
     277        if (node->renderer()->needsLayout())
    282278            return nullptr;
    283         SVGRenderingContext::renderSubtreeToImageBuffer(tileImage.get(), *renderer, contentTransformation);
     279        SVGRenderingContext::renderSubtreeToImageBuffer(tileImage.get(), node->renderer(), contentTransformation);
    284280    }
    285281
  • trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp

    r156952 r156954  
    292292        }
    293293
    294         if (continueRendering) {
    295             childPaintInfo.updateSubtreePaintRootForChildren(this);
    296             for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
    297                 // FIXME: Can this ever have RenderText children?
    298                 if (!child->isRenderElement())
    299                     continue;
    300                 toRenderElement(child)->paint(childPaintInfo, location());
    301             }
    302         }
     294        if (continueRendering)
     295            RenderBox::paint(childPaintInfo, LayoutPoint());
    303296    }
    304297
  • trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp

    r156952 r156954  
    178178void SVGInlineTextBox::paintSelectionBackground(PaintInfo& paintInfo)
    179179{
    180     ASSERT(paintInfo.shouldPaintWithinRoot(renderer()));
     180    ASSERT(paintInfo.shouldPaintWithinRoot(&renderer()));
    181181    ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection);
    182182    ASSERT(truncation() == cNoTruncation);
     
    243243void SVGInlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint&, LayoutUnit, LayoutUnit)
    244244{
    245     ASSERT(paintInfo.shouldPaintWithinRoot(renderer()));
     245    ASSERT(paintInfo.shouldPaintWithinRoot(&renderer()));
    246246    ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection);
    247247    ASSERT(truncation() == cNoTruncation);
  • trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp

    r156952 r156954  
    275275}
    276276
    277 void SVGRenderingContext::renderSubtreeToImageBuffer(ImageBuffer* image, RenderElement& item, const AffineTransform& subtreeContentTransformation)
    278 {
     277void SVGRenderingContext::renderSubtreeToImageBuffer(ImageBuffer* image, RenderObject* item, const AffineTransform& subtreeContentTransformation)
     278{
     279    ASSERT(item);
    279280    ASSERT(image);
    280281    ASSERT(image->context());
     
    286287    contentTransformation = subtreeContentTransformation * contentTransformation;
    287288
    288     ASSERT(!item.needsLayout());
    289     item.paint(info, IntPoint());
     289    ASSERT(!item->needsLayout());
     290    item->paint(info, IntPoint());
    290291
    291292    contentTransformation = savedContentTransformation;
  • trunk/Source/WebCore/rendering/svg/SVGRenderingContext.h

    r156952 r156954  
    3333
    3434class AffineTransform;
    35 class RenderElement;
    3635class RenderObject;
    3736class FloatRect;
     
    8180    static bool createImageBufferForPattern(const FloatRect& absoluteTargetRect, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>&, ColorSpace, RenderingMode);
    8281
    83     static void renderSubtreeToImageBuffer(ImageBuffer*, RenderElement&, const AffineTransform&);
     82    static void renderSubtreeToImageBuffer(ImageBuffer*, RenderObject*, const AffineTransform&);
    8483    static void clipToImageBuffer(GraphicsContext*, const AffineTransform& absoluteTransform, const FloatRect& targetRect, OwnPtr<ImageBuffer>&, bool safeToClear);
    8584
  • trunk/Source/WebCore/svg/SVGUseElement.cpp

    r156952 r156954  
    571571}
    572572
    573 RenderElement* SVGUseElement::rendererClipChild() const
     573RenderObject* SVGUseElement::rendererClipChild() const
    574574{
    575575    Node* n = m_targetElementInstance ? m_targetElementInstance->shadowTreeElement() : 0;
  • trunk/Source/WebCore/svg/SVGUseElement.h

    r156952 r156954  
    5252    void invalidateDependentShadowTrees();
    5353
    54     RenderElement* rendererClipChild() const;
     54    RenderObject* rendererClipChild() const;
    5555
    5656private:
  • trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp

    r156952 r156954  
    9797void FEImage::platformApplySoftware()
    9898{
    99     RenderElement* renderer = referencedRenderer();
     99    RenderObject* renderer = referencedRenderer();
    100100    if (!m_image && !renderer)
    101101        return;
     
    126126        resultImage->context()->concatCTM(absoluteTransform);
    127127
    128         SVGElement* contextNode = toSVGElement(renderer->element());
     128        SVGElement* contextNode = toSVGElement(renderer->node());
    129129        if (contextNode->hasRelativeLengths()) {
    130130            SVGLengthContext lengthContext(contextNode);
     
    139139
    140140        AffineTransform contentTransformation;
    141         SVGRenderingContext::renderSubtreeToImageBuffer(resultImage, *renderer, contentTransformation);
     141        SVGRenderingContext::renderSubtreeToImageBuffer(resultImage, renderer, contentTransformation);
    142142        return;
    143143    }
Note: See TracChangeset for help on using the changeset viewer.