Bug 123286 - SVG: applyResource() should take a RenderElement&.
Summary: SVG: applyResource() should take a RenderElement&.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-24 12:45 PDT by Andreas Kling
Modified: 2013-10-25 05:26 PDT (History)
13 users (show)

See Also:


Attachments
Patch (34.15 KB, patch)
2013-10-24 12:46 PDT, Andreas Kling
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>