[Cocoa] Remove __has_include guards around use of WebKitAdditions
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 31 Jan 2016 23:00:03 +0000 (23:00 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 31 Jan 2016 23:00:03 +0000 (23:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=153728

Reviewed by Andy Estes.

Guard WebKitAdditions includes with #if USE(APPLE_INTERNAL_SDK) rather than with __has_include.

Source/WebCore:

* dom/EventNames.h:
* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):
* page/MainFrame.cpp:
(WebCore::MainFrame::MainFrame):
* page/MainFrame.h:
* page/PageConfiguration.h:
* platform/cocoa/WebKitAdditions.mm:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
* platform/ios/LegacyTileGridTile.mm:

Source/WebKit/mac:

* WebKitAdditions.mm:
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKit2:

* Shared/Cocoa/WebKitAdditions.mm:
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/RemoteLayerBackingStore.mm:
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_shouldDispatchFakeMouseMoveEvents):

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

20 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/EventNames.h
Source/WebCore/loader/EmptyClients.cpp
Source/WebCore/page/MainFrame.cpp
Source/WebCore/page/MainFrame.h
Source/WebCore/page/PageConfiguration.h
Source/WebCore/platform/cocoa/WebKitAdditions.mm
Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
Source/WebCore/platform/ios/LegacyTileGridTile.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebKitAdditions.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/Cocoa/WebKitAdditions.mm
Source/WebKit2/Shared/WebCoreArgumentCoders.h
Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp

index 40616ca..4869771 100644 (file)
@@ -1,3 +1,23 @@
+2016-01-31  Dan Bernstein  <mitz@apple.com>
+
+        [Cocoa] Remove __has_include guards around use of WebKitAdditions
+        https://bugs.webkit.org/show_bug.cgi?id=153728
+
+        Reviewed by Andy Estes.
+
+        Guard WebKitAdditions includes with #if USE(APPLE_INTERNAL_SDK) rather than with __has_include.
+
+        * dom/EventNames.h:
+        * loader/EmptyClients.cpp:
+        (WebCore::fillWithEmptyClients):
+        * page/MainFrame.cpp:
+        (WebCore::MainFrame::MainFrame):
+        * page/MainFrame.h:
+        * page/PageConfiguration.h:
+        * platform/cocoa/WebKitAdditions.mm:
+        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
+        * platform/ios/LegacyTileGridTile.mm:
+
 2016-01-31  Darin Adler  <darin@apple.com>
 
         Replace CaseFoldingHash with ASCIICaseInsensitiveHash
index 4ee2097..46900ec 100644 (file)
@@ -27,7 +27,7 @@
 #include <functional>
 #include <wtf/text/AtomicString.h>
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/EventNamesAdditions.h>)
+#if USE(APPLE_INTERNAL_SDK)
 #import <WebKitAdditions/EventNamesAdditions.h>
 #endif
 
index 7c27c0a..f46d0d0 100644 (file)
@@ -44,7 +44,7 @@
 #include "StorageNamespaceProvider.h"
 #include <wtf/NeverDestroyed.h>
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/EmptyClientsIncludes.h>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/EmptyClientsIncludes.h>
 #endif
 
@@ -138,7 +138,7 @@ void fillWithEmptyClients(PageConfiguration& pageConfiguration)
     pageConfiguration.storageNamespaceProvider = adoptRef(new EmptyStorageNamespaceProvider);
     pageConfiguration.visitedLinkStore = adoptRef(new EmptyVisitedLinkStore);
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/EmptyClientsFill.cpp>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/EmptyClientsFill.cpp>
 #endif
 }
index d154dea..afd8586 100644 (file)
@@ -39,7 +39,7 @@
 #include "ServicesOverlayController.h"
 #endif /* PLATFORM(MAC) */
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/MainFrameIncludes.h>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/MainFrameIncludes.h>
 #endif
 
@@ -57,7 +57,7 @@ inline MainFrame::MainFrame(Page& page, PageConfiguration& configuration)
     , m_pageOverlayController(std::make_unique<PageOverlayController>(*this))
     , m_diagnosticLoggingClient(configuration.diagnosticLoggingClient)
 {
-#if defined(__has_include) && __has_include(<WebKitAdditions/MainFrameInitialization.cpp>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/MainFrameInitialization.cpp>
 #endif
 }
index 97199f9..45c1f1c 100644 (file)
@@ -29,7 +29,7 @@
 #include "Frame.h"
 #include <wtf/Vector.h>
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/MainFrameIncludes.h>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/MainFrameIncludes.h>
 #endif
 
