See summary.
Created attachment 30452 [details] patch
Comment on attachment 30452 [details] patch > Index: WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp > +// Helper macro for converting v8 values into floats (expected by many of the > +// canvas functions). > +#define TO_FLOAT(a) static_cast<float>((a)->NumberValue()) Can this be rewritten as an inline function instead? It is best to avoid macros whenever possible. Can you use toFloat from V8Binding.h? > +CALLBACK_FUNC_DECL(CanvasRenderingContext2DPutImageData) ... > + if (V8Proxy::IsWrapperOfType(args[0], V8ClassIndex::IMAGEDATA)) { > + imageData = V8Proxy::ToNativeObject<ImageData>(V8ClassIndex::IMAGEDATA, args[0]); > + } style nit: no brackets around single lines
Created attachment 30476 [details] patch2
(In reply to comment #2) > (From update of attachment 30452 [details] [review]) > > Index: WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp > > > +// Helper macro for converting v8 values into floats (expected by many of the > > +// canvas functions). > > +#define TO_FLOAT(a) static_cast<float>((a)->NumberValue()) > > Can this be rewritten as an inline function instead? It is best to > avoid macros whenever possible. > > Can you use toFloat from V8Binding.h? Wasn't aware of that one, thanks. > > > > +CALLBACK_FUNC_DECL(CanvasRenderingContext2DPutImageData) > ... > > + if (V8Proxy::IsWrapperOfType(args[0], V8ClassIndex::IMAGEDATA)) { > > + imageData = V8Proxy::ToNativeObject<ImageData>(V8ClassIndex::IMAGEDATA, args[0]); > > + } > > style nit: no brackets around single lines > Doh, missed one. Done.
Landed as: http://trac.webkit.org/changeset/43871