Changeset 13384 in webkit


Ignore:
Timestamp:
Mar 18, 2006 10:05:00 PM (18 years ago)
Author:
darin
Message:

LayoutTests:

Reviewed by Darin.

  • fast/canvas/patternfill-repeat-expected.checksum: Added.
  • fast/canvas/patternfill-repeat-expected.png: Added.
  • fast/canvas/patternfill-repeat-expected.txt: Added.
  • fast/canvas/patternfill-repeat.html: Added.

WebCore:

Test: fast/canvas/patternfill-repeat.html

Reviewed by Darin.

  • CanvasPattern.cpp (CanvasPattern::createPattern) Change stepping so that repeat-x, repeat-y, and no-repeat repeat outside the view area by using large values for repeat interval.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r13383 r13384  
     12006-03-18  David Carson  <dacarson@gmail.com>       
     2
     3        Reviewed by Darin.
     4
     5        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=7830
     6          <canvas> createPattern 'repeat' options fail
     7
     8        * fast/canvas/patternfill-repeat-expected.checksum: Added.
     9        * fast/canvas/patternfill-repeat-expected.png: Added.
     10        * fast/canvas/patternfill-repeat-expected.txt: Added.
     11        * fast/canvas/patternfill-repeat.html: Added.
     12
    1132006-03-18  Mitz Pettel  <opendarwin.org@mitzpettel.com>
    214
  • trunk/WebCore/ChangeLog

    r13383 r13384  
     12006-03-18  David Carson  <dacarson@gmail.com>
     2
     3        Test: fast/canvas/patternfill-repeat.html
     4
     5        Reviewed by Darin.
     6
     7        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7830
     8          <canvas> createPattern 'repeat' options fail
     9
     10        * CanvasPattern.cpp (CanvasPattern::createPattern)
     11        Change stepping so that repeat-x, repeat-y, and no-repeat repeat
     12        outside the view area by using large values for repeat interval.
     13
    1142006-03-18  Mitz Pettel  <opendarwin.org@mitzpettel.com>
    215
  • trunk/WebCore/html/CanvasPattern.cpp

    r13330 r13384  
    8686        CGAffineTransformTranslate(CGAffineTransformScale(transform, 1, -1), 0, -image->height());
    8787
    88     float xStep = m_repeatX ? image->width() : 0;
    89     float yStep = m_repeatY ? image->height() : 0;
     88    float xStep = m_repeatX ? image->width() : FLT_MAX;
     89    // If FLT_MAX should also be used for yStep, nothing is rendered. Using fractions of FLT_MAX also
     90    // result in nothing being rendered. This is not a problem with xStep.
     91    // INT_MAX is almost correct, but there seems to be some number wrapping occuring making the fill
     92    // pattern is not filled correctly.
     93    // So, just pick a really large number that works.
     94    float yStep = m_repeatY ? image->height() : (100000000.0);
    9095
    9196    const CGPatternCallbacks patternCallbacks = { 0, patternCallback, patternReleaseCallback };
Note: See TracChangeset for help on using the changeset viewer.