The following two canvas tests are failing because we do not check for collinearity of the points when arcTo is called. canvas/philip/tests/2d.path.arcTo.collinear.2.html canvas/philip/tests/2d.path.arcTo.collinear.3.html
Created attachment 82798 [details] Add collinearity check This patch adds a collinearity check that checks if the three points used to draw an arc through arcTo method are positioned in a line. Check is performed by calculating the area of the triangle that the three points construct - if the area equals zero, the lines are collinear.
Comment on attachment 82798 [details] Add collinearity check View in context: https://bugs.webkit.org/attachment.cgi?id=82798&action=review This is great! We want to make the if statement a little clearer below. > Source/WebCore/platform/graphics/cairo/PathCairo.cpp:187 > + || !(p0.x() * (p1.y() - p2.y()) + p1.x() * (p2.y() - p0.y()) + p2.x() * (p0.y() - p1.y()))) { Please split out the area calculation to a static inline method called something like areaOfTriangleFormedByPoints.
Created attachment 82974 [details] Updated patch Creates new function for calculating area of a triangle, clears up the checking statement.
Comment on attachment 82974 [details] Updated patch OK. rs=me.
CCing folks who understand graphics better than I so they can see this go by.
Comment on attachment 82974 [details] Updated patch Clearing flags on attachment: 82974 Committed r79541: <http://trac.webkit.org/changeset/79541>
All reviewed patches have been landed. Closing bug.