WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
63801
[Chromium] HTML5 Canvas context.createPattern(image, repetition) can throw TYPE_MISMATCH_ERR exception.
https://bugs.webkit.org/show_bug.cgi?id=63801
Summary
[Chromium] HTML5 Canvas context.createPattern(image, repetition) can throw TY...
Dongseong Hwang
Reported
2011-07-01 05:43:57 PDT
Chromium failed this test :
http://dev.w3.org/html5/2dcontext/#dom-context-2d-createpattern
Attachments
patch
(8.75 KB, patch)
2011-07-01 05:49 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
patch
(8.76 KB, patch)
2011-07-03 00:25 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
patch
(12.55 KB, patch)
2011-07-05 00:38 PDT
,
Dongseong Hwang
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ec2-cr-linux-02
(1.32 MB, application/zip)
2011-07-05 01:06 PDT
,
WebKit Review Bot
no flags
Details
patch
(8.76 KB, patch)
2011-07-05 01:24 PDT
,
Dongseong Hwang
ojan
: review-
ojan
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Dongseong Hwang
Comment 1
2011-07-01 05:49:06 PDT
Created
attachment 99465
[details]
patch JavaScriptCore treats this by JSCanvasRenderingContext2DCustom.cpp but V8 does not treats this. From HTML5 canvas spec:
http://dev.w3.org/html5/2dcontext/#dom-context-2d-createpattern
"If the first argument isn't an img, canvas, or video element, throws a TYPE_MISMATCH_ERR exception." This patch makes Chromium pass canvas/philip/tests/2d.pattern.image.undefined.html
WebKit Review Bot
Comment 2
2011-07-01 05:52:12 PDT
Attachment 99465
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/plat..." exit_code: 1 Source/WebCore/html/canvas/CanvasRenderingContext2D.idl:150: Line contains tab character. [whitespace/tab] [5] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Dongseong Hwang
Comment 3
2011-07-03 00:25:05 PDT
Created
attachment 99569
[details]
patch
Dongseong Hwang
Comment 4
2011-07-05 00:38:14 PDT
Created
attachment 99672
[details]
patch
WebKit Review Bot
Comment 5
2011-07-05 01:06:47 PDT
Comment on
attachment 99672
[details]
patch
Attachment 99672
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/8982679
New failing tests: canvas/philip/tests/2d.path.arc.nonempty.html
WebKit Review Bot
Comment 6
2011-07-05 01:06:52 PDT
Created
attachment 99674
[details]
Archive of layout-test-results from ec2-cr-linux-02 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-02 Port: Chromium Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Dongseong Hwang
Comment 7
2011-07-05 01:24:18 PDT
Created
attachment 99678
[details]
patch
Eric Seidel (no email)
Comment 8
2011-07-05 18:09:44 PDT
Comment on
attachment 99678
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=99678&action=review
> Source/WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:106 > + fail:
Really? We use goto in the v8 bindings?
Andreas Kling
Comment 9
2011-07-05 18:43:58 PDT
I'm not sure this is correct.
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-createpattern
no longer has the part about TYPE_MISMATCH_ERR. IIRC, Web IDL specifies that this shouldn't match any of the overloads, but instead raise TypeError. (
http://www.w3.org/TR/WebIDL/#es-operations
)
Dongseong Hwang
Comment 10
2011-07-05 19:47:46 PDT
I copied it from the derived source. I thought I should make at the lowest changes. However, I agree. I should remove goto. (In reply to
comment #8
)
> (From update of
attachment 99678
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=99678&action=review
> > > Source/WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:106 > > + fail: > > Really? We use goto in the v8 bindings?
Dongseong Hwang
Comment 11
2011-07-05 19:57:48 PDT
(In reply to
comment #9
)
> I'm not sure this is correct. > >
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-createpattern
no longer has the part about TYPE_MISMATCH_ERR. IIRC, Web IDL specifies that this shouldn't match any of the overloads, but instead raise TypeError. (
http://www.w3.org/TR/WebIDL/#es-operations
)
I'm not familiar with w3 spec, but above spec is Last Updated 1 July 2011. The spec I had attached is W3C Working Draft 24 May 2011. Which is correct?
Ojan Vafai
Comment 12
2012-04-20 18:10:23 PDT
(In reply to
comment #11
)
> (In reply to
comment #9
) > > I'm not sure this is correct. > > > >
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-createpattern
no longer has the part about TYPE_MISMATCH_ERR. IIRC, Web IDL specifies that this shouldn't match any of the overloads, but instead raise TypeError. (
http://www.w3.org/TR/WebIDL/#es-operations
) > > I'm not familiar with w3 spec, but above spec is Last Updated 1 July 2011. The spec I had attached is W3C Working Draft 24 May 2011. > Which is correct?
For WebKit, we use the whatwg.org copy of the spec as the one that we implement. Although, in this specific case, it looks like both specs have changed to no longer throw an error in this case.
Ojan Vafai
Comment 13
2012-04-20 18:10:48 PDT
Comment on
attachment 99678
[details]
patch Please reopen the bug if you believe I've misread the spec.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug