Changeset 63270 in webkit


Ignore:
Timestamp:
Jul 13, 2010 5:45:21 PM (14 years ago)
Author:
andreas.kling@nokia.com
Message:

2010-07-13 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Darin Adler.

Canvas: rect(x,y,w,h) should move to (x,y) even if w=0 and h=0
https://bugs.webkit.org/show_bug.cgi?id=42211

  • html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::rect):

2010-07-13 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

Make our end tag in-foreign-content mode spec bug workarounds more closely match minefield
https://bugs.webkit.org/show_bug.cgi?id=42187

  • html5lib/runner-expected-html5.txt:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r63264 r63270  
    5252        * fast/canvas/webgl/texture-complete-expected.txt: Added.
    5353        * fast/canvas/webgl/texture-complete.html: Added.
     54
     552010-07-13  Andreas Kling  <andreas.kling@nokia.com>
     56
     57        Reviewed by Darin Adler.
     58
     59        Canvas: rect(x,y,w,h) should move to (x,y) even if w=0 and h=0
     60        https://bugs.webkit.org/show_bug.cgi?id=42211
     61
     62        Unskip canvas/philip/tests/2d.path.rect.zero.4.html
     63
     64        * platform/mac/Skipped:
     65        * platform/qt/Skipped:
    5466
    55672010-07-13  Andreas Kling  <andreas.kling@nokia.com>
  • trunk/LayoutTests/platform/mac/Skipped

    r63252 r63270  
    225225canvas/philip/tests/2d.path.clip.empty.html
    226226canvas/philip/tests/2d.path.rect.winding.html
    227 canvas/philip/tests/2d.path.rect.zero.4.html
    228227canvas/philip/tests/2d.path.stroke.prune.arc.html
    229228canvas/philip/tests/2d.path.stroke.prune.closed.html
  • trunk/LayoutTests/platform/qt/Skipped

    r63252 r63270  
    52905290canvas/philip/tests/2d.path.quadraticCurveTo.shape.html
    52915291canvas/philip/tests/2d.path.rect.winding.html
    5292 canvas/philip/tests/2d.path.rect.zero.4.html
    52935292canvas/philip/tests/2d.path.rect.zero.6.html
    52945293canvas/philip/tests/2d.path.stroke.scale2.html
  • trunk/WebCore/ChangeLog

    r63269 r63270  
     12010-07-13  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Canvas: rect(x,y,w,h) should move to (x,y) even if w=0 and h=0
     6        https://bugs.webkit.org/show_bug.cgi?id=42211
     7
     8        * html/canvas/CanvasRenderingContext2D.cpp:
     9        (WebCore::CanvasRenderingContext2D::rect):
     10
    1112010-07-13  Simon Fraser  <simon.fraser@apple.com>
    212
  • trunk/WebCore/html/canvas/CanvasRenderingContext2D.cpp

    r63102 r63270  
    647647void CanvasRenderingContext2D::rect(float x, float y, float width, float height)
    648648{
    649     if (!validateRectForCanvas(x, y, width, height))
    650         return;
    651     if (!state().m_invertibleCTM)
    652         return;
     649    if (!state().m_invertibleCTM)
     650        return;
     651
     652    if (!isfinite(x) || !isfinite(y) || !isfinite(width) || !isfinite(height))
     653        return;
     654
     655    if (!width && !height) {
     656        m_path.moveTo(FloatPoint(x, y));
     657        return;
     658    }
     659
     660    if (width < 0) {
     661        width = -width;
     662        x -= width;
     663    }
     664
     665    if (height < 0) {
     666        height = -height;
     667        y -= height;
     668    }
     669
    653670    m_path.addRect(FloatRect(x, y, width, height));
    654671}
Note: See TracChangeset for help on using the changeset viewer.