RESOLVED FIXED Bug 40166
Canvas createPattern(img, repetition) shouldn't throw INVALID_STATE_ERR when !img.complete
https://bugs.webkit.org/show_bug.cgi?id=40166
Summary Canvas createPattern(img, repetition) shouldn't throw INVALID_STATE_ERR when ...
Andreas Kling
Reported 2010-06-04 08:24:37 PDT
Spec link: http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-createpattern If !img.complete, createPattern() should simply return null.
Attachments
Proposed patch (1.40 KB, patch)
2010-06-04 08:26 PDT, Andreas Kling
krit: review+
krit: commit-queue+
Proposed patch v2 (2.85 KB, patch)
2010-06-04 11:36 PDT, Andreas Kling
no flags
Proposed patch v3 (3.99 KB, patch)
2010-06-04 12:19 PDT, Andreas Kling
no flags
Andreas Kling
Comment 1 2010-06-04 08:26:23 PDT
Created attachment 57883 [details] Proposed patch Note the lack of test due to a bug in HTMLImageElement's complete attribute. This will be addressed in a subsequent patch.
Dirk Schulze
Comment 2 2010-06-04 08:31:42 PDT
Comment on attachment 57883 [details] Proposed patch lgtm. r=me
Andreas Kling
Comment 3 2010-06-04 11:36:25 PDT
Created attachment 57900 [details] Proposed patch v2 Oops! Turns out there IS a way to create an incomplete image and an existing test already covered it. Updated patch with corrected test and ChangeLog.
Andreas Kling
Comment 4 2010-06-04 12:19:33 PDT
Created attachment 57904 [details] Proposed patch v3 Updated patch as per our discussion on IRC. Test is now more verbose about what it's testing.
Dirk Schulze
Comment 5 2010-06-04 12:24:09 PDT
Comment on attachment 57904 [details] Proposed patch v3 Great! r=me
WebKit Commit Bot
Comment 6 2010-06-04 21:41:18 PDT
Comment on attachment 57904 [details] Proposed patch v3 Clearing flags on attachment: 57904 Committed r60731: <http://trac.webkit.org/changeset/60731>
WebKit Commit Bot
Comment 7 2010-06-04 21:41:24 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.