Bug 123286

Summary: SVG: applyResource() should take a RenderElement&.
Product: WebKit Reporter: Andreas Kling <kling>
Component: SVGAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dino, d-r, esprehn+autocc, fmalita, glenn, gyuyoung.kim, kling, kondapallykalyan, pdr, schenney, simon.fraser, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch koivisto: review+

Description Andreas Kling 2013-10-24 12:45:44 PDT
Tightening show goes on.
Comment 1 Andreas Kling 2013-10-24 12:46:39 PDT
Created attachment 215096 [details]
Patch
Comment 2 Darin Adler 2013-10-24 12:49:51 PDT
Comment on attachment 215096 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=215096&action=review

> Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp:58
> -static inline RenderObject* firstParentRendererForNonTextNode(RenderObject* renderer)
> +static inline RenderElement* firstParentRendererForNonTextNode(RenderObject* renderer)
>  {
>      ASSERT(renderer);

ASSERT(renderer) is usually a clue that the argument should be a reference, not a pointer.

> Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp:197
> +        if (activePaintingResource->applyResource(*parentRenderObject, parentRenderObjectStyle, context, resourceMode)) {

What guarantees that parentRenderObject won’t be null here?
Comment 3 Andreas Kling 2013-10-25 05:26:42 PDT
Committed r158004: <http://trac.webkit.org/changeset/158004>