summaryrefslogtreecommitdiff
path: root/Source/WebKit2/Shared/API/c
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-30 12:48:17 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-30 12:48:17 +0200
commit881da28418d380042aa95a97f0cbd42560a64f7c (patch)
treea794dff3274695e99c651902dde93d934ea7a5af /Source/WebKit2/Shared/API/c
parent7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff)
parent0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff)
downloadqtwebkit-881da28418d380042aa95a97f0cbd42560a64f7c.tar.gz
Merge 'wip/next' into dev
Change-Id: Iff9ee5e23bb326c4371ec8ed81d56f2f05d680e9
Diffstat (limited to 'Source/WebKit2/Shared/API/c')
-rw-r--r--Source/WebKit2/Shared/API/c/WKActionMenuItemTypes.h (renamed from Source/WebKit2/Shared/API/c/WKGraphicsContext.h)30
-rw-r--r--Source/WebKit2/Shared/API/c/WKActionMenuTypes.h (renamed from Source/WebKit2/Shared/API/c/cf/WKStringCF.h)28
-rw-r--r--Source/WebKit2/Shared/API/c/WKArray.cpp24
-rw-r--r--Source/WebKit2/Shared/API/c/WKArray.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKBase.h79
-rw-r--r--Source/WebKit2/Shared/API/c/WKCertificateInfo.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKConnectionRef.cpp2
-rw-r--r--Source/WebKit2/Shared/API/c/WKConnectionRef.h17
-rw-r--r--Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp70
-rw-r--r--Source/WebKit2/Shared/API/c/WKContextMenuItem.h4
-rw-r--r--Source/WebKit2/Shared/API/c/WKContextMenuItemTypes.h3
-rw-r--r--Source/WebKit2/Shared/API/c/WKData.cpp7
-rw-r--r--Source/WebKit2/Shared/API/c/WKData.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKDeclarationSpecifiers.h73
-rw-r--r--Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp165
-rw-r--r--Source/WebKit2/Shared/API/c/WKDiagnosticLoggingResultType.h (renamed from Source/WebKit2/Shared/API/c/cf/WKErrorCF.h)20
-rw-r--r--Source/WebKit2/Shared/API/c/WKDictionary.cpp20
-rw-r--r--Source/WebKit2/Shared/API/c/WKDictionary.h4
-rw-r--r--Source/WebKit2/Shared/API/c/WKErrorRef.cpp (renamed from Source/WebKit2/Shared/API/c/WKError.cpp)8
-rw-r--r--Source/WebKit2/Shared/API/c/WKErrorRef.h (renamed from Source/WebKit2/Shared/API/c/WKError.h)10
-rw-r--r--Source/WebKit2/Shared/API/c/WKEvent.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKFindOptions.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKGeometry.cpp17
-rw-r--r--Source/WebKit2/Shared/API/c/WKGeometry.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKGraphicsContext.cpp37
-rw-r--r--Source/WebKit2/Shared/API/c/WKImage.h9
-rw-r--r--Source/WebKit2/Shared/API/c/WKImmediateActionTypes.h (renamed from Source/WebKit2/Shared/API/c/cairo/WKImageCairo.h)29
-rw-r--r--Source/WebKit2/Shared/API/c/WKMutableArray.cpp14
-rw-r--r--Source/WebKit2/Shared/API/c/WKMutableArray.h5
-rw-r--r--Source/WebKit2/Shared/API/c/WKMutableDictionary.cpp19
-rw-r--r--Source/WebKit2/Shared/API/c/WKMutableDictionary.h6
-rw-r--r--Source/WebKit2/Shared/API/c/WKNumber.cpp14
-rw-r--r--Source/WebKit2/Shared/API/c/WKNumber.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKPageLoadTypes.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKPageVisibilityTypes.h5
-rw-r--r--Source/WebKit2/Shared/API/c/WKPluginInformation.cpp114
-rw-r--r--Source/WebKit2/Shared/API/c/WKPluginInformation.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKRenderLayer.cpp14
-rw-r--r--Source/WebKit2/Shared/API/c/WKRenderLayer.h9
-rw-r--r--Source/WebKit2/Shared/API/c/WKRenderObject.cpp20
-rw-r--r--Source/WebKit2/Shared/API/c/WKRenderObject.h7
-rw-r--r--Source/WebKit2/Shared/API/c/WKSecurityOriginRef.cpp (renamed from Source/WebKit2/Shared/API/c/WKSecurityOrigin.cpp)24
-rw-r--r--Source/WebKit2/Shared/API/c/WKSecurityOriginRef.h (renamed from Source/WebKit2/Shared/API/c/WKSecurityOrigin.h)8
-rw-r--r--Source/WebKit2/Shared/API/c/WKSerializedScriptValue.cpp8
-rw-r--r--Source/WebKit2/Shared/API/c/WKSerializedScriptValue.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKSerializedScriptValuePrivate.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKSharedAPICast.h293
-rw-r--r--Source/WebKit2/Shared/API/c/WKString.cpp63
-rw-r--r--Source/WebKit2/Shared/API/c/WKString.h3
-rw-r--r--Source/WebKit2/Shared/API/c/WKStringPrivate.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKType.cpp7
-rw-r--r--Source/WebKit2/Shared/API/c/WKType.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKURL.cpp8
-rw-r--r--Source/WebKit2/Shared/API/c/WKURL.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKURLRequest.cpp20
-rw-r--r--Source/WebKit2/Shared/API/c/WKURLRequest.h4
-rw-r--r--Source/WebKit2/Shared/API/c/WKURLResponse.cpp6
-rw-r--r--Source/WebKit2/Shared/API/c/WKURLResponse.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKUserContentInjectedFrames.h (renamed from Source/WebKit2/Shared/API/c/soup/WKBaseSoup.h)18
-rw-r--r--Source/WebKit2/Shared/API/c/WKUserContentURLPattern.cpp7
-rw-r--r--Source/WebKit2/Shared/API/c/WKUserContentURLPattern.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKUserScriptInjectionTime.h (renamed from Source/WebKit2/Shared/API/c/mac/WKBaseMac.h)18
-rw-r--r--Source/WebKit2/Shared/API/c/cairo/WKImageCairo.cpp58
-rw-r--r--Source/WebKit2/Shared/API/c/cf/WKErrorCF.cpp45
-rw-r--r--Source/WebKit2/Shared/API/c/cf/WKStringCF.cpp50
-rw-r--r--Source/WebKit2/Shared/API/c/cf/WKURLCF.cpp66
-rw-r--r--Source/WebKit2/Shared/API/c/cf/WKURLCF.h43
-rw-r--r--Source/WebKit2/Shared/API/c/cf/WKURLRequestCF.cpp44
-rw-r--r--Source/WebKit2/Shared/API/c/cf/WKURLRequestCF.h43
-rw-r--r--Source/WebKit2/Shared/API/c/cf/WKURLResponseCF.cpp54
-rw-r--r--Source/WebKit2/Shared/API/c/cf/WKURLResponseCF.h43
-rw-r--r--Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.cpp38
-rw-r--r--Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.h42
-rw-r--r--Source/WebKit2/Shared/API/c/cg/WKImageCG.cpp62
-rw-r--r--Source/WebKit2/Shared/API/c/cg/WKImageCG.h45
-rw-r--r--Source/WebKit2/Shared/API/c/efl/WKArrayEfl.cpp52
-rw-r--r--Source/WebKit2/Shared/API/c/efl/WKArrayEfl.h39
-rw-r--r--Source/WebKit2/Shared/API/c/efl/WKBaseEfl.h33
-rw-r--r--Source/WebKit2/Shared/API/c/gtk/WKBaseGtk.h39
-rw-r--r--Source/WebKit2/Shared/API/c/gtk/WKGraphicsContextGtk.cpp38
-rw-r--r--Source/WebKit2/Shared/API/c/gtk/WKGraphicsContextGtk.h43
-rw-r--r--Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.h43
-rw-r--r--Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.mm43
-rw-r--r--Source/WebKit2/Shared/API/c/mac/WKObjCTypeWrapperRef.h45
-rw-r--r--Source/WebKit2/Shared/API/c/mac/WKObjCTypeWrapperRef.mm48
-rw-r--r--Source/WebKit2/Shared/API/c/mac/WKURLRequestNS.h43
-rw-r--r--Source/WebKit2/Shared/API/c/mac/WKURLRequestNS.mm44
-rw-r--r--Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.h43
-rw-r--r--Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.mm44
-rw-r--r--Source/WebKit2/Shared/API/c/mac/WKWebArchive.cpp84
-rw-r--r--Source/WebKit2/Shared/API/c/mac/WKWebArchive.h52
-rw-r--r--Source/WebKit2/Shared/API/c/mac/WKWebArchiveResource.cpp65
-rw-r--r--Source/WebKit2/Shared/API/c/mac/WKWebArchiveResource.h50
-rw-r--r--Source/WebKit2/Shared/API/c/qt/WKImageQt.cpp2
-rw-r--r--Source/WebKit2/Shared/API/c/qt/WKImageQt.h4
95 files changed, 914 insertions, 1975 deletions
diff --git a/Source/WebKit2/Shared/API/c/WKGraphicsContext.h b/Source/WebKit2/Shared/API/c/WKActionMenuItemTypes.h
index c9d0a522f..7ab00f53a 100644
--- a/Source/WebKit2/Shared/API/c/WKGraphicsContext.h
+++ b/Source/WebKit2/Shared/API/c/WKActionMenuItemTypes.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,19 +23,37 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WKGraphicsContext_h
-#define WKGraphicsContext_h
+#ifndef WKActionMenuItemTypes_h
+#define WKActionMenuItemTypes_h
-#include <WebKit2/WKBase.h>
+#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
-WK_EXPORT WKTypeID WKGraphicsContextGetTypeID();
+// Deprecated; remove when there are no more clients.
+enum {
+ kWKContextActionItemTagNoAction = 0,
+ kWKContextActionItemTagOpenLinkInDefaultBrowser,
+ kWKContextActionItemTagPreviewLink,
+ kWKContextActionItemTagAddLinkToSafariReadingList,
+ kWKContextActionItemTagCopyImage,
+ kWKContextActionItemTagAddImageToPhotos,
+ kWKContextActionItemTagSaveImageToDownloads,
+ kWKContextActionItemTagShareImage,
+ kWKContextActionItemTagCopyText,
+ kWKContextActionItemTagLookupText,
+ kWKContextActionItemTagPaste,
+ kWKContextActionItemTagTextSuggestions,
+ kWKContextActionItemTagCopyVideoURL,
+ kWKContextActionItemTagSaveVideoToDownloads,
+ kWKContextActionItemTagShareVideo,
+ kWKContextActionItemTagShareLink
+};
#ifdef __cplusplus
}
#endif
-#endif /* WKGraphicsContext_h */
+#endif /* WKActionMenuItemTypes_h */
diff --git a/Source/WebKit2/Shared/API/c/cf/WKStringCF.h b/Source/WebKit2/Shared/API/c/WKActionMenuTypes.h
index f94685386..4769c390d 100644
--- a/Source/WebKit2/Shared/API/c/cf/WKStringCF.h
+++ b/Source/WebKit2/Shared/API/c/WKActionMenuTypes.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,21 +23,33 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WKStringCF_h
-#define WKStringCF_h
+#ifndef WKActionMenuTypes_h
+#define WKActionMenuTypes_h
-#include <CoreFoundation/CoreFoundation.h>
-#include <WebKit2/WKBase.h>
+#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
-WK_EXPORT WKStringRef WKStringCreateWithCFString(CFStringRef string);
-WK_EXPORT CFStringRef WKStringCopyCFString(CFAllocatorRef alloc, WKStringRef string);
+// Deprecated; remove when there are no more clients.
+enum {
+ kWKActionMenuNone = 0,
+ kWKActionMenuLink,
+ kWKActionMenuImage,
+ kWKActionMenuDataDetectedItem,
+ kWKActionMenuReadOnlyText,
+ kWKActionMenuEditableText,
+ kWKActionMenuEditableTextWithSuggestions,
+ kWKActionMenuWhitespaceInEditableArea,
+ kWKActionMenuVideo,
+ kWKActionMenuMailtoLink,
+ kWKActionMenuTelLink
+};
+typedef uint32_t _WKActionMenuType;
#ifdef __cplusplus
}
#endif
-#endif /* WKStringCF_h */
+#endif /* WKActionMenuTypes_h */
diff --git a/Source/WebKit2/Shared/API/c/WKArray.cpp b/Source/WebKit2/Shared/API/c/WKArray.cpp
index 5bf35e3c3..844161124 100644
--- a/Source/WebKit2/Shared/API/c/WKArray.cpp
+++ b/Source/WebKit2/Shared/API/c/WKArray.cpp
@@ -26,31 +26,41 @@
#include "config.h"
#include "WKArray.h"
-#include "ImmutableArray.h"
+#include "APIArray.h"
#include "WKAPICast.h"
using namespace WebKit;
WKTypeID WKArrayGetTypeID()
{
- return toAPI(ImmutableArray::APIType);
+ return toAPI(API::Array::APIType);
}
WKArrayRef WKArrayCreate(WKTypeRef* values, size_t numberOfValues)
{
- RefPtr<ImmutableArray> array = ImmutableArray::create(reinterpret_cast<APIObject**>(const_cast<void**>(values)), numberOfValues);
- return toAPI(array.release().leakRef());
+ Vector<RefPtr<API::Object>> elements;
+ elements.reserveInitialCapacity(numberOfValues);
+
+ for (size_t i = 0; i < numberOfValues; ++i)
+ elements.uncheckedAppend(toImpl(values[i]));
+
+ return toAPI(&API::Array::create(WTFMove(elements)).leakRef());
}
WKArrayRef WKArrayCreateAdoptingValues(WKTypeRef* values, size_t numberOfValues)
{
- RefPtr<ImmutableArray> array = ImmutableArray::adopt(reinterpret_cast<APIObject**>(const_cast<void**>(values)), numberOfValues);
- return toAPI(array.release().leakRef());
+ Vector<RefPtr<API::Object>> elements;
+ elements.reserveInitialCapacity(numberOfValues);
+
+ for (size_t i = 0; i < numberOfValues; ++i)
+ elements.uncheckedAppend(adoptRef(toImpl(values[i])));
+
+ return toAPI(&API::Array::create(WTFMove(elements)).leakRef());
}
WKTypeRef WKArrayGetItemAtIndex(WKArrayRef arrayRef, size_t index)
{
- return toImpl(arrayRef)->at(index);
+ return toAPI(toImpl(arrayRef)->at(index));
}
size_t WKArrayGetSize(WKArrayRef arrayRef)
diff --git a/Source/WebKit2/Shared/API/c/WKArray.h b/Source/WebKit2/Shared/API/c/WKArray.h
index 25900f313..ff8d39bfe 100644
--- a/Source/WebKit2/Shared/API/c/WKArray.h
+++ b/Source/WebKit2/Shared/API/c/WKArray.h
@@ -26,7 +26,7 @@
#ifndef WKArray_h
#define WKArray_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#include <stddef.h>
diff --git a/Source/WebKit2/Shared/API/c/WKBase.h b/Source/WebKit2/Shared/API/c/WKBase.h
index ea8e2f1ba..6a88d0be1 100644
--- a/Source/WebKit2/Shared/API/c/WKBase.h
+++ b/Source/WebKit2/Shared/API/c/WKBase.h
@@ -27,22 +27,23 @@
#ifndef WKBase_h
#define WKBase_h
+#include <WebKit/WKDeclarationSpecifiers.h>
#include <stdint.h>
#if defined(BUILDING_GTK__)
-#include <WebKit2/WKBaseGtk.h>
+#include <WebKit/WKBaseGtk.h>
#endif
-#if defined(WTF_USE_SOUP)
-#include <WebKit2/WKBaseSoup.h>
+#if defined(USE_SOUP)
+#include <WebKit/WKBaseSoup.h>
#endif
#if defined(BUILDING_EFL__)
-#include <WebKit2/WKBaseEfl.h>
+#include <WebKit/WKBaseEfl.h>
#endif
-#if defined(__APPLE__) && !defined(BUILDING_QT__)
-#include <WebKit2/WKBaseMac.h>
+#if defined(__APPLE__) && !defined(BUILDING_GTK__) && !defined(BUILDING_QT__)
+#include <WebKit/WKBaseMac.h>
#endif
/* WebKit2 shared types */
@@ -81,18 +82,6 @@ typedef const struct OpaqueWKUserContentURLPattern* WKUserContentURLPatternRef;
typedef const struct OpaqueWKWebArchive* WKWebArchiveRef;
typedef const struct OpaqueWKWebArchiveResource* WKWebArchiveResourceRef;
-enum WKUserContentInjectedFrames {
- kWKInjectInAllFrames,
- kWKInjectInTopFrameOnly
-};
-typedef enum WKUserContentInjectedFrames WKUserContentInjectedFrames;
-
-enum WKUserScriptInjectionTime {
- kWKInjectAtDocumentStart,
- kWKInjectAtDocumentEnd
-};
-typedef enum WKUserScriptInjectionTime WKUserScriptInjectionTime;
-
/* WebKit2 main API types */
typedef const struct OpaqueWKApplicationCacheManager* WKApplicationCacheManagerRef;
@@ -105,11 +94,12 @@ typedef const struct OpaqueWKBatteryStatus* WKBatteryStatusRef;
typedef const struct OpaqueWKResourceCacheManager* WKResourceCacheManagerRef;
typedef const struct OpaqueWKColorPickerResultListener* WKColorPickerResultListenerRef;
typedef const struct OpaqueWKContext* WKContextRef;
+typedef const struct OpaqueWKContextConfiguration* WKContextConfigurationRef;
typedef const struct OpaqueWKCookieManager* WKCookieManagerRef;
typedef const struct OpaqueWKCredential* WKCredentialRef;
-typedef const struct OpaqueWKDatabaseManager* WKDatabaseManagerRef;
typedef const struct OpaqueWKDownload* WKDownloadRef;
typedef const struct OpaqueWKFormSubmissionListener* WKFormSubmissionListenerRef;
+typedef const struct OpaqueWKFrameInfo* WKFrameInfoRef;
typedef const struct OpaqueWKFrame* WKFrameRef;
typedef const struct OpaqueWKFramePolicyListener* WKFramePolicyListenerRef;
typedef const struct OpaqueWKGeolocationManager* WKGeolocationManagerRef;
@@ -120,10 +110,12 @@ typedef const struct OpaqueWKHitTestResult* WKHitTestResultRef;
typedef const struct OpaqueWKIconDatabase* WKIconDatabaseRef;
typedef const struct OpaqueWKInspector* WKInspectorRef;
typedef const struct OpaqueWKKeyValueStorageManager* WKKeyValueStorageManagerRef;
-typedef const struct OpaqueWKMediaCacheManager* WKMediaCacheManagerRef;
+typedef const struct OpaqueWKMediaSessionFocusManager* WKMediaSessionFocusManagerRef;
+typedef const struct OpaqueWKMediaSessionMetadata* WKMediaSessionMetadataRef;
+typedef const struct OpaqueWKNavigationAction* WKNavigationActionRef;
typedef const struct OpaqueWKNavigationData* WKNavigationDataRef;
-typedef const struct OpaqueWKNetworkInfoManager* WKNetworkInfoManagerRef;
-typedef const struct OpaqueWKNetworkInfo* WKNetworkInfoRef;
+typedef const struct OpaqueWKNavigation* WKNavigationRef;
+typedef const struct OpaqueWKNavigationResponse* WKNavigationResponseRef;
typedef const struct OpaqueWKNotification* WKNotificationRef;
typedef const struct OpaqueWKNotificationManager* WKNotificationManagerRef;
typedef const struct OpaqueWKNotificationPermissionRequest* WKNotificationPermissionRequestRef;
@@ -131,13 +123,28 @@ typedef const struct OpaqueWKNotificationProvider* WKNotificationProviderRef;
typedef const struct OpaqueWKOpenPanelParameters* WKOpenPanelParametersRef;
typedef const struct OpaqueWKOpenPanelResultListener* WKOpenPanelResultListenerRef;
typedef const struct OpaqueWKPage* WKPageRef;
+typedef const struct OpaqueWKPageConfiguration* WKPageConfigurationRef;
typedef const struct OpaqueWKPageGroup* WKPageGroupRef;
typedef const struct OpaqueWKPluginSiteDataManager* WKPluginSiteDataManagerRef;
typedef const struct OpaqueWKPreferences* WKPreferencesRef;
typedef const struct OpaqueWKProtectionSpace* WKProtectionSpaceRef;
+typedef const struct OpaqueWKPageRunBeforeUnloadConfirmPanelResultListener* WKPageRunBeforeUnloadConfirmPanelResultListenerRef;
+typedef const struct OpaqueWKPageRunJavaScriptAlertResultListener* WKPageRunJavaScriptAlertResultListenerRef;
+typedef const struct OpaqueWKPageRunJavaScriptConfirmResultListener* WKPageRunJavaScriptConfirmResultListenerRef;
+typedef const struct OpaqueWKPageRunJavaScriptPromptResultListener* WKPageRunJavaScriptPromptResultListenerRef;
typedef const struct OpaqueWKTextChecker* WKTextCheckerRef;
+typedef const struct OpaqueWKSession* WKSessionRef;
+typedef const struct OpaqueWKSessionState* WKSessionStateRef;
+typedef const struct OpaqueWKUserContentController* WKUserContentControllerRef;
+typedef const struct OpaqueWKUserContentExtensionStore* WKUserContentExtensionStoreRef;
+typedef const struct OpaqueWKUserContentFilter* WKUserContentFilterRef;
+typedef const struct OpaqueWKUserMediaPermissionCheck* WKUserMediaPermissionCheckRef;
+typedef const struct OpaqueWKUserMediaPermissionRequest* WKUserMediaPermissionRequestRef;
+typedef const struct OpaqueWKUserScript* WKUserScriptRef;
typedef const struct OpaqueWKVibration* WKVibrationRef;
typedef const struct OpaqueWKViewportAttributes* WKViewportAttributesRef;
+typedef const struct OpaqueWKWebsiteDataStore* WKWebsiteDataStoreRef;
+typedef const struct OpaqueWKWindowFeatures* WKWindowFeaturesRef;
/* WebKit2 Bundle types */
@@ -146,6 +153,7 @@ typedef const struct OpaqueWKBundleBackForwardList* WKBundleBackForwardListRef;
typedef const struct OpaqueWKBundleBackForwardListItem* WKBundleBackForwardListItemRef;
typedef const struct OpaqueWKBundleDOMCSSStyleDeclaration* WKBundleCSSStyleDeclarationRef;
typedef const struct OpaqueWKBundleDOMWindowExtension* WKBundleDOMWindowExtensionRef;
+typedef const struct OpaqueWKBundleFileHandle* WKBundleFileHandleRef;
typedef const struct OpaqueWKBundleFrame* WKBundleFrameRef;
typedef const struct OpaqueWKBundleHitTestResult* WKBundleHitTestResultRef;
typedef const struct OpaqueWKBundleInspector* WKBundleInspectorRef;
@@ -158,31 +166,4 @@ typedef const struct OpaqueWKBundlePageOverlay* WKBundlePageOverlayRef;
typedef const struct OpaqueWKBundleRangeHandle* WKBundleRangeHandleRef;
typedef const struct OpaqueWKBundleScriptWorld* WKBundleScriptWorldRef;
-#undef WK_EXPORT
-#if defined(WK_NO_EXPORT)
-#define WK_EXPORT
-#elif defined(__GNUC__) && !defined(__CC_ARM) && !defined(__ARMCC__)
-#define WK_EXPORT __attribute__((visibility("default")))
-#elif defined(WIN32) || defined(_WIN32) || defined(_WIN32_WCE) || defined(__CC_ARM) || defined(__ARMCC__)
-#if BUILDING_WEBKIT
-#define WK_EXPORT __declspec(dllexport)
-#else
-#define WK_EXPORT __declspec(dllimport)
-#endif
-#else /* !defined(WK_NO_EXPORT) */
-#define WK_EXPORT
-#endif /* defined(WK_NO_EXPORT) */
-
-#if !defined(WK_INLINE)
-#if defined(__cplusplus)
-#define WK_INLINE static inline
-#elif defined(__GNUC__)
-#define WK_INLINE static __inline__
-#elif defined(__WIN32__)
-#define WK_INLINE static __inline
-#else
-#define WK_INLINE static
-#endif
-#endif /* !defined(WK_INLINE) */
-
#endif /* WKBase_h */
diff --git a/Source/WebKit2/Shared/API/c/WKCertificateInfo.h b/Source/WebKit2/Shared/API/c/WKCertificateInfo.h
index d4a2ed91d..f88f93c1a 100644
--- a/Source/WebKit2/Shared/API/c/WKCertificateInfo.h
+++ b/Source/WebKit2/Shared/API/c/WKCertificateInfo.h
@@ -26,7 +26,7 @@
#ifndef WKCertificateInfo_h
#define WKCertificateInfo_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifdef __cplusplus
extern "C" {
diff --git a/Source/WebKit2/Shared/API/c/WKConnectionRef.cpp b/Source/WebKit2/Shared/API/c/WKConnectionRef.cpp
index 6c4700f59..9fa7042c2 100644
--- a/Source/WebKit2/Shared/API/c/WKConnectionRef.cpp
+++ b/Source/WebKit2/Shared/API/c/WKConnectionRef.cpp
@@ -36,7 +36,7 @@ WKTypeID WKConnectionGetTypeID()
return toAPI(WebConnection::APIType);
}
-void WKConnectionSetConnectionClient(WKConnectionRef connectionRef, const WKConnectionClient* wkClient)
+void WKConnectionSetConnectionClient(WKConnectionRef connectionRef, const WKConnectionClientBase* wkClient)
{
toImpl(connectionRef)->initializeConnectionClient(wkClient);
}
diff --git a/Source/WebKit2/Shared/API/c/WKConnectionRef.h b/Source/WebKit2/Shared/API/c/WKConnectionRef.h
index f6baea734..fd94cb614 100644
--- a/Source/WebKit2/Shared/API/c/WKConnectionRef.h
+++ b/Source/WebKit2/Shared/API/c/WKConnectionRef.h
@@ -26,7 +26,7 @@
#ifndef WKConnectionRef_h
#define WKConnectionRef_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifdef __cplusplus
extern "C" {
@@ -35,19 +35,22 @@ extern "C" {
typedef void (*WKConnectionDidReceiveMessageCallback)(WKConnectionRef connection, WKStringRef messageName, WKTypeRef messageBody, const void *clientInfo);
typedef void (*WKConnectionDidCloseCallback)(WKConnectionRef connection, const void* clientInfo);
-struct WKConnectionClient {
+typedef struct WKConnectionClientBase {
int version;
const void * clientInfo;
+} WKConnectionClientBase;
+
+typedef struct WKConnectionClientV0 {
+ WKConnectionClientBase base;
+
+ // Version 0.
WKConnectionDidReceiveMessageCallback didReceiveMessage;
WKConnectionDidCloseCallback didClose;
-};
-typedef struct WKConnectionClient WKConnectionClient;
-
-enum { WKConnectionClientCurrentVersion = 0 };
+} WKConnectionClientV0;
WK_EXPORT WKTypeID WKConnectionGetTypeID();
-WK_EXPORT void WKConnectionSetConnectionClient(WKConnectionRef connection, const WKConnectionClient* client);
+WK_EXPORT void WKConnectionSetConnectionClient(WKConnectionRef connection, const WKConnectionClientBase* client);
WK_EXPORT void WKConnectionPostMessage(WKConnectionRef connection, WKStringRef messageName, WKTypeRef messageBody);
#ifdef __cplusplus
diff --git a/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp b/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp
index 41134c971..0514f1825 100644
--- a/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp
+++ b/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp
@@ -26,16 +26,12 @@
#include "config.h"
#include "WKContextMenuItem.h"
-#include "MutableArray.h"
+#include "APIArray.h"
#include "WebContextMenuItem.h"
#include "WebContextMenuItemData.h"
#include "WKAPICast.h"
#include "WKContextMenuItemTypes.h"
-#if PLATFORM(MAC)
-#import <mach-o/dyld.h>
-#endif
-
using namespace WebCore;
using namespace WebKit;
@@ -44,15 +40,18 @@ WKTypeID WKContextMenuItemGetTypeID()
#if ENABLE(CONTEXT_MENUS)
return toAPI(WebContextMenuItem::APIType);
#else
- return toAPI(APIObject::TypeNull);
+ return toAPI(API::Object::Type::Null);
#endif
}
WKContextMenuItemRef WKContextMenuItemCreateAsAction(WKContextMenuItemTag tag, WKStringRef title, bool enabled)
{
#if ENABLE(CONTEXT_MENUS)
- return toAPI(WebContextMenuItem::create(WebContextMenuItemData(ActionType, toImpl(tag), toImpl(title)->string(), enabled, false)).leakRef());
+ return toAPI(&WebContextMenuItem::create(WebContextMenuItemData(ActionType, toImpl(tag), toImpl(title)->string(), enabled, false)).leakRef());
#else
+ UNUSED_PARAM(tag);
+ UNUSED_PARAM(title);
+ UNUSED_PARAM(enabled);
return 0;
#endif
}
@@ -60,8 +59,12 @@ WKContextMenuItemRef WKContextMenuItemCreateAsAction(WKContextMenuItemTag tag, W
WKContextMenuItemRef WKContextMenuItemCreateAsCheckableAction(WKContextMenuItemTag tag, WKStringRef title, bool enabled, bool checked)
{
#if ENABLE(CONTEXT_MENUS)
- return toAPI(WebContextMenuItem::create(WebContextMenuItemData(CheckableActionType, toImpl(tag), toImpl(title)->string(), enabled, checked)).leakRef());
+ return toAPI(&WebContextMenuItem::create(WebContextMenuItemData(CheckableActionType, toImpl(tag), toImpl(title)->string(), enabled, checked)).leakRef());
#else
+ UNUSED_PARAM(tag);
+ UNUSED_PARAM(title);
+ UNUSED_PARAM(enabled);
+ UNUSED_PARAM(checked);
return 0;
#endif
}
@@ -71,6 +74,9 @@ WKContextMenuItemRef WKContextMenuItemCreateAsSubmenu(WKStringRef title, bool en
#if ENABLE(CONTEXT_MENUS)
return toAPI(WebContextMenuItem::create(toImpl(title)->string(), enabled, toImpl(submenuItems)).leakRef());
#else
+ UNUSED_PARAM(title);
+ UNUSED_PARAM(enabled);
+ UNUSED_PARAM(submenuItems);
return 0;
#endif
}
@@ -84,37 +90,12 @@ WKContextMenuItemRef WKContextMenuItemSeparatorItem()
#endif
}
-#if PLATFORM(MAC)
-static WKContextMenuItemTag compatibleContextMenuItemTag(WKContextMenuItemTag tag)
-{
- static bool needsWorkaround = ^bool {
- const int32_t safariFrameworkVersionWithIncompatibleContextMenuItemTags = 0x02181900; // 536.25.0 (Safari 6.0)
- return NSVersionOfRunTimeLibrary("Safari") == safariFrameworkVersionWithIncompatibleContextMenuItemTags;
- }();
-
- if (!needsWorkaround)
- return tag;
-
- // kWKContextMenuItemTagDictationAlternative was inserted before kWKContextMenuItemTagInspectElement.
- // DictationAlternative is now at the end like it should have been. To be compatible we need to return
- // InspectElement for DictationAlternative and shift InspectElement and after by one.
- if (tag == kWKContextMenuItemTagDictationAlternative)
- return kWKContextMenuItemTagInspectElement;
- if (tag >= kWKContextMenuItemTagInspectElement && tag < kWKContextMenuItemBaseApplicationTag)
- return tag + 1;
- return tag;
-}
-#endif
-
WKContextMenuItemTag WKContextMenuItemGetTag(WKContextMenuItemRef itemRef)
{
#if ENABLE(CONTEXT_MENUS)
-#if PLATFORM(MAC)
- return compatibleContextMenuItemTag(toAPI(toImpl(itemRef)->data()->action()));
-#else
- return toAPI(toImpl(itemRef)->data()->action());
-#endif
+ return toAPI(toImpl(itemRef)->data().action());
#else
+ UNUSED_PARAM(itemRef);
return toAPI(ContextMenuItemTagNoAction);
#endif
}
@@ -122,8 +103,9 @@ WKContextMenuItemTag WKContextMenuItemGetTag(WKContextMenuItemRef itemRef)
WKContextMenuItemType WKContextMenuItemGetType(WKContextMenuItemRef itemRef)
{
#if ENABLE(CONTEXT_MENUS)
- return toAPI(toImpl(itemRef)->data()->type());
+ return toAPI(toImpl(itemRef)->data().type());
#else
+ UNUSED_PARAM(itemRef);
return toAPI(ActionType);
#endif
}
@@ -131,8 +113,9 @@ WKContextMenuItemType WKContextMenuItemGetType(WKContextMenuItemRef itemRef)
WKStringRef WKContextMenuItemCopyTitle(WKContextMenuItemRef itemRef)
{
#if ENABLE(CONTEXT_MENUS)
- return toCopiedAPI(toImpl(itemRef)->data()->title().impl());
+ return toCopiedAPI(toImpl(itemRef)->data().title().impl());
#else
+ UNUSED_PARAM(itemRef);
return 0;
#endif
}
@@ -140,8 +123,9 @@ WKStringRef WKContextMenuItemCopyTitle(WKContextMenuItemRef itemRef)
bool WKContextMenuItemGetEnabled(WKContextMenuItemRef itemRef)
{
#if ENABLE(CONTEXT_MENUS)
- return toImpl(itemRef)->data()->enabled();
+ return toImpl(itemRef)->data().enabled();
#else
+ UNUSED_PARAM(itemRef);
return false;
#endif
}
@@ -149,8 +133,9 @@ bool WKContextMenuItemGetEnabled(WKContextMenuItemRef itemRef)
bool WKContextMenuItemGetChecked(WKContextMenuItemRef itemRef)
{
#if ENABLE(CONTEXT_MENUS)
- return toImpl(itemRef)->data()->checked();
+ return toImpl(itemRef)->data().checked();
#else
+ UNUSED_PARAM(itemRef);
return false;
#endif
}
@@ -158,8 +143,9 @@ bool WKContextMenuItemGetChecked(WKContextMenuItemRef itemRef)
WKArrayRef WKContextMenuCopySubmenuItems(WKContextMenuItemRef itemRef)
{
#if ENABLE(CONTEXT_MENUS)
- return toAPI(toImpl(itemRef)->submenuItemsAsImmutableArray().leakRef());
+ return toAPI(&toImpl(itemRef)->submenuItemsAsAPIArray().leakRef());
#else
+ UNUSED_PARAM(itemRef);
return 0;
#endif
}
@@ -169,6 +155,7 @@ WKTypeRef WKContextMenuItemGetUserData(WKContextMenuItemRef itemRef)
#if ENABLE(CONTEXT_MENUS)
return toAPI(toImpl(itemRef)->userData());
#else
+ UNUSED_PARAM(itemRef);
return 0;
#endif
}
@@ -177,5 +164,8 @@ void WKContextMenuItemSetUserData(WKContextMenuItemRef itemRef, WKTypeRef userDa
{
#if ENABLE(CONTEXT_MENUS)
toImpl(itemRef)->setUserData(toImpl(userDataRef));
+#else
+ UNUSED_PARAM(itemRef);
+ UNUSED_PARAM(userDataRef);
#endif
}
diff --git a/Source/WebKit2/Shared/API/c/WKContextMenuItem.h b/Source/WebKit2/Shared/API/c/WKContextMenuItem.h
index 9b978400c..caf1b7632 100644
--- a/Source/WebKit2/Shared/API/c/WKContextMenuItem.h
+++ b/Source/WebKit2/Shared/API/c/WKContextMenuItem.h
@@ -26,8 +26,8 @@
#ifndef WKContextMenuItem_h
#define WKContextMenuItem_h
-#include <WebKit2/WKBase.h>
-#include <WebKit2/WKContextMenuItemTypes.h>
+#include <WebKit/WKBase.h>
+#include <WebKit/WKContextMenuItemTypes.h>
#ifdef __cplusplus
extern "C" {
diff --git a/Source/WebKit2/Shared/API/c/WKContextMenuItemTypes.h b/Source/WebKit2/Shared/API/c/WKContextMenuItemTypes.h
index d4d570a95..33ef0ffa4 100644
--- a/Source/WebKit2/Shared/API/c/WKContextMenuItemTypes.h
+++ b/Source/WebKit2/Shared/API/c/WKContextMenuItemTypes.h
@@ -26,6 +26,8 @@
#ifndef WKContextMenuItemTypes_h
#define WKContextMenuItemTypes_h
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -119,6 +121,7 @@ enum {
kWKContextMenuItemTagSelectAll,
kWKContextMenuItemTagOpenLinkInThisWindow,
kWKContextMenuItemTagToggleVideoFullscreen,
+ kWKContextMenuItemTagShareMenu,
kWKContextMenuItemBaseApplicationTag = 10000
};
typedef uint32_t WKContextMenuItemTag;
diff --git a/Source/WebKit2/Shared/API/c/WKData.cpp b/Source/WebKit2/Shared/API/c/WKData.cpp
index f51636914..fdbca73dc 100644
--- a/Source/WebKit2/Shared/API/c/WKData.cpp
+++ b/Source/WebKit2/Shared/API/c/WKData.cpp
@@ -26,20 +26,19 @@
#include "config.h"
#include "WKData.h"
-#include "WebData.h"
+#include "APIData.h"
#include "WKAPICast.h"
using namespace WebKit;
WKTypeID WKDataGetTypeID()
{
- return toAPI(WebData::APIType);
+ return toAPI(API::Data::APIType);
}
WKDataRef WKDataCreate(const unsigned char* bytes, size_t size)
{
- RefPtr<WebData> data = WebData::create(bytes, size);
- return toAPI(data.release().leakRef());
+ return toAPI(&API::Data::create(bytes, size).leakRef());
}
const unsigned char* WKDataGetBytes(WKDataRef dataRef)
diff --git a/Source/WebKit2/Shared/API/c/WKData.h b/Source/WebKit2/Shared/API/c/WKData.h
index a647ee4e4..19e1fff7c 100644
--- a/Source/WebKit2/Shared/API/c/WKData.h
+++ b/Source/WebKit2/Shared/API/c/WKData.h
@@ -26,7 +26,7 @@
#ifndef WKData_h
#define WKData_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#include <stddef.h>
diff --git a/Source/WebKit2/Shared/API/c/WKDeclarationSpecifiers.h b/Source/WebKit2/Shared/API/c/WKDeclarationSpecifiers.h
new file mode 100644
index 000000000..2346ea692
--- /dev/null
+++ b/Source/WebKit2/Shared/API/c/WKDeclarationSpecifiers.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
+ * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WKDeclarationSpecifiers_h
+#define WKDeclarationSpecifiers_h
+
+#undef WK_EXPORT
+#if defined(WK_NO_EXPORT)
+#define WK_EXPORT
+#elif defined(__GNUC__) && !defined(__CC_ARM) && !defined(__ARMCC__)
+#define WK_EXPORT __attribute__((visibility("default")))
+#elif defined(WIN32) || defined(_WIN32) || defined(_WIN32_WCE) || defined(__CC_ARM) || defined(__ARMCC__)
+#if BUILDING_WEBKIT
+#define WK_EXPORT __declspec(dllexport)
+#else
+#define WK_EXPORT __declspec(dllimport)
+#endif
+#else /* !defined(WK_NO_EXPORT) */
+#define WK_EXPORT
+#endif /* defined(WK_NO_EXPORT) */
+
+#if !defined(WK_INLINE)
+#if defined(__cplusplus)
+#define WK_INLINE static inline
+#elif defined(__GNUC__)
+#define WK_INLINE static __inline__
+#elif defined(__WIN32__)
+#define WK_INLINE static __inline
+#else
+#define WK_INLINE static
+#endif
+#endif /* !defined(WK_INLINE) */
+
+#ifndef __has_extension
+#define __has_extension(x) 0
+#endif
+
+#if defined(__has_extension) && __has_extension(enumerator_attributes) && __has_extension(attribute_unavailable_with_message)
+#define WK_C_DEPRECATED(message) __attribute__((deprecated(message)))
+#else
+#define WK_C_DEPRECATED(message)
+#endif
+
+#if defined(__has_extension) && __has_extension(enumerator_attributes) && __has_extension(attribute_unavailable_with_message)
+#define WK_ENUM_DEPRECATED(message) __attribute__((deprecated(message)))
+#else
+#define WK_ENUM_DEPRECATED(message)
+#endif
+
+#endif /* WKDeclarationSpecifiers_h */
diff --git a/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp b/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp
new file mode 100644
index 000000000..563c87329
--- /dev/null
+++ b/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp
@@ -0,0 +1,165 @@
+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "APIDictionary.h"
+#include "WKArray.h"
+#include "WKContextPrivate.h"
+#include "WKMutableDictionary.h"
+#include "WKPreferencesRefPrivate.h"
+#include "WKSharedAPICast.h"
+
+#if PLATFORM(MAC)
+#include "WKContextPrivateMac.h"
+#endif
+
+// Deprecated functions that should be removed from the framework once nobody uses them.
+
+using namespace WebKit;
+
+extern "C" {
+WK_EXPORT bool WKArrayIsMutable(WKArrayRef array);
+
+WK_EXPORT void WKPageSetVisibilityState(WKPageRef, WKPageVisibilityState, bool);
+
+WK_EXPORT bool WKDictionaryIsMutable(WKDictionaryRef dictionary);
+WK_EXPORT bool WKDictionaryAddItem(WKMutableDictionaryRef dictionary, WKStringRef key, WKTypeRef item);
+WK_EXPORT void WKDictionaryRemoveItem(WKMutableDictionaryRef dictionary, WKStringRef key);
+
+WK_EXPORT void WKPreferencesSetRegionBasedColumnsEnabled(WKPreferencesRef, bool flag);
+WK_EXPORT bool WKPreferencesGetRegionBasedColumnsEnabled(WKPreferencesRef);
+
+WK_EXPORT void WKPreferencesSetMultithreadedWebGLEnabled(WKPreferencesRef, bool);
+WK_EXPORT bool WKPreferencesGetMultithreadedWebGLEnabled(WKPreferencesRef);
+
+WK_EXPORT bool WKInspectorIsDebuggingJavaScript(WKInspectorRef);
+WK_EXPORT void WKInspectorToggleJavaScriptDebugging(WKInspectorRef);
+
+WK_EXPORT bool WKInspectorIsProfilingJavaScript(WKInspectorRef);
+WK_EXPORT void WKInspectorToggleJavaScriptProfiling(WKInspectorRef);
+
+#if PLATFORM(MAC)
+WK_EXPORT CGContextRef WKGraphicsContextGetCGContext(WKGraphicsContextRef graphicsContext);
+#endif
+}
+
+bool WKArrayIsMutable(WKArrayRef)
+{
+ return false;
+}
+
+void WKPageSetVisibilityState(WKPageRef, WKPageVisibilityState, bool)
+{
+}
+
+bool WKDictionaryIsMutable(WKDictionaryRef)
+{
+ return true;
+}
+
+bool WKDictionaryAddItem(WKMutableDictionaryRef dictionaryRef, WKStringRef keyRef, WKTypeRef itemRef)
+{
+ return toImpl(dictionaryRef)->add(toImpl(keyRef)->string(), toImpl(itemRef));
+}
+
+void WKDictionaryRemoveItem(WKMutableDictionaryRef dictionaryRef, WKStringRef keyRef)
+{
+ toImpl(dictionaryRef)->remove(toImpl(keyRef)->string());
+}
+
+void WKPreferencesSetRegionBasedColumnsEnabled(WKPreferencesRef, bool)
+{
+}
+
+bool WKPreferencesGetRegionBasedColumnsEnabled(WKPreferencesRef)
+{
+ return true;
+}
+
+void WKPreferencesSetMultithreadedWebGLEnabled(WKPreferencesRef, bool)
+{
+}
+
+bool WKPreferencesGetMultithreadedWebGLEnabled(WKPreferencesRef)
+{
+ return false;
+}
+
+void WKPreferencesSetScreenFontSubstitutionEnabled(WKPreferencesRef, bool)
+{
+}
+
+bool WKPreferencesGetScreenFontSubstitutionEnabled(WKPreferencesRef)
+{
+ return false;
+}
+
+bool WKInspectorIsDebuggingJavaScript(WKInspectorRef)
+{
+ return false;
+}
+
+void WKInspectorToggleJavaScriptDebugging(WKInspectorRef)
+{
+}
+
+bool WKInspectorIsProfilingJavaScript(WKInspectorRef)
+{
+ return false;
+}
+
+void WKInspectorToggleJavaScriptProfiling(WKInspectorRef)
+{
+}
+
+void WKContextSetUsesNetworkProcess(WKContextRef, bool)
+{
+}
+
+void WKContextSetProcessModel(WKContextRef, WKProcessModel)
+{
+}
+
+WKProcessModel WKContextGetProcessModel(WKContextRef)
+{
+ return kWKProcessModelMultipleSecondaryProcesses;
+}
+
+#if PLATFORM(MAC)
+CGContextRef WKGraphicsContextGetCGContext(WKGraphicsContextRef graphicsContext)
+{
+ return nullptr;
+}
+
+bool WKContextGetProcessSuppressionEnabled(WKContextRef)
+{
+ return true;
+}
+
+void WKContextSetProcessSuppressionEnabled(WKContextRef, bool)
+{
+}
+#endif
diff --git a/Source/WebKit2/Shared/API/c/cf/WKErrorCF.h b/Source/WebKit2/Shared/API/c/WKDiagnosticLoggingResultType.h
index 298f7c291..581c74f96 100644
--- a/Source/WebKit2/Shared/API/c/cf/WKErrorCF.h
+++ b/Source/WebKit2/Shared/API/c/WKDiagnosticLoggingResultType.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,21 +23,23 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WKErrorCF_h
-#define WKErrorCF_h
-
-#include <CoreFoundation/CoreFoundation.h>
-#include <WebKit2/WKBase.h>
+#ifndef WKDiagnosticLoggingResultType_h
+#define WKDiagnosticLoggingResultType_h
#ifdef __cplusplus
extern "C" {
#endif
-WK_EXPORT WKErrorRef WKErrorCreateWithCFError(CFErrorRef error);
-WK_EXPORT CFErrorRef WKErrorCopyCFError(CFAllocatorRef alloc, WKErrorRef error);
+enum {
+ kWKDiagnosticLoggingResultPass = 0,
+ kWKDiagnosticLoggingResultFail = 1,
+ kWKDiagnosticLoggingResultNoop = 2,
+};
+typedef uint32_t WKDiagnosticLoggingResultType;
#ifdef __cplusplus
}
#endif
-#endif /* WKErrorCF_h */
+#endif /* WKDiagnosticLoggingResultType_h */
+
diff --git a/Source/WebKit2/Shared/API/c/WKDictionary.cpp b/Source/WebKit2/Shared/API/c/WKDictionary.cpp
index a3bdcf98f..654e1e61e 100644
--- a/Source/WebKit2/Shared/API/c/WKDictionary.cpp
+++ b/Source/WebKit2/Shared/API/c/WKDictionary.cpp
@@ -26,20 +26,29 @@
#include "config.h"
#include "WKDictionary.h"
-#include "ImmutableArray.h"
-#include "ImmutableDictionary.h"
+#include "APIArray.h"
+#include "APIDictionary.h"
#include "WKAPICast.h"
using namespace WebKit;
WKTypeID WKDictionaryGetTypeID()
{
- return toAPI(ImmutableDictionary::APIType);
+ return toAPI(API::Dictionary::APIType);
+}
+
+WK_EXPORT WKDictionaryRef WKDictionaryCreate(const WKStringRef* keys, const WKTypeRef* values, size_t numberOfValues)
+{
+ API::Dictionary::MapType map;
+ for (size_t i = 0; i < numberOfValues; ++i)
+ map.add(toImpl(keys[i])->string(), toImpl(values[i]));
+
+ return toAPI(&API::Dictionary::create(WTFMove(map)).leakRef());
}
WKTypeRef WKDictionaryGetItemForKey(WKDictionaryRef dictionaryRef, WKStringRef key)
{
- return toImpl(dictionaryRef)->get(toImpl(key)->string());
+ return toAPI(toImpl(dictionaryRef)->get(toImpl(key)->string()));
}
size_t WKDictionaryGetSize(WKDictionaryRef dictionaryRef)
@@ -49,6 +58,5 @@ size_t WKDictionaryGetSize(WKDictionaryRef dictionaryRef)
WKArrayRef WKDictionaryCopyKeys(WKDictionaryRef dictionaryRef)
{
- RefPtr<ImmutableArray> keys = toImpl(dictionaryRef)->keys();
- return toAPI(keys.release().leakRef());
+ return toAPI(&toImpl(dictionaryRef)->keys().leakRef());
}
diff --git a/Source/WebKit2/Shared/API/c/WKDictionary.h b/Source/WebKit2/Shared/API/c/WKDictionary.h
index 1c3940016..e486cc2a8 100644
--- a/Source/WebKit2/Shared/API/c/WKDictionary.h
+++ b/Source/WebKit2/Shared/API/c/WKDictionary.h
@@ -26,7 +26,7 @@
#ifndef WKDictionary_h
#define WKDictionary_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#include <stddef.h>
@@ -36,6 +36,8 @@ extern "C" {
WK_EXPORT WKTypeID WKDictionaryGetTypeID();
+WK_EXPORT WKDictionaryRef WKDictionaryCreate(const WKStringRef* keys, const WKTypeRef* values, size_t numberOfValues);
+
WK_EXPORT WKTypeRef WKDictionaryGetItemForKey(WKDictionaryRef dictionary, WKStringRef key);
WK_EXPORT size_t WKDictionaryGetSize(WKDictionaryRef dictionary);
diff --git a/Source/WebKit2/Shared/API/c/WKError.cpp b/Source/WebKit2/Shared/API/c/WKErrorRef.cpp
index 148bd624b..c1e75eb00 100644
--- a/Source/WebKit2/Shared/API/c/WKError.cpp
+++ b/Source/WebKit2/Shared/API/c/WKErrorRef.cpp
@@ -24,21 +24,21 @@
*/
#include "config.h"
-#include "WKError.h"
+#include "WKErrorRef.h"
-#include "WebError.h"
+#include "APIError.h"
#include "WKAPICast.h"
using namespace WebKit;
WKTypeID WKErrorGetTypeID()
{
- return toAPI(WebError::APIType);
+ return toAPI(API::Error::APIType);
}
WKStringRef WKErrorCopyWKErrorDomain()
{
- return toCopiedAPI(WebError::webKitErrorDomain());
+ return toCopiedAPI(API::Error::webKitErrorDomain());
}
WKStringRef WKErrorCopyDomain(WKErrorRef errorRef)
diff --git a/Source/WebKit2/Shared/API/c/WKError.h b/Source/WebKit2/Shared/API/c/WKErrorRef.h
index b099b732c..bc8e294fa 100644
--- a/Source/WebKit2/Shared/API/c/WKError.h
+++ b/Source/WebKit2/Shared/API/c/WKErrorRef.h
@@ -23,10 +23,10 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WKError_h
-#define WKError_h
+#ifndef WKErrorRef_h
+#define WKErrorRef_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifdef __cplusplus
extern "C" {
@@ -37,6 +37,7 @@ enum {
kWKErrorCodeCannotShowURL = 101,
kWKErrorCodeFrameLoadInterruptedByPolicyChange = 102,
kWKErrorCodeCannotUseRestrictedPort = 103,
+ kWKErrorCodeFrameLoadBlockedByContentBlocker = 104,
kWKErrorCodeCannotFindPlugIn = 200,
kWKErrorCodeCannotLoadPlugIn = 201,
kWKErrorCodeJavaUnavailable = 202,
@@ -45,7 +46,6 @@ enum {
kWKErrorCodeInsecurePlugInVersion = 205,
kWKErrorInternal = 300,
};
-typedef uint32_t WKErrorCode;
WK_EXPORT WKTypeID WKErrorGetTypeID();
@@ -60,4 +60,4 @@ WK_EXPORT WKStringRef WKErrorCopyLocalizedDescription(WKErrorRef error);
}
#endif
-#endif // WKError_h
+#endif // WKErrorRef_h
diff --git a/Source/WebKit2/Shared/API/c/WKEvent.h b/Source/WebKit2/Shared/API/c/WKEvent.h
index b15c47ad2..05c43a58d 100644
--- a/Source/WebKit2/Shared/API/c/WKEvent.h
+++ b/Source/WebKit2/Shared/API/c/WKEvent.h
@@ -26,7 +26,7 @@
#ifndef WKEvent_h
#define WKEvent_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifdef __cplusplus
extern "C" {
diff --git a/Source/WebKit2/Shared/API/c/WKFindOptions.h b/Source/WebKit2/Shared/API/c/WKFindOptions.h
index f2be889f5..176127abb 100644
--- a/Source/WebKit2/Shared/API/c/WKFindOptions.h
+++ b/Source/WebKit2/Shared/API/c/WKFindOptions.h
@@ -26,6 +26,8 @@
#ifndef WKFindOptions_h
#define WKFindOptions_h
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/Source/WebKit2/Shared/API/c/WKGeometry.cpp b/Source/WebKit2/Shared/API/c/WKGeometry.cpp
index 8ad7ff0e7..e1ea82435 100644
--- a/Source/WebKit2/Shared/API/c/WKGeometry.cpp
+++ b/Source/WebKit2/Shared/API/c/WKGeometry.cpp
@@ -26,42 +26,39 @@
#include "config.h"
#include "WKGeometry.h"
+#include "APIGeometry.h"
#include "WKAPICast.h"
-#include "WebGeometry.h"
using namespace WebKit;
WKTypeID WKSizeGetTypeID()
{
- return toAPI(WebSize::APIType);
+ return toAPI(API::Size::APIType);
}
WKTypeID WKPointGetTypeID()
{
- return toAPI(WebPoint::APIType);
+ return toAPI(API::Point::APIType);
}
WKTypeID WKRectGetTypeID()
{
- return toAPI(WebRect::APIType);
+ return toAPI(API::Rect::APIType);
}
WKPointRef WKPointCreate(WKPoint point)
{
- RefPtr<WebPoint> webPoint = WebPoint::create(point);
- return toAPI(webPoint.release().leakRef());
+ return toAPI(&API::Point::create(point).leakRef());
}
WKSizeRef WKSizeCreate(WKSize size)
{
- RefPtr<WebSize> webSize = WebSize::create(size);
- return toAPI(webSize.release().leakRef());
+ return toAPI(&API::Size::create(size).leakRef());
}
WKRectRef WKRectCreate(WKRect rect)
{
- RefPtr<WebRect> webRect = WebRect::create(rect);
- return toAPI(webRect.release().leakRef());
+ return toAPI(&API::Rect::create(rect).leakRef());
}
WKSize WKSizeGetValue(WKSizeRef size)
diff --git a/Source/WebKit2/Shared/API/c/WKGeometry.h b/Source/WebKit2/Shared/API/c/WKGeometry.h
index 97bf242e9..124fe2498 100644
--- a/Source/WebKit2/Shared/API/c/WKGeometry.h
+++ b/Source/WebKit2/Shared/API/c/WKGeometry.h
@@ -26,7 +26,7 @@
#ifndef WKGeometry_h
#define WKGeometry_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifdef __cplusplus
extern "C" {
diff --git a/Source/WebKit2/Shared/API/c/WKGraphicsContext.cpp b/Source/WebKit2/Shared/API/c/WKGraphicsContext.cpp
deleted file mode 100644
index 5d80dfa3f..000000000
--- a/Source/WebKit2/Shared/API/c/WKGraphicsContext.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WKGraphicsContext.h"
-
-#include "WKSharedAPICast.h"
-#include "WebGraphicsContext.h"
-
-using namespace WebKit;
-
-WKTypeID WKGraphicsContextGetTypeID()
-{
- return toAPI(WebGraphicsContext::APIType);
-}
diff --git a/Source/WebKit2/Shared/API/c/WKImage.h b/Source/WebKit2/Shared/API/c/WKImage.h
index 07437bd76..27a34544e 100644
--- a/Source/WebKit2/Shared/API/c/WKImage.h
+++ b/Source/WebKit2/Shared/API/c/WKImage.h
@@ -26,8 +26,8 @@
#ifndef WKImage_h
#define WKImage_h
-#include <WebKit2/WKBase.h>
-#include <WebKit2/WKGeometry.h>
+#include <WebKit/WKBase.h>
+#include <WebKit/WKGeometry.h>
#ifdef __cplusplus
extern "C" {
@@ -42,7 +42,10 @@ enum {
kWKSnapshotOptionsShareable = 1 << 0,
kWKSnapshotOptionsExcludeSelectionHighlighting = 1 << 1,
kWKSnapshotOptionsInViewCoordinates = 1 << 2,
- kWKSnapshotOptionsPaintSelectionRectangle = 1 << 3
+ kWKSnapshotOptionsPaintSelectionRectangle = 1 << 3,
+ kWKSnapshotOptionsForceBlackText = 1 << 4,
+ kWKSnapshotOptionsForceWhiteText = 1 << 5,
+ kWKSnapshotOptionsPrinting = 1 << 6,
};
typedef uint32_t WKSnapshotOptions;
diff --git a/Source/WebKit2/Shared/API/c/cairo/WKImageCairo.h b/Source/WebKit2/Shared/API/c/WKImmediateActionTypes.h
index 5c1e5413f..5fdc29a9e 100644
--- a/Source/WebKit2/Shared/API/c/cairo/WKImageCairo.h
+++ b/Source/WebKit2/Shared/API/c/WKImmediateActionTypes.h
@@ -1,6 +1,5 @@
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Copyright (C) 2011 Igalia S.L.
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -24,24 +23,30 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WKImageCairo_h
-#define WKImageCairo_h
+#ifndef WKImmediateActionTypes_h
+#define WKImmediateActionTypes_h
-#include <WebKit2/WKBase.h>
-#include <WebKit2/WKImage.h>
-
-typedef struct _cairo_surface cairo_surface_t;
+#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
-WK_EXPORT cairo_surface_t* WKImageCreateCairoSurface(WKImageRef image);
-
-WK_EXPORT WKImageRef WKImageCreateFromCairoSurface(cairo_surface_t* surface, WKImageOptions options);
+enum {
+ kWKImmediateActionNone = 0,
+ kWKImmediateActionLinkPreview,
+ kWKImmediateActionDataDetectedItem,
+ kWKImmediateActionLookupText,
+ kWKImmediateActionMailtoLink,
+ kWKImmediateActionTelLink
+};
+
+#ifndef _WKImmediateActionType
+#define _WKImmediateActionType uint32_t
+#endif
#ifdef __cplusplus
}
#endif
-#endif /* WKImageCairo_h */
+#endif /* WKImmediateActionTypes_h */
diff --git a/Source/WebKit2/Shared/API/c/WKMutableArray.cpp b/Source/WebKit2/Shared/API/c/WKMutableArray.cpp
index 2d8c11d25..5dc85260f 100644
--- a/Source/WebKit2/Shared/API/c/WKMutableArray.cpp
+++ b/Source/WebKit2/Shared/API/c/WKMutableArray.cpp
@@ -26,29 +26,23 @@
#include "config.h"
#include "WKMutableArray.h"
-#include "MutableArray.h"
+#include "APIArray.h"
#include "WKAPICast.h"
using namespace WebKit;
WKMutableArrayRef WKMutableArrayCreate()
{
- RefPtr<MutableArray> array = MutableArray::create();
- return toAPI(array.release().leakRef());
-}
-
-bool WKArrayIsMutable(WKArrayRef arrayRef)
-{
- return toImpl(arrayRef)->isMutable();
+ return const_cast<WKMutableArrayRef>(toAPI(&API::Array::create().leakRef()));
}
void WKArrayAppendItem(WKMutableArrayRef arrayRef, WKTypeRef itemRef)
{
- toImpl(arrayRef)->append(toImpl(itemRef));
+ toImpl(arrayRef)->elements().append(toImpl(itemRef));
}
void WKArrayRemoveItemAtIndex(WKMutableArrayRef arrayRef, size_t index)
{
- toImpl(arrayRef)->removeItemAtIndex(index);
+ toImpl(arrayRef)->elements().remove(index);
}
diff --git a/Source/WebKit2/Shared/API/c/WKMutableArray.h b/Source/WebKit2/Shared/API/c/WKMutableArray.h
index a0dc06a4f..80bd8c029 100644
--- a/Source/WebKit2/Shared/API/c/WKMutableArray.h
+++ b/Source/WebKit2/Shared/API/c/WKMutableArray.h
@@ -26,7 +26,8 @@
#ifndef WKMutableArray_h
#define WKMutableArray_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
+#include <stddef.h>
#ifndef __cplusplus
#include <stdbool.h>
@@ -38,8 +39,6 @@ extern "C" {
WK_EXPORT WKMutableArrayRef WKMutableArrayCreate();
-WK_EXPORT bool WKArrayIsMutable(WKArrayRef array);
-
WK_EXPORT void WKArrayAppendItem(WKMutableArrayRef array, WKTypeRef item);
WK_EXPORT void WKArrayRemoveItemAtIndex(WKMutableArrayRef array, size_t index);
diff --git a/Source/WebKit2/Shared/API/c/WKMutableDictionary.cpp b/Source/WebKit2/Shared/API/c/WKMutableDictionary.cpp
index b066df5e4..96b89bd45 100644
--- a/Source/WebKit2/Shared/API/c/WKMutableDictionary.cpp
+++ b/Source/WebKit2/Shared/API/c/WKMutableDictionary.cpp
@@ -26,25 +26,14 @@
#include "config.h"
#include "WKMutableDictionary.h"
-#include "MutableDictionary.h"
+#include "APIDictionary.h"
#include "WKAPICast.h"
using namespace WebKit;
WKMutableDictionaryRef WKMutableDictionaryCreate()
{
- RefPtr<MutableDictionary> dictionary = MutableDictionary::create();
- return toAPI(dictionary.release().leakRef());
-}
-
-bool WKDictionaryIsMutable(WKDictionaryRef dictionaryRef)
-{
- return toImpl(dictionaryRef)->isMutable();
-}
-
-bool WKDictionaryAddItem(WKMutableDictionaryRef dictionaryRef, WKStringRef keyRef, WKTypeRef itemRef)
-{
- return toImpl(dictionaryRef)->add(toImpl(keyRef)->string(), toImpl(itemRef));
+ return const_cast<WKMutableDictionaryRef>(toAPI(&API::Dictionary::create().leakRef()));
}
bool WKDictionarySetItem(WKMutableDictionaryRef dictionaryRef, WKStringRef keyRef, WKTypeRef itemRef)
@@ -52,7 +41,3 @@ bool WKDictionarySetItem(WKMutableDictionaryRef dictionaryRef, WKStringRef keyRe
return toImpl(dictionaryRef)->set(toImpl(keyRef)->string(), toImpl(itemRef));
}
-void WKDictionaryRemoveItem(WKMutableDictionaryRef dictionaryRef, WKStringRef keyRef)
-{
- toImpl(dictionaryRef)->remove(toImpl(keyRef)->string());
-}
diff --git a/Source/WebKit2/Shared/API/c/WKMutableDictionary.h b/Source/WebKit2/Shared/API/c/WKMutableDictionary.h
index 2459f9132..0c3b33a12 100644
--- a/Source/WebKit2/Shared/API/c/WKMutableDictionary.h
+++ b/Source/WebKit2/Shared/API/c/WKMutableDictionary.h
@@ -26,7 +26,7 @@
#ifndef WKMutableDictionary_h
#define WKMutableDictionary_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifndef __cplusplus
#include <stdbool.h>
@@ -38,11 +38,7 @@ extern "C" {
WK_EXPORT WKMutableDictionaryRef WKMutableDictionaryCreate();
-WK_EXPORT bool WKDictionaryIsMutable(WKDictionaryRef dictionary);
-
-WK_EXPORT bool WKDictionaryAddItem(WKMutableDictionaryRef dictionary, WKStringRef key, WKTypeRef item);
WK_EXPORT bool WKDictionarySetItem(WKMutableDictionaryRef dictionary, WKStringRef key, WKTypeRef item);
-WK_EXPORT void WKDictionaryRemoveItem(WKMutableDictionaryRef dictionary, WKStringRef key);
#ifdef __cplusplus
}
diff --git a/Source/WebKit2/Shared/API/c/WKNumber.cpp b/Source/WebKit2/Shared/API/c/WKNumber.cpp
index 1fc796908..11300632c 100644
--- a/Source/WebKit2/Shared/API/c/WKNumber.cpp
+++ b/Source/WebKit2/Shared/API/c/WKNumber.cpp
@@ -26,19 +26,19 @@
#include "config.h"
#include "WKNumber.h"
+#include "APINumber.h"
#include "WKAPICast.h"
-#include "WebNumber.h"
using namespace WebKit;
WKTypeID WKBooleanGetTypeID()
{
- return toAPI(WebBoolean::APIType);
+ return toAPI(API::Boolean::APIType);
}
WKBooleanRef WKBooleanCreate(bool value)
{
- RefPtr<WebBoolean> booleanObject = WebBoolean::create(value);
+ RefPtr<API::Boolean> booleanObject = API::Boolean::create(value);
return toAPI(booleanObject.release().leakRef());
}
@@ -49,12 +49,12 @@ bool WKBooleanGetValue(WKBooleanRef booleanRef)
WKTypeID WKDoubleGetTypeID()
{
- return toAPI(WebDouble::APIType);
+ return toAPI(API::Double::APIType);
}
WKDoubleRef WKDoubleCreate(double value)
{
- RefPtr<WebDouble> doubleObject = WebDouble::create(value);
+ RefPtr<API::Double> doubleObject = API::Double::create(value);
return toAPI(doubleObject.release().leakRef());
}
@@ -65,12 +65,12 @@ double WKDoubleGetValue(WKDoubleRef doubleRef)
WKTypeID WKUInt64GetTypeID()
{
- return toAPI(WebUInt64::APIType);
+ return toAPI(API::UInt64::APIType);
}
WKUInt64Ref WKUInt64Create(uint64_t value)
{
- RefPtr<WebUInt64> uint64Object = WebUInt64::create(value);
+ RefPtr<API::UInt64> uint64Object = API::UInt64::create(value);
return toAPI(uint64Object.release().leakRef());
}
diff --git a/Source/WebKit2/Shared/API/c/WKNumber.h b/Source/WebKit2/Shared/API/c/WKNumber.h
index c8c912965..2ebe73a8c 100644
--- a/Source/WebKit2/Shared/API/c/WKNumber.h
+++ b/Source/WebKit2/Shared/API/c/WKNumber.h
@@ -26,7 +26,7 @@
#ifndef WKNumber_h
#define WKNumber_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifdef __cplusplus
extern "C" {
diff --git a/Source/WebKit2/Shared/API/c/WKPageLoadTypes.h b/Source/WebKit2/Shared/API/c/WKPageLoadTypes.h
index 726630150..fce79a3ad 100644
--- a/Source/WebKit2/Shared/API/c/WKPageLoadTypes.h
+++ b/Source/WebKit2/Shared/API/c/WKPageLoadTypes.h
@@ -26,6 +26,8 @@
#ifndef WKPageLoadTypes_h
#define WKPageLoadTypes_h
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/Source/WebKit2/Shared/API/c/WKPageVisibilityTypes.h b/Source/WebKit2/Shared/API/c/WKPageVisibilityTypes.h
index a64a3951c..2f8c6d2eb 100644
--- a/Source/WebKit2/Shared/API/c/WKPageVisibilityTypes.h
+++ b/Source/WebKit2/Shared/API/c/WKPageVisibilityTypes.h
@@ -26,6 +26,8 @@
#ifndef WKPageVisibilityTypes_h
#define WKPageVisibilityTypes_h
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -33,8 +35,7 @@ extern "C" {
enum {
kWKPageVisibilityStateVisible,
kWKPageVisibilityStateHidden,
- kWKPageVisibilityStatePrerender,
- kWKPageVisibilityStateUnloaded
+ kWKPageVisibilityStatePrerender
};
typedef uint32_t WKPageVisibilityState;
diff --git a/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp b/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp
index 19435e08c..e3ae4f5f0 100644
--- a/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp
+++ b/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp
@@ -26,92 +26,148 @@
#include "config.h"
#include "WKPluginInformation.h"
+#include "APIString.h"
#include "PluginInformation.h"
#include "WKSharedAPICast.h"
-#include "WebString.h"
using namespace WebKit;
WKStringRef WKPluginInformationBundleIdentifierKey()
{
- static WebString* key = WebString::create(pluginInformationBundleIdentifierKey()).leakRef();
- return toAPI(key);
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ static API::String& key = API::String::create(pluginInformationBundleIdentifierKey()).leakRef();
+ return toAPI(&key);
+#else
+ return 0;
+#endif
}
WKStringRef WKPluginInformationBundleVersionKey()
{
- static WebString* key = WebString::create(pluginInformationBundleVersionKey()).leakRef();
- return toAPI(key);
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ static API::String& key = API::String::create(pluginInformationBundleVersionKey()).leakRef();
+ return toAPI(&key);
+#else
+ return 0;
+#endif
}
WKStringRef WKPluginInformationBundleShortVersionKey()
{
- static WebString* key = WebString::create(pluginInformationBundleShortVersionKey()).leakRef();
- return toAPI(key);
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ static API::String& key = API::String::create(pluginInformationBundleShortVersionKey()).leakRef();
+ return toAPI(&key);
+#else
+ return 0;
+#endif
}
WKStringRef WKPluginInformationPathKey()
{
- static WebString* key = WebString::create(pluginInformationPathKey()).leakRef();
- return toAPI(key);
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ static API::String& key = API::String::create(pluginInformationPathKey()).leakRef();
+ return toAPI(&key);
+#else
+ return 0;
+#endif
}
WKStringRef WKPluginInformationDisplayNameKey()
{
- static WebString* key = WebString::create(pluginInformationDisplayNameKey()).leakRef();
- return toAPI(key);
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ static API::String& key = API::String::create(pluginInformationDisplayNameKey()).leakRef();
+ return toAPI(&key);
+#else
+ return 0;
+#endif
}
WKStringRef WKPluginInformationDefaultLoadPolicyKey()
{
- static WebString* key = WebString::create(pluginInformationDefaultLoadPolicyKey()).leakRef();
- return toAPI(key);
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ static API::String& key = API::String::create(pluginInformationDefaultLoadPolicyKey()).leakRef();
+ return toAPI(&key);
+#else
+ return 0;
+#endif
}
WKStringRef WKPluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey()
{
- static WebString* key = WebString::create(pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey()).leakRef();
- return toAPI(key);
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ static API::String& key = API::String::create(pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey()).leakRef();
+ return toAPI(&key);
+#else
+ return 0;
+#endif
}
WKStringRef WKPluginInformationHasSandboxProfileKey()
{
- static WebString* key = WebString::create(pluginInformationHasSandboxProfileKey()).leakRef();
- return toAPI(key);
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ static API::String& key = API::String::create(pluginInformationHasSandboxProfileKey()).leakRef();
+ return toAPI(&key);
+#else
+ return 0;
+#endif
}
WKStringRef WKPluginInformationFrameURLKey()
{
- static WebString* key = WebString::create(pluginInformationFrameURLKey()).leakRef();
- return toAPI(key);
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ static API::String& key = API::String::create(pluginInformationFrameURLKey()).leakRef();
+ return toAPI(&key);
+#else
+ return 0;
+#endif
}
WKStringRef WKPluginInformationMIMETypeKey()
{
- static WebString* key = WebString::create(pluginInformationMIMETypeKey()).leakRef();
- return toAPI(key);
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ static API::String& key = API::String::create(pluginInformationMIMETypeKey()).leakRef();
+ return toAPI(&key);
+#else
+ return 0;
+#endif
}
WKStringRef WKPluginInformationPageURLKey()
{
- static WebString* key = WebString::create(pluginInformationPageURLKey()).leakRef();
- return toAPI(key);
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ static API::String& key = API::String::create(pluginInformationPageURLKey()).leakRef();
+ return toAPI(&key);
+#else
+ return 0;
+#endif
}
WKStringRef WKPluginInformationPluginspageAttributeURLKey()
{
- static WebString* key = WebString::create(pluginInformationPluginspageAttributeURLKey()).leakRef();
- return toAPI(key);
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ static API::String& key = API::String::create(pluginInformationPluginspageAttributeURLKey()).leakRef();
+ return toAPI(&key);
+#else
+ return 0;
+#endif
}
WKStringRef WKPluginInformationPluginURLKey()
{
- static WebString* key = WebString::create(pluginInformationPluginURLKey()).leakRef();
- return toAPI(key);
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ static API::String& key = API::String::create(pluginInformationPluginURLKey()).leakRef();
+ return toAPI(&key);
+#else
+ return 0;
+#endif
}
WKStringRef WKPlugInInformationReplacementObscuredKey()
{
- static WebString* key = WebString::create(plugInInformationReplacementObscuredKey()).leakRef();
- return toAPI(key);
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ static API::String& key = API::String::create(plugInInformationReplacementObscuredKey()).leakRef();
+ return toAPI(&key);
+#else
+ return 0;
+#endif
}
diff --git a/Source/WebKit2/Shared/API/c/WKPluginInformation.h b/Source/WebKit2/Shared/API/c/WKPluginInformation.h
index 0bcaef192..08970844b 100644
--- a/Source/WebKit2/Shared/API/c/WKPluginInformation.h
+++ b/Source/WebKit2/Shared/API/c/WKPluginInformation.h
@@ -26,7 +26,7 @@
#ifndef WKPluginInformation_h
#define WKPluginInformation_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifdef __cplusplus
extern "C" {
diff --git a/Source/WebKit2/Shared/API/c/WKRenderLayer.cpp b/Source/WebKit2/Shared/API/c/WKRenderLayer.cpp
index 82cf959be..da21e69aa 100644
--- a/Source/WebKit2/Shared/API/c/WKRenderLayer.cpp
+++ b/Source/WebKit2/Shared/API/c/WKRenderLayer.cpp
@@ -53,7 +53,7 @@ WKStringRef WKRenderLayerCopyElementTagName(WKRenderLayerRef renderLayerRef)
if (!renderLayer->renderer()->elementTagName().isNull())
return toCopiedAPI(renderLayer->renderer()->elementTagName());
- return 0;
+ return nullptr;
}
WKStringRef WKRenderLayerCopyElementID(WKRenderLayerRef renderLayerRef)
@@ -62,7 +62,7 @@ WKStringRef WKRenderLayerCopyElementID(WKRenderLayerRef renderLayerRef)
if (!renderLayer->renderer()->elementID().isNull())
return toCopiedAPI(renderLayer->renderer()->elementID());
- return 0;
+ return nullptr;
}
WKArrayRef WKRenderLayerGetElementClassNames(WKRenderLayerRef renderLayerRef)
@@ -110,6 +110,11 @@ WKCompositingLayerType WKRenderLayerGetCompositingLayerType(WKRenderLayerRef ren
return kWKCompositingLayerTypeNone;
}
+WK_EXPORT double WKRenderLayerGetBackingStoreMemoryEstimate(WKRenderLayerRef renderLayerRef)
+{
+ return toImpl(renderLayerRef)->backingStoreMemoryEstimate();
+}
+
WKArrayRef WKRenderLayerGetNegativeZOrderList(WKRenderLayerRef renderLayerRef)
{
return toAPI(toImpl(renderLayerRef)->negativeZOrderList());
@@ -124,3 +129,8 @@ WKArrayRef WKRenderLayerGetPositiveZOrderList(WKRenderLayerRef renderLayerRef)
{
return toAPI(toImpl(renderLayerRef)->positiveZOrderList());
}
+
+WKRenderLayerRef WKRenderLayerGetFrameContentsLayer(WKRenderLayerRef renderLayerRef)
+{
+ return toAPI(toImpl(renderLayerRef)->frameContentsLayer());
+}
diff --git a/Source/WebKit2/Shared/API/c/WKRenderLayer.h b/Source/WebKit2/Shared/API/c/WKRenderLayer.h
index 72f28e0b9..7aeae7855 100644
--- a/Source/WebKit2/Shared/API/c/WKRenderLayer.h
+++ b/Source/WebKit2/Shared/API/c/WKRenderLayer.h
@@ -27,8 +27,8 @@
#define WKRenderLayer_h
-#include <WebKit2/WKBase.h>
-#include <WebKit2/WKGeometry.h>
+#include <WebKit/WKBase.h>
+#include <WebKit/WKGeometry.h>
#ifdef __cplusplus
extern "C" {
@@ -38,7 +38,7 @@ WK_EXPORT WKTypeID WKRenderLayerGetTypeID();
WK_EXPORT WKRenderObjectRef WKRenderLayerGetRenderer(WKRenderLayerRef renderLayer);
-// FIXME: Remove this function once Safari does not require it.
+// FIXME: Remove this function once Safari does not require it. Clients can access this data via the renderer.
WK_EXPORT WKStringRef WKRenderLayerCopyRendererName(WKRenderLayerRef renderLayer);
// FIXME: Remove these three functions once Safari does not require them.
@@ -62,11 +62,14 @@ enum WKCompositingLayerType {
typedef enum WKCompositingLayerType WKCompositingLayerType;
WK_EXPORT WKCompositingLayerType WKRenderLayerGetCompositingLayerType(WKRenderLayerRef renderLayer);
+WK_EXPORT double WKRenderLayerGetBackingStoreMemoryEstimate(WKRenderLayerRef renderLayer);
WK_EXPORT WKArrayRef WKRenderLayerGetNegativeZOrderList(WKRenderLayerRef renderLayer);
WK_EXPORT WKArrayRef WKRenderLayerGetNormalFlowList(WKRenderLayerRef renderLayer);
WK_EXPORT WKArrayRef WKRenderLayerGetPositiveZOrderList(WKRenderLayerRef renderLayer);
+WK_EXPORT WKRenderLayerRef WKRenderLayerGetFrameContentsLayer(WKRenderLayerRef renderLayer);
+
#ifdef __cplusplus
}
#endif
diff --git a/Source/WebKit2/Shared/API/c/WKRenderObject.cpp b/Source/WebKit2/Shared/API/c/WKRenderObject.cpp
index 2bc9728cf..df2e743dd 100644
--- a/Source/WebKit2/Shared/API/c/WKRenderObject.cpp
+++ b/Source/WebKit2/Shared/API/c/WKRenderObject.cpp
@@ -42,13 +42,27 @@ WKStringRef WKRenderObjectCopyName(WKRenderObjectRef renderObjectRef)
return toCopiedAPI(toImpl(renderObjectRef)->name());
}
+WKStringRef WKRenderObjectCopyTextSnippet(WKRenderObjectRef renderObjectRef)
+{
+ WebRenderObject* renderObject = toImpl(renderObjectRef);
+ if (!renderObject->textSnippet().isNull())
+ return toCopiedAPI(renderObject->textSnippet());
+
+ return nullptr;
+}
+
+unsigned WKRenderObjectGetTextLength(WKRenderObjectRef renderObjectRef)
+{
+ return toImpl(renderObjectRef)->textLength();
+}
+
WKStringRef WKRenderObjectCopyElementTagName(WKRenderObjectRef renderObjectRef)
{
WebRenderObject* renderObject = toImpl(renderObjectRef);
if (!renderObject->elementTagName().isNull())
return toCopiedAPI(renderObject->elementTagName());
- return 0;
+ return nullptr;
}
WKStringRef WKRenderObjectCopyElementID(WKRenderObjectRef renderObjectRef)
@@ -57,7 +71,7 @@ WKStringRef WKRenderObjectCopyElementID(WKRenderObjectRef renderObjectRef)
if (!renderObject->elementID().isNull())
return toCopiedAPI(renderObject->elementID());
- return 0;
+ return nullptr;
}
WKArrayRef WKRenderObjectGetElementClassNames(WKRenderObjectRef renderObjectRef)
@@ -79,5 +93,5 @@ WKRect WKRenderObjectGetFrameRect(WKRenderObjectRef renderObjectRef)
WKArrayRef WKRenderObjectGetChildren(WKRenderObjectRef renderObjectRef)
{
- return toAPI(toImpl(renderObjectRef)->children().get());
+ return toAPI(toImpl(renderObjectRef)->children());
}
diff --git a/Source/WebKit2/Shared/API/c/WKRenderObject.h b/Source/WebKit2/Shared/API/c/WKRenderObject.h
index 965cf2a96..0973ae8cf 100644
--- a/Source/WebKit2/Shared/API/c/WKRenderObject.h
+++ b/Source/WebKit2/Shared/API/c/WKRenderObject.h
@@ -26,8 +26,8 @@
#ifndef WKRenderObject_h
#define WKRenderObject_h
-#include <WebKit2/WKBase.h>
-#include <WebKit2/WKGeometry.h>
+#include <WebKit/WKBase.h>
+#include <WebKit/WKGeometry.h>
#ifdef __cplusplus
extern "C" {
@@ -36,7 +36,8 @@ extern "C" {
WK_EXPORT WKTypeID WKRenderObjectGetTypeID();
WK_EXPORT WKStringRef WKRenderObjectCopyName(WKRenderObjectRef renderObject);
-
+WK_EXPORT WKStringRef WKRenderObjectCopyTextSnippet(WKRenderObjectRef renderObject);
+WK_EXPORT unsigned WKRenderObjectGetTextLength(WKRenderObjectRef renderObject);
WK_EXPORT WKStringRef WKRenderObjectCopyElementTagName(WKRenderObjectRef renderObject);
WK_EXPORT WKStringRef WKRenderObjectCopyElementID(WKRenderObjectRef renderObject);
WK_EXPORT WKArrayRef WKRenderObjectGetElementClassNames(WKRenderObjectRef renderObject);
diff --git a/Source/WebKit2/Shared/API/c/WKSecurityOrigin.cpp b/Source/WebKit2/Shared/API/c/WKSecurityOriginRef.cpp
index f7291065f..882867f80 100644
--- a/Source/WebKit2/Shared/API/c/WKSecurityOrigin.cpp
+++ b/Source/WebKit2/Shared/API/c/WKSecurityOriginRef.cpp
@@ -24,59 +24,57 @@
*/
#include "config.h"
-#include "WKSecurityOrigin.h"
+#include "WKSecurityOriginRef.h"
+#include "APISecurityOrigin.h"
#include "WKAPICast.h"
-#include "WebSecurityOrigin.h"
using namespace WebKit;
WKTypeID WKSecurityOriginGetTypeID()
{
- return toAPI(WebSecurityOrigin::APIType);
+ return toAPI(API::SecurityOrigin::APIType);
}
WKSecurityOriginRef WKSecurityOriginCreateFromString(WKStringRef string)
{
- RefPtr<WebSecurityOrigin> securityOrigin = WebSecurityOrigin::createFromString(toImpl(string)->string());
- return toAPI(securityOrigin.release().leakRef());
+ return toAPI(API::SecurityOrigin::create(WebCore::SecurityOrigin::createFromString(toImpl(string)->string())).leakRef());
}
WKSecurityOriginRef WKSecurityOriginCreateFromDatabaseIdentifier(WKStringRef identifier)
{
- RefPtr<WebSecurityOrigin> securityOrigin = WebSecurityOrigin::createFromDatabaseIdentifier(toImpl(identifier)->string());
- return toAPI(securityOrigin.release().leakRef());
+ return toAPI(API::SecurityOrigin::create(WebCore::SecurityOrigin::createFromDatabaseIdentifier((toImpl(identifier)->string()))).leakRef());
}
WKSecurityOriginRef WKSecurityOriginCreate(WKStringRef protocol, WKStringRef host, int port)
{
- RefPtr<WebSecurityOrigin> securityOrigin = WebSecurityOrigin::create(toImpl(protocol)->string(), toImpl(host)->string(), port);
+ RefPtr<API::SecurityOrigin> securityOrigin = API::SecurityOrigin::create(toImpl(protocol)->string(), toImpl(host)->string(), port);
return toAPI(securityOrigin.release().leakRef());
}
WKStringRef WKSecurityOriginCopyDatabaseIdentifier(WKSecurityOriginRef securityOrigin)
{
- return toCopiedAPI(toImpl(securityOrigin)->databaseIdentifier());
+ return toCopiedAPI(toImpl(securityOrigin)->securityOrigin().databaseIdentifier());
}
WKStringRef WKSecurityOriginCopyToString(WKSecurityOriginRef securityOrigin)
{
- return toCopiedAPI(toImpl(securityOrigin)->toString());
+ return toCopiedAPI(toImpl(securityOrigin)->securityOrigin().toString());
}
WKStringRef WKSecurityOriginCopyProtocol(WKSecurityOriginRef securityOrigin)
{
- return toCopiedAPI(toImpl(securityOrigin)->protocol());
+ return toCopiedAPI(toImpl(securityOrigin)->securityOrigin().protocol());
}
WKStringRef WKSecurityOriginCopyHost(WKSecurityOriginRef securityOrigin)
{
- return toCopiedAPI(toImpl(securityOrigin)->host());
+ return toCopiedAPI(toImpl(securityOrigin)->securityOrigin().host());
}
unsigned short WKSecurityOriginGetPort(WKSecurityOriginRef securityOrigin)
{
- return toImpl(securityOrigin)->port();
+ return toImpl(securityOrigin)->securityOrigin().port();
}
// For backwards ABI compatibility.
diff --git a/Source/WebKit2/Shared/API/c/WKSecurityOrigin.h b/Source/WebKit2/Shared/API/c/WKSecurityOriginRef.h
index d932e93a4..3c3356b38 100644
--- a/Source/WebKit2/Shared/API/c/WKSecurityOrigin.h
+++ b/Source/WebKit2/Shared/API/c/WKSecurityOriginRef.h
@@ -23,10 +23,10 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WKSecurityOrigin_h
-#define WKSecurityOrigin_h
+#ifndef WKSecurityOriginRef_h
+#define WKSecurityOriginRef_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifdef __cplusplus
extern "C" {
@@ -48,4 +48,4 @@ WK_EXPORT unsigned short WKSecurityOriginGetPort(WKSecurityOriginRef securityOri
}
#endif
-#endif /* WKSecurityOrigin_h */
+#endif /* WKSecurityOriginRef_h */
diff --git a/Source/WebKit2/Shared/API/c/WKSerializedScriptValue.cpp b/Source/WebKit2/Shared/API/c/WKSerializedScriptValue.cpp
index f45c388e9..ec2ad96f5 100644
--- a/Source/WebKit2/Shared/API/c/WKSerializedScriptValue.cpp
+++ b/Source/WebKit2/Shared/API/c/WKSerializedScriptValue.cpp
@@ -27,25 +27,25 @@
#include "WKSerializedScriptValue.h"
#include "WKSerializedScriptValuePrivate.h"
+#include "APISerializedScriptValue.h"
#include "WKAPICast.h"
-#include "WebSerializedScriptValue.h"
using namespace WebKit;
WKTypeID WKSerializedScriptValueGetTypeID()
{
- return toAPI(WebSerializedScriptValue::APIType);
+ return toAPI(API::SerializedScriptValue::APIType);
}
WKSerializedScriptValueRef WKSerializedScriptValueCreate(JSContextRef context, JSValueRef value, JSValueRef* exception)
{
- RefPtr<WebSerializedScriptValue> serializedValue = WebSerializedScriptValue::create(context, value, exception);
+ RefPtr<API::SerializedScriptValue> serializedValue = API::SerializedScriptValue::create(context, value, exception);
return toAPI(serializedValue.release().leakRef());
}
WKSerializedScriptValueRef WKSerializedScriptValueCreateWithInternalRepresentation(void* internalRepresentation)
{
- RefPtr<WebSerializedScriptValue> serializedValue = WebSerializedScriptValue::create(static_cast<WebCore::SerializedScriptValue*>(internalRepresentation));
+ RefPtr<API::SerializedScriptValue> serializedValue = API::SerializedScriptValue::create(static_cast<WebCore::SerializedScriptValue*>(internalRepresentation));
return toAPI(serializedValue.release().leakRef());
}
diff --git a/Source/WebKit2/Shared/API/c/WKSerializedScriptValue.h b/Source/WebKit2/Shared/API/c/WKSerializedScriptValue.h
index 3f73d7a06..625afe05b 100644
--- a/Source/WebKit2/Shared/API/c/WKSerializedScriptValue.h
+++ b/Source/WebKit2/Shared/API/c/WKSerializedScriptValue.h
@@ -27,7 +27,7 @@
#define WKSerializedScriptValue_h
#include <JavaScriptCore/JavaScript.h>
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifdef __cplusplus
extern "C" {
diff --git a/Source/WebKit2/Shared/API/c/WKSerializedScriptValuePrivate.h b/Source/WebKit2/Shared/API/c/WKSerializedScriptValuePrivate.h
index 27e184906..837067fb7 100644
--- a/Source/WebKit2/Shared/API/c/WKSerializedScriptValuePrivate.h
+++ b/Source/WebKit2/Shared/API/c/WKSerializedScriptValuePrivate.h
@@ -26,7 +26,7 @@
#ifndef WKSerializedScriptValuePrivate_h
#define WKSerializedScriptValuePrivate_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifdef __cplusplus
extern "C" {
diff --git a/Source/WebKit2/Shared/API/c/WKSharedAPICast.h b/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
index b354a947a..99fe397a3 100644
--- a/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
+++ b/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
@@ -26,10 +26,19 @@
#ifndef WKSharedAPICast_h
#define WKSharedAPICast_h
+#include "APIError.h"
+#include "APINumber.h"
+#include "APISecurityOrigin.h"
+#include "APISession.h"
+#include "APIString.h"
+#include "APIURL.h"
+#include "APIURLRequest.h"
+#include "APIURLResponse.h"
#include "ImageOptions.h"
#include "SameDocumentNavigationType.h"
#include "WKBase.h"
#include "WKContextMenuItemTypes.h"
+#include "WKDiagnosticLoggingResultType.h"
#include "WKEvent.h"
#include "WKFindOptions.h"
#include "WKGeometry.h"
@@ -37,16 +46,12 @@
#include "WKPageLoadTypes.h"
#include "WKPageLoadTypesPrivate.h"
#include "WKPageVisibilityTypes.h"
-#include "WebError.h"
+#include "WKUserContentInjectedFrames.h"
+#include "WKUserScriptInjectionTime.h"
#include "WebEvent.h"
#include "WebFindOptions.h"
-#include "WebNumber.h"
-#include "WebSecurityOrigin.h"
-#include "WebString.h"
-#include "WebURL.h"
-#include "WebURLRequest.h"
-#include "WebURLResponse.h"
#include <WebCore/ContextMenuItem.h>
+#include <WebCore/DiagnosticLoggingResultType.h>
#include <WebCore/FloatRect.h>
#include <WebCore/FrameLoaderTypes.h>
#include <WebCore/IntRect.h>
@@ -55,72 +60,84 @@
#include <WebCore/SecurityOrigin.h>
#include <WebCore/UserContentTypes.h>
#include <WebCore/UserScriptTypes.h>
-#include <wtf/TypeTraits.h>
+
+namespace API {
+class Array;
+class Dictionary;
+class Data;
+class Point;
+class Rect;
+class SecurityOrigin;
+class SerializedScriptValue;
+class Size;
+class UserContentURLPattern;
+class WebArchive;
+class WebArchiveResource;
+}
namespace WebKit {
-class ImmutableArray;
-class ImmutableDictionary;
-class MutableArray;
-class MutableDictionary;
class ObjCObjectGraph;
-class WebArchive;
-class WebArchiveResource;
class WebCertificateInfo;
class WebConnection;
class WebContextMenuItem;
-class WebData;
class WebGraphicsContext;
class WebImage;
-class WebPoint;
-class WebRect;
-class WebSecurityOrigin;
-class WebSerializedScriptValue;
-class WebSize;
-class WebURLRequest;
-class WebURLResponse;
-class WebUserContentURLPattern;
-
-template<typename APIType> struct APITypeInfo { };
-template<typename ImplType> struct ImplTypeInfo { };
+
+template<typename APIType> struct APITypeInfo;
+template<typename ImplType> struct ImplTypeInfo;
#define WK_ADD_API_MAPPING(TheAPIType, TheImplType) \
- template<> struct APITypeInfo<TheAPIType> { typedef TheImplType* ImplType; }; \
- template<> struct ImplTypeInfo<TheImplType*> { typedef TheAPIType APIType; };
+ template<> struct APITypeInfo<TheAPIType> { typedef TheImplType ImplType; }; \
+ template<> struct ImplTypeInfo<TheImplType> { typedef TheAPIType APIType; };
-WK_ADD_API_MAPPING(WKArrayRef, ImmutableArray)
-WK_ADD_API_MAPPING(WKBooleanRef, WebBoolean)
+WK_ADD_API_MAPPING(WKArrayRef, API::Array)
+WK_ADD_API_MAPPING(WKBooleanRef, API::Boolean)
WK_ADD_API_MAPPING(WKCertificateInfoRef, WebCertificateInfo)
WK_ADD_API_MAPPING(WKConnectionRef, WebConnection)
WK_ADD_API_MAPPING(WKContextMenuItemRef, WebContextMenuItem)
-WK_ADD_API_MAPPING(WKDataRef, WebData)
-WK_ADD_API_MAPPING(WKDictionaryRef, ImmutableDictionary)
-WK_ADD_API_MAPPING(WKDoubleRef, WebDouble)
-WK_ADD_API_MAPPING(WKErrorRef, WebError)
+WK_ADD_API_MAPPING(WKDataRef, API::Data)
+WK_ADD_API_MAPPING(WKDictionaryRef, API::Dictionary)
+WK_ADD_API_MAPPING(WKDoubleRef, API::Double)
+WK_ADD_API_MAPPING(WKErrorRef, API::Error)
WK_ADD_API_MAPPING(WKGraphicsContextRef, WebGraphicsContext)
WK_ADD_API_MAPPING(WKImageRef, WebImage)
-WK_ADD_API_MAPPING(WKMutableArrayRef, MutableArray)
-WK_ADD_API_MAPPING(WKMutableDictionaryRef, MutableDictionary)
-WK_ADD_API_MAPPING(WKPointRef, WebPoint)
-WK_ADD_API_MAPPING(WKRectRef, WebRect)
-WK_ADD_API_MAPPING(WKSecurityOriginRef, WebSecurityOrigin)
-WK_ADD_API_MAPPING(WKSerializedScriptValueRef, WebSerializedScriptValue)
-WK_ADD_API_MAPPING(WKSizeRef, WebSize)
-WK_ADD_API_MAPPING(WKStringRef, WebString)
-WK_ADD_API_MAPPING(WKTypeRef, APIObject)
-WK_ADD_API_MAPPING(WKUInt64Ref, WebUInt64)
-WK_ADD_API_MAPPING(WKURLRef, WebURL)
-WK_ADD_API_MAPPING(WKURLRequestRef, WebURLRequest)
-WK_ADD_API_MAPPING(WKURLResponseRef, WebURLResponse)
-WK_ADD_API_MAPPING(WKUserContentURLPatternRef, WebUserContentURLPattern)
-
-#if PLATFORM(MAC)
-WK_ADD_API_MAPPING(WKWebArchiveRef, WebArchive)
-WK_ADD_API_MAPPING(WKWebArchiveResourceRef, WebArchiveResource)
+WK_ADD_API_MAPPING(WKPointRef, API::Point)
+WK_ADD_API_MAPPING(WKRectRef, API::Rect)
+WK_ADD_API_MAPPING(WKSecurityOriginRef, API::SecurityOrigin)
+WK_ADD_API_MAPPING(WKSerializedScriptValueRef, API::SerializedScriptValue)
+WK_ADD_API_MAPPING(WKSizeRef, API::Size)
+WK_ADD_API_MAPPING(WKStringRef, API::String)
+WK_ADD_API_MAPPING(WKTypeRef, API::Object)
+WK_ADD_API_MAPPING(WKUInt64Ref, API::UInt64)
+WK_ADD_API_MAPPING(WKURLRef, API::URL)
+WK_ADD_API_MAPPING(WKURLRequestRef, API::URLRequest)
+WK_ADD_API_MAPPING(WKURLResponseRef, API::URLResponse)
+WK_ADD_API_MAPPING(WKUserContentURLPatternRef, API::UserContentURLPattern)
+WK_ADD_API_MAPPING(WKSessionRef, API::Session)
+
+template<> struct APITypeInfo<WKMutableArrayRef> { typedef API::Array ImplType; };
+template<> struct APITypeInfo<WKMutableDictionaryRef> { typedef API::Dictionary ImplType; };
+
+#if PLATFORM(COCOA)
+WK_ADD_API_MAPPING(WKWebArchiveRef, API::WebArchive)
+WK_ADD_API_MAPPING(WKWebArchiveResourceRef, API::WebArchiveResource)
WK_ADD_API_MAPPING(WKObjCTypeWrapperRef, ObjCObjectGraph)
#endif
-template<typename ImplType, typename APIType = typename ImplTypeInfo<ImplType*>::APIType>
+template<typename T, typename APIType = typename ImplTypeInfo<T>::APIType>
+auto toAPI(T* t) -> APIType
+{
+ return reinterpret_cast<APIType>(API::Object::wrap(t));
+}
+
+template<typename T, typename ImplType = typename APITypeInfo<T>::ImplType>
+auto toImpl(T t) -> ImplType*
+{
+ return static_cast<ImplType*>(API::Object::unwrap(static_cast<void*>(const_cast<typename std::remove_const<typename std::remove_pointer<T>::type>::type*>(t))));
+}
+
+template<typename ImplType, typename APIType = typename ImplTypeInfo<ImplType>::APIType>
class ProxyingRefPtr {
public:
ProxyingRefPtr(PassRefPtr<ImplType> impl)
@@ -128,58 +145,41 @@ public:
{
}
+ ProxyingRefPtr(Ref<ImplType>&& impl)
+ : m_impl(WTFMove(impl))
+ {
+ }
+
operator APIType() { return toAPI(m_impl.get()); }
private:
RefPtr<ImplType> m_impl;
};
-/* Opaque typing convenience methods */
-
-template<typename T>
-inline typename APITypeInfo<T>::ImplType toImpl(T t)
-{
- // An example of the conversions that take place:
- // const struct OpaqueWKArray* -> const struct OpaqueWKArray -> struct OpaqueWKArray -> struct OpaqueWKArray* -> ImmutableArray*
-
- typedef typename WTF::RemovePointer<T>::Type PotentiallyConstValueType;
- typedef typename WTF::RemoveConst<PotentiallyConstValueType>::Type NonConstValueType;
-
- return reinterpret_cast<typename APITypeInfo<T>::ImplType>(const_cast<NonConstValueType*>(t));
-}
-
-template<typename T>
-inline typename ImplTypeInfo<T>::APIType toAPI(T t)
-{
- return reinterpret_cast<typename ImplTypeInfo<T>::APIType>(t);
-}
-
/* Special cases. */
-inline ProxyingRefPtr<WebString> toAPI(StringImpl* string)
+inline ProxyingRefPtr<API::String> toAPI(StringImpl* string)
{
- return ProxyingRefPtr<WebString>(WebString::create(string));
+ return ProxyingRefPtr<API::String>(API::String::create(string));
}
inline WKStringRef toCopiedAPI(const String& string)
{
- RefPtr<WebString> webString = WebString::create(string);
- return toAPI(webString.release().leakRef());
+ return toAPI(&API::String::create(string).leakRef());
}
-inline ProxyingRefPtr<WebURL> toURLRef(StringImpl* string)
+inline ProxyingRefPtr<API::URL> toURLRef(StringImpl* string)
{
if (!string)
- return ProxyingRefPtr<WebURL>(0);
- return ProxyingRefPtr<WebURL>(WebURL::create(String(string)));
+ return ProxyingRefPtr<API::URL>(nullptr);
+ return ProxyingRefPtr<API::URL>(API::URL::create(String(string)));
}
inline WKURLRef toCopiedURLAPI(const String& string)
{
if (!string)
- return 0;
- RefPtr<WebURL> webURL = WebURL::create(string);
- return toAPI(webURL.release().leakRef());
+ return nullptr;
+ return toAPI(&API::URL::create(string).leakRef());
}
inline String toWTFString(WKStringRef stringRef)
@@ -196,26 +196,26 @@ inline String toWTFString(WKURLRef urlRef)
return toImpl(urlRef)->string();
}
-inline ProxyingRefPtr<WebError> toAPI(const WebCore::ResourceError& error)
+inline ProxyingRefPtr<API::Error> toAPI(const WebCore::ResourceError& error)
{
- return ProxyingRefPtr<WebError>(WebError::create(error));
+ return ProxyingRefPtr<API::Error>(API::Error::create(error));
}
-inline ProxyingRefPtr<WebURLRequest> toAPI(const WebCore::ResourceRequest& request)
+inline ProxyingRefPtr<API::URLRequest> toAPI(const WebCore::ResourceRequest& request)
{
- return ProxyingRefPtr<WebURLRequest>(WebURLRequest::create(request));
+ return ProxyingRefPtr<API::URLRequest>(API::URLRequest::create(request));
}
-inline ProxyingRefPtr<WebURLResponse> toAPI(const WebCore::ResourceResponse& response)
+inline ProxyingRefPtr<API::URLResponse> toAPI(const WebCore::ResourceResponse& response)
{
- return ProxyingRefPtr<WebURLResponse>(WebURLResponse::create(response));
+ return ProxyingRefPtr<API::URLResponse>(API::URLResponse::create(response));
}
inline WKSecurityOriginRef toCopiedAPI(WebCore::SecurityOrigin* origin)
{
if (!origin)
return 0;
- return toAPI(WebSecurityOrigin::create(origin).leakRef());
+ return toAPI(API::SecurityOrigin::create(*origin).leakRef());
}
/* Geometry conversions */
@@ -280,7 +280,7 @@ inline WKPoint toAPI(const WebCore::IntPoint& point)
/* Enum conversions */
-inline WKTypeID toAPI(APIObject::Type type)
+inline WKTypeID toAPI(API::Object::Type type)
{
return static_cast<WKTypeID>(type);
}
@@ -448,10 +448,8 @@ inline WKContextMenuItemTag toAPI(WebCore::ContextMenuAction action)
return kWKContextMenuItemTagPDFFacingPagesScrolling;
case WebCore::ContextMenuItemTagDictationAlternative:
return kWKContextMenuItemTagDictationAlternative;
-#if ENABLE(INSPECTOR)
case WebCore::ContextMenuItemTagInspectElement:
return kWKContextMenuItemTagInspectElement;
-#endif
case WebCore::ContextMenuItemTagTextDirectionMenu:
return kWKContextMenuItemTagTextDirectionMenu;
case WebCore::ContextMenuItemTagTextDirectionDefault:
@@ -478,7 +476,7 @@ inline WKContextMenuItemTag toAPI(WebCore::ContextMenuAction action)
return kWKContextMenuItemTagMediaPlayPause;
case WebCore::ContextMenuItemTagMediaMute:
return kWKContextMenuItemTagMediaMute;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
case WebCore::ContextMenuItemTagCorrectSpellingAutomatically:
return kWKContextMenuItemTagCorrectSpellingAutomatically;
case WebCore::ContextMenuItemTagSubstitutionsMenu:
@@ -506,8 +504,12 @@ inline WKContextMenuItemTag toAPI(WebCore::ContextMenuAction action)
case WebCore::ContextMenuItemTagChangeBack:
return kWKContextMenuItemTagChangeBack;
#endif
+#if PLATFORM(QT)
case WebCore::ContextMenuItemTagOpenLinkInThisWindow:
return kWKContextMenuItemTagOpenLinkInThisWindow;
+#endif
+ case WebCore::ContextMenuItemTagShareMenu:
+ return kWKContextMenuItemTagShareMenu;
default:
if (action < WebCore::ContextMenuItemBaseApplicationTag)
LOG_ERROR("ContextMenuAction %i is an unknown tag but is below the allowable custom tag value of %i", action, WebCore:: ContextMenuItemBaseApplicationTag);
@@ -642,10 +644,8 @@ inline WebCore::ContextMenuAction toImpl(WKContextMenuItemTag tag)
return WebCore::ContextMenuItemTagPDFFacingPagesScrolling;
case kWKContextMenuItemTagDictationAlternative:
return WebCore::ContextMenuItemTagDictationAlternative;
-#if ENABLE(INSPECTOR)
case kWKContextMenuItemTagInspectElement:
return WebCore::ContextMenuItemTagInspectElement;
-#endif
case kWKContextMenuItemTagTextDirectionMenu:
return WebCore::ContextMenuItemTagTextDirectionMenu;
case kWKContextMenuItemTagTextDirectionDefault:
@@ -672,7 +672,7 @@ inline WebCore::ContextMenuAction toImpl(WKContextMenuItemTag tag)
return WebCore::ContextMenuItemTagMediaPlayPause;
case kWKContextMenuItemTagMediaMute:
return WebCore::ContextMenuItemTagMediaMute;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
case kWKContextMenuItemTagCorrectSpellingAutomatically:
return WebCore::ContextMenuItemTagCorrectSpellingAutomatically;
case kWKContextMenuItemTagSubstitutionsMenu:
@@ -699,9 +699,13 @@ inline WebCore::ContextMenuAction toImpl(WKContextMenuItemTag tag)
return WebCore::ContextMenuItemTagCapitalize;
case kWKContextMenuItemTagChangeBack:
return WebCore::ContextMenuItemTagChangeBack;
+ case kWKContextMenuItemTagShareMenu:
+ return WebCore::ContextMenuItemTagShareMenu;
#endif
+#if PLATFORM(QT)
case kWKContextMenuItemTagOpenLinkInThisWindow:
return WebCore::ContextMenuItemTagOpenLinkInThisWindow;
+#endif
default:
if (tag < kWKContextMenuItemBaseApplicationTag)
LOG_ERROR("WKContextMenuItemTag %i is an unknown tag but is below the allowable custom tag value of %i", tag, kWKContextMenuItemBaseApplicationTag);
@@ -755,22 +759,22 @@ inline WKFrameNavigationType toAPI(WebCore::NavigationType type)
WKFrameNavigationType wkType = kWKFrameNavigationTypeOther;
switch (type) {
- case WebCore::NavigationTypeLinkClicked:
+ case WebCore::NavigationType::LinkClicked:
wkType = kWKFrameNavigationTypeLinkClicked;
break;
- case WebCore::NavigationTypeFormSubmitted:
+ case WebCore::NavigationType::FormSubmitted:
wkType = kWKFrameNavigationTypeFormSubmitted;
break;
- case WebCore::NavigationTypeBackForward:
+ case WebCore::NavigationType::BackForward:
wkType = kWKFrameNavigationTypeBackForward;
break;
- case WebCore::NavigationTypeReload:
+ case WebCore::NavigationType::Reload:
wkType = kWKFrameNavigationTypeReload;
break;
- case WebCore::NavigationTypeFormResubmitted:
+ case WebCore::NavigationType::FormResubmitted:
wkType = kWKFrameNavigationTypeFormResubmitted;
break;
- case WebCore::NavigationTypeOther:
+ case WebCore::NavigationType::Other:
wkType = kWKFrameNavigationTypeOther;
break;
}
@@ -800,6 +804,66 @@ inline WKSameDocumentNavigationType toAPI(SameDocumentNavigationType type)
return wkType;
}
+inline SameDocumentNavigationType toSameDocumentNavigationType(WKSameDocumentNavigationType wkType)
+{
+ SameDocumentNavigationType type = SameDocumentNavigationAnchorNavigation;
+
+ switch (wkType) {
+ case kWKSameDocumentNavigationAnchorNavigation:
+ type = SameDocumentNavigationAnchorNavigation;
+ break;
+ case kWKSameDocumentNavigationSessionStatePush:
+ type = SameDocumentNavigationSessionStatePush;
+ break;
+ case kWKSameDocumentNavigationSessionStateReplace:
+ type = SameDocumentNavigationSessionStateReplace;
+ break;
+ case kWKSameDocumentNavigationSessionStatePop:
+ type = SameDocumentNavigationSessionStatePop;
+ break;
+ }
+
+ return type;
+}
+
+inline WKDiagnosticLoggingResultType toAPI(WebCore::DiagnosticLoggingResultType type)
+{
+ WKDiagnosticLoggingResultType wkType;
+
+ switch (type) {
+ case WebCore::DiagnosticLoggingResultPass:
+ wkType = kWKDiagnosticLoggingResultPass;
+ break;
+ case WebCore::DiagnosticLoggingResultFail:
+ wkType = kWKDiagnosticLoggingResultFail;
+ break;
+ case WebCore::DiagnosticLoggingResultNoop:
+ wkType = kWKDiagnosticLoggingResultNoop;
+ break;
+ }
+
+ return wkType;
+}
+
+inline WebCore::DiagnosticLoggingResultType toDiagnosticLoggingResultType(WKDiagnosticLoggingResultType wkType)
+{
+ WebCore::DiagnosticLoggingResultType type;
+
+ switch (wkType) {
+ case kWKDiagnosticLoggingResultPass:
+ type = WebCore::DiagnosticLoggingResultPass;
+ break;
+ case kWKDiagnosticLoggingResultFail:
+ type = WebCore::DiagnosticLoggingResultFail;
+ break;
+ case kWKDiagnosticLoggingResultNoop:
+ type = WebCore::DiagnosticLoggingResultNoop;
+ break;
+ }
+
+ return type;
+}
+
inline WKLayoutMilestones toWKLayoutMilestones(WebCore::LayoutMilestones milestones)
{
unsigned wkMilestones = 0;
@@ -849,8 +913,6 @@ inline WebCore::PageVisibilityState toPageVisibilityState(WKPageVisibilityState
return WebCore::PageVisibilityStateHidden;
case kWKPageVisibilityStatePrerender:
return WebCore::PageVisibilityStatePrerender;
- case kWKPageVisibilityStateUnloaded:
- return WebCore::PageVisibilityStateUnloaded;
}
ASSERT_NOT_REACHED();
@@ -889,11 +951,17 @@ inline SnapshotOptions toSnapshotOptions(WKSnapshotOptions wkSnapshotOptions)
snapshotOptions |= SnapshotOptionsInViewCoordinates;
if (wkSnapshotOptions & kWKSnapshotOptionsPaintSelectionRectangle)
snapshotOptions |= SnapshotOptionsPaintSelectionRectangle;
+ if (wkSnapshotOptions & kWKSnapshotOptionsForceBlackText)
+ snapshotOptions |= SnapshotOptionsForceBlackText;
+ if (wkSnapshotOptions & kWKSnapshotOptionsForceWhiteText)
+ snapshotOptions |= SnapshotOptionsForceWhiteText;
+ if (wkSnapshotOptions & kWKSnapshotOptionsPrinting)
+ snapshotOptions |= SnapshotOptionsPrinting;
return snapshotOptions;
}
-inline WebCore::UserScriptInjectionTime toUserScriptInjectionTime(WKUserScriptInjectionTime wkInjectedTime)
+inline WebCore::UserScriptInjectionTime toUserScriptInjectionTime(_WKUserScriptInjectionTime wkInjectedTime)
{
switch (wkInjectedTime) {
case kWKInjectAtDocumentStart:
@@ -906,6 +974,19 @@ inline WebCore::UserScriptInjectionTime toUserScriptInjectionTime(WKUserScriptIn
return WebCore::InjectAtDocumentStart;
}
+inline _WKUserScriptInjectionTime toWKUserScriptInjectionTime(WebCore::UserScriptInjectionTime injectedTime)
+{
+ switch (injectedTime) {
+ case WebCore::InjectAtDocumentStart:
+ return kWKInjectAtDocumentStart;
+ case WebCore::InjectAtDocumentEnd:
+ return kWKInjectAtDocumentEnd;
+ }
+
+ ASSERT_NOT_REACHED();
+ return kWKInjectAtDocumentStart;
+}
+
inline WebCore::UserContentInjectedFrames toUserContentInjectedFrames(WKUserContentInjectedFrames wkInjectedFrames)
{
switch (wkInjectedFrames) {
diff --git a/Source/WebKit2/Shared/API/c/WKString.cpp b/Source/WebKit2/Shared/API/c/WKString.cpp
index cbac67dd8..bd2f17436 100644
--- a/Source/WebKit2/Shared/API/c/WKString.cpp
+++ b/Source/WebKit2/Shared/API/c/WKString.cpp
@@ -28,68 +28,101 @@
#include "WKStringPrivate.h"
#include "WKAPICast.h"
+#include <JavaScriptCore/InitializeThreading.h>
+#include <JavaScriptCore/JSStringRef.h>
+#include <JavaScriptCore/OpaqueJSString.h>
using namespace WebKit;
WKTypeID WKStringGetTypeID()
{
- return toAPI(WebString::APIType);
+ return toAPI(API::String::APIType);
}
WKStringRef WKStringCreateWithUTF8CString(const char* string)
{
- RefPtr<WebString> webString = WebString::createFromUTF8String(string);
- return toAPI(webString.release().leakRef());
+ return toAPI(&API::String::create(WTF::String::fromUTF8(string)).leakRef());
}
bool WKStringIsEmpty(WKStringRef stringRef)
{
- return toImpl(stringRef)->isEmpty();
+ return toImpl(stringRef)->stringView().isEmpty();
}
size_t WKStringGetLength(WKStringRef stringRef)
{
- return toImpl(stringRef)->length();
+ return toImpl(stringRef)->stringView().length();
}
size_t WKStringGetCharacters(WKStringRef stringRef, WKChar* buffer, size_t bufferLength)
{
- COMPILE_ASSERT(sizeof(WKChar) == sizeof(UChar), WKStringGetCharacters_sizeof_WKChar_matches_UChar);
- return (toImpl(stringRef)->getCharacters(static_cast<UChar*>(buffer), bufferLength));
+ static_assert(sizeof(WKChar) == sizeof(UChar), "Size of WKChar must match size of UChar");
+
+ unsigned unsignedBufferLength = std::min<size_t>(bufferLength, std::numeric_limits<unsigned>::max());
+ auto substring = toImpl(stringRef)->stringView().substring(0, unsignedBufferLength);
+
+ substring.getCharactersWithUpconvert(reinterpret_cast<UChar*>(buffer));
+ return substring.length();
}
size_t WKStringGetMaximumUTF8CStringSize(WKStringRef stringRef)
{
- return toImpl(stringRef)->maximumUTF8CStringSize();
+ return toImpl(stringRef)->stringView().length() * 3 + 1;
}
size_t WKStringGetUTF8CString(WKStringRef stringRef, char* buffer, size_t bufferSize)
{
- return toImpl(stringRef)->getUTF8CString(buffer, bufferSize);
+ if (!bufferSize)
+ return 0;
+
+ auto stringView = toImpl(stringRef)->stringView();
+
+ char* p = buffer;
+ WTF::Unicode::ConversionResult result;
+
+ if (stringView.is8Bit()) {
+ const LChar* characters = stringView.characters8();
+ result = WTF::Unicode::convertLatin1ToUTF8(&characters, characters + stringView.length(), &p, p + bufferSize - 1);
+ } else {
+ const UChar* characters = stringView.characters16();
+ result = WTF::Unicode::convertUTF16ToUTF8(&characters, characters + stringView.length(), &p, p + bufferSize - 1, /* strict */ true);
+ }
+
+ if (result != WTF::Unicode::conversionOK && result != WTF::Unicode::targetExhausted)
+ return 0;
+
+ *p++ = '\0';
+ return p - buffer;
}
bool WKStringIsEqual(WKStringRef aRef, WKStringRef bRef)
{
- return toImpl(aRef)->equal(toImpl(bRef));
+ return toImpl(aRef)->stringView() == toImpl(bRef)->stringView();
}
bool WKStringIsEqualToUTF8CString(WKStringRef aRef, const char* b)
{
- return toImpl(aRef)->equalToUTF8String(b);
+ // FIXME: Should we add a fast path that avoids memory allocation when the string is all ASCII?
+ // FIXME: We can do even the general case more efficiently if we write a function in StringView that understands UTF-8 C strings.
+ return toImpl(aRef)->stringView() == WTF::String::fromUTF8(b);
}
bool WKStringIsEqualToUTF8CStringIgnoringCase(WKStringRef aRef, const char* b)
{
- return toImpl(aRef)->equalToUTF8StringIgnoringCase(b);
+ // FIXME: Should we add a fast path that avoids memory allocation when the string is all ASCII?
+ // FIXME: We can do even the general case more efficiently if we write a function in StringView that understands UTF-8 C strings.
+ return equalIgnoringASCIICase(toImpl(aRef)->stringView(), WTF::String::fromUTF8(b));
}
WKStringRef WKStringCreateWithJSString(JSStringRef jsStringRef)
{
- RefPtr<WebString> webString = WebString::create(jsStringRef);
- return toAPI(webString.release().leakRef());
+ auto apiString = jsStringRef ? API::String::create(jsStringRef->string()) : API::String::createNull();
+
+ return toAPI(&apiString.leakRef());
}
JSStringRef WKStringCopyJSString(WKStringRef stringRef)
{
- return toImpl(stringRef)->createJSString();
+ JSC::initializeThreading();
+ return OpaqueJSString::create(toImpl(stringRef)->string()).leakRef();
}
diff --git a/Source/WebKit2/Shared/API/c/WKString.h b/Source/WebKit2/Shared/API/c/WKString.h
index f02c455eb..fc1b71d61 100644
--- a/Source/WebKit2/Shared/API/c/WKString.h
+++ b/Source/WebKit2/Shared/API/c/WKString.h
@@ -26,7 +26,8 @@
#ifndef WKString_h
#define WKString_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
+#include <stddef.h>
#ifndef __cplusplus
#include <stdbool.h>
diff --git a/Source/WebKit2/Shared/API/c/WKStringPrivate.h b/Source/WebKit2/Shared/API/c/WKStringPrivate.h
index f174f0166..74bc8a1f0 100644
--- a/Source/WebKit2/Shared/API/c/WKStringPrivate.h
+++ b/Source/WebKit2/Shared/API/c/WKStringPrivate.h
@@ -27,7 +27,7 @@
#define WKStringPrivate_h
#include <JavaScriptCore/JavaScript.h>
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifdef __cplusplus
extern "C" {
diff --git a/Source/WebKit2/Shared/API/c/WKType.cpp b/Source/WebKit2/Shared/API/c/WKType.cpp
index f0e4ea8fb..fd20e6fff 100644
--- a/Source/WebKit2/Shared/API/c/WKType.cpp
+++ b/Source/WebKit2/Shared/API/c/WKType.cpp
@@ -33,16 +33,17 @@ using namespace WebKit;
WKTypeID WKGetTypeID(WKTypeRef typeRef)
{
- return toAPI(static_cast<APIObject*>(const_cast<void*>(typeRef))->type());
+ return toAPI(toImpl(typeRef)->type());
}
WKTypeRef WKRetain(WKTypeRef typeRef)
{
- static_cast<APIObject*>(const_cast<void*>(typeRef))->ref();
+ toImpl(typeRef)->ref();
+
return typeRef;
}
void WKRelease(WKTypeRef typeRef)
{
- static_cast<APIObject*>(const_cast<void*>(typeRef))->deref();
+ toImpl(typeRef)->deref();
}
diff --git a/Source/WebKit2/Shared/API/c/WKType.h b/Source/WebKit2/Shared/API/c/WKType.h
index 02f036c6f..e57ea379c 100644
--- a/Source/WebKit2/Shared/API/c/WKType.h
+++ b/Source/WebKit2/Shared/API/c/WKType.h
@@ -26,7 +26,7 @@
#ifndef WKType_h
#define WKType_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifdef __cplusplus
extern "C" {
diff --git a/Source/WebKit2/Shared/API/c/WKURL.cpp b/Source/WebKit2/Shared/API/c/WKURL.cpp
index 24c555dc0..f1a1ea546 100644
--- a/Source/WebKit2/Shared/API/c/WKURL.cpp
+++ b/Source/WebKit2/Shared/API/c/WKURL.cpp
@@ -32,17 +32,17 @@ using namespace WebKit;
WKTypeID WKURLGetTypeID()
{
- return toAPI(WebURL::APIType);
+ return toAPI(API::URL::APIType);
}
WKURLRef WKURLCreateWithUTF8CString(const char* string)
{
- return toAPI(WebURL::create(String::fromUTF8(string)).leakRef());
+ return toAPI(&API::URL::create(String::fromUTF8(string)).leakRef());
}
WKURLRef WKURLCreateWithBaseURL(WKURLRef baseURL, const char* relative)
{
- return toAPI(WebURL::create(toImpl(baseURL), String::fromUTF8(relative)).leakRef());
+ return toAPI(&API::URL::create(toImpl(baseURL), String::fromUTF8(relative)).leakRef());
}
WKStringRef WKURLCopyString(WKURLRef url)
@@ -52,7 +52,7 @@ WKStringRef WKURLCopyString(WKURLRef url)
bool WKURLIsEqual(WKURLRef a, WKURLRef b)
{
- return toImpl(a)->string() == toImpl(b)->string();
+ return API::URL::equals(*toImpl(a), *toImpl(b));
}
WKStringRef WKURLCopyHostName(WKURLRef url)
diff --git a/Source/WebKit2/Shared/API/c/WKURL.h b/Source/WebKit2/Shared/API/c/WKURL.h
index 2c0a02cc4..6bbc2b392 100644
--- a/Source/WebKit2/Shared/API/c/WKURL.h
+++ b/Source/WebKit2/Shared/API/c/WKURL.h
@@ -26,7 +26,7 @@
#ifndef WKURL_h
#define WKURL_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifdef __cplusplus
extern "C" {
diff --git a/Source/WebKit2/Shared/API/c/WKURLRequest.cpp b/Source/WebKit2/Shared/API/c/WKURLRequest.cpp
index 114c74190..736e1f3e6 100644
--- a/Source/WebKit2/Shared/API/c/WKURLRequest.cpp
+++ b/Source/WebKit2/Shared/API/c/WKURLRequest.cpp
@@ -26,26 +26,27 @@
#include "config.h"
#include "WKURLRequest.h"
+#include "APIURLRequest.h"
#include "WKAPICast.h"
-#include "WebURLRequest.h"
-#include <WebCore/KURL.h>
+#include "WKData.h"
+#include <WebCore/URL.h>
using namespace WebCore;
using namespace WebKit;
WKTypeID WKURLRequestGetTypeID()
{
- return toAPI(WebURLRequest::APIType);
+ return toAPI(API::URLRequest::APIType);
}
WKURLRequestRef WKURLRequestCreateWithWKURL(WKURLRef url)
{
- return toAPI(WebURLRequest::create(KURL(KURL(), toImpl(url)->string())).leakRef());
+ return toAPI(&API::URLRequest::create(URL(URL(), toImpl(url)->string())).leakRef());
}
WKURLRef WKURLRequestCopyURL(WKURLRequestRef requestRef)
{
- return toCopiedURLAPI(toImpl(requestRef)->url());
+ return toCopiedURLAPI(toImpl(requestRef)->resourceRequest().url());
}
WKURLRef WKURLRequestCopyFirstPartyForCookies(WKURLRequestRef requestRef)
@@ -58,7 +59,14 @@ WKStringRef WKURLRequestCopyHTTPMethod(WKURLRequestRef requestRef)
return toCopiedAPI(toImpl(requestRef)->resourceRequest().httpMethod());
}
+WKURLRequestRef WKURLRequestCopySettingHTTPBody(WKURLRequestRef requestRef, WKDataRef body)
+{
+ WebCore::ResourceRequest requestCopy(toImpl(requestRef)->resourceRequest());
+ requestCopy.setHTTPBody(FormData::create(WKDataGetBytes(body), WKDataGetSize(body)));
+ return toAPI(&API::URLRequest::create(requestCopy).leakRef());
+}
+
void WKURLRequestSetDefaultTimeoutInterval(double timeoutInterval)
{
- WebURLRequest::setDefaultTimeoutInterval(timeoutInterval);
+ API::URLRequest::setDefaultTimeoutInterval(timeoutInterval);
}
diff --git a/Source/WebKit2/Shared/API/c/WKURLRequest.h b/Source/WebKit2/Shared/API/c/WKURLRequest.h
index 85df3d389..174180423 100644
--- a/Source/WebKit2/Shared/API/c/WKURLRequest.h
+++ b/Source/WebKit2/Shared/API/c/WKURLRequest.h
@@ -26,7 +26,7 @@
#ifndef WKURLRequest_h
#define WKURLRequest_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifdef __cplusplus
extern "C" {
@@ -42,6 +42,8 @@ WK_EXPORT WKURLRef WKURLRequestCopyFirstPartyForCookies(WKURLRequestRef);
WK_EXPORT WKStringRef WKURLRequestCopyHTTPMethod(WKURLRequestRef);
+WK_EXPORT WKURLRequestRef WKURLRequestCopySettingHTTPBody(WKURLRequestRef, WKDataRef);
+
WK_EXPORT void WKURLRequestSetDefaultTimeoutInterval(double);
#ifdef __cplusplus
diff --git a/Source/WebKit2/Shared/API/c/WKURLResponse.cpp b/Source/WebKit2/Shared/API/c/WKURLResponse.cpp
index c5491840b..b8a8a90bc 100644
--- a/Source/WebKit2/Shared/API/c/WKURLResponse.cpp
+++ b/Source/WebKit2/Shared/API/c/WKURLResponse.cpp
@@ -26,15 +26,15 @@
#include "config.h"
#include "WKURLResponse.h"
+#include "APIURLResponse.h"
#include "WKAPICast.h"
-#include "WebURLResponse.h"
-#include <WebCore/KURL.h>
+#include <WebCore/URL.h>
using namespace WebKit;
WKTypeID WKURLResponseGetTypeID()
{
- return toAPI(WebURLResponse::APIType);
+ return toAPI(API::URLResponse::APIType);
}
WKURLRef WKURLResponseCopyURL(WKURLResponseRef responseRef)
diff --git a/Source/WebKit2/Shared/API/c/WKURLResponse.h b/Source/WebKit2/Shared/API/c/WKURLResponse.h
index d56027ae9..9093b7791 100644
--- a/Source/WebKit2/Shared/API/c/WKURLResponse.h
+++ b/Source/WebKit2/Shared/API/c/WKURLResponse.h
@@ -26,7 +26,7 @@
#ifndef WKURLResponse_h
#define WKURLResponse_h
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifdef __cplusplus
extern "C" {
diff --git a/Source/WebKit2/Shared/API/c/soup/WKBaseSoup.h b/Source/WebKit2/Shared/API/c/WKUserContentInjectedFrames.h
index 6189e4c97..06f0a7159 100644
--- a/Source/WebKit2/Shared/API/c/soup/WKBaseSoup.h
+++ b/Source/WebKit2/Shared/API/c/WKUserContentInjectedFrames.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Igalia S.L.
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,13 +23,13 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WKBaseSoup_h
-#define WKBaseSoup_h
+#ifndef WKUserContentInjectedFrames_h
+#define WKUserContentInjectedFrames_h
-#ifndef WKBase_h
-#error "Please #include \"WKBase.h\" instead of this file directly."
-#endif
+enum WKUserContentInjectedFrames {
+ kWKInjectInAllFrames,
+ kWKInjectInTopFrameOnly
+};
+typedef enum WKUserContentInjectedFrames WKUserContentInjectedFrames;
-typedef const struct OpaqueWKSoupRequestManager* WKSoupRequestManagerRef;
-
-#endif /* WKBaseSoup_h */
+#endif /* WKUserContentInjectedFrames_h */
diff --git a/Source/WebKit2/Shared/API/c/WKUserContentURLPattern.cpp b/Source/WebKit2/Shared/API/c/WKUserContentURLPattern.cpp
index f6a204ab6..ceedc7696 100644
--- a/Source/WebKit2/Shared/API/c/WKUserContentURLPattern.cpp
+++ b/Source/WebKit2/Shared/API/c/WKUserContentURLPattern.cpp
@@ -26,21 +26,20 @@
#include "config.h"
#include "WKUserContentURLPattern.h"
+#include "APIUserContentURLPattern.h"
#include "WKAPICast.h"
#include "WKString.h"
-#include "WebUserContentURLPattern.h"
using namespace WebKit;
WKTypeID WKUserContentURLPatternGetTypeID()
{
- return toAPI(WebUserContentURLPattern::APIType);
+ return toAPI(API::UserContentURLPattern::APIType);
}
WKUserContentURLPatternRef WKUserContentURLPatternCreate(WKStringRef patternRef)
{
- RefPtr<WebUserContentURLPattern> userContentURLPattern = WebUserContentURLPattern::create(toImpl(patternRef)->string());
- return toAPI(userContentURLPattern.release().leakRef());
+ return toAPI(&API::UserContentURLPattern::create(toImpl(patternRef)->string()).leakRef());
}
WKStringRef WKUserContentURLPatternCopyHost(WKUserContentURLPatternRef urlPatternRef)
diff --git a/Source/WebKit2/Shared/API/c/WKUserContentURLPattern.h b/Source/WebKit2/Shared/API/c/WKUserContentURLPattern.h
index 6e4c6c132..407729663 100644
--- a/Source/WebKit2/Shared/API/c/WKUserContentURLPattern.h
+++ b/Source/WebKit2/Shared/API/c/WKUserContentURLPattern.h
@@ -27,7 +27,7 @@
#define WKUserContentURLPattern_h
#include <JavaScriptCore/JavaScript.h>
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
#ifdef __cplusplus
extern "C" {
diff --git a/Source/WebKit2/Shared/API/c/mac/WKBaseMac.h b/Source/WebKit2/Shared/API/c/WKUserScriptInjectionTime.h
index 772bdfad5..45d241072 100644
--- a/Source/WebKit2/Shared/API/c/mac/WKBaseMac.h
+++ b/Source/WebKit2/Shared/API/c/WKUserScriptInjectionTime.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,13 +23,13 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WKBaseMac_h
-#define WKBaseMac_h
+#ifndef WKUserScriptInjectionTime_h
+#define WKUserScriptInjectionTime_h
-#ifndef WKBase_h
-#error "Please #include \"WKBase.h\" instead of this file directly."
-#endif
+enum _WKUserScriptInjectionTime {
+ kWKInjectAtDocumentStart,
+ kWKInjectAtDocumentEnd
+};
+typedef enum _WKUserScriptInjectionTime _WKUserScriptInjectionTime;
-typedef const struct OpaqueWKObjCTypeWrapper* WKObjCTypeWrapperRef;
-
-#endif /* WKBaseMac_h */
+#endif /* WKUserScriptInjectionTime_h */
diff --git a/Source/WebKit2/Shared/API/c/cairo/WKImageCairo.cpp b/Source/WebKit2/Shared/API/c/cairo/WKImageCairo.cpp
deleted file mode 100644
index 703d86901..000000000
--- a/Source/WebKit2/Shared/API/c/cairo/WKImageCairo.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Copyright (C) 2011 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WKImageCairo.h"
-
-#include "ShareableBitmap.h"
-#include "WKSharedAPICast.h"
-#include "WebImage.h"
-#include <WebCore/GraphicsContext.h>
-#include <WebCore/PlatformContextCairo.h>
-
-using namespace WebKit;
-using namespace WebCore;
-
-cairo_surface_t* WKImageCreateCairoSurface(WKImageRef imageRef)
-{
- // We cannot pass a RefPtr through the API here, so we just leak the reference.
- return toImpl(imageRef)->bitmap()->createCairoSurface().leakRef();
-}
-
-WKImageRef WKImageCreateFromCairoSurface(cairo_surface_t* surface, WKImageOptions options)
-{
- IntSize imageSize(cairo_image_surface_get_width(surface), cairo_image_surface_get_height(surface));
- RefPtr<WebImage> webImage = WebImage::create(imageSize, toImageOptions(options));
- OwnPtr<GraphicsContext> graphicsContext = webImage->bitmap()->createGraphicsContext();
-
- cairo_t* cr = graphicsContext->platformContext()->cr();
- cairo_set_source_surface(cr, surface, 0, 0);
- cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
- cairo_rectangle(cr, 0, 0, imageSize.width(), imageSize.height());
- cairo_fill(cr);
-
- return toAPI(webImage.release().leakRef());
-}
diff --git a/Source/WebKit2/Shared/API/c/cf/WKErrorCF.cpp b/Source/WebKit2/Shared/API/c/cf/WKErrorCF.cpp
deleted file mode 100644
index 8c65b0a8e..000000000
--- a/Source/WebKit2/Shared/API/c/cf/WKErrorCF.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WKErrorCF.h"
-
-#include "WKAPICast.h"
-#include "WebError.h"
-
-using namespace WebCore;
-using namespace WebKit;
-
-WKErrorRef WKErrorCreateWithCFError(CFErrorRef cfError)
-{
- RefPtr<WebError> error = WebError::create(ResourceError(cfError));
- return toAPI(error.release().leakRef());
-}
-
-CFErrorRef WKErrorCopyCFError(CFAllocatorRef alloc, WKErrorRef error)
-{
- RetainPtr<CFErrorRef> cfError = toImpl(error)->platformError().cfError();
- return cfError.leakRef();
-}
diff --git a/Source/WebKit2/Shared/API/c/cf/WKStringCF.cpp b/Source/WebKit2/Shared/API/c/cf/WKStringCF.cpp
deleted file mode 100644
index f5ab62908..000000000
--- a/Source/WebKit2/Shared/API/c/cf/WKStringCF.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WKStringCF.h"
-
-#include "WKAPICast.h"
-#include <wtf/text/WTFString.h>
-
-using namespace WebCore;
-using namespace WebKit;
-
-WKStringRef WKStringCreateWithCFString(CFStringRef cfString)
-{
- String string(cfString);
- return toCopiedAPI(string);
-}
-
-CFStringRef WKStringCopyCFString(CFAllocatorRef allocatorRef, WKStringRef stringRef)
-{
- ASSERT(!toImpl(stringRef)->string().isNull());
-
- // NOTE: This does not use StringImpl::createCFString() since that function
- // expects to be called on the thread running WebCore.
- if (toImpl(stringRef)->string().is8Bit())
- return CFStringCreateWithBytes(allocatorRef, reinterpret_cast<const UInt8*>(toImpl(stringRef)->string().characters8()), toImpl(stringRef)->string().length(), kCFStringEncodingISOLatin1, true);
- return CFStringCreateWithCharacters(allocatorRef, reinterpret_cast<const UniChar*>(toImpl(stringRef)->string().characters16()), toImpl(stringRef)->string().length());
-}
diff --git a/Source/WebKit2/Shared/API/c/cf/WKURLCF.cpp b/Source/WebKit2/Shared/API/c/cf/WKURLCF.cpp
deleted file mode 100644
index f04ecfd26..000000000
--- a/Source/WebKit2/Shared/API/c/cf/WKURLCF.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WKURLCF.h"
-
-#include "WKAPICast.h"
-#include <WebCore/CFURLExtras.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefPtr.h>
-#include <wtf/text/CString.h>
-#include <wtf/text/WTFString.h>
-
-using namespace WebCore;
-using namespace WebKit;
-
-WKURLRef WKURLCreateWithCFURL(CFURLRef cfURL)
-{
- if (!cfURL)
- return 0;
-
- CString urlBytes;
- getURLBytes(cfURL, urlBytes);
-
- return toCopiedURLAPI(urlBytes.data());
-}
-
-CFURLRef WKURLCopyCFURL(CFAllocatorRef allocatorRef, WKURLRef URLRef)
-{
- ASSERT(!toImpl(URLRef)->string().isNull());
-
- // We first create a CString and then create the CFURL from it. This will ensure that the CFURL is stored in
- // UTF-8 which uses less memory and is what WebKit clients might expect.
-
- // This pattern of using UTF-8 and then falling back to Latin1 on failure matches KURL::createCFString with the
- // major differnce being that KURL does not do a UTF-8 conversion and instead chops off the high bits of the UTF-16
- // character sequence.
-
- CString buffer = toImpl(URLRef)->string().utf8();
- CFURLRef result = CFURLCreateAbsoluteURLWithBytes(kCFAllocatorDefault, reinterpret_cast<const UInt8*>(buffer.data()), buffer.length(), kCFStringEncodingUTF8, 0, true);
- if (!result)
- result = CFURLCreateAbsoluteURLWithBytes(kCFAllocatorDefault, reinterpret_cast<const UInt8*>(buffer.data()), buffer.length(), kCFStringEncodingISOLatin1, 0, true);
- return result;
-}
diff --git a/Source/WebKit2/Shared/API/c/cf/WKURLCF.h b/Source/WebKit2/Shared/API/c/cf/WKURLCF.h
deleted file mode 100644
index 394800d73..000000000
--- a/Source/WebKit2/Shared/API/c/cf/WKURLCF.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKURLCF_h
-#define WKURLCF_h
-
-#include <CoreFoundation/CoreFoundation.h>
-#include <WebKit2/WKBase.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-WK_EXPORT WKURLRef WKURLCreateWithCFURL(CFURLRef URL);
-WK_EXPORT CFURLRef WKURLCopyCFURL(CFAllocatorRef alloc, WKURLRef URL);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WKURLCF_h */
diff --git a/Source/WebKit2/Shared/API/c/cf/WKURLRequestCF.cpp b/Source/WebKit2/Shared/API/c/cf/WKURLRequestCF.cpp
deleted file mode 100644
index 22a9b763c..000000000
--- a/Source/WebKit2/Shared/API/c/cf/WKURLRequestCF.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WKURLRequestCF.h"
-
-#include "WKAPICast.h"
-#include "WebURLRequest.h"
-
-using namespace WebKit;
-
-WKURLRequestRef WKURLRequestCreateWithCFURLRequest(CFURLRequestRef urlRequest)
-{
- CFURLRequestRef copiedURLRequest = CFURLRequestCreateCopy(kCFAllocatorDefault, urlRequest);
- RefPtr<WebURLRequest> request = WebURLRequest::create(copiedURLRequest);
- return toAPI(request.release().leakRef());
-}
-
-CFURLRequestRef WKURLRequestCopyCFURLRequest(CFAllocatorRef alloc, WKURLRequestRef urlRequest)
-{
- return CFURLRequestCreateCopy(alloc, toImpl(urlRequest)->platformRequest());
-}
diff --git a/Source/WebKit2/Shared/API/c/cf/WKURLRequestCF.h b/Source/WebKit2/Shared/API/c/cf/WKURLRequestCF.h
deleted file mode 100644
index fb7dab2d6..000000000
--- a/Source/WebKit2/Shared/API/c/cf/WKURLRequestCF.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKURLRequestCF_h
-#define WKURLRequestCF_h
-
-#include <CFNetwork/CFURLRequestPriv.h>
-#include <WebKit2/WKBase.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-WK_EXPORT WKURLRequestRef WKURLRequestCreateWithCFURLRequest(CFURLRequestRef urlRequest);
-WK_EXPORT CFURLRequestRef WKURLRequestCopyCFURLRequest(CFAllocatorRef alloc, WKURLRequestRef urlRequest);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WKURLRequestCF_h */
diff --git a/Source/WebKit2/Shared/API/c/cf/WKURLResponseCF.cpp b/Source/WebKit2/Shared/API/c/cf/WKURLResponseCF.cpp
deleted file mode 100644
index ea33e9c3d..000000000
--- a/Source/WebKit2/Shared/API/c/cf/WKURLResponseCF.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WKURLResponseCF.h"
-
-#include "WKAPICast.h"
-#include "WebURLResponse.h"
-
-using namespace WebKit;
-
-WKURLResponseRef WKURLResponseCreateWithCFURLResponse(CFURLResponseRef urlResponse)
-{
- if (!urlResponse)
- return 0;
-
- CFURLResponseRef copiedURLResponse = CFURLResponseCreateCopy(kCFAllocatorDefault, urlResponse);
- RefPtr<WebURLResponse> response = WebURLResponse::create(copiedURLResponse);
- return toAPI(response.release().leakRef());
-}
-
-CFURLResponseRef WKURLResponseCopyCFURLResponse(CFAllocatorRef alloc, WKURLResponseRef urlResponse)
-{
- if (!urlResponse)
- return 0;
-
- PlatformResponse platformURLResponse = toImpl(urlResponse)->platformResponse();
- if (!platformURLResponse)
- return 0;
-
- return CFURLResponseCreateCopy(alloc, toImpl(urlResponse)->platformResponse());
-}
diff --git a/Source/WebKit2/Shared/API/c/cf/WKURLResponseCF.h b/Source/WebKit2/Shared/API/c/cf/WKURLResponseCF.h
deleted file mode 100644
index 5ce718424..000000000
--- a/Source/WebKit2/Shared/API/c/cf/WKURLResponseCF.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKURLResponseCF_h
-#define WKURLResponseCF_h
-
-#include <CFNetwork/CFURLResponsePriv.h>
-#include <WebKit2/WKBase.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-WK_EXPORT WKURLResponseRef WKURLResponseCreateWithCFURLResponse(CFURLResponseRef urlResponse);
-WK_EXPORT CFURLResponseRef WKURLResponseCopyCFURLResponse(CFAllocatorRef alloc, WKURLResponseRef urlResponse);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WKURLResponseCF_h */
diff --git a/Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.cpp b/Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.cpp
deleted file mode 100644
index aa7a77e83..000000000
--- a/Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#include "config.h"
-#include "WKGraphicsContextCG.h"
-
-#include "WKSharedAPICast.h"
-#include "WebGraphicsContext.h"
-
-using namespace WebKit;
-
-CGContextRef WKGraphicsContextGetCGContext(WKGraphicsContextRef graphicsContextRef)
-{
- return toImpl(graphicsContextRef)->platformContext();
-}
diff --git a/Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.h b/Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.h
deleted file mode 100644
index 06e9df092..000000000
--- a/Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKGraphicsContextCG_h
-#define WKGraphicsContextCG_h
-
-#include <CoreGraphics/CGContext.h>
-#include <WebKit2/WKBase.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-WK_EXPORT CGContextRef WKGraphicsContextGetCGContext(WKGraphicsContextRef graphicsContext);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WKGraphicsContextCG_h */
diff --git a/Source/WebKit2/Shared/API/c/cg/WKImageCG.cpp b/Source/WebKit2/Shared/API/c/cg/WKImageCG.cpp
deleted file mode 100644
index 1071ef592..000000000
--- a/Source/WebKit2/Shared/API/c/cg/WKImageCG.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WKImageCG.h"
-
-#include "ShareableBitmap.h"
-#include "WKSharedAPICast.h"
-#include "WebImage.h"
-#include <WebCore/ColorSpace.h>
-#include <WebCore/GraphicsContext.h>
-
-using namespace WebKit;
-using namespace WebCore;
-
-CGImageRef WKImageCreateCGImage(WKImageRef imageRef)
-{
- WebImage* webImage = toImpl(imageRef);
- if (!webImage->bitmap())
- return 0;
-
- return webImage->bitmap()->makeCGImageCopy().leakRef();
-}
-
-WKImageRef WKImageCreateFromCGImage(CGImageRef imageRef, WKImageOptions options)
-{
- if (!imageRef)
- return 0;
-
- IntSize imageSize(CGImageGetWidth(imageRef), CGImageGetHeight(imageRef));
- RefPtr<WebImage> webImage = WebImage::create(imageSize, toImageOptions(options));
- if (!webImage->bitmap())
- return 0;
-
- OwnPtr<GraphicsContext> graphicsContext = webImage->bitmap()->createGraphicsContext();
- FloatRect rect(FloatPoint(0, 0), imageSize);
- graphicsContext->clearRect(rect);
- graphicsContext->drawNativeImage(imageRef, imageSize, WebCore::ColorSpaceDeviceRGB, rect, rect);
- return toAPI(webImage.release().leakRef());
-}
diff --git a/Source/WebKit2/Shared/API/c/cg/WKImageCG.h b/Source/WebKit2/Shared/API/c/cg/WKImageCG.h
deleted file mode 100644
index 800b02eb6..000000000
--- a/Source/WebKit2/Shared/API/c/cg/WKImageCG.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKImageCG_h
-#define WKImageCG_h
-
-#include <CoreGraphics/CGImage.h>
-#include <WebKit2/WKBase.h>
-#include <WebKit2/WKImage.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-WK_EXPORT CGImageRef WKImageCreateCGImage(WKImageRef image);
-
-WK_EXPORT WKImageRef WKImageCreateFromCGImage(CGImageRef imageRef, WKImageOptions options);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WKImageCG_h */
diff --git a/Source/WebKit2/Shared/API/c/efl/WKArrayEfl.cpp b/Source/WebKit2/Shared/API/c/efl/WKArrayEfl.cpp
deleted file mode 100644
index 9778a99e8..000000000
--- a/Source/WebKit2/Shared/API/c/efl/WKArrayEfl.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2013 Samsung Electronics. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WKArrayEfl.h"
-
-#include "WKArray.h"
-#include "WKString.h"
-#include <Eina.h>
-#include <WebKit2/WKRetainPtr.h>
-#include <wtf/Vector.h>
-
-using namespace WebKit;
-
-WKArrayRef WKArrayCreateWithEinaList(Eina_List* array, WKTypeRef (*createWKType)(void*))
-{
- unsigned count = eina_list_count(array);
- if (!count)
- return WKArrayRef();
-
- Vector<WKTypeRef> vector;
- vector.reserveInitialCapacity(count);
-
- Eina_List* l = 0;
- void* data = 0;
- EINA_LIST_FOREACH(array, l, data)
- vector.uncheckedAppend(createWKType(data));
-
- return WKArrayCreateAdoptingValues(vector.data(), count);
-}
diff --git a/Source/WebKit2/Shared/API/c/efl/WKArrayEfl.h b/Source/WebKit2/Shared/API/c/efl/WKArrayEfl.h
deleted file mode 100644
index bd4b9a57b..000000000
--- a/Source/WebKit2/Shared/API/c/efl/WKArrayEfl.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2013 Samsung Electronics. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKArrayEfl_h
-#define WKArrayEfl_h
-
-#include <WebKit2/WKBase.h>
-
-/**
- * @typedef Eina_List
- * Type for a generic double linked list.
- */
-typedef struct _Eina_List Eina_List;
-
-WK_EXPORT WKArrayRef WKArrayCreateWithEinaList(Eina_List*, WKTypeRef (*createWKType)(void*));
-
-#endif // WKArrayEfl_h
diff --git a/Source/WebKit2/Shared/API/c/efl/WKBaseEfl.h b/Source/WebKit2/Shared/API/c/efl/WKBaseEfl.h
deleted file mode 100644
index 9c07f8e0c..000000000
--- a/Source/WebKit2/Shared/API/c/efl/WKBaseEfl.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2012 Samsung Electronics
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef WKBaseEfl_h
-#define WKBaseEfl_h
-
-#ifndef WKBase_h
-#error "Please #include \"WKBase.h\" instead of this file directly."
-#endif
-
-typedef const struct OpaqueWKView* WKViewRef;
-typedef const struct OpaqueWKPopupItem* WKPopupItemRef;
-typedef const struct OpaqueWKPopupMenuListener* WKPopupMenuListenerRef;
-typedef const struct OpaqueWKTouchPoint* WKTouchPointRef;
-typedef const struct OpaqueWKTouchEvent* WKTouchEventRef;
-
-#endif /* WKBaseEfl_h */
diff --git a/Source/WebKit2/Shared/API/c/gtk/WKBaseGtk.h b/Source/WebKit2/Shared/API/c/gtk/WKBaseGtk.h
deleted file mode 100644
index eb88f702a..000000000
--- a/Source/WebKit2/Shared/API/c/gtk/WKBaseGtk.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved.
- * Copyright (C) 2011 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKBaseGtk_h
-#define WKBaseGtk_h
-
-#ifndef WKBase_h
-#error "Please #include \"WKBase.h\" instead of this file directly."
-#endif
-
-#include <stdbool.h>
-
-typedef const struct OpaqueWKView* WKViewRef;
-
-#endif /* WKBaseGtk_h */
diff --git a/Source/WebKit2/Shared/API/c/gtk/WKGraphicsContextGtk.cpp b/Source/WebKit2/Shared/API/c/gtk/WKGraphicsContextGtk.cpp
deleted file mode 100644
index 69695f159..000000000
--- a/Source/WebKit2/Shared/API/c/gtk/WKGraphicsContextGtk.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2011 Igalia SL All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#include "config.h"
-#include "WKGraphicsContextGtk.h"
-
-#include "WKSharedAPICast.h"
-#include "WebGraphicsContext.h"
-
-using namespace WebKit;
-
-cairo_t* WKGraphicsContextGetGtkContext(WKGraphicsContextRef graphicsContextRef)
-{
- return toImpl(graphicsContextRef)->platformContext();
-}
diff --git a/Source/WebKit2/Shared/API/c/gtk/WKGraphicsContextGtk.h b/Source/WebKit2/Shared/API/c/gtk/WKGraphicsContextGtk.h
deleted file mode 100644
index 25fcfc424..000000000
--- a/Source/WebKit2/Shared/API/c/gtk/WKGraphicsContextGtk.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2011 Igalia SL All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKGraphicsContextGtk_h
-#define WKGraphicsContextGtk_h
-
-#include <WebKit2/WKBase.h>
-
-#include <cairo.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-WK_EXPORT cairo_t* WKGraphicsContextGetGtkContext(WKGraphicsContextRef);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WKGraphicsContextGtk_h */
diff --git a/Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.h b/Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.h
deleted file mode 100644
index d098f34ca..000000000
--- a/Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKCertificateInfoMac_h
-#define WKCertificateInfoMac_h
-
-#include <CoreFoundation/CoreFoundation.h>
-#include <WebKit2/WKBase.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-WK_EXPORT WKCertificateInfoRef WKCertificateInfoCreateWithCertficateChain(CFArrayRef certificateChain);
-WK_EXPORT CFArrayRef WKCertificateInfoGetCertificateChain(WKCertificateInfoRef certificateInfo);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WKCertificateInfoMac_h */
diff --git a/Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.mm b/Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.mm
deleted file mode 100644
index 34dd43151..000000000
--- a/Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.mm
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "WKCertificateInfoMac.h"
-
-#import "WKAPICast.h"
-#import "WebCertificateInfo.h"
-
-using namespace WebKit;
-
-WKCertificateInfoRef WKCertificateInfoCreateWithCertficateChain(CFArrayRef certificateChain)
-{
- RefPtr<WebCertificateInfo> certificateInfo = WebCertificateInfo::create(PlatformCertificateInfo(certificateChain));
- return toAPI(certificateInfo.release().leakRef());
-}
-
-CFArrayRef WKCertificateInfoGetCertificateChain(WKCertificateInfoRef certificateInfoRef)
-{
- return toImpl(certificateInfoRef)->platformCertificateInfo().certificateChain();
-}
diff --git a/Source/WebKit2/Shared/API/c/mac/WKObjCTypeWrapperRef.h b/Source/WebKit2/Shared/API/c/mac/WKObjCTypeWrapperRef.h
deleted file mode 100644
index 7cf79624c..000000000
--- a/Source/WebKit2/Shared/API/c/mac/WKObjCTypeWrapperRef.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKObjCTypeWrapperRef_h
-#define WKObjCTypeWrapperRef_h
-
-#include <Foundation/Foundation.h>
-#include <WebKit2/WKBase.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-WK_EXPORT WKTypeID WKObjCTypeWrapperGetTypeID();
-
-WK_EXPORT WKObjCTypeWrapperRef WKObjCTypeWrapperCreate(id object);
-WK_EXPORT id WKObjCTypeWrapperGetObject(WKObjCTypeWrapperRef wrapper);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WKObjCTypeWrapperRef_h */
diff --git a/Source/WebKit2/Shared/API/c/mac/WKObjCTypeWrapperRef.mm b/Source/WebKit2/Shared/API/c/mac/WKObjCTypeWrapperRef.mm
deleted file mode 100644
index ee0125ba1..000000000
--- a/Source/WebKit2/Shared/API/c/mac/WKObjCTypeWrapperRef.mm
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "WKObjCTypeWrapperRef.h"
-
-#import "ObjCObjectGraph.h"
-#import "WKSharedAPICast.h"
-
-using namespace WebKit;
-
-WKTypeID WKObjCTypeWrapperGetTypeID()
-{
- return toAPI(ObjCObjectGraph::APIType);
-}
-
-WKObjCTypeWrapperRef WKObjCTypeWrapperCreate(id object)
-{
- RefPtr<ObjCObjectGraph> objectWrapper = ObjCObjectGraph::create(object);
- return toAPI(objectWrapper.release().leakRef());
-}
-
-id WKObjCTypeWrapperGetObject(WKObjCTypeWrapperRef wrapperRef)
-{
- return toImpl(wrapperRef)->rootObject();
-}
diff --git a/Source/WebKit2/Shared/API/c/mac/WKURLRequestNS.h b/Source/WebKit2/Shared/API/c/mac/WKURLRequestNS.h
deleted file mode 100644
index 4cdfec847..000000000
--- a/Source/WebKit2/Shared/API/c/mac/WKURLRequestNS.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKURLRequestNS_h
-#define WKURLRequestNS_h
-
-#include <Foundation/Foundation.h>
-#include <WebKit2/WKBase.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-WK_EXPORT WKURLRequestRef WKURLRequestCreateWithNSURLRequest(NSURLRequest* urlRequest);
-WK_EXPORT NSURLRequest* WKURLRequestCopyNSURLRequest(WKURLRequestRef urlRequest);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WKURLRequestNS_h */
diff --git a/Source/WebKit2/Shared/API/c/mac/WKURLRequestNS.mm b/Source/WebKit2/Shared/API/c/mac/WKURLRequestNS.mm
deleted file mode 100644
index 82dce910f..000000000
--- a/Source/WebKit2/Shared/API/c/mac/WKURLRequestNS.mm
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "WKURLRequestNS.h"
-
-#import "WKAPICast.h"
-#import "WebURLRequest.h"
-
-using namespace WebKit;
-
-WKURLRequestRef WKURLRequestCreateWithNSURLRequest(NSURLRequest* urlRequest)
-{
- RetainPtr<NSURLRequest> copiedURLRequest = adoptNS([urlRequest copy]);
- RefPtr<WebURLRequest> request = WebURLRequest::create(copiedURLRequest.get());
- return toAPI(request.release().leakRef());
-}
-
-NSURLRequest* WKURLRequestCopyNSURLRequest(WKURLRequestRef urlRequest)
-{
- return [toImpl(urlRequest)->platformRequest() copy];
-}
diff --git a/Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.h b/Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.h
deleted file mode 100644
index 0bbc14943..000000000
--- a/Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKURLResponseNS_h
-#define WKURLResponseNS_h
-
-#include <Foundation/Foundation.h>
-#include <WebKit2/WKBase.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-WK_EXPORT WKURLResponseRef WKURLResponseCreateWithNSURLResponse(NSURLResponse* urlResponse);
-WK_EXPORT NSURLResponse* WKURLResponseCopyNSURLResponse(WKURLResponseRef urlResponse);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WKURLResponseNS_h */
diff --git a/Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.mm b/Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.mm
deleted file mode 100644
index 9200dbb65..000000000
--- a/Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.mm
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "WKURLResponseNS.h"
-
-#import "WKAPICast.h"
-#import "WebURLResponse.h"
-
-using namespace WebKit;
-
-WKURLResponseRef WKURLResponseCreateWithNSURLResponse(NSURLResponse* urlResponse)
-{
- RetainPtr<NSURLResponse> copiedURLResponse = adoptNS([urlResponse copy]);
- RefPtr<WebURLResponse> response = WebURLResponse::create(copiedURLResponse.get());
- return toAPI(response.release().leakRef());
-}
-
-NSURLResponse* WKURLResponseCopyNSURLResponse(WKURLResponseRef urlResponse)
-{
- return [toImpl(urlResponse)->platformResponse() copy];
-}
diff --git a/Source/WebKit2/Shared/API/c/mac/WKWebArchive.cpp b/Source/WebKit2/Shared/API/c/mac/WKWebArchive.cpp
deleted file mode 100644
index c9d4fe631..000000000
--- a/Source/WebKit2/Shared/API/c/mac/WKWebArchive.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WKWebArchive.h"
-
-#include "ImmutableArray.h"
-#include "InjectedBundleRangeHandle.h"
-#include "WKBundleAPICast.h"
-#include "WKSharedAPICast.h"
-#include "WebArchive.h"
-#include "WebArchiveResource.h"
-#include "WebData.h"
-
-using namespace WebKit;
-
-WKTypeID WKWebArchiveGetTypeID()
-{
- return toAPI(WebArchive::APIType);
-}
-
-WKWebArchiveRef WKWebArchiveCreate(WKWebArchiveResourceRef mainResourceRef, WKArrayRef subresourcesRef, WKArrayRef subframeArchivesRef)
-{
- RefPtr<WebArchive> webArchive = WebArchive::create(toImpl(mainResourceRef), toImpl(subresourcesRef), toImpl(subframeArchivesRef));
- return toAPI(webArchive.release().leakRef());
-}
-
-WKWebArchiveRef WKWebArchiveCreateWithData(WKDataRef dataRef)
-{
- RefPtr<WebArchive> webArchive = WebArchive::create(toImpl(dataRef));
- return toAPI(webArchive.release().leakRef());
-}
-
-WKWebArchiveRef WKWebArchiveCreateFromRange(WKBundleRangeHandleRef rangeHandleRef)
-{
- RefPtr<WebArchive> webArchive = WebArchive::create(toImpl(rangeHandleRef)->coreRange());
- return toAPI(webArchive.release().leakRef());
-}
-
-WKWebArchiveResourceRef WKWebArchiveCopyMainResource(WKWebArchiveRef webArchiveRef)
-{
- RefPtr<WebArchiveResource> mainResource = toImpl(webArchiveRef)->mainResource();
- return toAPI(mainResource.release().leakRef());
-}
-
-WKArrayRef WKWebArchiveCopySubresources(WKWebArchiveRef webArchiveRef)
-{
- RefPtr<ImmutableArray> subresources = toImpl(webArchiveRef)->subresources();
- return toAPI(subresources.release().leakRef());
-}
-
-WKArrayRef WKWebArchiveCopySubframeArchives(WKWebArchiveRef webArchiveRef)
-{
- RefPtr<ImmutableArray> subframeArchives = toImpl(webArchiveRef)->subframeArchives();
- return toAPI(subframeArchives.release().leakRef());
-}
-
-WKDataRef WKWebArchiveCopyData(WKWebArchiveRef webArchiveRef)
-{
- RefPtr<WebData> data = toImpl(webArchiveRef)->data();
- return toAPI(data.release().leakRef());
-}
diff --git a/Source/WebKit2/Shared/API/c/mac/WKWebArchive.h b/Source/WebKit2/Shared/API/c/mac/WKWebArchive.h
deleted file mode 100644
index 757fba573..000000000
--- a/Source/WebKit2/Shared/API/c/mac/WKWebArchive.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKWebArchive_h
-#define WKWebArchive_h
-
-#include <WebKit2/WKBase.h>
-
-#include <stddef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-WK_EXPORT WKTypeID WKWebArchiveGetTypeID();
-
-WK_EXPORT WKWebArchiveRef WKWebArchiveCreate(WKWebArchiveResourceRef mainResource, WKArrayRef subresources, WKArrayRef subframeArchives);
-WK_EXPORT WKWebArchiveRef WKWebArchiveCreateWithData(WKDataRef data);
-WK_EXPORT WKWebArchiveRef WKWebArchiveCreateFromRange(WKBundleRangeHandleRef range);
-
-WK_EXPORT WKWebArchiveResourceRef WKWebArchiveCopyMainResource(WKWebArchiveRef webArchive);
-WK_EXPORT WKArrayRef WKWebArchiveCopySubresources(WKWebArchiveRef webArchive);
-WK_EXPORT WKArrayRef WKWebArchiveCopySubframeArchives(WKWebArchiveRef webArchive);
-WK_EXPORT WKDataRef WKWebArchiveCopyData(WKWebArchiveRef webArchive);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // WKWebArchive_h
diff --git a/Source/WebKit2/Shared/API/c/mac/WKWebArchiveResource.cpp b/Source/WebKit2/Shared/API/c/mac/WKWebArchiveResource.cpp
deleted file mode 100644
index 7ae6d3db2..000000000
--- a/Source/WebKit2/Shared/API/c/mac/WKWebArchiveResource.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WKWebArchiveResource.h"
-
-#include "WKSharedAPICast.h"
-#include "WebArchiveResource.h"
-#include "WebData.h"
-
-using namespace WebKit;
-
-WKTypeID WKWebArchiveResourceGetTypeID()
-{
- return toAPI(WebArchiveResource::APIType);
-}
-
-WKWebArchiveResourceRef WKWebArchiveResourceCreate(WKDataRef dataRef, WKURLRef URLRef, WKStringRef MIMETypeRef, WKStringRef textEncodingRef)
-{
- RefPtr<WebArchiveResource> webArchiveResource = WebArchiveResource::create(toImpl(dataRef), toWTFString(URLRef), toWTFString(MIMETypeRef), toWTFString(textEncodingRef));
- return toAPI(webArchiveResource.release().leakRef());
-}
-
-WKDataRef WKWebArchiveResourceCopyData(WKWebArchiveResourceRef webArchiveResourceRef)
-{
- RefPtr<WebData> data = toImpl(webArchiveResourceRef)->data();
- return toAPI(data.release().leakRef());
-}
-
-WKURLRef WKWebArchiveResourceCopyURL(WKWebArchiveResourceRef webArchiveResourceRef)
-{
- return toCopiedURLAPI(toImpl(webArchiveResourceRef)->URL());
-}
-
-WKStringRef WKWebArchiveResourceCopyMIMEType(WKWebArchiveResourceRef webArchiveResourceRef)
-{
- return toCopiedAPI(toImpl(webArchiveResourceRef)->MIMEType());
-}
-
-WKStringRef WKWebArchiveResourceCopyTextEncoding(WKWebArchiveResourceRef webArchiveResourceRef)
-{
- return toCopiedAPI(toImpl(webArchiveResourceRef)->textEncoding());
-}
diff --git a/Source/WebKit2/Shared/API/c/mac/WKWebArchiveResource.h b/Source/WebKit2/Shared/API/c/mac/WKWebArchiveResource.h
deleted file mode 100644
index 3e14c4ef5..000000000
--- a/Source/WebKit2/Shared/API/c/mac/WKWebArchiveResource.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKWebArchiveResource_h
-#define WKWebArchiveResource_h
-
-#include <WebKit2/WKBase.h>
-
-#include <stddef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-WK_EXPORT WKTypeID WKWebArchiveResourceGetTypeID();
-
-WK_EXPORT WKWebArchiveResourceRef WKWebArchiveResourceCreate(WKDataRef data, WKURLRef URL, WKStringRef MIMEType, WKStringRef textEncoding);
-
-WK_EXPORT WKDataRef WKWebArchiveResourceCopyData(WKWebArchiveResourceRef webArchiveResource);
-WK_EXPORT WKURLRef WKWebArchiveResourceCopyURL(WKWebArchiveResourceRef webArchiveResource);
-WK_EXPORT WKStringRef WKWebArchiveResourceCopyMIMEType(WKWebArchiveResourceRef webArchiveResource);
-WK_EXPORT WKStringRef WKWebArchiveResourceCopyTextEncoding(WKWebArchiveResourceRef webArchiveResource);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // WKWebArchiveResource_h
diff --git a/Source/WebKit2/Shared/API/c/qt/WKImageQt.cpp b/Source/WebKit2/Shared/API/c/qt/WKImageQt.cpp
index 60388f4fa..6d5cc5a10 100644
--- a/Source/WebKit2/Shared/API/c/qt/WKImageQt.cpp
+++ b/Source/WebKit2/Shared/API/c/qt/WKImageQt.cpp
@@ -47,7 +47,7 @@ WKImageRef WKImageCreateFromQImage(const QImage& image)
RefPtr<WebImage> webImage = WebImage::create(image.size(), static_cast<ImageOptions>(0));
if (!webImage->bitmap())
return 0;
- OwnPtr<GraphicsContext> graphicsContext = webImage->bitmap()->createGraphicsContext();
+ auto graphicsContext = webImage->bitmap()->createGraphicsContext();
QPainter* painter = graphicsContext->platformContext();
painter->drawImage(QPoint(0, 0), image);
return toAPI(webImage.release().leakRef());
diff --git a/Source/WebKit2/Shared/API/c/qt/WKImageQt.h b/Source/WebKit2/Shared/API/c/qt/WKImageQt.h
index 5abef4818..6bcc5a432 100644
--- a/Source/WebKit2/Shared/API/c/qt/WKImageQt.h
+++ b/Source/WebKit2/Shared/API/c/qt/WKImageQt.h
@@ -23,8 +23,8 @@
#define WKImageQt_h
#include <QImage>
-#include <WebKit2/WKBase.h>
-#include <WebKit2/WKImage.h>
+#include <WebKit/WKBase.h>
+#include <WebKit/WKImage.h>
WK_EXPORT QImage WKImageCreateQImage(WKImageRef image);
WK_EXPORT WKImageRef WKImageCreateFromQImage(const QImage& image);