Changeset 156952 in webkit
- Timestamp:
- Oct 5, 2013 4:58:30 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r156950 r156952 1 2013-10-04 Antti Koivisto <antti@apple.com> 2 3 Move paint() to RenderElement 4 https://bugs.webkit.org/show_bug.cgi?id=122371 5 6 Reviewed by Darin Adler. 7 8 RenderText does not paint itself (text is painted by line boxes). We can move paint() down 9 to RenderElement. 10 11 This also requires some type tightening elsewhere in the code. 12 1 13 2013-10-04 Ryosuke Niwa <rniwa@webkit.org> 2 14 -
trunk/Source/WebCore/rendering/InlineBox.cpp
r156608 r156952 227 227 void InlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/) 228 228 { 229 if (!paintInfo.shouldPaintWithinRoot(&renderer()) || (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection)) 229 RenderElement& renderer = toRenderElement(this->renderer()); 230 if (!paintInfo.shouldPaintWithinRoot(renderer) || (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection)) 230 231 return; 231 232 232 233 LayoutPoint childPoint = paintOffset; 233 if (parent()->renderer().style()->isFlippedBlocksWritingMode() && renderer ().isBox()) // Faster than calling containingBlock().234 childPoint = m_renderer.containingBlock()->flipForWritingModeForChild(&toRenderBox(renderer ()), childPoint);234 if (parent()->renderer().style()->isFlippedBlocksWritingMode() && renderer.isBox()) // Faster than calling containingBlock(). 235 childPoint = m_renderer.containingBlock()->flipForWritingModeForChild(&toRenderBox(renderer), childPoint); 235 236 236 237 // Paint all phases of replaced elements atomically, as though the replaced element established its … … 240 241 PaintInfo info(paintInfo); 241 242 info.phase = preservePhase ? paintInfo.phase : PaintPhaseBlockBackground; 242 m_renderer.paint(info, childPoint);243 renderer.paint(info, childPoint); 243 244 if (!preservePhase) { 244 245 info.phase = PaintPhaseChildBlockBackgrounds; 245 m_renderer.paint(info, childPoint);246 renderer.paint(info, childPoint); 246 247 info.phase = PaintPhaseFloat; 247 m_renderer.paint(info, childPoint);248 renderer.paint(info, childPoint); 248 249 info.phase = PaintPhaseForeground; 249 m_renderer.paint(info, childPoint);250 renderer.paint(info, childPoint); 250 251 info.phase = PaintPhaseOutline; 251 m_renderer.paint(info, childPoint);252 renderer.paint(info, childPoint); 252 253 } 253 254 } -
trunk/Source/WebCore/rendering/InlineBox.h
r156682 r156952 182 182 InlineBox* prevLeafChildIgnoringLineBreak() const; 183 183 184 // FIXME: There should be a subclass that returns RenderElement. Plain InlineBox shouldn't be instantiated. 184 185 RenderObject& renderer() const { return m_renderer; } 185 186 -
trunk/Source/WebCore/rendering/InlineFlowBox.cpp
r156618 r156952 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
r156613 r156952 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() != 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) 523 523 return; 524 524 -
trunk/Source/WebCore/rendering/PaintInfo.h
r156622 r156952 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
r156876 r156952 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
r156905 r156952 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 children1101 PaintInfo childInfo(paintInfo);1102 childInfo.updateSubtreePaintRootForChildren(this);1103 for (RenderObject* child = firstChild(); child; child = child->nextSibling())1104 child->paint(childInfo, adjustedPaintOffset);1105 }1106 1107 1097 void RenderBox::paintRootBoxFillLayers(const PaintInfo& paintInfo) 1108 1098 { … … 1155 1145 void RenderBox::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 1156 1146 { 1157 if (!paintInfo.shouldPaintWithinRoot( this))1147 if (!paintInfo.shouldPaintWithinRoot(*this)) 1158 1148 return; 1159 1149 … … 1376 1366 void RenderBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 1377 1367 { 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()) 1379 1369 return; 1380 1370 -
trunk/Source/WebCore/rendering/RenderBox.h
r156905 r156952 298 298 299 299 virtual void layout(); 300 virtual void paint(PaintInfo&, const LayoutPoint&);301 300 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE; 302 301 -
trunk/Source/WebCore/rendering/RenderElement.h
r156876 r156952 88 88 void setNeedsSimplifiedNormalFlowLayout(); 89 89 90 virtual void paint(PaintInfo&, const LayoutPoint&) = 0; 91 90 92 // 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. 91 93 RenderElement* rendererForRootBackground(); -
trunk/Source/WebCore/rendering/RenderFieldset.cpp
r156876 r156952 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
r156876 r156952 141 141 LayoutUnit xPos = 0; 142 142 for (size_t c = 0; c < cols; c++) { 143 child->paint(paintInfo, adjustedPaintOffset);143 toRenderElement(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
r156278 r156952 56 56 57 57 virtual bool canHaveChildren() const OVERRIDE { return false; } 58 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL { } 58 59 59 60 virtual VisiblePosition positionForPoint(const LayoutPoint&) OVERRIDE; -
trunk/Source/WebCore/rendering/RenderObject.cpp
r156904 r156952 1239 1239 } 1240 1240 1241 void RenderObject::paint(PaintInfo&, const LayoutPoint&)1242 {1243 }1244 1245 1241 RenderLayerModelObject* RenderObject::containerForRepaint() const 1246 1242 { -
trunk/Source/WebCore/rendering/RenderObject.h
r156904 r156952 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&);657 655 658 656 // Recursive function that computes the size and position of this object and all its descendants. -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r156876 r156952 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
r156876 r156952 652 652 653 653 for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { 654 if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || child->isTableCaption())) { 655 LayoutPoint childPoint = flipForWritingModeForChild(toRenderBox(child), paintOffset); 656 child->paint(info, childPoint); 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); 657 660 } 658 661 } … … 698 701 void RenderTable::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 699 702 { 700 if (!paintInfo.shouldPaintWithinRoot( this))703 if (!paintInfo.shouldPaintWithinRoot(*this)) 701 704 return; 702 705 -
trunk/Source/WebCore/rendering/RenderTableCell.cpp
r156876 r156952 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
r156278 r156952 89 89 90 90 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OVERRIDE; 91 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE { } 91 92 92 93 RenderTable* table() const; -
trunk/Source/WebCore/rendering/RenderText.h
r156657 r156952 172 172 virtual unsigned length() const OVERRIDE FINAL { return textLength(); } 173 173 174 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL { ASSERT_NOT_REACHED(); }175 174 virtual void layout() OVERRIDE FINAL { ASSERT_NOT_REACHED(); } 176 175 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation&, const LayoutPoint&, HitTestAction) OVERRIDE FINAL { ASSERT_NOT_REACHED(); return false; } -
trunk/Source/WebCore/rendering/RenderView.cpp
r156876 r156952 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
r156608 r156952 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
r156876 r156952 140 140 if (continueRendering) { 141 141 childPaintInfo.updateSubtreePaintRootForChildren(this); 142 for (RenderObject* child = firstChild(); child; child = child->nextSibling()) 143 child->paint(childPaintInfo, IntPoint()); 142 for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { 143 if (!child->isRenderElement()) 144 continue; 145 toRenderElement(child)->paint(childPaintInfo, IntPoint()); 146 } 144 147 } 145 148 } -
trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.h
r156278 r156952 55 55 private: 56 56 virtual bool canHaveChildren() const OVERRIDE { return false; } 57 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL { } 57 58 58 59 SVGGradientElement* gradientElement() const; -
trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp
r155755 r156952 27 27 28 28 #include "AffineTransform.h" 29 #include "ElementIterator.h" 29 30 #include "FloatRect.h" 30 31 #include "Frame.h" … … 221 222 222 223 // Draw all clipPath children into a global mask. 223 for (Node* childNode = clipPathElement().firstChild(); childNode; childNode = childNode->nextSibling()) { 224 RenderObject* renderer = childNode->renderer(); 225 if (!childNode->isSVGElement() || !renderer) 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) 226 229 continue; 227 230 if (renderer->needsLayout()) { … … 234 237 235 238 WindRule newClipRule = style->svgStyle()->clipRule(); 236 bool isUseElement = child Node->hasTagName(SVGNames::useTag);239 bool isUseElement = child.hasTagName(SVGNames::useTag); 237 240 if (isUseElement) { 238 SVGUseElement * useElement = toSVGUseElement(childNode);239 renderer = useElement ->rendererClipChild();241 SVGUseElement& useElement = toSVGUseElement(child); 242 renderer = useElement.rendererClipChild(); 240 243 if (!renderer) 241 244 continue; 242 if (!useElement ->hasAttribute(SVGNames::clip_ruleAttr))245 if (!useElement.hasAttribute(SVGNames::clip_ruleAttr)) 243 246 newClipRule = renderer->style()->svgStyle()->clipRule(); 244 247 } … … 253 256 // We have to pass the <use> renderer itself to renderSubtreeToImageBuffer() to apply it's x/y/transform/etc. values when rendering. 254 257 // So if isUseElement is true, refetch the childNode->renderer(), as renderer got overriden above. 255 SVGRenderingContext::renderSubtreeToImageBuffer(clipperData->clipMaskImage.get(), isUseElement ? childNode->renderer() :renderer, maskContentTransformation);258 SVGRenderingContext::renderSubtreeToImageBuffer(clipperData->clipMaskImage.get(), isUseElement ? *child.renderer() : *renderer, maskContentTransformation); 256 259 } 257 260 -
trunk/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp
r155755 r156952 25 25 #include "AffineTransform.h" 26 26 #include "Element.h" 27 #include "ElementIterator.h" 27 28 #include "FloatPoint.h" 28 29 #include "FloatRect.h" … … 119 120 120 121 // Draw the content into the ImageBuffer. 121 for (Node* node = maskElement().firstChild(); node; node = node->nextSibling()) { 122 RenderObject* renderer = node->renderer(); 123 if (!node->isSVGElement() || !renderer) 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) 124 127 continue; 125 128 if (renderer->needsLayout()) … … 128 131 if (!style || style->display() == NONE || style->visibility() != VISIBLE) 129 132 continue; 130 SVGRenderingContext::renderSubtreeToImageBuffer(maskerData->maskImage.get(), renderer, maskContentTransformation);133 SVGRenderingContext::renderSubtreeToImageBuffer(maskerData->maskImage.get(), *renderer, maskContentTransformation); 131 134 } 132 135 -
trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp
r155755 r156952 24 24 #include "RenderSVGResourcePattern.h" 25 25 26 #include "ElementIterator.h" 26 27 #include "FrameView.h" 27 28 #include "GraphicsContext.h" … … 272 273 273 274 // Draw the content into the ImageBuffer. 274 for (Node* node = attributes.patternContentElement()->firstChild(); node; node = node->nextSibling()) { 275 if (!node->isSVGElement() || !node->renderer()) 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) 276 280 continue; 277 if ( node->renderer()->needsLayout())281 if (renderer->needsLayout()) 278 282 return nullptr; 279 SVGRenderingContext::renderSubtreeToImageBuffer(tileImage.get(), node->renderer(), contentTransformation);283 SVGRenderingContext::renderSubtreeToImageBuffer(tileImage.get(), *renderer, contentTransformation); 280 284 } 281 285 -
trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp
r156876 r156952 292 292 } 293 293 294 if (continueRendering) 295 RenderBox::paint(childPaintInfo, LayoutPoint()); 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 } 296 303 } 297 304 -
trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
r156094 r156952 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
r154856 r156952 275 275 } 276 276 277 void SVGRenderingContext::renderSubtreeToImageBuffer(ImageBuffer* image, RenderObject* item, const AffineTransform& subtreeContentTransformation) 278 { 279 ASSERT(item); 277 void SVGRenderingContext::renderSubtreeToImageBuffer(ImageBuffer* image, RenderElement& item, const AffineTransform& subtreeContentTransformation) 278 { 280 279 ASSERT(image); 281 280 ASSERT(image->context()); … … 287 286 contentTransformation = subtreeContentTransformation * contentTransformation; 288 287 289 ASSERT(!item ->needsLayout());290 item ->paint(info, IntPoint());288 ASSERT(!item.needsLayout()); 289 item.paint(info, IntPoint()); 291 290 292 291 contentTransformation = savedContentTransformation; -
trunk/Source/WebCore/rendering/svg/SVGRenderingContext.h
r147348 r156952 33 33 34 34 class AffineTransform; 35 class RenderElement; 35 36 class RenderObject; 36 37 class FloatRect; … … 80 81 static bool createImageBufferForPattern(const FloatRect& absoluteTargetRect, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>&, ColorSpace, RenderingMode); 81 82 82 static void renderSubtreeToImageBuffer(ImageBuffer*, Render Object*, const AffineTransform&);83 static void renderSubtreeToImageBuffer(ImageBuffer*, RenderElement&, const AffineTransform&); 83 84 static void clipToImageBuffer(GraphicsContext*, const AffineTransform& absoluteTransform, const FloatRect& targetRect, OwnPtr<ImageBuffer>&, bool safeToClear); 84 85 -
trunk/Source/WebCore/svg/SVGUseElement.cpp
r156903 r156952 571 571 } 572 572 573 Render Object* SVGUseElement::rendererClipChild() const573 RenderElement* SVGUseElement::rendererClipChild() const 574 574 { 575 575 Node* n = m_targetElementInstance ? m_targetElementInstance->shadowTreeElement() : 0; -
trunk/Source/WebCore/svg/SVGUseElement.h
r156903 r156952 52 52 void invalidateDependentShadowTrees(); 53 53 54 Render Object* rendererClipChild() const;54 RenderElement* rendererClipChild() const; 55 55 56 56 private: -
trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp
r156408 r156952 97 97 void FEImage::platformApplySoftware() 98 98 { 99 Render Object* renderer = referencedRenderer();99 RenderElement* renderer = referencedRenderer(); 100 100 if (!m_image && !renderer) 101 101 return; … … 126 126 resultImage->context()->concatCTM(absoluteTransform); 127 127 128 SVGElement* contextNode = toSVGElement(renderer-> node());128 SVGElement* contextNode = toSVGElement(renderer->element()); 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.