Changeset 66948 in webkit


Ignore:
Timestamp:
Sep 7, 2010 9:02:55 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-09-07 Jan E Hanssen <jhanssen@sencha.com>

Reviewed by Andreas Kling.

[Qt] Added test case for Path::length()
https://bugs.webkit.org/show_bug.cgi?id=45331

Also removed test case for Path::pointAtLength() that is now passing

  • platform/qt/svg/dom/path-pointAtLength-expected.txt: Removed.
  • svg/dom/path-totalLength-expected.txt: Added.
  • svg/dom/path-totalLength.html: Added.
  • svg/dom/script-tests/path-totalLength.js: Added. (getTotalLength):

2010-09-07 Jan E Hanssen <jhanssen@sencha.com>

Reviewed by Andreas Kling.

[Qt] Add a separate Path::closeCanvasSubpath() function for canvas paths
https://bugs.webkit.org/show_bug.cgi?id=45331

This is needed due to an adverse effect of the fix in 44061 that causes
certain paths not to be closed. This is not important for canvas paths
but it is for SVG paths, so splitting up the code in a generic (SVG)
case and one specialized for canvas.

Test: svg/dom/path-totalLength.html

  • html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::closePath):
  • platform/graphics/Path.h: (WebCore::Path::closeCanvasSubpath):
  • platform/graphics/qt/PathQt.cpp: (WebCore::Path::closeSubpath): (WebCore::Path::closeCanvasSubpath):
Location:
trunk
Files:
3 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r66944 r66948  
     12010-09-07  Jan E Hanssen  <jhanssen@sencha.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] Added test case for Path::length()
     6        https://bugs.webkit.org/show_bug.cgi?id=45331
     7
     8        Also removed test case for Path::pointAtLength() that is now passing
     9
     10        * platform/qt/svg/dom/path-pointAtLength-expected.txt: Removed.
     11        * svg/dom/path-totalLength-expected.txt: Added.
     12        * svg/dom/path-totalLength.html: Added.
     13        * svg/dom/script-tests/path-totalLength.js: Added.
     14        (getTotalLength):
     15
    1162010-09-07  Ojan Vafai  <ojan@chromium.org>
    217
  • trunk/WebCore/ChangeLog

    r66942 r66948  
     12010-09-07  Jan E Hanssen  <jhanssen@sencha.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] Add a separate Path::closeCanvasSubpath() function for canvas paths
     6        https://bugs.webkit.org/show_bug.cgi?id=45331
     7
     8        This is needed due to an adverse effect of the fix in 44061 that causes
     9        certain paths not to be closed. This is not important for canvas paths
     10        but it is for SVG paths, so splitting up the code in a generic (SVG)
     11        case and one specialized for canvas.
     12
     13        Test: svg/dom/path-totalLength.html
     14
     15        * html/canvas/CanvasRenderingContext2D.cpp:
     16        (WebCore::CanvasRenderingContext2D::closePath):
     17        * platform/graphics/Path.h:
     18        (WebCore::Path::closeCanvasSubpath):
     19        * platform/graphics/qt/PathQt.cpp:
     20        (WebCore::Path::closeSubpath):
     21        (WebCore::Path::closeCanvasSubpath):
     22
    1232010-09-07  Simon Fraser  <simon.fraser@apple.com>
    224
  • trunk/WebCore/html/canvas/CanvasRenderingContext2D.cpp

    r66785 r66948  
    660660    FloatRect boundRect = m_path.boundingRect();
    661661    if (boundRect.width() || boundRect.height())
    662         m_path.closeSubpath();
     662        m_path.closeCanvasSubpath();
    663663}
    664664
  • trunk/WebCore/platform/graphics/Path.h

    r65472 r66948  
    134134        void addArcTo(const FloatPoint&, const FloatPoint&, float radius);
    135135        void closeSubpath();
     136#if PLATFORM(QT)
     137        void closeCanvasSubpath();
     138#else
     139        void closeCanvasSubpath() { closeSubpath(); }
     140#endif
    136141
    137142        void addArc(const FloatPoint&, float radius, float startAngle, float endAngle, bool anticlockwise);
  • trunk/WebCore/platform/graphics/qt/PathQt.cpp

    r65472 r66948  
    265265void Path::closeSubpath()
    266266{
     267    m_path.closeSubpath();
     268}
     269
     270void Path::closeCanvasSubpath()
     271{
    267272    const int elementCount = m_path.elementCount();
    268273
Note: See TracChangeset for help on using the changeset viewer.