Add and deploy WK_API_ENABLED guards
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Oct 2013 03:59:52 +0000 (03:59 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Oct 2013 03:59:52 +0000 (03:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=123008

Reviewed by Darin Adler.

* Shared/API/Cocoa: Added.
* Shared/API/Cocoa/WKFoundation.h: Added. Defined WK_API_ENABLED based on whether the
Objective-C API should be enabled in the current configuration.
* Shared/mac/ObjCObjectGraphCoders.mm:
(WebKit::typeFromObject): Changed to use WK_API_ENABLED.
(WebKit::WebContextObjCObjectGraphEncoderImpl::encode): Ditto.
(WebKit::WebContextObjCObjectGraphDecoderImpl::decode): Ditto.
(WebKit::InjectedBundleObjCObjectGraphEncoderImpl::encode): Ditto.
(WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode): Ditto.
* UIProcess/API/mac/WKTypeRefWrapper.h: Ditto.
* UIProcess/API/mac/WKTypeRefWrapper.mm: Ditto.
* UIProcess/API/mac/WebKit2.h: Imported WKFoundation.h.
* WebKit2.xcodeproj/project.pbxproj: Added new Cocoa group in Shared/API. Added
WKFoundation.h as a public header.
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
* WebProcess/InjectedBundle/API/mac/WKDOMElement.h:
* WebProcess/InjectedBundle/API/mac/WKDOMElement.mm:
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.h:
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
* WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
* WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
* WebProcess/InjectedBundle/API/mac/WKDOMNodePrivate.h:
* WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
* WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
* WebProcess/InjectedBundle/API/mac/WKDOMRangePrivate.h:
* WebProcess/InjectedBundle/API/mac/WKDOMText.h:
* WebProcess/InjectedBundle/API/mac/WKDOMText.mm:
* WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h:
* WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerInternal.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInPrivate.h:
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::load):

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

32 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/Cocoa/WKFoundation.h [new file with mode: 0644]
Source/WebKit2/Shared/mac/ObjCObjectGraphCoders.mm
Source/WebKit2/UIProcess/API/mac/WKTypeRefWrapper.h
Source/WebKit2/UIProcess/API/mac/WKTypeRefWrapper.mm
Source/WebKit2/UIProcess/API/mac/WebKit2.h
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMDocument.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMElement.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMElement.mm
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMInternals.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.mm
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNodePrivate.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMRange.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMRange.mm
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMRangePrivate.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMText.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMText.mm
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerInternal.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInPrivate.h
Source/WebKit2/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm

index 305351e..6f37f2c 100644 (file)
@@ -1,3 +1,51 @@
+2013-10-17  Dan Bernstein  <mitz@apple.com>
+
+        Add and deploy WK_API_ENABLED guards
+        https://bugs.webkit.org/show_bug.cgi?id=123008
+
+        Reviewed by Darin Adler.
+
+        * Shared/API/Cocoa: Added.
+        * Shared/API/Cocoa/WKFoundation.h: Added. Defined WK_API_ENABLED based on whether the
+        Objective-C API should be enabled in the current configuration.
+        * Shared/mac/ObjCObjectGraphCoders.mm:
+        (WebKit::typeFromObject): Changed to use WK_API_ENABLED.
+        (WebKit::WebContextObjCObjectGraphEncoderImpl::encode): Ditto.
+        (WebKit::WebContextObjCObjectGraphDecoderImpl::decode): Ditto.
+        (WebKit::InjectedBundleObjCObjectGraphEncoderImpl::encode): Ditto.
+        (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode): Ditto.
+        * UIProcess/API/mac/WKTypeRefWrapper.h: Ditto.
+        * UIProcess/API/mac/WKTypeRefWrapper.mm: Ditto.
+        * UIProcess/API/mac/WebKit2.h: Imported WKFoundation.h.
+        * WebKit2.xcodeproj/project.pbxproj: Added new Cocoa group in Shared/API. Added
+        WKFoundation.h as a public header.
+        * WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
+        * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
+        * WebProcess/InjectedBundle/API/mac/WKDOMElement.h:
+        * WebProcess/InjectedBundle/API/mac/WKDOMElement.mm:
+        * WebProcess/InjectedBundle/API/mac/WKDOMInternals.h:
+        * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
+        * WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
+        * WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
+        * WebProcess/InjectedBundle/API/mac/WKDOMNodePrivate.h:
+        * WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
+        * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
+        * WebProcess/InjectedBundle/API/mac/WKDOMRangePrivate.h:
+        * WebProcess/InjectedBundle/API/mac/WKDOMText.h:
+        * WebProcess/InjectedBundle/API/mac/WKDOMText.mm:
+        * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h:
+        * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerInternal.h:
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h:
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInPrivate.h:
+        * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
+        (WebKit::InjectedBundle::load):
+
 2013-10-17  Csaba Osztrogon√°c  <ossy@webkit.org>
 
         [WK2] Speculative buildfixes for GTK and EFL after r157582.
diff --git a/Source/WebKit2/Shared/API/Cocoa/WKFoundation.h b/Source/WebKit2/Shared/API/Cocoa/WKFoundation.h
new file mode 100644 (file)
index 0000000..5d5b09a
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * 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 <TargetConditionals.h>
+
+#if TARGET_OS_IPHONE
+#define WK_API_ENABLED 1
+#else
+#define WK_API_ENABLED (defined(__clang__) && defined(__APPLE__) && defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100 && !defined(__i386__))
+#endif
index 7c3c776..054d7c3 100644 (file)
@@ -56,7 +56,7 @@ enum WebKitNSType {
     NSNumberType,
     NSDateType,
     NSDataType,
-#if defined(__LP64__) && defined(__clang__)
+#if WK_API_ENABLED
     WKBrowsingContextControllerType,
     WKTypeRefWrapperType,
 #endif
@@ -79,7 +79,7 @@ static WebKitNSType typeFromObject(id object)
         return NSDateType;
     if ([object isKindOfClass:[NSData class]])
         return NSDataType;
-#if defined(__LP64__) && defined(__clang__)
+#if WK_API_ENABLED
     if ([object isKindOfClass:[WKBrowsingContextController class]] || [object isKindOfClass:[WKWebProcessPlugInBrowserContextController class]])
         return WKBrowsingContextControllerType;
     if ([object isKindOfClass:[WKTypeRefWrapper class]])
@@ -281,7 +281,7 @@ public:
             return;
 
         switch (type) {
-#if defined(__LP64__) && defined(__clang__)
+#if WK_API_ENABLED
         case WKBrowsingContextControllerType: {
             WKBrowsingContextController *browsingContextController = static_cast<WKBrowsingContextController *>(m_root);
 
@@ -333,7 +333,7 @@ public:
         }
 
         switch (type) {
-#if defined(__LP64__) && defined(__clang__)
+#if WK_API_ENABLED
         case WKBrowsingContextControllerType: {
             uint64_t pageID;
             if (!decoder.decode(pageID))
@@ -385,7 +385,7 @@ public:
             return;
 
         switch (type) {
-#if defined(__LP64__) && defined(__clang__)
+#if WK_API_ENABLED
         case WKBrowsingContextControllerType: {
             WKWebProcessPlugInBrowserContextController *browserContextController = static_cast<WKWebProcessPlugInBrowserContextController *>(m_root);
 
@@ -435,7 +435,7 @@ public:
         }
 
         switch (type) {
-#if defined(__LP64__) && defined(__clang__)
+#if WK_API_ENABLED
         case WKBrowsingContextControllerType: {
             uint64_t pageID;
             if (!decoder.decode(pageID))
index 7b81e9a..6b5fc3d 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import <Foundation/Foundation.h>
 #import <WebKit2/WKBase.h>
+#import <WebKit2/WKFoundation.h>
+
+#if WK_API_ENABLED
 
 WK_EXPORT
 @interface WKTypeRefWrapper : NSObject
@@ -37,4 +38,4 @@ WK_EXPORT
 
 @end
 
-#endif
+#endif // WK_API_ENABLED
index fd80ac2..a69f6ba 100644 (file)
 
 #import "config.h"
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import "WKTypeRefWrapper.h"
 
+#if WK_API_ENABLED
+
 #import "WKRetainPtr.h"
 
 @interface WKTypeRefWrapper () {
@@ -57,4 +57,4 @@
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 7a2bd1a..905452b 100644 (file)
@@ -27,5 +27,6 @@
 #import <WebKit2/WKBrowsingContextGroup.h>
 #import <WebKit2/WKBrowsingContextLoadDelegate.h>
 #import <WebKit2/WKConnection.h>
+#import <WebKit2/WKFoundation.h>
 #import <WebKit2/WKProcessGroup.h>
 #import <WebKit2/WKView.h>
index aa4ddf7..5d37fad 100644 (file)
                37948408150C4B9700E52CE9 /* WKRenderLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37948406150C4B9600E52CE9 /* WKRenderLayer.cpp */; };
                37948409150C4B9700E52CE9 /* WKRenderLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 37948407150C4B9600E52CE9 /* WKRenderLayer.h */; settings = {ATTRIBUTES = (Private, ); }; };
                37C4E9F6131C6E7E0029BD5A /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = B396EA5512E0ED2D00F4FEB7 /* config.h */; };
+               37DFA7001810BB92001F4A9F /* WKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 37DFA6FF1810BB92001F4A9F /* WKFoundation.h */; settings = {ATTRIBUTES = (Public, ); }; };
                37F623B812A57B6200E3FDF6 /* WKFindOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 37F623B712A57B6200E3FDF6 /* WKFindOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
                37F90DE31376560E0051CF68 /* HTTPCookieAcceptPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = F638954F133BEF38008941D5 /* HTTPCookieAcceptPolicy.h */; };
                3F87B9BD158940120090FF62 /* WebColorChooser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F87B9BA15893F630090FF62 /* WebColorChooser.cpp */; };
                37948402150C350600E52CE9 /* WebRenderLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebRenderLayer.h; sourceTree = "<group>"; };
                37948406150C4B9600E52CE9 /* WKRenderLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKRenderLayer.cpp; sourceTree = "<group>"; };
                37948407150C4B9600E52CE9 /* WKRenderLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKRenderLayer.h; sourceTree = "<group>"; };
+               37DFA6FF1810BB92001F4A9F /* WKFoundation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFoundation.h; sourceTree = "<group>"; };
                37F623B712A57B6200E3FDF6 /* WKFindOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFindOptions.h; sourceTree = "<group>"; };
                3F87B9BA15893F630090FF62 /* WebColorChooser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorChooser.cpp; sourceTree = "<group>"; };
                3F87B9BB15893F630090FF62 /* WebColorChooser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebColorChooser.h; sourceTree = "<group>"; };
                        name = cf;
                        sourceTree = "<group>";
                };
+               37DFA6FE1810BB2D001F4A9F /* Cocoa */ = {
+                       isa = PBXGroup;
+                       children = (
+                               37DFA6FF1810BB92001F4A9F /* WKFoundation.h */,
+                       );
+                       path = Cocoa;
+                       sourceTree = "<group>";
+               };
                5105B0D2162F7A5E00E27709 /* Network */ = {
                        isa = PBXGroup;
                        children = (
                        isa = PBXGroup;
                        children = (
                                BCDDB315124EBCFE0048D13C /* C */,
+                               37DFA6FE1810BB2D001F4A9F /* Cocoa */,
                        );
                        path = API;
                        sourceTree = "<group>";
                                BC4075FC124FF0270068F20A /* WKError.h in Headers */,
                                BCFD548C132D82680055D816 /* WKErrorCF.h in Headers */,
                                BC40783D1250FADD0068F20A /* WKEvent.h in Headers */,
+                               37DFA7001810BB92001F4A9F /* WKFoundation.h in Headers */,
                                37F623B812A57B6200E3FDF6 /* WKFindOptions.h in Headers */,
                                BCE4695A1214EDF4000B98EB /* WKFormSubmissionListener.h in Headers */,
                                BCD0139B110FA420003B8A67 /* WKFrame.h in Headers */,
index 4495055..8962c38 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import <WebKit2/WKDOMNode.h>
+#import <WebKit2/WKFoundation.h>
+
+#if WK_API_ENABLED
 
 @class WKDOMElement;
 @class WKDOMText;
@@ -40,5 +41,5 @@ WK_EXPORT
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
 
index f355da8..ed819c2 100644 (file)
 
 #import "config.h"
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import "WKDOMDocument.h"
 
+#if WK_API_ENABLED
+
 #import "WKDOMInternals.h"
 #import <WebCore/Document.h>
 #import <WebCore/HTMLElement.h>
@@ -55,4 +55,4 @@
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index aa03cd4..67ea63b 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import <WebKit2/WKDOMNode.h>
+#import <WebKit2/WKFoundation.h>
+
+#if WK_API_ENABLED
 
 WK_EXPORT
 @interface WKDOMElement : WKDOMNode
@@ -38,4 +39,4 @@ WK_EXPORT
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 72cf5ab..9b9cd21 100644 (file)
 
 #import "config.h"
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import "WKDOMElement.h"
 
+#if WK_API_ENABLED
+
 #import "WKDOMInternals.h"
 #import <WebCore/Element.h>
 
@@ -58,4 +58,4 @@
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 7407a91..229159c 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import "WKDOMNode.h"
 #import "WKDOMRange.h"
 #import <WebCore/Node.h>
 #import <WebCore/Range.h>
 #import <wtf/HashMap.h>
 
+#if WK_API_ENABLED
+
 namespace WebCore {
 class Element;
 class Document;
@@ -117,4 +117,4 @@ NSArray *toNSArray(const Vector<WebCore::IntRect>&);
 
 } // namespace WebKit
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 2e9a01d..98cf56b 100644 (file)
 
 #import "config.h"
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import "WKDOMInternals.h"
 
+#if WK_API_ENABLED
+
 #import <WebCore/Document.h>
 #import <WebCore/Element.h>
 #import <WebCore/Node.h>
@@ -176,4 +176,4 @@ NSArray *toNSArray(const Vector<WebCore::IntRect>& rects)
 
 } // namespace WebKit
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 2e826ab..b2bb7af 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import <Foundation/Foundation.h>
 #import <WebKit2/WKDeclarationSpecifiers.h>
+#import <WebKit2/WKFoundation.h>
+
+#if WK_API_ENABLED
 
 @class WKDOMDocument;
 
@@ -47,4 +48,4 @@ WK_EXPORT
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 016f506..406b272 100644 (file)
 
 #import "config.h"
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import "WKDOMNode.h"
 #import "WKDOMNodePrivate.h"
 
+#if WK_API_ENABLED
+
 #import "InjectedBundleNodeHandle.h"
 #import "WKBundleAPICast.h"
 #import "WKDOMInternals.h"
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 2219ddd..f85ab73 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import <WebKit2/WKDOMNode.h>
 #import <WebKit2/WKBase.h>
 
+#if WK_API_ENABLED
+
 @interface WKDOMNode (WKPrivate)
 
 - (WKBundleNodeHandleRef)_copyBundleNodeHandleRef;
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 2468cf3..7e13d7e 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import <Foundation/Foundation.h>
 #import <WebKit2/WKDeclarationSpecifiers.h>
+#import <WebKit2/WKFoundation.h>
+
+#if WK_API_ENABLED
 
 @class WKDOMNode, WKDOMDocument;
 
@@ -51,4 +52,4 @@ WK_EXPORT
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 52342a5..9c31099 100644 (file)
 
 #import "config.h"
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import "WKDOMRange.h"
 #import "WKDOMRangePrivate.h"
 
+#if WK_API_ENABLED
+
 #import "InjectedBundleRangeHandle.h"
 #import "WKBundleAPICast.h"
 #import "WKDOMInternals.h"
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 707fcb0..64a0992 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import <WebKit2/WKDOMRange.h>
 #import <WebKit2/WKBase.h>
 
+#if WK_API_ENABLED
+
 @interface WKDOMRange (WKPrivate)
 
 - (WKBundleRangeHandleRef)_copyBundleRangeHandleRef;
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 7a97b5e..ee272b3 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import <WebKit2/WKDOMNode.h>
+#import <WebKit2/WKFoundation.h>
+
+#if WK_API_ENABLED
 
 WK_EXPORT
 @interface WKDOMText : WKDOMNode
@@ -34,4 +35,4 @@ WK_EXPORT
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 9bcd7b4..504b2be 100644 (file)
@@ -26,7 +26,7 @@
 #import "config.h"
 #import "WKDOMText.h"
 
-#if defined(__LP64__) && defined(__clang__)
+#if WK_API_ENABLED
 
 #import "WKDOMInternals.h"
 #import <WebCore/Text.h>
@@ -47,4 +47,4 @@
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index fd62c93..a0182bf 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import <Foundation/Foundation.h>
 #import <WebKit2/WKDeclarationSpecifiers.h>
+#import <WebKit2/WKFoundation.h>
+
+#if WK_API_ENABLED
 
 @class WKDOMRange;
 
@@ -44,4 +45,4 @@ WK_EXPORT
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 0f9ae61..5bc5b13 100644 (file)
 
 #import "config.h"
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import "WKDOMTextIterator.h"
 
+#if WK_API_ENABLED
+
 #import "WKDOMInternals.h"
 #import "WKDOMRange.h"
 #import <WebCore/TextIterator.h>
@@ -80,4 +80,4 @@
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index ef3cb40..d89e9aa 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import <Foundation/Foundation.h>
 #import <WebKit2/WKBase.h>
+#import <WebKit2/WKFoundation.h>
+
+#if WK_API_ENABLED
 
 @class WKConnection;
 @class WKWebProcessPlugInController;
@@ -49,4 +50,4 @@ WK_EXPORT
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 38f687a..f6815a1 100644 (file)
 
 #import "config.h"
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import "WKWebProcessPlugIn.h"
 #import "WKWebProcessPlugInPrivate.h"
 #import "WKWebProcessPlugInInternal.h"
 
+#if WK_API_ENABLED
+
 #import "InjectedBundle.h"
 #import "WKConnectionInternal.h"
 #import "WKBundle.h"
@@ -150,4 +150,4 @@ static WKWebProcessPlugInController *sharedInstance;
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 6790b15..226598f 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import <Foundation/Foundation.h>
 #import <WebKit2/WKDeclarationSpecifiers.h>
+#import <WebKit2/WKFoundation.h>
+
+#if WK_API_ENABLED
 
 @class WKDOMDocument;
 @class WKDOMRange;
@@ -40,4 +41,4 @@ WK_EXPORT
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 6d74136..e805ce0 100644 (file)
 
 #import "config.h"
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import "WKWebProcessPlugInBrowserContextController.h"
 #import "WKWebProcessPlugInBrowserContextControllerInternal.h"
 #import "WKWebProcessPlugInBrowserContextControllerPrivate.h"
 
+#if WK_API_ENABLED
+
 #import "WKBundleAPICast.h"
 #import "WKBundlePage.h"
 #import "WKBundlePagePrivate.h"
@@ -92,4 +92,4 @@
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 50f969c..29265bd 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import "WKWebProcessPlugInBrowserContextController.h"
 #import "WKBase.h"
 
+#if WK_API_ENABLED
+
 @interface WKWebProcessPlugInBrowserContextController (Internal)
 
 - (id)_initWithBundlePageRef:(WKBundlePageRef)bundlePageRef;
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index 59aac10..8b15700 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import <WebKit2/WKWebProcessPlugInBrowserContextController.h>
 
+#if WK_API_ENABLED
+
 @interface WKWebProcessPlugInBrowserContextController (Private)
 
 @property(readonly) WKBundlePageRef _bundlePageRef;
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index a125e33..eab612c 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import "WKWebProcessPlugIn.h"
 
+#if WK_API_ENABLED
+
 @interface WKWebProcessPlugInController (Internal)
 
 + (WKWebProcessPlugInController *)_shared;
@@ -36,4 +36,4 @@
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index b535a36..3b619e5 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if defined(__LP64__) && defined(__clang__)
-
 #import <WebKit2/WKWebProcessPlugIn.h>
 
+#if WK_API_ENABLED
+
 @interface WKWebProcessPlugInController (Private)
 
 @property(readonly) WKBundleRef _bundleRef;
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED
index dbf1885..134e7d0 100644 (file)
@@ -85,7 +85,7 @@ bool InjectedBundle::load(APIObject* initializationUserData)
         return true;
     }
     
-#if defined(__LP64__) && defined(__clang__)
+#if WK_API_ENABLED
     // Otherwise, look to see if the bundle has a principal class
     Class principalClass = [m_platformBundle principalClass];
     if (!principalClass) {