Changeset 156954 in webkit
- Timestamp:
- Oct 5, 2013 8:55:28 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r156953 r156954 1 2013-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 1 77 2013-10-05 Darin Adler <darin@apple.com> 2 78 -
trunk/Source/WebCore/rendering/InlineBox.cpp
r156952 r156954 227 227 void InlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/) 228 228 { 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)) 231 230 return; 232 231 233 232 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); 236 235 237 236 // Paint all phases of replaced elements atomically, as though the replaced element established its … … 241 240 PaintInfo info(paintInfo); 242 241 info.phase = preservePhase ? paintInfo.phase : PaintPhaseBlockBackground; 243 renderer.paint(info, childPoint);242 m_renderer.paint(info, childPoint); 244 243 if (!preservePhase) { 245 244 info.phase = PaintPhaseChildBlockBackgrounds; 246 renderer.paint(info, childPoint);245 m_renderer.paint(info, childPoint); 247 246 info.phase = PaintPhaseFloat; 248 renderer.paint(info, childPoint);247 m_renderer.paint(info, childPoint); 249 248 info.phase = PaintPhaseForeground; 250 renderer.paint(info, childPoint);249 m_renderer.paint(info, childPoint); 251 250 info.phase = PaintPhaseOutline; 252 renderer.paint(info, childPoint);251 m_renderer.paint(info, childPoint); 253 252 } 254 253 } -
trunk/Source/WebCore/rendering/InlineBox.h
r156952 r156954 182 182 InlineBox* prevLeafChildIgnoringLineBreak() const; 183 183 184 // FIXME: There should be a subclass that returns RenderElement. Plain InlineBox shouldn't be instantiated.185 184 RenderObject& renderer() const { return m_renderer; } 186 185 -
trunk/Source/WebCore/rendering/InlineFlowBox.cpp
r156952 r156954 1299 1299 void InlineFlowBox::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 1300 1300 { 1301 if (!paintInfo.shouldPaintWithinRoot( renderer()) || renderer().style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseForeground)1301 if (!paintInfo.shouldPaintWithinRoot(&renderer()) || renderer().style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseForeground) 1302 1302 return; 1303 1303 … … 1373 1373 void InlineFlowBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 1374 1374 { 1375 if (!paintInfo.shouldPaintWithinRoot( renderer()) || renderer().style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask)1375 if (!paintInfo.shouldPaintWithinRoot(&renderer()) || renderer().style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask) 1376 1376 return; 1377 1377 -
trunk/Source/WebCore/rendering/InlineTextBox.cpp
r156952 r156954 519 519 void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /*lineTop*/, LayoutUnit /*lineBottom*/) 520 520 { 521 if (isLineBreak() || !paintInfo.shouldPaintWithinRoot( renderer()) || renderer().style()->visibility() != VISIBLE522 ||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) 523 523 return; 524 524 -
trunk/Source/WebCore/rendering/PaintInfo.h
r156952 r156954 81 81 } 82 82 83 bool shouldPaintWithinRoot(const RenderObject &renderer) const83 bool shouldPaintWithinRoot(const RenderObject* renderer) const 84 84 { 85 return !subtreePaintRoot || subtreePaintRoot == &renderer;85 return !subtreePaintRoot || subtreePaintRoot == renderer; 86 86 } 87 87 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r156952 r156954 2236 2236 // z-index. We paint after we painted the background/border, so that the scrollbars will 2237 2237 // 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()) 2239 2239 layer()->paintOverflowControls(paintInfo.context, roundedIntPoint(adjustedPaintOffset), paintInfo.rect); 2240 2240 } -
trunk/Source/WebCore/rendering/RenderBox.cpp
r156952 r156954 1095 1095 // --------------------- painting stuff ------------------------------- 1096 1096 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 1097 1107 void RenderBox::paintRootBoxFillLayers(const PaintInfo& paintInfo) 1098 1108 { … … 1145 1155 void RenderBox::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 1146 1156 { 1147 if (!paintInfo.shouldPaintWithinRoot( *this))1157 if (!paintInfo.shouldPaintWithinRoot(this)) 1148 1158 return; 1149 1159 … … 1366 1376 void RenderBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 1367 1377 { 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()) 1369 1379 return; 1370 1380 -
trunk/Source/WebCore/rendering/RenderBox.h
r156952 r156954 298 298 299 299 virtual void layout(); 300 virtual void paint(PaintInfo&, const LayoutPoint&); 300 301 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE; 301 302 -
trunk/Source/WebCore/rendering/RenderElement.h
r156952 r156954 88 88 void setNeedsSimplifiedNormalFlowLayout(); 89 89 90 virtual void paint(PaintInfo&, const LayoutPoint&) = 0;91 92 90 // 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. 93 91 RenderElement* rendererForRootBackground(); -
trunk/Source/WebCore/rendering/RenderFieldset.cpp
r156952 r156954 139 139 void RenderFieldset::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 140 140 { 141 if (!paintInfo.shouldPaintWithinRoot( *this))141 if (!paintInfo.shouldPaintWithinRoot(this)) 142 142 return; 143 143 -
trunk/Source/WebCore/rendering/RenderFrameSet.cpp
r156952 r156954 141 141 LayoutUnit xPos = 0; 142 142 for (size_t c = 0; c < cols; c++) { 143 toRenderElement(child)->paint(paintInfo, adjustedPaintOffset);143 child->paint(paintInfo, adjustedPaintOffset); 144 144 xPos += m_cols.m_sizes[c]; 145 145 if (borderThickness && m_cols.m_allowBorder[c + 1]) { -
trunk/Source/WebCore/rendering/RenderLineBreak.h
r156952 r156954 56 56 57 57 virtual bool canHaveChildren() const OVERRIDE { return false; } 58 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL { }59 58 60 59 virtual VisiblePosition positionForPoint(const LayoutPoint&) OVERRIDE; -
trunk/Source/WebCore/rendering/RenderObject.cpp
r156952 r156954 1239 1239 } 1240 1240 1241 void RenderObject::paint(PaintInfo&, const LayoutPoint&) 1242 { 1243 } 1244 1241 1245 RenderLayerModelObject* RenderObject::containerForRepaint() const 1242 1246 { -
trunk/Source/WebCore/rendering/RenderObject.h
r156952 r156954 653 653 void setHasTransform(bool b = true) { m_bitfields.setHasTransform(b); } 654 654 void setHasReflection(bool b = true) { m_bitfields.setHasReflection(b); } 655 656 virtual void paint(PaintInfo&, const LayoutPoint&); 655 657 656 658 // Recursive function that computes the size and position of this object and all its descendants. -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r156952 r156954 130 130 return; 131 131 132 if (!paintInfo.shouldPaintWithinRoot( *this))132 if (!paintInfo.shouldPaintWithinRoot(this)) 133 133 return; 134 134 … … 177 177 return false; 178 178 179 if (!paintInfo.shouldPaintWithinRoot( *this))179 if (!paintInfo.shouldPaintWithinRoot(this)) 180 180 return false; 181 181 -
trunk/Source/WebCore/rendering/RenderTable.cpp
r156952 r156954 652 652 653 653 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); 660 657 } 661 658 } … … 701 698 void RenderTable::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 702 699 { 703 if (!paintInfo.shouldPaintWithinRoot( *this))700 if (!paintInfo.shouldPaintWithinRoot(this)) 704 701 return; 705 702 -
trunk/Source/WebCore/rendering/RenderTableCell.cpp
r156952 r156954 1157 1157 ASSERT(paintInfo.phase == PaintPhaseCollapsedTableBorders); 1158 1158 1159 if (!paintInfo.shouldPaintWithinRoot( *this) || style()->visibility() != VISIBLE)1159 if (!paintInfo.shouldPaintWithinRoot(this) || style()->visibility() != VISIBLE) 1160 1160 return; 1161 1161 … … 1267 1267 void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, const LayoutPoint& paintOffset, RenderElement* backgroundObject) 1268 1268 { 1269 if (!paintInfo.shouldPaintWithinRoot( *this))1269 if (!paintInfo.shouldPaintWithinRoot(this)) 1270 1270 return; 1271 1271 … … 1303 1303 void RenderTableCell::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 1304 1304 { 1305 if (!paintInfo.shouldPaintWithinRoot( *this))1305 if (!paintInfo.shouldPaintWithinRoot(this)) 1306 1306 return; 1307 1307 -
trunk/Source/WebCore/rendering/RenderTableCol.h
r156952 r156954 89 89 90 90 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OVERRIDE; 91 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE { }92 91 93 92 RenderTable* table() const; -
trunk/Source/WebCore/rendering/RenderText.h
r156952 r156954 172 172 virtual unsigned length() const OVERRIDE FINAL { return textLength(); } 173 173 174 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL { ASSERT_NOT_REACHED(); } 174 175 virtual void layout() OVERRIDE FINAL { ASSERT_NOT_REACHED(); } 175 176 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 439 439 440 440 // 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)) 442 442 paintInfo.context->fillRect(paintInfo.rect, frameView().baseBackgroundColor(), ColorSpaceDeviceRGB); 443 443 … … 473 473 void RenderView::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint&) 474 474 { 475 if (!paintInfo.shouldPaintWithinRoot( *this))475 if (!paintInfo.shouldPaintWithinRoot(this)) 476 476 return; 477 477 -
trunk/Source/WebCore/rendering/RootInlineBox.cpp
r156952 r156954 170 170 void RootInlineBox::paintEllipsisBox(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom) const 171 171 { 172 if (hasEllipsisBox() && paintInfo.shouldPaintWithinRoot( renderer()) && renderer().style()->visibility() == VISIBLE172 if (hasEllipsisBox() && paintInfo.shouldPaintWithinRoot(&renderer()) && renderer().style()->visibility() == VISIBLE 173 173 && paintInfo.phase == PaintPhaseForeground) 174 174 ellipsisBox()->paint(paintInfo, paintOffset, lineTop, lineBottom); … … 191 191 void RootInlineBox::paintCustomHighlight(PaintInfo& paintInfo, const LayoutPoint& paintOffset, const AtomicString& highlightType) 192 192 { 193 if (!paintInfo.shouldPaintWithinRoot( renderer()) || renderer().style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseForeground)193 if (!paintInfo.shouldPaintWithinRoot(&renderer()) || renderer().style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseForeground) 194 194 return; 195 195 -
trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp
r156952 r156954 140 140 if (continueRendering) { 141 141 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()); 147 144 } 148 145 } -
trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.h
r156952 r156954 55 55 private: 56 56 virtual bool canHaveChildren() const OVERRIDE { return false; } 57 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL { }58 57 59 58 SVGGradientElement* gradientElement() const; -
trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp
r156952 r156954 27 27 28 28 #include "AffineTransform.h" 29 #include "ElementIterator.h"30 29 #include "FloatRect.h" 31 30 #include "Frame.h" … … 222 221 223 222 // 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) 229 226 continue; 230 227 if (renderer->needsLayout()) { … … 237 234 238 235 WindRule newClipRule = style->svgStyle()->clipRule(); 239 bool isUseElement = child .hasTagName(SVGNames::useTag);236 bool isUseElement = childNode->hasTagName(SVGNames::useTag); 240 237 if (isUseElement) { 241 SVGUseElement & useElement = toSVGUseElement(child);242 renderer = useElement .rendererClipChild();238 SVGUseElement* useElement = toSVGUseElement(childNode); 239 renderer = useElement->rendererClipChild(); 243 240 if (!renderer) 244 241 continue; 245 if (!useElement .hasAttribute(SVGNames::clip_ruleAttr))242 if (!useElement->hasAttribute(SVGNames::clip_ruleAttr)) 246 243 newClipRule = renderer->style()->svgStyle()->clipRule(); 247 244 } … … 256 253 // We have to pass the <use> renderer itself to renderSubtreeToImageBuffer() to apply it's x/y/transform/etc. values when rendering. 257 254 // 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); 259 256 } 260 257 -
trunk/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp
r156952 r156954 25 25 #include "AffineTransform.h" 26 26 #include "Element.h" 27 #include "ElementIterator.h"28 27 #include "FloatPoint.h" 29 28 #include "FloatRect.h" … … 120 119 121 120 // 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) 127 124 continue; 128 125 if (renderer->needsLayout()) … … 131 128 if (!style || style->display() == NONE || style->visibility() != VISIBLE) 132 129 continue; 133 SVGRenderingContext::renderSubtreeToImageBuffer(maskerData->maskImage.get(), *renderer, maskContentTransformation);130 SVGRenderingContext::renderSubtreeToImageBuffer(maskerData->maskImage.get(), renderer, maskContentTransformation); 134 131 } 135 132 -
trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp
r156952 r156954 24 24 #include "RenderSVGResourcePattern.h" 25 25 26 #include "ElementIterator.h"27 26 #include "FrameView.h" 28 27 #include "GraphicsContext.h" … … 273 272 274 273 // 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()) 280 276 continue; 281 if ( renderer->needsLayout())277 if (node->renderer()->needsLayout()) 282 278 return nullptr; 283 SVGRenderingContext::renderSubtreeToImageBuffer(tileImage.get(), *renderer, contentTransformation);279 SVGRenderingContext::renderSubtreeToImageBuffer(tileImage.get(), node->renderer(), contentTransformation); 284 280 } 285 281 -
trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp
r156952 r156954 292 292 } 293 293 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()); 303 296 } 304 297 -
trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
r156952 r156954 178 178 void SVGInlineTextBox::paintSelectionBackground(PaintInfo& paintInfo) 179 179 { 180 ASSERT(paintInfo.shouldPaintWithinRoot( renderer()));180 ASSERT(paintInfo.shouldPaintWithinRoot(&renderer())); 181 181 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection); 182 182 ASSERT(truncation() == cNoTruncation); … … 243 243 void SVGInlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint&, LayoutUnit, LayoutUnit) 244 244 { 245 ASSERT(paintInfo.shouldPaintWithinRoot( renderer()));245 ASSERT(paintInfo.shouldPaintWithinRoot(&renderer())); 246 246 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection); 247 247 ASSERT(truncation() == cNoTruncation); -
trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp
r156952 r156954 275 275 } 276 276 277 void SVGRenderingContext::renderSubtreeToImageBuffer(ImageBuffer* image, RenderElement& item, const AffineTransform& subtreeContentTransformation) 278 { 277 void SVGRenderingContext::renderSubtreeToImageBuffer(ImageBuffer* image, RenderObject* item, const AffineTransform& subtreeContentTransformation) 278 { 279 ASSERT(item); 279 280 ASSERT(image); 280 281 ASSERT(image->context()); … … 286 287 contentTransformation = subtreeContentTransformation * contentTransformation; 287 288 288 ASSERT(!item .needsLayout());289 item .paint(info, IntPoint());289 ASSERT(!item->needsLayout()); 290 item->paint(info, IntPoint()); 290 291 291 292 contentTransformation = savedContentTransformation; -
trunk/Source/WebCore/rendering/svg/SVGRenderingContext.h
r156952 r156954 33 33 34 34 class AffineTransform; 35 class RenderElement;36 35 class RenderObject; 37 36 class FloatRect; … … 81 80 static bool createImageBufferForPattern(const FloatRect& absoluteTargetRect, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>&, ColorSpace, RenderingMode); 82 81 83 static void renderSubtreeToImageBuffer(ImageBuffer*, Render Element&, const AffineTransform&);82 static void renderSubtreeToImageBuffer(ImageBuffer*, RenderObject*, const AffineTransform&); 84 83 static void clipToImageBuffer(GraphicsContext*, const AffineTransform& absoluteTransform, const FloatRect& targetRect, OwnPtr<ImageBuffer>&, bool safeToClear); 85 84 -
trunk/Source/WebCore/svg/SVGUseElement.cpp
r156952 r156954 571 571 } 572 572 573 Render Element* SVGUseElement::rendererClipChild() const573 RenderObject* SVGUseElement::rendererClipChild() const 574 574 { 575 575 Node* n = m_targetElementInstance ? m_targetElementInstance->shadowTreeElement() : 0; -
trunk/Source/WebCore/svg/SVGUseElement.h
r156952 r156954 52 52 void invalidateDependentShadowTrees(); 53 53 54 Render Element* rendererClipChild() const;54 RenderObject* rendererClipChild() const; 55 55 56 56 private: -
trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp
r156952 r156954 97 97 void FEImage::platformApplySoftware() 98 98 { 99 Render Element* renderer = referencedRenderer();99 RenderObject* renderer = referencedRenderer(); 100 100 if (!m_image && !renderer) 101 101 return; … … 126 126 resultImage->context()->concatCTM(absoluteTransform); 127 127 128 SVGElement* contextNode = toSVGElement(renderer-> element());128 SVGElement* contextNode = toSVGElement(renderer->node()); 129 129 if (contextNode->hasRelativeLengths()) { 130 130 SVGLengthContext lengthContext(contextNode); … … 139 139 140 140 AffineTransform contentTransformation; 141 SVGRenderingContext::renderSubtreeToImageBuffer(resultImage, *renderer, contentTransformation);141 SVGRenderingContext::renderSubtreeToImageBuffer(resultImage, renderer, contentTransformation); 142 142 return; 143 143 }
Note: See TracChangeset
for help on using the changeset viewer.