2009-07-14 Dmitry Titov <dimich@chromium.org>
authorbfulgham@webkit.org <bfulgham@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jul 2009 21:28:38 +0000 (21:28 +0000)
committerbfulgham@webkit.org <bfulgham@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jul 2009 21:28:38 +0000 (21:28 +0000)
commitfe859784218f123843d507eb05a50c0fa7276d95
tree32297412a483a303a67e525bf57f570e21ac92ee
parent53effe27608b6bba1045faffeb740c663b3e8c04
2009-07-14  Dmitry Titov  <dimich@chromium.org>

        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=27266
        Add hasCurrentPoint() to WebCore::Path.
        This fixes Skia-based Chromium regression caused by the fix for
        https://bugs.webkit.org/show_bug.cgi?id=27187.
        For Skia, the new method always returns 'true', pending actual implementation.
        This means Chromium still will differ from Gecko behavior, but at least its Canvas
        will not be completely broken.

        Existing Canvas Layout Tests should pass in Chromium after this change.

        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::lineTo): insteand of Path::isEmpty() test for hasCurrentPoint().
        (WebCore::CanvasRenderingContext2D::quadraticCurveTo): ditto.
        (WebCore::CanvasRenderingContext2D::bezierCurveTo): ditto.

        * platform/graphics/Path.h:
        * platform/graphics/cairo/PathCairo.cpp:
        (WebCore::Path::hasCurrentPoint):
        * platform/graphics/cg/PathCG.cpp:
        (WebCore::Path::isEmpty):
        (WebCore::Path::hasCurrentPoint):
        * platform/graphics/qt/PathQt.cpp:
        (WebCore::Path::hasCurrentPoint):
        * platform/graphics/skia/PathSkia.cpp:
        (WebCore::Path::hasCurrentPoint):
        * platform/graphics/wx/PathWx.cpp:
        (WebCore::Path::hasCurrentPoint):
        All these files add a Path::hasCurrentPoint() for various platforms.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@45873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/html/CanvasRenderingContext2D.cpp
WebCore/platform/graphics/Path.h
WebCore/platform/graphics/cairo/PathCairo.cpp
WebCore/platform/graphics/cg/PathCG.cpp
WebCore/platform/graphics/qt/PathQt.cpp
WebCore/platform/graphics/skia/PathSkia.cpp
WebCore/platform/graphics/wx/PathWx.cpp