Add and deploy WK_API_ENABLED guards
[WebKit-https.git] / Source / WebKit2 / WebProcess / InjectedBundle / API / mac / WKDOMRange.mm
index 76f8c1c..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"
@@ -50,7 +51,7 @@
 
 - (id)initWithDocument:(WKDOMDocument *)document
 {
-    RefPtr<WebCore::Range> range = WebCore::Range::create(WebKit::toWebCoreDocument(document));
+    RefPtr<WebCore::Range> range = WebCore::Range::create(*WebKit::toWebCoreDocument(document));
     self = [self _initWithImpl:range.get()];
     if (!self)
         return nil;
 
 - (NSArray *)textRects
 {
-    _impl->ownerDocument()->updateLayoutIgnorePendingStylesheets();
+    _impl->ownerDocument().updateLayoutIgnorePendingStylesheets();
     Vector<WebCore::IntRect> rects;
     _impl->textRects(rects);
     return WebKit::toNSArray(rects);
 
 @end
 
-#endif // defined(__LP64__) && defined(__clang__)
+#endif // WK_API_ENABLED