Make WebPageProxy hold on to a SessionID instead of an API:Session
https://bugs.webkit.org/show_bug.cgi?id=139302

Reviewed by Sam Weinig.

This is in preparation for adding API::WebsiteDataStore. Currently we have to keep the
Session ID and the WebsiteDataStore separate because we still need to support toggling private browsing.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetSession):
* UIProcess/API/C/WKSessionRef.cpp:
(WKSessionCreate):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(+[_WKWebsiteDataStore nonPersistentDataStore]):
* UIProcess/APISession.cpp:
(API::generateID):
(API::Session::Session):
(API::Session::createEphemeral):
(API::Session::legacyPrivateSession): Deleted.
(API::Session::create): Deleted.
* UIProcess/APISession.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createWebPage):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setSessionID):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setSession): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::sessionID):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FeatureDefines.xcconfig: Workaround bug in Xcode 5.1.1 when defining ENABLE_WEB_REPLAY
<http://webkit.org/b/139286>

Reviewed by Daniel Bates.

* Configurations/FeatureDefines.xcconfig: Switch back to using
PLATFORM_NAME to workaround a bug in Xcode 5.1.1 on 10.8.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add an API::WebsiteDataStore object and use it for _WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=139304

Reviewed by Tim Horton.

* Shared/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Make _WKWebsiteDataStore a wrapper for API::WebsiteDataStore instead of API::Session.

* UIProcess/API/APIWebsiteDataStore.cpp: Added.
(API::generateNonPersistentSessionID):
(API::WebsiteDataStore::defaultDataStore):
(API::WebsiteDataStore::createNonPersistentDataStore):
(API::WebsiteDataStore::WebsiteDataStore):
(API::WebsiteDataStore::~WebsiteDataStore):
(API::WebsiteDataStore::isNonPersistent):
Add new WebsiteDataStore implementation. Currently it only contains the WebCore Session ID, but more will be
added to it in upcoming commits.

* UIProcess/API/APIWebsiteDataStore.h:
Add header.

* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: Added.
(API::WebsiteDataStore::defaultDataStoreConfiguration):
Platform specific file that returns the default data store configuration.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Set the session ID from the website data store.

* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(+[_WKWebsiteDataStore defaultDataStore]):
(+[_WKWebsiteDataStore nonPersistentDataStore]):
(-[_WKWebsiteDataStore dealloc]):
(-[_WKWebsiteDataStore isNonPersistent]):
(-[_WKWebsiteDataStore _apiObject]):
Update now that we wrap an API::WebsiteDataStore instead.

* UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h:
(WebKit::wrapper):
Update for API::Session -> API::WebsiteDataStore change.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Oops, didn't mean to commit this.

* Shared/API/Cocoa/WKFoundation.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176848 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WKBundleCSSStyleDeclarationRef needs to be a real API::Object
https://bugs.webkit.org/show_bug.cgi?id=139291

Patch by Sam Weinig <sam@webkit.org> on 2014-12-05
Reviewed by Dan Bernstein.

Change WKBundleCSSStyleDeclarationRef from being a WebCore::CSSStyleDeclaration, to
being a real API::Object.  WKRetain and WKRelease require this.

* Shared/APIObject.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
* WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp: Added.
(WebKit::domHandleCache):
(WebKit::InjectedBundleCSSStyleDeclarationHandle::getOrCreate):
(WebKit::InjectedBundleCSSStyleDeclarationHandle::InjectedBundleCSSStyleDeclarationHandle):
(WebKit::InjectedBundleCSSStyleDeclarationHandle::~InjectedBundleCSSStyleDeclarationHandle):
* WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.h: Added.
* WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
(WebKit::InjectedBundlePageEditorClient::shouldApplyStyle):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176849 268f45cc-cd09-0410-ab3c-d52691b4dbfc