Changeset 141500 in webkit


Ignore:
Timestamp:
Jan 31, 2013 3:51:58 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Source/WebCore: Quadratic and bezier curves with coincident endpoints rendered incorrectly
https://bugs.webkit.org/show_bug.cgi?id=105650

Patch by Youenn Fablet <youennf@gmail.com> on 2013-01-31
Reviewed by Kenneth Russell.

Tests: fast/canvas/canvas-bezier-same-endpoint.html

fast/canvas/canvas-quadratic-same-endpoint.html

  • html/canvas/CanvasPathMethods.cpp:

(WebCore::CanvasPathMethods::quadraticCurveTo):
(WebCore::CanvasPathMethods::bezierCurveTo):

LayoutTests: Quadratic and bezier curves with coincident endpoints rendered incorrectly
https://bugs.webkit.org/show_bug.cgi?id=105650
Modified TestExpectations for Mac, efl and Qt platforms as quadratic curves
may not be rendered correctly
(see https://bugs.webkit.org/show_bug.cgi?id=107118)

Patch by Youenn Fablet <youennf@gmail.com> on 2013-01-31
Reviewed by Kenneth Russell.

  • fast/canvas/canvas-bezier-same-endpoint-expected.txt: Added.
  • fast/canvas/canvas-bezier-same-endpoint.html: Added.
  • fast/canvas/canvas-quadratic-same-endpoint-expected.txt: Added.
  • fast/canvas/canvas-quadratic-same-endpoint.html: Added.
  • platform/efl/TestExpectations: Skipped quad test
  • platform/mac/TestExpectations: Skipped quad test
  • platform/qt/TestExpectations: Skipped quad test
Location:
trunk
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r141492 r141500  
     12013-01-31  Youenn Fablet  <youennf@gmail.com>
     2
     3        Quadratic and bezier curves with coincident endpoints rendered incorrectly
     4        https://bugs.webkit.org/show_bug.cgi?id=105650
     5        Modified TestExpectations for Mac, efl and Qt platforms as quadratic curves
     6        may not be rendered correctly
     7        (see https://bugs.webkit.org/show_bug.cgi?id=107118)
     8
     9        Reviewed by Kenneth Russell.
     10
     11        * fast/canvas/canvas-bezier-same-endpoint-expected.txt: Added.
     12        * fast/canvas/canvas-bezier-same-endpoint.html: Added.
     13        * fast/canvas/canvas-quadratic-same-endpoint-expected.txt: Added.
     14        * fast/canvas/canvas-quadratic-same-endpoint.html: Added.
     15        * platform/efl/TestExpectations: Skipped quad test
     16        * platform/mac/TestExpectations: Skipped quad test
     17        * platform/qt/TestExpectations: Skipped quad test
     18
    1192013-01-31  Uday Kiran  <udaykiran@motorola.com>
    220
  • trunk/LayoutTests/platform/efl/TestExpectations

    r141456 r141500  
    212212# Flaky tests (text diff mismatch)
    213213http/tests/navigation/document-location-mouseover.html
     214
     215# https://bugs.webkit.org/show_bug.cgi?id=107118
     216fast/canvas/canvas-quadratic-same-endpoint.html
    214217
    215218# ------------------------------------
  • trunk/LayoutTests/platform/mac/TestExpectations

    r141469 r141500  
    936936canvas/philip/tests/2d.strokeRect.zero.4.html
    937937
     938# https://bugs.webkit.org/show_bug.cgi?id=107118
     939fast/canvas/canvas-quadratic-same-endpoint.html
     940
    938941# --- Compositing ----
    939942css3/filters/composited-during-transition-layertree.html
  • trunk/LayoutTests/platform/qt/TestExpectations

    r141456 r141500  
    12121212fast/canvas/canvas-blend-image.html
    12131213fast/canvas/canvas-blend-solid.html
     1214
     1215# https://bugs.webkit.org/show_bug.cgi?id=107118
     1216fast/canvas/canvas-quadratic-same-endpoint.html
    12141217
    12151218# ReferenceError: Can't find variable: MediaKeyError
  • trunk/Source/WebCore/ChangeLog

    r141499 r141500  
     12013-01-31  Youenn Fablet  <youennf@gmail.com>
     2
     3        Quadratic and bezier curves with coincident endpoints rendered incorrectly
     4        https://bugs.webkit.org/show_bug.cgi?id=105650
     5
     6        Reviewed by Kenneth Russell.
     7
     8        Tests: fast/canvas/canvas-bezier-same-endpoint.html
     9               fast/canvas/canvas-quadratic-same-endpoint.html
     10
     11        * html/canvas/CanvasPathMethods.cpp:
     12        (WebCore::CanvasPathMethods::quadraticCurveTo):
     13        (WebCore::CanvasPathMethods::bezierCurveTo):
     14
    1152013-01-31  Mark Lam  <mark.lam@apple.com>
    216
  • trunk/Source/WebCore/html/canvas/CanvasPathMethods.cpp

    r141456 r141500  
    8585
    8686    FloatPoint p1 = FloatPoint(x, y);
    87     if (p1 != m_path.currentPoint())
    88         m_path.addQuadCurveTo(FloatPoint(cpx, cpy), p1);
     87    FloatPoint cp = FloatPoint(cpx, cpy);
     88    if (p1 != m_path.currentPoint() || p1 != cp)
     89        m_path.addQuadCurveTo(cp, p1);
    8990}
    9091
     
    99100
    100101    FloatPoint p1 = FloatPoint(x, y);
    101     if (p1 != m_path.currentPoint())
    102         m_path.addBezierCurveTo(FloatPoint(cp1x, cp1y), FloatPoint(cp2x, cp2y), p1);
     102    FloatPoint cp1 = FloatPoint(cp1x, cp1y);
     103    FloatPoint cp2 = FloatPoint(cp2x, cp2y);
     104    if (p1 != m_path.currentPoint() || p1 != cp1 ||  p1 != cp2)
     105        m_path.addBezierCurveTo(cp1, cp2, p1);
    103106}
    104107
Note: See TracChangeset for help on using the changeset viewer.