Bug 107324 - Asserts when textPath is used with no path
Summary: Asserts when textPath is used with no path
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Stephen Chenney
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-18 13:58 PST by Stephen Chenney
Modified: 2013-01-22 08:54 PST (History)
8 users (show)

See Also:


Attachments
Patch (3.58 KB, patch)
2013-01-18 14:42 PST, Stephen Chenney
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Chenney 2013-01-18 13:58:30 PST
We assert in SVGTextLayoutEngine when the textPath element has no path associated with it:

ASSERTION FAILED: ok
../../third_party/WebKit/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp(562) : void WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath(WebCore::SVGInlineTextBox *, WebCore::RenderSVGInlineText *, const WebCore::RenderStyle *)

Turns out that we totally fail to check for this case, which normally isn't a problem (this is not a security issue) because the text path just returns 0,0 or something for any point on the path when the path doesn't exist.

Fix imminent.
Comment 1 Stephen Chenney 2013-01-18 14:42:00 PST
Created attachment 183550 [details]
Patch
Comment 2 Eric Seidel (no email) 2013-01-18 14:48:36 PST
Comment on attachment 183550 [details]
Patch

So long as this early return leaves the rendering tree in an expected state, then this seems fine.
Comment 3 Stephen Chenney 2013-01-22 08:54:21 PST
Committed r140429: <http://trac.webkit.org/changeset/140429>