1 /* 2 * Copyright 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of 14 * its contributors may be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 #import "WebSystemInterface.h" 30 31 // Needed for builds not using PCH to expose BUILDING_ macros, see bug 32753. 32 #include <wtf/Platform.h> 33 34 #import <WebCore/WebCoreSystemInterface.h> 35 #import <WebKitSystemInterface.h> 36 37 #define INIT(function) wk##function = WK##function 38 39 void InitWebCoreSystemInterface(void) 40 { 41 static bool didInit; 42 if (didInit) 43 return; 44 45 INIT(AdvanceDefaultButtonPulseAnimation); 46 INIT(CGContextGetShouldSmoothFonts); 47 INIT(CopyCFLocalizationPreferredName); 48 INIT(CopyCONNECTProxyResponse); 49 INIT(CopyNSURLResponseStatusLine); 50 INIT(CreateCustomCFReadStream); 51 INIT(CreateNSURLConnectionDelegateProxy); 52 INIT(DrawCapsLockIndicator); 53 INIT(DrawBezeledTextArea); 54 INIT(DrawBezeledTextFieldCell); 55 INIT(DrawFocusRing); 56 INIT(DrawMediaUIPart); 57 INIT(DrawMediaSliderTrack); 58 INIT(DrawTextFieldCellFocusRing); 59 INIT(GetExtensionsForMIMEType); 60 INIT(GetFontInLanguageForCharacter); 61 INIT(GetFontInLanguageForRange); 62 INIT(GetGlyphTransformedAdvances); 63 INIT(GetHTTPPipeliningPriority); 64 INIT(GetMIMETypeForExtension); 65 INIT(GetNSURLResponseLastModifiedDate); 66 INIT(SignedPublicKeyAndChallengeString); 67 INIT(GetPreferredExtensionForMIMEType); 68 INIT(GetWheelEventDeltas); 69 INIT(HitTestMediaUIPart); 70 INIT(InitializeMaximumHTTPConnectionCountPerHost); 71 INIT(MeasureMediaUIPart); 72 INIT(MediaControllerThemeAvailable); 73 INIT(PopupMenu); 74 INIT(SetCGFontRenderingMode); 75 INIT(SetCONNECTProxyAuthorizationForStream); 76 INIT(SetCONNECTProxyForStream); 77 INIT(SetCookieStoragePrivateBrowsingEnabled); 78 INIT(SetDragImage); 79 INIT(SetHTTPPipeliningMaximumPriority); 80 INIT(SetHTTPPipeliningPriority); 81 INIT(SetHTTPPipeliningMinimumFastLanePriority); 82 INIT(SetNSURLConnectionDefersCallbacks); 83 INIT(SetNSURLRequestShouldContentSniff); 84 INIT(SetPatternBaseCTM); 85 INIT(SetPatternPhaseInUserSpace); 86 INIT(GetUserToBaseCTM); 87 INIT(SetUpFontCache); 88 INIT(SignalCFReadStreamEnd); 89 INIT(SignalCFReadStreamError); 90 INIT(SignalCFReadStreamHasBytes); 91 INIT(QTIncludeOnlyModernMediaFileTypes); 92 INIT(QTMovieDataRate); 93 INIT(QTMovieDisableComponent); 94 INIT(QTMovieMaxTimeLoaded); 95 INIT(QTMovieMaxTimeLoadedChangeNotification); 96 INIT(QTMovieMaxTimeSeekable); 97 INIT(QTMovieGetType); 98 INIT(QTMovieHasClosedCaptions); 99 INIT(QTMovieSetShowClosedCaptions); 100 INIT(QTMovieSelectPreferredAlternates); 101 INIT(QTMovieViewSetDrawSynchronously); 102 103 #ifndef BUILDING_ON_TIGER 104 INIT(GetGlyphsForCharacters); 105 #else 106 INIT(ClearGlyphVector); 107 INIT(ConvertCharToGlyphs); 108 INIT(CopyFullFontName); 109 INIT(GetATSStyleGroup); 110 INIT(GetCGFontFromNSFont); 111 INIT(GetFontMetrics); 112 INIT(GetGlyphVectorFirstRecord); 113 INIT(GetGlyphVectorNumGlyphs); 114 INIT(GetGlyphVectorRecordSize); 115 INIT(GetNSFontATSUFontId); 116 INIT(InitializeGlyphVector); 117 INIT(ReleaseStyleGroup); 118 INIT(SupportsMultipartXMixedReplace); 119 #endif 120 121 #if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD) 122 INIT(GetHyphenationLocationBeforeIndex); 123 INIT(GetNSEventMomentumPhase); 124 #endif 125 126 INIT(CreateCTLineWithUniCharProvider); 127 128 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 129 INIT(IOSurfaceContextCreate); 130 INIT(IOSurfaceContextCreateImage); 131 INIT(CreateCTTypesetterWithUniCharProviderAndOptions); 132 INIT(MakeScrollbarPainter); 133 INIT(ScrollbarPainterSetDelegate); 134 INIT(ScrollbarPainterPaint); 135 INIT(ScrollbarPainterForceFlashScrollers); 136 INIT(ScrollbarThickness); 137 INIT(ScrollbarMinimumThumbLength); 138 INIT(ScrollbarMinimumTotalLengthNeededForThumb); 139 INIT(ScrollbarPainterKnobAlpha); 140 INIT(SetScrollbarPainterKnobAlpha); 141 INIT(ScrollbarPainterTrackAlpha); 142 INIT(SetScrollbarPainterTrackAlpha); 143 INIT(ScrollbarPainterIsHorizontal); 144 INIT(ScrollbarPainterSetOverlayState); 145 INIT(MakeScrollbarPainterController); 146 INIT(MakeScrollbarReplacementPainter); 147 INIT(SetPainterForPainterController); 148 INIT(VerticalScrollbarPainterForController); 149 INIT(HorizontalScrollbarPainterForController); 150 INIT(SetScrollbarPainterControllerStyle); 151 INIT(ContentAreaScrolled); 152 INIT(ContentAreaWillPaint); 153 INIT(MouseEnteredContentArea); 154 INIT(MouseExitedContentArea); 155 INIT(MouseMovedInContentArea); 156 INIT(WillStartLiveResize); 157 INIT(ContentAreaResized); 158 INIT(WillEndLiveResize); 159 INIT(ContentAreaDidShow); 160 INIT(ContentAreaDidHide); 161 INIT(DidBeginScrollGesture); 162 INIT(DidEndScrollGesture); 163 INIT(ScrollbarPainterUsesOverlayScrollers); 164 #endif 165 166 INIT(GetAXTextMarkerTypeID); 167 INIT(GetAXTextMarkerRangeTypeID); 168 INIT(CreateAXTextMarker); 169 INIT(GetBytesFromAXTextMarker); 170 INIT(CreateAXTextMarkerRange); 171 INIT(CopyAXTextMarkerRangeStart); 172 INIT(CopyAXTextMarkerRangeEnd); 173 INIT(AccessibilityHandleFocusChanged); 174 INIT(CreateAXUIElementRef); 175 INIT(UnregisterUniqueIdForElement); 176 INIT(CreatePrivateStorageSession); 177 INIT(CopyRequestWithStorageSession); 178 INIT(CopyHTTPCookieStorage); 179 INIT(GetHTTPCookieAcceptPolicy); 180 INIT(HTTPCookiesForURL); 181 INIT(SetHTTPCookiesForURL); 182 INIT(DeleteHTTPCookie); 183 184 INIT(GetCFURLResponseMIMEType); 185 INIT(GetCFURLResponseURL); 186 INIT(GetCFURLResponseHTTPResponse); 187 INIT(CopyCFURLResponseSuggestedFilename); 188 INIT(SetCFURLResponseMIMEType); 189 190 didInit = true; 191 } 192