Bug 50170

Summary: Need a WebKit2 Equivalent of WebSecurityOrigin
Product: WebKit Reporter: Jessie Berlin <jberlin>
Component: WebKit2Assignee: Jessie Berlin <jberlin>
Status: RESOLVED FIXED    
Severity: Normal CC: jberlin, sam
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

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