@@ -68,7 +68,7 @@ public:
 
     WEBCORE_EXPORT DiagnosticLoggingClient& diagnosticLoggingClient() const;
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/MainFrameMembers.h>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/MainFrameMembers.h>
 #endif
 
index 5165180..5b971c1 100644 (file)
@@ -29,7 +29,7 @@
 #include <wtf/Noncopyable.h>
 #include <wtf/RefPtr.h>
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/PageConfigurationIncludes.h>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/PageConfigurationIncludes.h>
 #endif
 
@@ -77,7 +77,7 @@ public:
     FrameLoaderClient* loaderClientForMainFrame { nullptr };
     DiagnosticLoggingClient* diagnosticLoggingClient { nullptr };
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/PageConfigurationMembers.h>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/PageConfigurationMembers.h>
 #endif
 
index 7912fbe..7fc11a4 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "config.h"
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/WebCoreAdditions.cpp>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/WebCoreAdditions.cpp>
 #endif
 
index f665cbf..2110b53 100644 (file)
@@ -65,7 +65,7 @@
 @end
 #endif
 
-#if __has_include(<WebKitAdditions/LayerBackingStoreAdditions.mm>)
+#if USE(APPLE_INTERNAL_SDK)
 #import <WebKitAdditions/LayerBackingStoreAdditions.mm>
 #else
 namespace WebCore {
index 0005e3a..247124b 100644 (file)
@@ -39,7 +39,7 @@
 #include <functional>
 #include <wtf/NeverDestroyed.h>
 
-#if __has_include(<WebKitAdditions/LayerBackingStoreAdditions.mm>)
+#if USE(APPLE_INTERNAL_SDK)
 #import <WebKitAdditions/LayerBackingStoreAdditions.mm>
 #else
 namespace WebCore {
index ef0bf9e..f378fad 100644 (file)
@@ -1,3 +1,17 @@
+2016-01-31  Dan Bernstein  <mitz@apple.com>
+
+        [Cocoa] Remove __has_include guards around use of WebKitAdditions
+        https://bugs.webkit.org/show_bug.cgi?id=153728
+
+        Reviewed by Andy Estes.
+
+        Guard WebKitAdditions includes with #if USE(APPLE_INTERNAL_SDK) rather than with __has_include.
+
+        * WebKitAdditions.mm:
+        * WebView/WebView.mm:
+        (-[WebView _commonInitializationWithFrameName:groupName:]):
+        (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
+
 2016-01-29  Ada Chan  <adachan@apple.com>
 
         Enable VIDEO_PRESENTATION_MODE only in Debug and Release builds on Mac
index 5bcabc0..099da83 100644 (file)
@@ -23,8 +23,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifdef __has_include
-#if __has_include(<WebKitAdditions/WebKitLegacyAdditions.cpp>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/WebKitLegacyAdditions.cpp>
 #endif
-#endif
index 9d57fad..96ef909 100644 (file)
 #import <WebCore/WebMediaSessionManagerMac.h>
 #endif
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/WebViewIncludes.h>)
+#if USE(APPLE_INTERNAL_SDK)
 #import <WebKitAdditions/WebViewIncludes.h>
 #endif
 
@@ -973,7 +973,7 @@ static void WebKitInitializeGamepadProviderIfNecessary()
     pageConfiguration.inspectorClient = new WebInspectorClient(self);
 #endif
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/WebViewInitialization.mm>)
+#if USE(APPLE_INTERNAL_SDK)
 #import <WebKitAdditions/WebViewInitialization.mm>
 #endif
 
@@ -1217,7 +1217,7 @@ static void WebKitInitializeGamepadProviderIfNecessary()
     pageConfiguration.dragClient = new WebDragClient(self);
 #endif
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/WebViewInitialization.mm>)
+#if USE(APPLE_INTERNAL_SDK)
 #import <WebKitAdditions/WebViewInitialization.mm>
 #endif
 
index 2002b90..ee790bd 100644 (file)
@@ -1,3 +1,24 @@
+2016-01-31  Dan Bernstein  <mitz@apple.com>
+
+        [Cocoa] Remove __has_include guards around use of WebKitAdditions
+        https://bugs.webkit.org/show_bug.cgi?id=153728
+
+        Reviewed by Andy Estes.
+
+        Guard WebKitAdditions includes with #if USE(APPLE_INTERNAL_SDK) rather than with __has_include.
+
+        * Shared/Cocoa/WebKitAdditions.mm:
+        * Shared/WebCoreArgumentCoders.h:
+        * Shared/mac/RemoteLayerBackingStore.mm:
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+        (WebKit::WebPageProxy::reattachToWebProcess):
+        (WebKit::WebPageProxy::resetState):
+        * UIProcess/WebPageProxy.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::m_shouldDispatchFakeMouseMoveEvents):
+
 2016-01-31  Timothy Horton  <timothy_horton@apple.com>
 
         Include the right WebKitAdditions files
