2
* Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions
7
* 1. Redistributions of source code must retain the above copyright
8
* notice, this list of conditions and the following disclaimer.
9
* 2. Redistributions in binary form must reproduce the above copyright
10
* notice, this list of conditions and the following disclaimer in the
11
* documentation and/or other materials provided with the distribution.
13
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
* THE POSSIBILITY OF SUCH DAMAGE.
27
#import "WebSystemInterface.h"
29
#import <WebCore/WebCoreSystemInterface.h>
30
#import <WebKitSystemInterface.h>
32
#define INIT(function) wk##function = WK##function
34
void InitWebCoreSystemInterface(void)
36
static dispatch_once_t initOnce;
38
dispatch_once(&initOnce, ^{
39
INIT(AdvanceDefaultButtonPulseAnimation);
40
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
41
INIT(CALayerEnumerateRectsBeingDrawnWithBlock);
43
INIT(CopyCFLocalizationPreferredName);
44
INIT(CGContextGetShouldSmoothFonts);
45
INIT(CGPatternCreateWithImageAndTransform);
46
INIT(CGContextResetClip);
47
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
48
INIT(CGContextDrawsWithCorrectShadowOffsets);
50
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
51
INIT(CTFontTransformGlyphs);
53
INIT(CopyCONNECTProxyResponse);
54
INIT(CopyNSURLResponseStatusLine);
55
INIT(CreateCTLineWithUniCharProvider);
56
INIT(CreateCustomCFReadStream);
57
INIT(CreateNSURLConnectionDelegateProxy);
58
INIT(DrawBezeledTextArea);
59
INIT(DrawBezeledTextFieldCell);
60
INIT(DrawCapsLockIndicator);
62
INIT(DrawMediaSliderTrack);
63
INIT(DrawMediaUIPart);
64
INIT(DrawTextFieldCellFocusRing);
65
INIT(GetExtensionsForMIMEType);
66
INIT(GetFontInLanguageForCharacter);
67
INIT(GetFontInLanguageForRange);
68
INIT(GetGlyphTransformedAdvances);
69
INIT(GetGlyphsForCharacters);
70
INIT(GetVerticalGlyphsForCharacters);
71
INIT(GetHTTPPipeliningPriority);
72
INIT(GetMIMETypeForExtension);
73
INIT(GetNSURLResponseLastModifiedDate);
74
INIT(SignedPublicKeyAndChallengeString);
75
INIT(GetPreferredExtensionForMIMEType);
76
INIT(GetUserToBaseCTM);
77
INIT(GetWheelEventDeltas);
78
INIT(GetNSEventKeyChar);
79
INIT(HitTestMediaUIPart);
80
INIT(InitializeMaximumHTTPConnectionCountPerHost);
81
INIT(MeasureMediaUIPart);
82
INIT(MediaControllerThemeAvailable);
84
INIT(QTIncludeOnlyModernMediaFileTypes);
85
INIT(QTMovieDataRate);
86
INIT(QTMovieDisableComponent);
88
INIT(QTMovieHasClosedCaptions);
89
INIT(QTMovieMaxTimeLoaded);
90
INIT(QTMovieMaxTimeLoadedChangeNotification);
91
INIT(QTMovieMaxTimeSeekable);
92
INIT(QTMovieResolvedURL);
93
INIT(QTMovieSelectPreferredAlternates);
94
INIT(QTMovieSetShowClosedCaptions);
95
INIT(QTMovieViewSetDrawSynchronously);
96
INIT(QTGetSitesInMediaDownloadCache);
97
INIT(QTClearMediaDownloadCacheForSite);
98
INIT(QTClearMediaDownloadCache);
100
INIT(SetCGFontRenderingMode);
101
INIT(SetCONNECTProxyAuthorizationForStream);
102
INIT(SetCONNECTProxyForStream);
104
INIT(SetHTTPPipeliningMaximumPriority);
105
INIT(SetHTTPPipeliningPriority);
106
INIT(SetHTTPPipeliningMinimumFastLanePriority);
107
INIT(SetNSURLConnectionDefersCallbacks);
108
INIT(SetNSURLRequestShouldContentSniff);
109
INIT(SetPatternPhaseInUserSpace);
110
INIT(SetUpFontCache);
111
INIT(SignalCFReadStreamEnd);
112
INIT(SignalCFReadStreamError);
113
INIT(SignalCFReadStreamHasBytes);
114
INIT(CreatePrivateStorageSession);
115
INIT(CopyRequestWithStorageSession);
116
INIT(CopyHTTPCookieStorage);
117
INIT(GetHTTPCookieAcceptPolicy);
118
INIT(SetHTTPCookieAcceptPolicy);
120
INIT(HTTPCookiesForURL);
121
INIT(SetHTTPCookiesForURL);
122
INIT(DeleteAllHTTPCookies);
123
INIT(DeleteHTTPCookie);
125
INIT(SetMetadataURL);
127
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
128
INIT(IOSurfaceContextCreate);
129
INIT(IOSurfaceContextCreateImage);
130
INIT(CreateCTTypesetterWithUniCharProviderAndOptions);
131
INIT(RecommendedScrollerStyle);
132
INIT(ExecutableWasLinkedOnOrBeforeSnowLeopard);
133
INIT(CopyDefaultSearchProviderDisplayName);
134
INIT(SetCrashReportApplicationSpecificInformation);
135
INIT(AVAssetResolvedURL);
138
INIT(GetHyphenationLocationBeforeIndex);
139
INIT(GetNSEventMomentumPhase);
142
INIT(GetDefaultHTTPCookieStorage);
143
INIT(CopyCredentialFromCFPersistentStorage);
144
INIT(SetCFURLRequestShouldContentSniff);
145
INIT(CFURLRequestCopyHTTPRequestBodyParts);
146
INIT(CFURLRequestSetHTTPRequestBodyParts);
147
INIT(SetRequestStorageSession);
150
INIT(GetAXTextMarkerTypeID);
151
INIT(GetAXTextMarkerRangeTypeID);
152
INIT(CreateAXTextMarker);
153
INIT(GetBytesFromAXTextMarker);
154
INIT(CreateAXTextMarkerRange);
155
INIT(CopyAXTextMarkerRangeStart);
156
INIT(CopyAXTextMarkerRangeEnd);
157
INIT(AccessibilityHandleFocusChanged);
158
INIT(CreateAXUIElementRef);
159
INIT(UnregisterUniqueIdForElement);
161
INIT(GetCFURLResponseMIMEType);
162
INIT(GetCFURLResponseURL);
163
INIT(GetCFURLResponseHTTPResponse);
164
INIT(CopyCFURLResponseSuggestedFilename);
165
INIT(SetCFURLResponseMIMEType);
167
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
168
INIT(CreateVMPressureDispatchOnMainQueue);
171
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
172
INIT(GetMacOSXVersionString);
173
INIT(ExecutableWasLinkedOnOrBeforeLion);
176
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
177
INIT(CGPathAddRoundedRect);
180
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
181
INIT(CFURLRequestAllowAllPostCaching);
183
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
184
INIT(FilterIsManagedSession);
185
INIT(FilterCreateInstance);
187
INIT(FilterWasBlocked);
189
INIT(FilterDataComplete);
191
INIT(NSElasticDeltaForTimeDelta);
192
INIT(NSElasticDeltaForReboundDelta);
193
INIT(NSReboundDeltaForElasticDelta);
196
INIT(CaptionAppearanceHasUserPreferences);
197
INIT(CaptionAppearanceShowCaptionsWhenAvailable);
198
INIT(CaptionAppearanceCopyForegroundColor);
199
INIT(CaptionAppearanceCopyBackgroundColor);
200
INIT(CaptionAppearanceCopyWindowColor);
201
INIT(CaptionAppearanceGetForegroundOpacity);
202
INIT(CaptionAppearanceGetBackgroundOpacity);
203
INIT(CaptionAppearanceGetWindowOpacity);
204
INIT(CaptionAppearanceCopyFontForStyle);
205
INIT(CaptionAppearanceGetRelativeCharacterSize);
206
INIT(CaptionAppearanceGetTextEdgeStyle);
207
INIT(CaptionAppearanceGetSettingsChangedNotification);