WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
27170
[V8] drawImage method of HTMLCanvasElement to accept HTMLVideoElement as argument
https://bugs.webkit.org/show_bug.cgi?id=27170
Summary
[V8] drawImage method of HTMLCanvasElement to accept HTMLVideoElement as argu...
Hin-Chung Lam
Reported
2009-07-10 19:32:19 PDT
Copied code from the same method and accepts HTMLVideoElement.
Attachments
patch
(2.61 KB, patch)
2009-07-10 19:33 PDT
,
Hin-Chung Lam
dglazkov
: review-
Details
Formatted Diff
Diff
patch
(2.60 KB, patch)
2009-07-13 13:06 PDT
,
Hin-Chung Lam
dglazkov
: review-
Details
Formatted Diff
Diff
patch
(
deleted
)
2009-07-13 14:50 PDT
,
Hin-Chung Lam
no flags
Details
Formatted Diff
Diff
patch
(4.59 KB, patch)
2009-07-13 14:52 PDT
,
Hin-Chung Lam
no flags
Details
Formatted Diff
Diff
patch
(3.08 KB, patch)
2009-07-14 11:54 PDT
,
Hin-Chung Lam
dglazkov
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Hin-Chung Lam
Comment 1
2009-07-10 19:33:23 PDT
Created
attachment 32603
[details]
patch
Dimitri Glazkov (Google)
Comment 2
2009-07-10 21:54:24 PDT
Comment on
attachment 32603
[details]
patch
> + if (ec != 0) { > + V8Proxy::setDOMException(ec); > + return notHandledByInterceptor(); > + }
This probably should be if (ec) return throwError(ec);
> + if (ec != 0) { > + V8Proxy::setDOMException(ec); > + return notHandledByInterceptor(); > + }
Ditto.
> + break; > + default: > + V8Proxy::throwError(V8Proxy::SyntaxError, "drawImage: Invalid number of arguments"); > + return v8::Undefined();
return throwError(V8Proxy::SyntaxError, "drawImage: Invalid number of arguments");
> Index: ChangeLog > =================================================================== > --- ChangeLog (revision 45742) > +++ ChangeLog (working copy) > @@ -1,3 +1,12 @@ > +2009-07-07 Alpha Lam <
hclam@chromium.org
> > + > + Reviewed by NOBODY(OOPS!). > + > + Changed CanvasRenderingContext2DDrawImage to accept HTMLVideoElement > + as a parameter of drawImage of HTMLCanvasElement. > +
Wrong ChangeLog? Should be WebCore/ChangeLog.
Hin-Chung Lam
Comment 3
2009-07-13 13:06:31 PDT
Created
attachment 32672
[details]
patch V8Proxy::throwError takes an ErrorType rather than error code (i.e. |ec|). So I keep part where error code is useful.
Darin Adler
Comment 4
2009-07-13 13:10:02 PDT
Is this a V8-only issue, or a V8-only fix to an issue that affects WebKit even without V8?
Hin-Chung Lam
Comment 5
2009-07-13 13:15:54 PDT
(In reply to
comment #4
)
> Is this a V8-only issue, or a V8-only fix to an issue that affects WebKit even > without V8?
This is a V8-only issue. It only applies when V8 is used with WebKit.
Darin Adler
Comment 6
2009-07-13 13:22:40 PDT
(In reply to
comment #5
)
> This is a V8-only issue. It only applies when V8 is used with WebKit.
OK. Please mention that in the bug title in the future.
Dimitri Glazkov (Google)
Comment 7
2009-07-13 14:10:36 PDT
Here are the throwError helpers I was suggesting to use:
http://trac.webkit.org/browser/trunk/WebCore/bindings/v8/V8Proxy.h
(look at the bottom, trac down atm).
Hin-Chung Lam
Comment 8
2009-07-13 14:50:54 PDT
Created
attachment 32678
[details]
patch
Hin-Chung Lam
Comment 9
2009-07-13 14:52:22 PDT
Created
attachment 32679
[details]
patch
Hin-Chung Lam
Comment 10
2009-07-13 14:53:37 PDT
I have updated the patch using the throwError helper method.
Dimitri Glazkov (Google)
Comment 11
2009-07-14 08:57:50 PDT
Note that "return throwError(...)" will give you v8::Undefined(), whereas "return notHandledByInterceptor()" will produce v8::Null() (which is a signal for the interceptor handler). I am not sure why we were using notHandledByInterceptor() here and worry if changing this may introduce layout test regressions?
Hin-Chung Lam
Comment 12
2009-07-14 10:36:57 PDT
(In reply to
comment #11
)
> Note that "return throwError(...)" will give you v8::Undefined(), whereas > "return notHandledByInterceptor()" will produce v8::Null() (which is a signal > for the interceptor handler). I am not sure why we were using > notHandledByInterceptor() here and worry if changing this may introduce layout > test regressions?
It might break some layout tests, I'd be safe and do what is in the original code.
Dimitri Glazkov (Google)
Comment 13
2009-07-14 10:41:24 PDT
Ok. Sorry for the run-around. Pls upload the updated patch and I'll r+. Can you also file a WebKit bug to investigate why we have these weird notHandledByInterceptor retvals?
Hin-Chung Lam
Comment 14
2009-07-14 11:54:32 PDT
Created
attachment 32726
[details]
patch
Dimitri Glazkov (Google)
Comment 15
2009-07-14 12:40:51 PDT
Comment on
attachment 32726
[details]
patch Good to go.
David Levin
Comment 16
2009-07-15 11:27:39 PDT
Committed as
http://trac.webkit.org/changeset/45929
Fixed changelog to have a link to the bug in
http://trac.webkit.org/changeset/45932
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