Bug 50170 - Need a WebKit2 Equivalent of WebSecurityOrigin
Summary: Need a WebKit2 Equivalent of WebSecurityOrigin
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Jessie Berlin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-11-29 12:22 PST by Jessie Berlin
Modified: 2010-12-03 09:34 PST (History)
2 users (show)

See Also:


Attachments
Patch (18.30 KB, patch)
2010-12-02 16:14 PST, Jessie Berlin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jessie Berlin 2010-11-29 12:22:58 PST
<rdar://problem/8706761>
Comment 1 Jessie Berlin 2010-12-02 16:14:17 PST
Created attachment 75428 [details]
Patch
Comment 2 Sam Weinig 2010-12-02 16:23:42 PST
Comment on attachment 75428 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=75428&action=review

You need to add this file to the WebKit2.pro as well.

> WebKit2/Shared/APIObject.h:70
> +        TypeSecurityOrigin,

It seems like there may be use for this object in both processes, so maybe it should go in Shared.

> WebKit2/UIProcess/API/C/WKSecurityOrigin.h:37
> +WK_EXPORT WKSecurityOriginRef WKSecurityOriginCreate(WKStringRef databaseIdentifier);

I don't like the phrase databaseIdentifier here.

> WebKit2/UIProcess/API/C/WKSecurityOrigin.h:41
> +WK_EXPORT size_t WKSecurityOriginGetPort(WKSecurityOriginRef securityOrigin);

I think it would be reasonable to return an unsigned short here since ports can't be larger that that.
Comment 3 Jessie Berlin 2010-12-02 18:02:17 PST
(In reply to comment #2)
> (From update of attachment 75428 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=75428&action=review
> 
> You need to add this file to the WebKit2.pro as well.

Done.

> 
> > WebKit2/Shared/APIObject.h:70
> > +        TypeSecurityOrigin,
> 
> It seems like there may be use for this object in both processes, so maybe it should go in Shared.

Done.

> 
> > WebKit2/UIProcess/API/C/WKSecurityOrigin.h:37
> > +WK_EXPORT WKSecurityOriginRef WKSecurityOriginCreate(WKStringRef databaseIdentifier);
> 
> I don't like the phrase databaseIdentifier here.

Is "identifier" better?

> 
> > WebKit2/UIProcess/API/C/WKSecurityOrigin.h:41
> > +WK_EXPORT size_t WKSecurityOriginGetPort(WKSecurityOriginRef securityOrigin);
> 
> I think it would be reasonable to return an unsigned short here since ports can't be larger that that.

Done.
Comment 4 Jessie Berlin 2010-12-03 09:33:58 PST
Comment on attachment 75428 [details]
Patch

Committed in r73267
https://trac.webkit.org/changeset/73267