Bug 24562 - Add custom V8 binding for Document.getCSSCanvasContext
Summary: Add custom V8 binding for Document.getCSSCanvasContext
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Mike Belshe
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-12 14:27 PDT by Mike Belshe
Modified: 2009-03-13 15:47 PDT (History)
0 users

See Also:


Attachments
patch (1.47 KB, patch)
2009-03-12 14:36 PDT, Mike Belshe
dglazkov: review+
Details | Formatted Diff | Diff
updated patch (1.44 KB, patch)
2009-03-12 15:56 PDT, Mike Belshe
dglazkov: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Belshe 2009-03-12 14:27:44 PDT
Made this function custom to deal with the difference between DOMObject in the IDL and CanvasRenderingContext2D.
Comment 1 Mike Belshe 2009-03-12 14:36:53 PDT
Created attachment 28557 [details]
patch
Comment 2 Dimitri Glazkov (Google) 2009-03-12 15:14:53 PDT
Comment on attachment 28557 [details]
patch

Looks good, aside for helper functions.

Also, don't forget to put bug URL in the ChangeLog. I usually do:

URL
Description.

(standard stuff prepareChangelog puts in)

> +    String contextId = ToWebCoreString(args[0]);

toWebCoreString

> +    String name = ToWebCoreString(args[1]);

Ditto.

> +    int width = ToInt32(args[2]);

toInt32
> +    int height = ToInt32(args[3]);
Ditto.
> +    CanvasRenderingContext2D* result = imp->getCSSCanvasContext(contextId, name, width, height);
> +    return V8Proxy::ToV8Object(V8ClassIndex::CANVASRENDERINGCONTEXT2D, result);
> +}
> +
>  } // namespace WebCore
Comment 3 Mike Belshe 2009-03-12 15:56:01 PDT
Created attachment 28563 [details]
updated patch
Comment 4 Dimitri Glazkov (Google) 2009-03-13 15:47:29 PDT
Landed as http://trac.webkit.org/changeset/41691.