Bug 24561 - Add custom V8 bindings for HTMLElementCanvas, Location
Summary: Add custom V8 bindings for HTMLElementCanvas, Location
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:24 PDT by Mike Belshe
Modified: 2009-03-13 16:08 PDT (History)
0 users

See Also:


Attachments
patch (17.38 KB, patch)
2009-03-12 14:36 PDT, Mike Belshe
no flags Details | Formatted Diff | Diff
patch with updates (17.09 KB, patch)
2009-03-12 15:53 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:24:57 PDT
Custom implementations for v8.
Comment 1 Mike Belshe 2009-03-12 14:36:12 PDT
Created attachment 28556 [details]
patch
Comment 2 Dimitri Glazkov (Google) 2009-03-12 15:10:26 PDT
Comment on attachment 28556 [details]
patch

Looks good, except for very minor style nits:

> +        * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: Added.
> +        (WebCore::CALLBACK_FUNC_DECL):
> +        * bindings/v8/custom/V8LocationCustom.cpp: Added.
> +        (WebCore::navigateIfAllowed):
> +        (WebCore::ACCESSOR_SETTER):
> +        (WebCore::ACCESSOR_GETTER):
> +        (WebCore::CALLBACK_FUNC_DECL):
> +        (WebCore::INDEXED_ACCESS_CHECK):
> +        (WebCore::NAMED_ACCESS_CHECK):

Remove func lines here unless there's a useful comment to go with them.

> +    v8::Handle<v8::Value> holder = args.Holder();
> +    HTMLCanvasElement* imp = V8Proxy::DOMWrapperToNode<HTMLCanvasElement>(holder);
> +    String contextId = ToWebCoreString(args[0]);
toWebCoreString

> +        return sharedTemplate->GetFunction();
> +    } else {
> +        return privateTemplate->GetFunction();
> +    }

No braces for one-liners.

> +        return sharedTemplate->GetFunction();
> +    } else {
> +        return privateTemplate->GetFunction();
> +    }

Ditto.

> +        return sharedTemplate->GetFunction();
> +    } else {
> +        return privateTemplate->GetFunction();
> +    }

Ditto.
Comment 3 Mike Belshe 2009-03-12 15:53:26 PDT
Created attachment 28562 [details]
patch with updates
Comment 4 Dimitri Glazkov (Google) 2009-03-13 16:08:12 PDT
Landed as http://trac.webkit.org/changeset/41693.