Bug 42186 - Failing 2d.path.arcTo.ensuresubpath.* philip canvas tests
Summary: Failing 2d.path.arcTo.ensuresubpath.* philip canvas tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.6
: P2 Normal
Assignee: Matthew Delaney
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-13 13:22 PDT by Matthew Delaney
Modified: 2010-07-16 21:54 PDT (History)
4 users (show)

See Also:


Attachments
Proposed patch (3.85 KB, patch)
2010-07-16 20:54 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff
Proposed patch v2 (3.86 KB, patch)
2010-07-16 21:09 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Delaney 2010-07-13 13:22:24 PDT
2d.path.arcTo.ensuresubpath.2
Comment 1 Andreas Kling 2010-07-16 20:48:38 PDT
2d.path.arcTo.ensuresubpath.1 is also skipped on Mac.
Comment 2 Andreas Kling 2010-07-16 20:54:44 PDT
Created attachment 61872 [details]
Proposed patch
Comment 3 Andreas Kling 2010-07-16 21:09:22 PDT
Created attachment 61873 [details]
Proposed patch v2

Missed the fact that Path::isEmpty() and !Path::hasCurrentPoint() mean different things.
Comment 4 Sam Weinig 2010-07-16 21:25:28 PDT
(In reply to comment #3)
> Created an attachment (id=61873) [details]
> Proposed patch v2
> 
> Missed the fact that Path::isEmpty() and !Path::hasCurrentPoint() mean different things.

In the CG code path at least, Path::isEmpty() == !Path::hasCurrentPoint() I think.  On what platforms do these differ and how?
Comment 5 Andreas Kling 2010-07-16 21:35:22 PDT
From Path.h:

    // Gets the current point of the current path, which is conceptually the final point reached by the path so far.
    // Note the Path can be empty (isEmpty() == true) and still have a current point.

Most Path implementations have Path::isEmpty() == !Path::hasCurrentPoint(), only Skia and OpenVG differ.

PathSkia.cpp:
=============

bool Path::isEmpty() const
{
    return m_path->isEmpty();
}

bool Path::hasCurrentPoint() const
{
    return m_path->getPoints(NULL, 0) != 0;
}

PathOpenVG.cpp:
===============

bool Path::isEmpty() const
{
    m_path->makeCompatibleContextCurrent();
    return !vgGetParameteri(m_path->vgPath(), VG_PATH_NUM_SEGMENTS);
}

bool Path::hasCurrentPoint() const
{
    m_path->makeCompatibleContextCurrent();
    return vgGetParameteri(m_path->vgPath(), VG_PATH_NUM_SEGMENTS) > 0;
}
Comment 6 WebKit Commit Bot 2010-07-16 21:53:59 PDT
Comment on attachment 61873 [details]
Proposed patch v2

Clearing flags on attachment: 61873

Committed r63607: <http://trac.webkit.org/changeset/63607>
Comment 7 WebKit Commit Bot 2010-07-16 21:54:03 PDT
All reviewed patches have been landed.  Closing bug.