index 4ea095b..0a5e845 100644 (file)
@@ -25,6 +25,6 @@
 
 #import "config.h"
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/WebKitAdditions.mm>)
+#if USE(APPLE_INTERNAL_SDK)
 #import <WebKitAdditions/WebKitAdditions.mm>
 #endif
index 7969252..8a2e0d2 100644 (file)
@@ -465,7 +465,7 @@ template<> struct ArgumentCoder<WebCore::ExceptionDetails> {
 
 } // namespace IPC
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/WebCoreArgumentCodersAdditions.h>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/WebCoreArgumentCodersAdditions.h>
 #endif
 
index 8beb7b1..8f398f6 100644 (file)
@@ -44,7 +44,7 @@
 #import <mach/mach_port.h>
 #endif
 
-#if __has_include(<WebKitAdditions/RemoteLayerBackingStoreAdditions.mm>)
+#if USE(APPLE_INTERNAL_SDK)
 #import <WebKitAdditions/RemoteLayerBackingStoreAdditions.mm>
 #else
 
index 95f109b..3224afb 100644 (file)
@@ -142,7 +142,7 @@ enum class DynamicViewportUpdateMode {
     ResizingWithDocumentHidden,
 };
 
-#if __has_include(<WebKitAdditions/RemoteLayerBackingStoreAdditions.mm>)
+#if USE(APPLE_INTERNAL_SDK)
 #import <WebKitAdditions/RemoteLayerBackingStoreAdditions.mm>
 #else
 
index 5d3bda0..3b5a2b0 100644 (file)
 #include <WebCore/MediaSessionMetadata.h>
 #endif
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/WebPageProxyIncludes.h>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/WebPageProxyIncludes.h>
 #endif
 
@@ -474,7 +474,7 @@ WebPageProxy::WebPageProxy(PageClient& pageClient, WebProcessProxy& process, uin
     m_vibration = WebVibrationProxy::create(this);
 #endif
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/WebPageProxyInitialization.cpp>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/WebPageProxyInitialization.cpp>
 #endif
 
@@ -706,7 +706,7 @@ void WebPageProxy::reattachToWebProcess()
     m_videoFullscreenManager = WebVideoFullscreenManagerProxy::create(*this);
 #endif
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/WebPageProxyInitialization.cpp>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/WebPageProxyInitialization.cpp>
 #endif
 
@@ -5045,7 +5045,7 @@ void WebPageProxy::resetState(ResetStateReason resetStateReason)
     m_pageClient.mediaSessionManager().removeAllPlaybackTargetPickerClients(*this);
 #endif
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/WebPageProxyInvalidation.cpp>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/WebPageProxyInvalidation.cpp>
 #endif
 
index ec0f8af..f7c6f1e 100644 (file)
@@ -122,7 +122,7 @@ OBJC_CLASS _WKRemoteObjectRegistry;
 #include <WebCore/WebMediaSessionManagerClient.h>
 #endif
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/WebPageProxyIncludes.h>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/WebPageProxyIncludes.h>
 #endif
 
@@ -1557,7 +1557,7 @@ private:
     RefPtr<WebVibrationProxy> m_vibration;
 #endif
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/WebPageProxyMembers.h>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/WebPageProxyMembers.h>
 #endif
 
index a1cd2d8..d9248e1 100644 (file)
 #include <WebCore/MediaPlayerRequestInstallMissingPluginsCallback.h>
 #endif
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/WebPageIncludes.h>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/WebPageIncludes.h>
 #endif
 
@@ -398,7 +398,7 @@ WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
     pageConfiguration.userContentController = m_userContentController ? &m_userContentController->userContentController() : &m_pageGroup->userContentController();
     pageConfiguration.visitedLinkStore = VisitedLinkTableController::getOrCreate(parameters.visitedLinkTableID);
 
-#if defined(__has_include) && __has_include(<WebKitAdditions/WebPageInitialization.h>)
+#if USE(APPLE_INTERNAL_SDK)
 #include <WebKitAdditions/WebPageInitialization.h>
 #endif