Need WebKit2 API to create a SecurityOrigin from protocol, host, and port
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Dec 2010 01:16:19 +0000 (01:16 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Dec 2010 01:16:19 +0000 (01:16 +0000)
commit67efa46d274c58c75c6d500ff8374389d29b6920
tree2cdda5c3651ccab3c5731ad7d6761b8067559b59
parent59efa2d1a85da1da1a72e9a844fed0ca5e603794
Need WebKit2 API to create a SecurityOrigin from protocol, host, and port
https://bugs.webkit.org/show_bug.cgi?id=51563

Reviewed by Sam Weinig.

WebCore:

Add SecurityOrigin::create(const String& protocol, const String& host, int port).

* WebCore.exp.in:
Export the symbols for WebCore::SecurityOrigin::create(String, String, int).

* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::createFromDatabaseIdentifier):
Use the constant MaxAllowedPort.
(WebCore::SecurityOrigin::create):
Sanitizing based off of that done in createFromDatabaseIdentifier.
* page/SecurityOrigin.h:

WebKit2:

Add WKSecurityOriginCreate(WKStringRef protocol, WKStringRef host, int port).

* Shared/API/c/WKSecurityOrigin.cpp:
(WKSecurityOriginCreateFromIdentifier):
Renamed so as not to clash with the new WKSecurityOriginCreate.
(WKSecurityOriginCreate):
* Shared/API/c/WKSecurityOrigin.h:
* Shared/WebSecurityOrigin.h:
(WebKit::WebSecurityOrigin::create):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@74597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/WebCore.exp.in
WebCore/page/SecurityOrigin.cpp
WebCore/page/SecurityOrigin.h
WebKit2/ChangeLog
WebKit2/Shared/API/c/WKSecurityOrigin.cpp
WebKit2/Shared/API/c/WKSecurityOrigin.h
WebKit2/Shared/WebSecurityOrigin.h