2010-08-16 Andreas Kling <andreas.kling@nokia.com>
authorandreas.kling <andreas.kling@nokia.com>
Tue, 17 Aug 2010 00:41:17 +0000 (00:41 +0000)
committerSimon Hausmann <simon.hausmann@nokia.com>
Tue, 24 Aug 2010 10:05:33 +0000 (12:05 +0200)
commitc2aaec160209c180b6bf0ef9c14e706adf841498
tree4ec868a5f329f6a35e714324c214f9668a9f787f
parent44aad6b289443c0ed151f8b31dedf01986af1b35
2010-08-16  Andreas Kling  <andreas.kling@nokia.com>

        Reviewed by Ariya Hidayat.

        [Qt] Path::closeSubpath() should only close the last subpath if it has >1 point
        https://bugs.webkit.org/show_bug.cgi?id=44061

        Spec link:
        http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-closepath

        Test: fast/canvas/canvas-closePath-single-point.html

        * platform/graphics/Path.h: Add a Qt-only member to track the last subpath.
        * platform/graphics/qt/PathQt.cpp:
        (WebCore::Path::closeSubpath): Only close the last subpath if it
        has more than 1 point. Otherwise behave as moveTo(first point in last subpath)
        (WebCore::Path::Path):
        (WebCore::Path::operator=):
        (WebCore::Path::moveTo):
        (WebCore::Path::transform):
2010-08-16  Andreas Kling  <andreas.kling@nokia.com>

        Reviewed by Ariya Hidayat.

        [Qt] Path::closeSubpath() should only close the last subpath if it has >1 point
        https://bugs.webkit.org/show_bug.cgi?id=44061

        Add a test to verify behavior of closePath() when path has only 1 point.

        * fast/canvas/canvas-closePath-single-point-expected.txt: Added.
        * fast/canvas/canvas-closePath-single-point.html: Added.
        * fast/canvas/script-tests/canvas-closePath-single-point.js: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/canvas/canvas-closePath-single-point-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-closePath-single-point.html [new file with mode: 0644]
LayoutTests/fast/canvas/script-tests/canvas-closePath-single-point.js [new file with mode: 0644]
WebCore/ChangeLog
WebCore/platform/graphics/Path.h
WebCore/platform/graphics/qt/PathQt.cpp