Bug 45331 - [Qt] Calling Path::closeSubpath() when the path only contains only one line or curve element does not result in the path being closed
Summary: [Qt] Calling Path::closeSubpath() when the path only contains only one line o...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: HTML5, Qt
Depends on:
Blocks:
 
Reported: 2010-09-07 15:49 PDT by Jan Erik Hanssen
Modified: 2010-09-07 21:03 PDT (History)
3 users (show)

See Also:


Attachments
Proposed patch (5.55 KB, patch)
2010-09-07 16:03 PDT, Jan Erik Hanssen
kling: review-
Details | Formatted Diff | Diff
Proposed patch v2 (6.49 KB, patch)
2010-09-07 18:24 PDT, Jan Erik Hanssen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Erik Hanssen 2010-09-07 15:49:55 PDT
Creating an SVG path such as 'M10,10 L100,100 Z' in QtWebKit does not result in the path being closed. The path will be identical to 'M10,10 L100,100' which is not correct.
Comment 1 Jan Erik Hanssen 2010-09-07 16:03:08 PDT
Created attachment 66782 [details]
Proposed patch
Comment 2 Andreas Kling 2010-09-07 16:41:21 PDT
Comment on attachment 66782 [details]
Proposed patch

> +#if PLATFORM(QT)
> +        m_path.closeCanvasSubpath();
> +#else
>          m_path.closeSubpath();
> +#endif

It's rather un-obvious why we're doing something differently on Qt here.

I think all platforms should have closeCanvasSubpath() and we'd call that from here instead.

For non-Qt ports, it could be an inline call to closeSubpath() in Path.h
Comment 3 Jan Erik Hanssen 2010-09-07 18:24:49 PDT
Created attachment 66818 [details]
Proposed patch v2
Comment 4 Andreas Kling 2010-09-07 18:29:46 PDT
Comment on attachment 66818 [details]
Proposed patch v2

r=me
Comment 5 WebKit Commit Bot 2010-09-07 21:03:23 PDT
Comment on attachment 66818 [details]
Proposed patch v2

Clearing flags on attachment: 66818

Committed r66948: <http://trac.webkit.org/changeset/66948>
Comment 6 WebKit Commit Bot 2010-09-07 21:03:28 PDT
All reviewed patches have been landed.  Closing bug.