Stop using PLATFORM(MAC) in WebCore except where it means “OS X but not iOS”
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Feb 2014 22:26:50 +0000 (22:26 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Feb 2014 22:26:50 +0000 (22:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=128464

Reviewed by Anders Carlsson.

* Modules/webaudio/AudioContext.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebCore::AudioContext::constructCommon):
* accessibility/AccessibilityNodeObject.cpp: Ditto.
(WebCore::AccessibilityNodeObject::visibleText):
* accessibility/AccessibilityObject.h: Ditto.
* accessibility/AccessibilityRenderObject.cpp: Ditto.
(WebCore::AccessibilityRenderObject::clickPoint):
(WebCore::AccessibilityRenderObject::visiblePositionForPoint):
(WebCore::AccessibilityRenderObject::addChildren):
* accessibility/AccessibilityRenderObject.h: Ditto.
* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::JSInspectorFrontendHost::platform): Made it explicit that this function returns
"mac" when built for iOS.
* bindings/js/ScriptController.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebCore::ScriptController::ScriptController):
* bindings/js/ScriptController.h: Ditto.
* crypto/CryptoKey.cpp: Changed PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) &&
!PLATFORM(GTK) when checking for whether to use CoreCrypto.
* crypto/keys/CryptoKeyRSA.h: Ditto.
* dom/Clipboard.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* dom/Document.cpp: Ditto.
(WebCore::Document::implicitClose):
* dom/KeyboardEvent.h: Ditto.
* editing/Editor.cpp: Ditto.
(WebCore::Editor::cut):
(WebCore::Editor::copy):
(WebCore::Editor::copyImage):
* editing/Editor.h: Ditto.
* editing/FrameSelection.h: Ditto.
* editing/TypingCommand.cpp: Ditto.
(WebCore::TypingCommand::typingAddedToOpenCommand):
* history/HistoryItem.h: Ditto.
* html/HTMLMediaElement.cpp: Ditto.
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h: Ditto.
* html/HTMLPlugInElement.cpp: Ditto.
(WebCore::registeredPluginReplacements):
* html/HTMLPlugInImageElement.cpp: Ditto.
(WebCore::HTMLPlugInImageElement::setDisplayState):
* html/HTMLSelectElement.cpp: Ditto.
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
* html/shadow/MediaControlElements.cpp: Ditto.
(WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
* html/shadow/MediaControlElements.h: Ditto.
* inspector/InspectorIndexedDBAgent.cpp: Ditto.
* loader/CookieJar.cpp: Ditto.
* loader/DocumentLoader.cpp: Ditto.
(WebCore::DocumentLoader::dataReceived):
* loader/DocumentLoader.h: Ditto.
(WebCore::DocumentLoader::didTellClientAboutLoad):
* loader/EmptyClients.h: Ditto.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadArchive): Added !PLATFORM(IOS) around Mac-only workaround.
(WebCore::FrameLoader::defaultObjectContentType): Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebCore::FrameLoader::subresourceCachePolicy): Ditto.
* loader/ResourceBuffer.h: Changed PLATFORM(MAC) to USE(FOUNDATION) around functions that
are implemented using Foundation.
* loader/ResourceLoadScheduler.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebCore::ResourceLoadScheduler::scheduleLoad):
* loader/ResourceLoader.cpp: Ditto.
(WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
* loader/ResourceLoader.h: Ditto.
* loader/archive/cf/LegacyWebArchive.cpp: Ditto.
* loader/cache/CachedResource.cpp: Changed PLATFORM(MAC) to USE(FOUNDATION) around function
that is implemented using other USE(FOUNDATION)-guarded code.
* loader/cache/CachedResource.h: Ditto.
* page/Chrome.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* page/ChromeClient.h: Ditto.
* page/ContextMenuClient.h: Ditto.
* page/ContextMenuController.cpp: Ditto.
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::createAndAppendFontSubMenu):
(WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
* page/DragClient.h: Ditto.
* page/DragController.cpp: Ditto.
(WebCore::dragLocForDHTMLDrag):
(WebCore::dragLocForSelectionDrag):
(WebCore::DragController::startDrag):
(WebCore::DragController::doImageDrag):
* page/EditorClient.h: Ditto.
* page/EventHandler.cpp: Ditto.
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::handleMouseDraggedEvent):
(WebCore::EventHandler::logicalScrollRecursively):
(WebCore::EventHandler::clearDragState):
(WebCore::EventHandler::handleWheelEvent):
(WebCore::EventHandler::defaultWheelEventHandler):
(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::eventInvertsTabsToLinksClientCallResult):
* page/EventHandler.h: Ditto.
* page/FrameView.cpp: Ditto.
(WebCore::FrameView::layout):
* page/Page.h: Ditto.
* page/Settings.cpp: Ditto.
* page/Settings.h: Ditto.
* page/scrolling/ScrollingCoordinator.cpp: Ditto.
* page/scrolling/ScrollingCoordinator.h: Ditto.
* page/scrolling/ScrollingStateNode.h: Removed unused #include.
* page/scrolling/ScrollingThread.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebCore::ScrollingThread::createThreadIfNeeded):
* page/scrolling/ScrollingThread.h: Ditto.
* platform/network/cf/ResourceRequest.h: Added !PLATFORM(IOS) around
applyWebArchiveHackForMail.
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::applyWebArchiveHackForMail): Ditto.
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::applyWebArchiveHackForMail): Ditto.
* plugins/PluginViewNone.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA)
* rendering/RenderBox.cpp: Ditto.
(WebCore::RenderBox::logicalScroll):
* rendering/RenderLayerBacking.cpp: Ditto.
(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
* rendering/RenderMenuList.h: Ditto.
* rendering/RenderText.cpp: Ditto.
(WebCore::RenderText::previousOffsetForBackwardDeletion):
* rendering/break_lines.cpp: Removed unused #include.
* testing/js/WebCoreTestSupport.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* xml/XSLStyleSheetLibxslt.cpp: Changed PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) &&
!PLATFORM(GTK) around soft-linking libxslt.
* xml/XSLTExtensions.cpp: Ditto.
* xml/XSLTProcessorLibxslt.cpp: Ditto.
* xml/XSLTUnicodeSort.cpp: Ditto.

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

71 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/webaudio/AudioContext.cpp
Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.h
Source/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp
Source/WebCore/bindings/js/ScriptController.cpp
Source/WebCore/bindings/js/ScriptController.h
Source/WebCore/crypto/CryptoKey.cpp
Source/WebCore/crypto/keys/CryptoKeyRSA.h
Source/WebCore/dom/Clipboard.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/KeyboardEvent.h
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/Editor.h
Source/WebCore/editing/FrameSelection.h
Source/WebCore/editing/TypingCommand.cpp
Source/WebCore/history/HistoryItem.h
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/HTMLPlugInElement.cpp
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/shadow/MediaControlElements.h
Source/WebCore/inspector/InspectorIndexedDBAgent.cpp
Source/WebCore/loader/CookieJar.cpp
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/DocumentLoader.h
Source/WebCore/loader/EmptyClients.h
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/ResourceBuffer.h
Source/WebCore/loader/ResourceLoadScheduler.cpp
Source/WebCore/loader/ResourceLoader.cpp
Source/WebCore/loader/ResourceLoader.h
Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/loader/cache/CachedResource.h
Source/WebCore/page/Chrome.h
Source/WebCore/page/ChromeClient.h
Source/WebCore/page/ContextMenuClient.h
Source/WebCore/page/ContextMenuController.cpp
Source/WebCore/page/DragClient.h
Source/WebCore/page/DragController.cpp
Source/WebCore/page/EditorClient.h
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/EventHandler.h
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/Page.h
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
Source/WebCore/page/scrolling/ScrollingCoordinator.h
Source/WebCore/page/scrolling/ScrollingStateNode.h
Source/WebCore/page/scrolling/ScrollingThread.cpp
Source/WebCore/page/scrolling/ScrollingThread.h
Source/WebCore/platform/network/cf/ResourceRequest.h
Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp
Source/WebCore/platform/network/mac/ResourceRequestMac.mm
Source/WebCore/plugins/PluginViewNone.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderMenuList.h
Source/WebCore/rendering/RenderText.cpp
Source/WebCore/rendering/break_lines.cpp
Source/WebCore/testing/js/WebCoreTestSupport.h
Source/WebCore/xml/XSLStyleSheetLibxslt.cpp
Source/WebCore/xml/XSLTExtensions.cpp
Source/WebCore/xml/XSLTProcessorLibxslt.cpp
Source/WebCore/xml/XSLTUnicodeSort.cpp

index 1ccb857..8c3f147 100644 (file)
@@ -1,3 +1,137 @@
+2014-02-08  Dan Bernstein  <mitz@apple.com>
+
+        Stop using PLATFORM(MAC) in WebCore except where it means “OS X but not iOS”
+        https://bugs.webkit.org/show_bug.cgi?id=128464
+
+        Reviewed by Anders Carlsson.
+
+        * Modules/webaudio/AudioContext.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        (WebCore::AudioContext::constructCommon):
+        * accessibility/AccessibilityNodeObject.cpp: Ditto.
+        (WebCore::AccessibilityNodeObject::visibleText):
+        * accessibility/AccessibilityObject.h: Ditto.
+        * accessibility/AccessibilityRenderObject.cpp: Ditto.
+        (WebCore::AccessibilityRenderObject::clickPoint):
+        (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
+        (WebCore::AccessibilityRenderObject::addChildren):
+        * accessibility/AccessibilityRenderObject.h: Ditto.
+        * bindings/js/JSInspectorFrontendHostCustom.cpp:
+        (WebCore::JSInspectorFrontendHost::platform): Made it explicit that this function returns
+        "mac" when built for iOS.
+        * bindings/js/ScriptController.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        (WebCore::ScriptController::ScriptController):
+        * bindings/js/ScriptController.h: Ditto.
+        * crypto/CryptoKey.cpp: Changed PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) &&
+        !PLATFORM(GTK) when checking for whether to use CoreCrypto.
+        * crypto/keys/CryptoKeyRSA.h: Ditto.
+        * dom/Clipboard.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        * dom/Document.cpp: Ditto.
+        (WebCore::Document::implicitClose):
+        * dom/KeyboardEvent.h: Ditto.
+        * editing/Editor.cpp: Ditto.
+        (WebCore::Editor::cut):
+        (WebCore::Editor::copy):
+        (WebCore::Editor::copyImage):
+        * editing/Editor.h: Ditto.
+        * editing/FrameSelection.h: Ditto.
+        * editing/TypingCommand.cpp: Ditto.
+        (WebCore::TypingCommand::typingAddedToOpenCommand):
+        * history/HistoryItem.h: Ditto.
+        * html/HTMLMediaElement.cpp: Ditto.
+        (WebCore::HTMLMediaElement::parseAttribute):
+        * html/HTMLMediaElement.h: Ditto.
+        * html/HTMLPlugInElement.cpp: Ditto.
+        (WebCore::registeredPluginReplacements):
+        * html/HTMLPlugInImageElement.cpp: Ditto.
+        (WebCore::HTMLPlugInImageElement::setDisplayState):
+        * html/HTMLSelectElement.cpp: Ditto.
+        (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
+        * html/shadow/MediaControlElements.cpp: Ditto.
+        (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
+        (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
+        * html/shadow/MediaControlElements.h: Ditto.
+        * inspector/InspectorIndexedDBAgent.cpp: Ditto.
+        * loader/CookieJar.cpp: Ditto.
+        * loader/DocumentLoader.cpp: Ditto.
+        (WebCore::DocumentLoader::dataReceived):
+        * loader/DocumentLoader.h: Ditto.
+        (WebCore::DocumentLoader::didTellClientAboutLoad):
+        * loader/EmptyClients.h: Ditto.
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::loadArchive): Added !PLATFORM(IOS) around Mac-only workaround.
+        (WebCore::FrameLoader::defaultObjectContentType): Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        (WebCore::FrameLoader::subresourceCachePolicy): Ditto.
+        * loader/ResourceBuffer.h: Changed PLATFORM(MAC) to USE(FOUNDATION) around functions that
+        are implemented using Foundation.
+        * loader/ResourceLoadScheduler.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        (WebCore::ResourceLoadScheduler::scheduleLoad):
+        * loader/ResourceLoader.cpp: Ditto.
+        (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
+        * loader/ResourceLoader.h: Ditto.
+        * loader/archive/cf/LegacyWebArchive.cpp: Ditto.
+        * loader/cache/CachedResource.cpp: Changed PLATFORM(MAC) to USE(FOUNDATION) around function
+        that is implemented using other USE(FOUNDATION)-guarded code.
+        * loader/cache/CachedResource.h: Ditto.
+        * page/Chrome.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        * page/ChromeClient.h: Ditto.
+        * page/ContextMenuClient.h: Ditto.
+        * page/ContextMenuController.cpp: Ditto.
+        (WebCore::ContextMenuController::contextMenuItemSelected):
+        (WebCore::ContextMenuController::createAndAppendFontSubMenu):
+        (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu):
+        (WebCore::ContextMenuController::populate):
+        (WebCore::ContextMenuController::checkOrEnableIfNeeded):
+        * page/DragClient.h: Ditto.
+        * page/DragController.cpp: Ditto.
+        (WebCore::dragLocForDHTMLDrag):
+        (WebCore::dragLocForSelectionDrag):
+        (WebCore::DragController::startDrag):
+        (WebCore::DragController::doImageDrag):
+        * page/EditorClient.h: Ditto.
+        * page/EventHandler.cpp: Ditto.
+        (WebCore::EventHandler::EventHandler):
+        (WebCore::EventHandler::handleMouseDraggedEvent):
+        (WebCore::EventHandler::logicalScrollRecursively):
+        (WebCore::EventHandler::clearDragState):
+        (WebCore::EventHandler::handleWheelEvent):
+        (WebCore::EventHandler::defaultWheelEventHandler):
+        (WebCore::EventHandler::keyEvent):
+        (WebCore::EventHandler::eventInvertsTabsToLinksClientCallResult):
+        * page/EventHandler.h: Ditto.
+        * page/FrameView.cpp: Ditto.
+        (WebCore::FrameView::layout):
+        * page/Page.h: Ditto.
+        * page/Settings.cpp: Ditto.
+        * page/Settings.h: Ditto.
+        * page/scrolling/ScrollingCoordinator.cpp: Ditto.
+        * page/scrolling/ScrollingCoordinator.h: Ditto.
+        * page/scrolling/ScrollingStateNode.h: Removed unused #include.
+        * page/scrolling/ScrollingThread.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        (WebCore::ScrollingThread::createThreadIfNeeded):
+        * page/scrolling/ScrollingThread.h: Ditto.
+        * platform/network/cf/ResourceRequest.h: Added !PLATFORM(IOS) around
+        applyWebArchiveHackForMail.
+        * platform/network/cf/ResourceRequestCFNet.cpp:
+        (WebCore::ResourceRequest::applyWebArchiveHackForMail): Ditto.
+        * platform/network/mac/ResourceRequestMac.mm:
+        (WebCore::ResourceRequest::applyWebArchiveHackForMail): Ditto.
+        * plugins/PluginViewNone.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA)
+        * rendering/RenderBox.cpp: Ditto.
+        (WebCore::RenderBox::logicalScroll):
+        * rendering/RenderLayerBacking.cpp: Ditto.
+        (WebCore::RenderLayerBacking::createGraphicsLayer):
+        (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
+        * rendering/RenderMenuList.h: Ditto.
+        * rendering/RenderText.cpp: Ditto.
+        (WebCore::RenderText::previousOffsetForBackwardDeletion):
+        * rendering/break_lines.cpp: Removed unused #include.
+        * testing/js/WebCoreTestSupport.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        * xml/XSLStyleSheetLibxslt.cpp: Changed PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) &&
+        !PLATFORM(GTK) around soft-linking libxslt.
+        * xml/XSLTExtensions.cpp: Ditto.
+        * xml/XSLTProcessorLibxslt.cpp: Ditto.
+        * xml/XSLTUnicodeSort.cpp: Ditto.
+
 2014-02-08  Andreas Kling  <akling@apple.com>
 
         Remove unused ChromeClient::formStateDidChange().
index ac22503..428a70c 100644 (file)
@@ -196,7 +196,7 @@ void AudioContext::constructCommon()
         m_restrictions = NoRestrictions;
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     addBehaviorRestriction(RequirePageConsentForAudioStartRestriction);
 #endif
 }
index 66e93fb..dd1f0bc 100644 (file)
@@ -1350,7 +1350,7 @@ void AccessibilityNodeObject::visibleText(Vector<AccessibilityText>& textOrder)
     case CheckBoxRole:
     case ListBoxOptionRole:
     // MacOS does not expect native <li> elements to expose label information, it only expects leaf node elements to do that.
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
     case ListItemRole:
 #endif
     case MenuButtonRole:
index c5e9e3c..64dda4d 100644 (file)
 #include <wtf/RefPtr.h>
 #include <wtf/Vector.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include <wtf/RetainPtr.h>
 #elif PLATFORM(WIN)
 #include "AccessibilityObjectWrapperWin.h"
 #include "COMPtr.h"
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 
 typedef struct _NSRange NSRange;
 
@@ -732,7 +732,7 @@ public:
     virtual void updateChildrenIfNecessary();
     virtual void setNeedsToUpdateChildren() { }
     virtual void clearChildren();
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     virtual void detachFromParent();
 #else
     virtual void detachFromParent() { }
@@ -911,7 +911,7 @@ public:
 #endif
 #endif
     
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     void overrideAttachmentParent(AccessibilityObject* parent);
 #else
     void overrideAttachmentParent(AccessibilityObject*) { }
@@ -963,7 +963,7 @@ protected:
     unsigned getLengthForTextRange() const { return text().length(); }
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     RetainPtr<WebAccessibilityObjectWrapper> m_wrapper;
 #elif PLATFORM(WIN)
     COMPtr<AccessibilityObjectWrapper> m_wrapper;
index 0ce1671..0cee0c6 100644 (file)
@@ -910,7 +910,7 @@ IntPoint AccessibilityRenderObject::clickPoint()
     VisibleSelection visSelection = selection();
     VisiblePositionRange range = VisiblePositionRange(visSelection.visibleStart(), visSelection.visibleEnd());
     IntRect bounds = boundsForVisiblePositionRange(range);
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     bounds.setLocation(m_renderer->view().frameView().screenToContents(bounds.location()));
 #endif        
     return IntPoint(bounds.x() + (bounds.width() / 2), bounds.y() - (bounds.height() / 2));
@@ -1994,7 +1994,7 @@ VisiblePosition AccessibilityRenderObject::visiblePositionForPoint(const IntPoin
     if (!renderView)
         return VisiblePosition();
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     FrameView* frameView = &renderView->frameView();
 #endif
 
@@ -2033,7 +2033,7 @@ VisiblePosition AccessibilityRenderObject::visiblePositionForPoint(const IntPoin
             break;
         Frame& frame = toFrameView(widget)->frame();
         renderView = frame.document()->renderView();
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
         frameView = toFrameView(widget);
 #endif
     }
@@ -2913,7 +2913,7 @@ void AccessibilityRenderObject::addAttachmentChildren()
         m_children.append(axWidget);
 }
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 void AccessibilityRenderObject::updateAttachmentViewParents()
 {
     // Only the unignored parent should set the attachment parent, because that's what is reflected in the AX 
@@ -3002,7 +3002,7 @@ void AccessibilityRenderObject::addChildren()
     addCanvasChildren();
     addRemoteSVGChildren();
     
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     updateAttachmentViewParents();
 #endif
 }
index cdffa0d..c6c31c7 100644 (file)
@@ -264,7 +264,7 @@ private:
     void addCanvasChildren();
     void addAttachmentChildren();
     void addRemoteSVGChildren();
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     void updateAttachmentViewParents();
 #endif
 
index 2175181..f1e446d 100644 (file)
@@ -53,7 +53,7 @@ namespace WebCore {
 
 JSValue JSInspectorFrontendHost::platform(ExecState* execState)
 {
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) || PLATFORM(IOS)
     DEFINE_STATIC_LOCAL(const String, platform, (ASCIILiteral("mac")));
 #elif OS(WINDOWS)
     DEFINE_STATIC_LOCAL(const String, platform, (ASCIILiteral("windows")));
index dadeb3f..22e26bf 100644 (file)
@@ -74,7 +74,7 @@ ScriptController::ScriptController(Frame& frame)
 #if ENABLE(NETSCAPE_PLUGIN_API)
     , m_windowScriptNPObject(0)
 #endif
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     , m_windowScriptObject(0)
 #endif
 {
@@ -379,7 +379,7 @@ NPObject* ScriptController::createScriptObjectForPluginElement(HTMLPlugInElement
 
 #endif
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
 PassRefPtr<JSC::Bindings::Instance> ScriptController::createScriptInstanceForWidget(Widget* widget)
 {
     if (!widget->isPluginView())
@@ -406,7 +406,7 @@ JSObject* ScriptController::jsObjectForPluginElement(HTMLPlugInElement* plugin)
     return jsElementValue.getObject();
 }
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
 
 void ScriptController::updatePlatformScriptObjects()
 {
index e415740..0201eb9 100644 (file)
@@ -30,7 +30,7 @@
 #include <wtf/RefPtr.h>
 #include <wtf/text/TextPosition.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include <wtf/RetainPtr.h>
 OBJC_CLASS WebScriptObject;
 OBJC_CLASS JSContext;
@@ -151,7 +151,7 @@ public:
     void collectIsolatedContexts(Vector<std::pair<JSC::ExecState*, SecurityOrigin*>>&);
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     WebScriptObject* windowScriptObject();
     JSContext *javaScriptContext();
 #endif
@@ -187,7 +187,7 @@ private:
 #if ENABLE(NETSCAPE_PLUGIN_API)
     NPObject* m_windowScriptNPObject;
 #endif
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     RetainPtr<WebScriptObject> m_windowScriptObject;
 #endif
 };
index 5db0e4e..1ef9539 100644 (file)
@@ -89,7 +89,7 @@ Vector<String> CryptoKey::usages() const
     return result;
 }
 
-#if !PLATFORM(MAC)
+#if !OS(DARWIN) || PLATFORM(EFL) || PLATFORM(GTK)
 Vector<uint8_t> CryptoKey::randomData(size_t size)
 {
     Vector<uint8_t> result(size);
index b6c1fab..c33d243 100644 (file)
@@ -31,7 +31,7 @@
 
 #if ENABLE(SUBTLE_CRYPTO)
 
-#if PLATFORM(MAC) || PLATFORM(IOS)
+#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)
 typedef struct _CCRSACryptor *CCRSACryptorRef;
 typedef CCRSACryptorRef PlatformRSAKey;
 #endif
index e40ec5a..30d13dd 100644 (file)
@@ -266,7 +266,7 @@ void Clipboard::updateDragImage()
     m_pasteboard->setDragImage(computedImage, computedHotSpot);
 }
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
 
 DragImageRef Clipboard::createDragImage(IntPoint& location) const
 {
index 8db300b..28321b6 100644 (file)
@@ -2424,7 +2424,7 @@ void Document::implicitClose()
 
     m_processingLoadEvent = false;
 
-#if PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(EFL)
+#if PLATFORM(COCOA) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(EFL)
     if (f && hasLivingRenderTree() && AXObjectCache::accessibilityEnabled()) {
         // The AX cache may have been cleared at this point, but we need to make sure it contains an
         // AX object to send the notification to. getOrCreate will make sure that an valid AX object
index b82a014..e028052 100644 (file)
@@ -32,7 +32,7 @@ namespace WebCore {
 class Node;
 class PlatformKeyboardEvent;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 struct KeypressCommand {
     KeypressCommand() { }
     explicit KeypressCommand(const String& commandName) : commandName(commandName) { ASSERT(isASCIILower(commandName[0U])); }
@@ -103,7 +103,7 @@ public:
     virtual bool isKeyboardEvent() const override;
     virtual int which() const override;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     // We only have this need to store keypress command info on the Mac.
     Vector<KeypressCommand>& keypressCommands() { return m_keypressCommands; }
 #endif
@@ -118,7 +118,7 @@ private:
     unsigned m_location;
     bool m_altGraphKey : 1;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     // Commands that were sent by AppKit when interpreting the event. Doesn't include input method commands.
     Vector<KeypressCommand> m_keypressCommands;
 #endif
index 1ca4f89..638ebff 100644 (file)
@@ -1284,7 +1284,7 @@ void Editor::cut()
         if (enclosingTextFormControl(m_frame.selection().selection().start()))
             Pasteboard::createForCopyAndPaste()->writePlainText(selectedTextForClipboard(), canSmartCopyOrDelete() ? Pasteboard::CanSmartReplace : Pasteboard::CannotSmartReplace);
         else {
-#if PLATFORM(MAC) || PLATFORM(EFL)
+#if PLATFORM(COCOA) || PLATFORM(EFL)
             writeSelectionToPasteboard(*Pasteboard::createForCopyAndPaste());
 #else
             // FIXME: Convert all other platforms to match Mac and delete this.
@@ -1311,13 +1311,13 @@ void Editor::copy()
             canSmartCopyOrDelete() ? Pasteboard::CanSmartReplace : Pasteboard::CannotSmartReplace);
     } else {
         if (HTMLImageElement* imageElement = imageElementFromImageDocument(document())) {
-#if PLATFORM(MAC) || PLATFORM(EFL)
+#if PLATFORM(COCOA) || PLATFORM(EFL)
             writeImageToPasteboard(*Pasteboard::createForCopyAndPaste(), *imageElement, document().url(), document().title());
 #else
             Pasteboard::createForCopyAndPaste()->writeImage(*imageElement, document().url(), document().title());
 #endif
         } else {
-#if PLATFORM(MAC) || PLATFORM(EFL)
+#if PLATFORM(COCOA) || PLATFORM(EFL)
             writeSelectionToPasteboard(*Pasteboard::createForCopyAndPaste());
 #else
             // FIXME: Convert all other platforms to match Mac and delete this.
@@ -1421,7 +1421,7 @@ void Editor::copyImage(const HitTestResult& result)
     if (url.isEmpty())
         url = result.absoluteImageURL();
 
-#if PLATFORM(MAC) || PLATFORM(EFL)
+#if PLATFORM(COCOA) || PLATFORM(EFL)
     writeImageToPasteboard(*Pasteboard::createForCopyAndPaste(), *element, url, result.altDisplayString());
 #else
     Pasteboard::createForCopyAndPaste()->writeImage(*element, url, result.altDisplayString());
index 9039618..08ae4fd 100644 (file)
@@ -41,7 +41,7 @@
 #include "VisibleSelection.h"
 #include "WritingDirection.h"
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 OBJC_CLASS NSAttributedString;
 OBJC_CLASS NSDictionary;
 #endif
@@ -419,7 +419,7 @@ public:
     DeleteButtonController& deleteButtonController() const { return *m_deleteButtonController; }
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     bool insertParagraphSeparatorInQuotedContent();
     const SimpleFontData* fontForSelection(bool&) const;
     NSDictionary* fontAttributesForSelectionStart() const;
@@ -434,7 +434,7 @@ public:
 #endif // !PLATFORM(IOS)
 #endif
 
-#if PLATFORM(MAC) || PLATFORM(EFL)
+#if PLATFORM(COCOA) || PLATFORM(EFL)
     void writeSelectionToPasteboard(Pasteboard&);
     void writeImageToPasteboard(Pasteboard&, Element& imageElement, const URL&, const String& title);
 #endif
@@ -469,7 +469,7 @@ private:
 
     bool unifiedTextCheckerEnabled() const;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     PassRefPtr<SharedBuffer> selectionInWebArchiveFormat();
     PassRefPtr<Range> adjustedSelectionRange();
     PassRefPtr<DocumentFragment> createFragmentForImageResourceAndAddResource(PassRefPtr<ArchiveResource>);
index 16abf5e..35059ca 100644 (file)
@@ -366,7 +366,7 @@ inline void FrameSelection::setTypingStyle(PassRefPtr<EditingStyle> style)
     m_typingStyle = style;
 }
 
-#if !(PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL))
+#if !(PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(EFL))
 #if HAVE(ACCESSIBILITY)
 inline void FrameSelection::notifyAccessibilityForSelectionChange()
 {
index 1f87687..33efeb0 100644 (file)
@@ -345,7 +345,7 @@ void TypingCommand::typingAddedToOpenCommand(ETypingCommand commandTypeForAddedT
 
     updatePreservesTypingStyle(commandTypeForAddedTyping);
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     frame.editor().appliedEditing(this);
     // Since the spellchecking code may also perform corrections and other replacements, it should happen after the typing changes.
     if (!m_shouldPreventSpellChecking)
index 9ae72af..29a2928 100644 (file)
@@ -37,7 +37,7 @@
 #include "ViewportArguments.h"
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #import <wtf/RetainPtr.h>
 typedef struct objc_object* id;
 #endif
@@ -164,7 +164,7 @@ public:
 
     bool isCurrentDocument(Document*) const;
     
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     id viewState() const;
     void setViewState(id);
     
@@ -263,7 +263,7 @@ private:
     String m_sharedLinkUniqueIdentifier;
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     RetainPtr<id> m_viewState;
     std::unique_ptr<HashMap<String, RetainPtr<id>>> m_transientProperties;
 #endif
index 8856712..1120d53 100644 (file)
 #include "WebKitPlaybackTargetAvailabilityEvent.h"
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include "DisplaySleepDisabler.h"
 #endif
 
@@ -5476,7 +5476,7 @@ void HTMLMediaElement::applyMediaFragmentURI()
 
 void HTMLMediaElement::updateSleepDisabling()
 {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     if (!shouldDisableSleep() && m_sleepDisabler)
         m_sleepDisabler = nullptr;
     else if (shouldDisableSleep() && !m_sleepDisabler)
@@ -5484,7 +5484,7 @@ void HTMLMediaElement::updateSleepDisabling()
 #endif
 }
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 bool HTMLMediaElement::shouldDisableSleep() const
 {
 #if ENABLE(PAGE_VISIBILITY_API)
index fa1bcac..65f7b07 100644 (file)
@@ -75,7 +75,7 @@ class TimeRanges;
 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
 class Widget;
 #endif
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 class DisplaySleepDisabler;
 #endif
 #if ENABLE(ENCRYPTED_MEDIA_V2)
@@ -659,7 +659,7 @@ private:
     bool isAutoplaying() const { return m_autoplaying; }
 
     void updateSleepDisabling();
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     bool shouldDisableSleep() const;
 #endif
 
@@ -811,7 +811,7 @@ private:
     friend class MediaController;
     RefPtr<MediaController> m_mediaController;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     OwnPtr<DisplaySleepDisabler> m_sleepDisabler;
 #endif
 
index 93643c7..16a901a 100644 (file)
@@ -55,7 +55,7 @@
 #include "npruntime_impl.h"
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include "QuickTimePluginReplacement.h"
 #endif
 
@@ -313,7 +313,7 @@ void HTMLPlugInElement::didAddUserAgentShadowRoot(ShadowRoot* root)
     }
 }
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 static void registrar(const ReplacementPlugin&);
 #endif
 
@@ -326,14 +326,14 @@ static Vector<ReplacementPlugin*>& registeredPluginReplacements()
         return registeredReplacements;
     enginesQueried = true;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     QuickTimePluginReplacement::registerPluginReplacement(registrar);
 #endif
     
     return registeredReplacements;
 }
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 static void registrar(const ReplacementPlugin& replacement)
 {
     registeredPluginReplacements().append(new ReplacementPlugin(replacement));
index 1db121c..31fb796 100644 (file)
@@ -133,7 +133,7 @@ HTMLPlugInImageElement::~HTMLPlugInImageElement()
 
 void HTMLPlugInImageElement::setDisplayState(DisplayState state)
 {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     if (state == RestartingWithPendingMouseClick || state == Restarting) {
         m_isRestartedPlugin = true;
         m_snapshotDecision = NeverSnapshot;
index f9bb5e7..c78f3e0 100644 (file)
@@ -1351,7 +1351,7 @@ void HTMLSelectElement::listBoxDefaultEventHandler(Event* event)
         int listIndex = toRenderListBox(renderer())->listIndexAtOffset(toIntSize(localOffset));
         if (listIndex >= 0) {
             if (!isDisabledFormControl()) {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
                 updateSelectedState(listIndex, mouseEvent->metaKey(), mouseEvent->shiftKey());
 #else
                 updateSelectedState(listIndex, mouseEvent->ctrlKey(), mouseEvent->shiftKey());
@@ -1456,7 +1456,7 @@ void HTMLSelectElement::listBoxDefaultEventHandler(Event* event)
             ASSERT_UNUSED(listItems, !listItems.size() || static_cast<size_t>(endIndex) < listItems.size());
             setActiveSelectionEndIndex(endIndex);
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
             m_allowsNonContiguousSelection = m_multiple && isSpatialNavigationEnabled(document().frame());
 #else
             m_allowsNonContiguousSelection = m_multiple && (isSpatialNavigationEnabled(document().frame()) || static_cast<KeyboardEvent*>(event)->ctrlKey());
index 44dbdd9..0aced78 100644 (file)
@@ -673,11 +673,11 @@ const AtomicString& MediaControlReturnToRealtimeButtonElement::shadowPseudoId()
 
 MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement(Document& document, MediaControls* controls)
     : MediaControlInputElement(document, MediaShowClosedCaptionsButton)
-#if PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK)
+#if PLATFORM(COCOA) || PLATFORM(WIN) || PLATFORM(GTK)
     , m_controls(controls)
 #endif
 {
-#if !PLATFORM(MAC) && !PLATFORM(WIN) || !PLATFORM(GTK)
+#if !PLATFORM(COCOA) && !PLATFORM(WIN) || !PLATFORM(GTK)
     UNUSED_PARAM(controls);
 #endif
 }
@@ -707,7 +707,7 @@ void MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler(Event* e
         // UI. Not all ports may want the closed captions button to toggle a list of tracks, so
         // we have to use #if.
         // https://bugs.webkit.org/show_bug.cgi?id=101877
-#if !PLATFORM(MAC) && !PLATFORM(WIN) && !PLATFORM(GTK)
+#if !PLATFORM(COCOA) && !PLATFORM(WIN) && !PLATFORM(GTK)
         mediaController()->setClosedCaptionsVisible(!mediaController()->closedCaptionsVisible());
         setChecked(mediaController()->closedCaptionsVisible());
         updateDisplayType();
index 6f5205d..4a23b38 100644 (file)
@@ -295,7 +295,7 @@ private:
     virtual const AtomicString& shadowPseudoId() const override;
     virtual void defaultEventHandler(Event*) override;
 
-#if PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK)
+#if PLATFORM(COCOA) || PLATFORM(WIN) || PLATFORM(GTK)
     MediaControls* m_controls;
 #endif
 };
index af3c598..ba2a608 100644 (file)
@@ -238,7 +238,7 @@ static PassRefPtr<IDBIndex> indexForObjectStore(IDBObjectStore* idbObjectStore,
     return idbIndex;
 }
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
 static PassRefPtr<KeyPath> keyPathFromIDBKeyPath(const IDBKeyPath& idbKeyPath)
 {
     RefPtr<KeyPath> keyPath;
@@ -265,7 +265,7 @@ static PassRefPtr<KeyPath> keyPathFromIDBKeyPath(const IDBKeyPath& idbKeyPath)
 
     return keyPath.release();
 }
-#endif // !PLATFORM(MAC)
+#endif // !PLATFORM(COCOA)
 
 class DatabaseLoader : public ExecutableWithDatabase {
 public:
@@ -278,7 +278,7 @@ public:
 
     virtual void execute(PassRefPtr<IDBDatabase> prpDatabase) override
     {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
         ASSERT_UNUSED(prpDatabase, prpDatabase);
 #else
         RefPtr<IDBDatabase> idbDatabase = prpDatabase;
@@ -319,7 +319,7 @@ public:
             .setObjectStores(objectStores);
 
         m_requestCallback->sendSuccess(result);
-#endif // PLATFORM(MAC)
+#endif // PLATFORM(COCOA)
     }
 
     virtual RequestCallback* requestCallback() override { return m_requestCallback.get(); }
index e93d1ca..2b690c1 100644 (file)
@@ -48,7 +48,7 @@ static NetworkingContext* networkingContext(const Document* document)
     return frame->loader().networkingContext();
 }
 
-#if PLATFORM(MAC) || USE(CFNETWORK) || USE(SOUP)
+#if PLATFORM(COCOA) || USE(CFNETWORK) || USE(SOUP)
 inline NetworkStorageSession& storageSession(const Document* document)
 {
     NetworkingContext* context = networkingContext(document);
index b04a4e7..54f7cc7 100644 (file)
@@ -850,7 +850,7 @@ void DocumentLoader::dataReceived(CachedResource* resource, const char* data, in
     ASSERT_UNUSED(resource, resource == m_mainResource);
     ASSERT(!m_response.isNull());
 
-#if USE(CFNETWORK) || PLATFORM(MAC)
+#if USE(CFNETWORK) || PLATFORM(COCOA)
     // Workaround for <rdar://problem/6060782>
     if (m_response.isNull())
         m_response = ResourceResponse(URL(), "text/html", 0, String(), String());
index 866fd7c..caeb366 100644 (file)
@@ -144,7 +144,7 @@ namespace WebCore {
         void setTitle(const StringWithDirection&);
         const String& overrideEncoding() const { return m_overrideEncoding; }
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
         void schedule(WTF::SchedulePair*);
         void unschedule(WTF::SchedulePair*);
 #endif
@@ -238,7 +238,7 @@ namespace WebCore {
         
         void didTellClientAboutLoad(const String& url)
         { 
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
             // Don't include data urls here, as if a lot of data is loaded
             // that way, we hold on to the (large) url string for too long.
             if (protocolIs(url, "data"))
index 19cefa8..6c7865a 100644 (file)
@@ -382,7 +382,7 @@ public:
 
     virtual void registerForIconNotification(bool) override { }
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     virtual RemoteAXObjectRef accessibilityRemoteObject() override { return 0; }
     virtual NSCachedURLResponse* willCacheResponse(DocumentLoader*, unsigned long, NSCachedURLResponse* response) const override { return response; }
 #endif
@@ -484,7 +484,7 @@ public:
     virtual int pasteboardChangeCount() override { return 0; }
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     virtual NSString* userVisibleString(NSURL*) override { return 0; }
     virtual DocumentFragment* documentFragmentFromAttributedString(NSAttributedString*, Vector<RefPtr<ArchiveResource>>&) override { return 0; };
     virtual void setInsertionPasteboard(const String&) override { };
@@ -557,7 +557,7 @@ public:
     virtual void speak(const String&) override { }
     virtual void stopSpeaking() override { }
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     virtual void searchWithSpotlight() override { }
 #endif
 
index 0fdee6f..6e913ef 100644 (file)
@@ -924,7 +924,7 @@ void FrameLoader::loadArchive(PassRefPtr<Archive> archive)
     SubstituteData substituteData(mainResource->data(), mainResource->mimeType(), mainResource->textEncoding(), URL());
     
     ResourceRequest request(mainResource->url());
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !PLATFORM(IOS)
     request.applyWebArchiveHackForMail();
 #endif
 
@@ -941,7 +941,7 @@ ObjectContentType FrameLoader::defaultObjectContentType(const URL& url, const St
     if (mimeType.isEmpty())
         mimeType = mimeTypeFromURL(url);
 
-#if !PLATFORM(MAC) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does EFL
+#if !PLATFORM(COCOA) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does EFL
     if (mimeType.isEmpty()) {
         String decodedPath = decodeURLEscapeSequences(url.path());
         mimeType = PluginDatabase::installedPlugins()->MIMETypeForExtension(decodedPath.substring(decodedPath.reverseFind('.') + 1));
@@ -951,7 +951,7 @@ ObjectContentType FrameLoader::defaultObjectContentType(const URL& url, const St
     if (mimeType.isEmpty())
         return ObjectContentFrame; // Go ahead and hope that we can display the content.
 
-#if !PLATFORM(MAC) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does EFL
+#if !PLATFORM(COCOA) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does EFL
     bool plugInSupportsMIMEType = PluginDatabase::installedPlugins()->isMIMETypeRegistered(mimeType);
 #else
     bool plugInSupportsMIMEType = false;
@@ -2157,7 +2157,7 @@ CachePolicy FrameLoader::subresourceCachePolicy() const
         return CachePolicyRevalidate;
 
     const ResourceRequest& request(documentLoader()->request());
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     if (request.cachePolicy() == ReloadIgnoringCacheData && !equalIgnoringCase(request.httpMethod(), "post") && ResourceRequest::useQuickLookResourceCachingQuirks())
         return CachePolicyRevalidate;
 #endif
index cd6cb6c..6c99fac 100644 (file)
@@ -32,7 +32,7 @@
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
-#if PLATFORM(MAC)
+#if USE(FOUNDATION)
 OBJC_CLASS NSData;
 #endif
 
@@ -64,7 +64,7 @@ public:
     unsigned getSomeData(const char*& data, unsigned position = 0) const;
     
     SharedBuffer* sharedBuffer() const;
-#if PLATFORM(MAC)
+#if USE(FOUNDATION)
     void tryReplaceSharedBufferContents(SharedBuffer*);
 #endif
     PassRefPtr<ResourceBuffer> copy() const;
@@ -80,7 +80,7 @@ public:
     // Ensure this buffer has no other clients before calling this.
     PassOwnPtr<PurgeableBuffer> releasePurgeableBuffer();
 
-#if PLATFORM(MAC)
+#if USE(FOUNDATION)
     SharedBuffer::NSDataRetainPtrWithoutImplicitConversionOperator createNSData();
 #endif
 #if USE(CF)
index e8fee1d..996a801 100644 (file)
@@ -162,7 +162,7 @@ void ResourceLoadScheduler::scheduleLoad(ResourceLoader* resourceLoader, Resourc
     bool hadRequests = host->hasRequests();
     host->schedule(resourceLoader, priority);
 
-#if PLATFORM(MAC) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFNETWORK)
     if (!isSuspendingPendingRequests()) {
         // Serve all requests at once to keep the pipeline full at the network layer.
         // FIXME: Does this code do anything useful, given that we also set maxRequestsInFlightPerHost to effectively unlimited on these platforms?
index ebef76f..c7b2b2c 100644 (file)
@@ -559,7 +559,7 @@ void ResourceLoader::didReceiveAuthenticationChallenge(const AuthenticationChall
     }
     // Only these platforms provide a way to continue without credentials.
     // If we can't continue with credentials, we need to cancel the load altogether.
-#if PLATFORM(MAC) || USE(CFNETWORK) || USE(CURL) || PLATFORM(GTK) || PLATFORM(EFL)
+#if PLATFORM(COCOA) || USE(CFNETWORK) || USE(CURL) || PLATFORM(GTK) || PLATFORM(EFL)
     challenge.authenticationClient()->receivedRequestToContinueWithoutCredential(challenge);
     ASSERT(!handle() || !handle()->hasAuthenticationChallenge());
 #else
index 6b075ed..aa8b95c 100644 (file)
@@ -120,7 +120,7 @@ public:
     virtual void didFail(ResourceHandle*, const ResourceError&) override;
     virtual void wasBlocked(ResourceHandle*) override;
     virtual void cannotShowURL(ResourceHandle*) override;
-#if PLATFORM(MAC) && !USE(CFNETWORK)
+#if PLATFORM(COCOA) && !USE(CFNETWORK)
     virtual void willStopBufferingData(ResourceHandle*, const char* data, unsigned length) override { willStopBufferingData(data, length); }
 #endif
     virtual bool shouldUseCredentialStorage(ResourceHandle*) override { return shouldUseCredentialStorage(); }
@@ -133,13 +133,13 @@ public:
     virtual bool canAuthenticateAgainstProtectionSpace(ResourceHandle*, const ProtectionSpace& protectionSpace) override { return canAuthenticateAgainstProtectionSpace(protectionSpace); }
 #endif
     virtual void receivedCancellation(ResourceHandle*, const AuthenticationChallenge& challenge) override { receivedCancellation(challenge); }
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #if USE(CFNETWORK)
     virtual CFCachedURLResponseRef willCacheResponse(ResourceHandle*, CFCachedURLResponseRef) override;
 #else
     virtual NSCachedURLResponse* willCacheResponse(ResourceHandle*, NSCachedURLResponse*) override;
 #endif
-#endif // PLATFORM(MAC)
+#endif // PLATFORM(COCOA)
 #if PLATFORM(WIN) && USE(CFNETWORK)
     // FIXME: Windows should use willCacheResponse - <https://bugs.webkit.org/show_bug.cgi?id=57257>.
     virtual bool shouldCacheResponse(ResourceHandle*, CFCachedURLResponseRef) override;
index 9f0037e..31f1a1b 100644 (file)
@@ -406,7 +406,7 @@ RetainPtr<CFDataRef> LegacyWebArchive::rawDataRepresentation()
     return plistData;
 }
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
 
 ResourceResponse LegacyWebArchive::createResourceResponseFromMacArchivedData(CFDataRef responseData)
 {
index 60e304a..697a495 100644 (file)
@@ -888,7 +888,7 @@ bool CachedResource::isUsingDiskImageCache() const
 }
 #endif
 
-#if PLATFORM(MAC)
+#if USE(FOUNDATION)
 void CachedResource::tryReplaceEncodedData(PassRefPtr<SharedBuffer> newBuffer)
 {
     if (!m_data)
index 6cf3b7a..ef0bc66 100644 (file)
@@ -256,7 +256,7 @@ public:
 
     virtual bool canReuse(const ResourceRequest&) const { return true; }
 
-#if PLATFORM(MAC)
+#if USE(FOUNDATION)
     void tryReplaceEncodedData(PassRefPtr<SharedBuffer>);
 #endif
 
index 05b6c76..45f43cc 100644 (file)
@@ -28,7 +28,7 @@
 #include <wtf/Forward.h>
 #include <wtf/RefPtr.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #ifndef __OBJC__
 class NSView;
 #endif
@@ -167,7 +167,7 @@ public:
 
     bool requiresFullscreenForVideoPlayback();
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     void focusNSView(NSView*);
 #endif
 
index 14cfcb3..edf74c8 100644 (file)
@@ -330,7 +330,7 @@ public:
     virtual IntRect visibleRectForTiledBackingStore() const { return IntRect(); }
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     virtual NSResponder *firstResponder() { return 0; }
     virtual void makeFirstResponder(NSResponder *) { }
     // Focuses on the containing view associated with this page.
index 23d3a5a..19adde3 100644 (file)
@@ -59,7 +59,7 @@ namespace WebCore {
         virtual void speak(const String&) = 0;
         virtual void stopSpeaking() = 0;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
         virtual void searchWithSpotlight() = 0;
 #endif
 
index 4774a43..2bedc02 100644 (file)
@@ -428,7 +428,7 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
     case ContextMenuItemTagTextDirectionRightToLeft:
         frame->editor().command("MakeTextWritingDirectionRightToLeft").execute();
         break;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     case ContextMenuItemTagSearchInSpotlight:
         m_client.searchWithSpotlight();
         break;
@@ -445,7 +445,7 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
     case ContextMenuItemTagCheckGrammarWithSpelling:
         frame->editor().toggleGrammarChecking();
         break;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     case ContextMenuItemTagShowFonts:
         frame->editor().showFontPanel();
         break;
@@ -467,7 +467,7 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
         frame->editor().capitalizeWord();
         break;
 #endif
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     case ContextMenuItemTagChangeBack:
         frame->editor().changeBackToReplacedString(m_hitTestResult.replacedString());
         break;
@@ -520,26 +520,26 @@ void ContextMenuController::createAndAppendFontSubMenu(ContextMenuItem& fontMenu
 {
     ContextMenu fontMenu;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     ContextMenuItem showFonts(ActionType, ContextMenuItemTagShowFonts, contextMenuItemTagShowFonts());
 #endif
     ContextMenuItem bold(CheckableActionType, ContextMenuItemTagBold, contextMenuItemTagBold());
     ContextMenuItem italic(CheckableActionType, ContextMenuItemTagItalic, contextMenuItemTagItalic());
     ContextMenuItem underline(CheckableActionType, ContextMenuItemTagUnderline, contextMenuItemTagUnderline());
     ContextMenuItem outline(ActionType, ContextMenuItemTagOutline, contextMenuItemTagOutline());
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     ContextMenuItem styles(ActionType, ContextMenuItemTagStyles, contextMenuItemTagStyles());
     ContextMenuItem showColors(ActionType, ContextMenuItemTagShowColors, contextMenuItemTagShowColors());
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     appendItem(showFonts, &fontMenu);
 #endif
     appendItem(bold, &fontMenu);
     appendItem(italic, &fontMenu);
     appendItem(underline, &fontMenu);
     appendItem(outline, &fontMenu);
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     appendItem(styles, &fontMenu);
     appendItem(*separatorItem(), &fontMenu);
     appendItem(showColors, &fontMenu);
@@ -563,19 +563,19 @@ void ContextMenuController::createAndAppendSpellingAndGrammarSubMenu(ContextMenu
         contextMenuItemTagCheckSpellingWhileTyping());
     ContextMenuItem grammarWithSpelling(CheckableActionType, ContextMenuItemTagCheckGrammarWithSpelling, 
         contextMenuItemTagCheckGrammarWithSpelling());
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     ContextMenuItem correctSpelling(CheckableActionType, ContextMenuItemTagCorrectSpellingAutomatically, 
         contextMenuItemTagCorrectSpellingAutomatically());
 #endif
 
     appendItem(showSpellingPanel, &spellingAndGrammarMenu);
     appendItem(checkSpelling, &spellingAndGrammarMenu);
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     appendItem(*separatorItem(), &spellingAndGrammarMenu);
 #endif
     appendItem(checkAsYouType, &spellingAndGrammarMenu);
     appendItem(grammarWithSpelling, &spellingAndGrammarMenu);
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     appendItem(correctSpelling, &spellingAndGrammarMenu);
 #endif
 
@@ -585,7 +585,7 @@ void ContextMenuController::createAndAppendSpellingAndGrammarSubMenu(ContextMenu
 #endif // !PLATFORM(GTK)
 
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 
 void ContextMenuController::createAndAppendSpeechSubMenu(ContextMenuItem& speechMenuItem)
 {
@@ -668,7 +668,7 @@ void ContextMenuController::createAndAppendTextDirectionSubMenu(ContextMenuItem&
 
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 
 void ContextMenuController::createAndAppendSubstitutionsSubMenu(ContextMenuItem& substitutionsMenuItem)
 {
@@ -722,13 +722,13 @@ static bool selectionContainsPossibleWord(Frame* frame)
     return false;
 }
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #define SUPPORTS_TOGGLE_VIDEO_FULLSCREEN 1
 #else
 #define SUPPORTS_TOGGLE_VIDEO_FULLSCREEN 0
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #define SUPPORTS_TOGGLE_SHOW_HIDE_MEDIA_CONTROLS 1
 #else
 #define SUPPORTS_TOGGLE_SHOW_HIDE_MEDIA_CONTROLS 0
@@ -773,7 +773,7 @@ void ContextMenuController::populate()
         contextMenuItemTagEnterVideoFullscreen());
     ContextMenuItem ToggleVideoFullscreen(ActionType, ContextMenuItemTagToggleVideoFullscreen,
         contextMenuItemTagEnterVideoFullscreen());
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     ContextMenuItem SearchSpotlightItem(ActionType, ContextMenuItemTagSearchInSpotlight, 
         contextMenuItemTagSearchInSpotlight());
 #endif
@@ -865,7 +865,7 @@ void ContextMenuController::populate()
         if (imageURL.isEmpty() && linkURL.isEmpty() && mediaURL.isEmpty()) {
             if (m_hitTestResult.isSelected()) {
                 if (selectionContainsPossibleWord(frame)) {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
                     String selectedString = frame->displayStringModifiedByEncoding(frame->editor().selectedText());
                     ContextMenuItem LookUpInDictionaryItem(ActionType, ContextMenuItemTagLookUpInDictionary, contextMenuItemTagLookUpInDictionary(selectedString));
 
@@ -879,7 +879,7 @@ void ContextMenuController::populate()
                 }
 
                 appendItem(CopyItem, m_contextMenu.get());
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
                 appendItem(*separatorItem(), m_contextMenu.get());
 
                 ContextMenuItem SpeechMenuItem(SubmenuType, ContextMenuItemTagSpeechMenu, contextMenuItemTagSpeechMenu());
@@ -956,7 +956,7 @@ void ContextMenuController::populate()
                         appendItem(IgnoreGrammarItem, m_contextMenu.get());
                     appendItem(*separatorItem(), m_contextMenu.get());
                     haveContextMenuItemsForMisspellingOrGrammer = true;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
                 } else {
                     // If the string was autocorrected, generate a contextual menu item allowing it to be changed back.
                     String replacedString = m_hitTestResult.replacedString();
@@ -996,7 +996,7 @@ void ContextMenuController::populate()
         }
 
         if (m_hitTestResult.isSelected() && !inPasswordField && selectionContainsPossibleWord(frame)) {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
             String selectedString = frame->displayStringModifiedByEncoding(frame->editor().selectedText());
             ContextMenuItem LookUpInDictionaryItem(ActionType, ContextMenuItemTagLookUpInDictionary, contextMenuItemTagLookUpInDictionary(selectedString));
 
@@ -1028,7 +1028,7 @@ void ContextMenuController::populate()
             createAndAppendSpellingAndGrammarSubMenu(SpellingAndGrammarMenuItem);
             appendItem(SpellingAndGrammarMenuItem, m_contextMenu.get());
 #endif
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
             ContextMenuItem substitutionsMenuItem(SubmenuType, ContextMenuItemTagSubstitutionsMenu, 
                 contextMenuItemTagSubstitutionsMenu());
             createAndAppendSubstitutionsSubMenu(substitutionsMenuItem);
@@ -1049,7 +1049,7 @@ void ContextMenuController::populate()
                 createAndAppendFontSubMenu(FontMenuItem);
                 appendItem(FontMenuItem, m_contextMenu.get());
             }
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
             ContextMenuItem SpeechMenuItem(SubmenuType, ContextMenuItemTagSpeechMenu, contextMenuItemTagSpeechMenu());
             createAndAppendSpeechSubMenu(SpeechMenuItem);
             appendItem(SpeechMenuItem, m_contextMenu.get());
@@ -1232,7 +1232,7 @@ void ContextMenuController::checkOrEnableIfNeeded(ContextMenuItem& item) const
         case ContextMenuItemTagCheckSpellingWhileTyping:
             shouldCheck = frame->editor().isContinuousSpellCheckingEnabled();
             break;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
         case ContextMenuItemTagSubstitutionsMenu:
         case ContextMenuItemTagTransformationsMenu:
             break;
@@ -1270,7 +1270,7 @@ void ContextMenuController::checkOrEnableIfNeeded(ContextMenuItem& item) const
         case ContextMenuItemTagStopSpeaking:
             shouldEnable = m_client.isSpeaking();
             break;
-#else // PLATFORM(MAC) ends here
+#else // PLATFORM(COCOA) ends here
         case ContextMenuItemTagStopSpeaking:
             break;
 #endif
index 343490c..4fed5e3 100644 (file)
@@ -51,9 +51,9 @@ public:
     virtual void startDrag(DragImageRef, const IntPoint& dragImageOrigin, const IntPoint& eventPos, Clipboard&, Frame&, bool linkDrag = false) = 0;
     virtual void dragEnded() { }
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     // Mac-specific helper function to allow access to web archives and NSPasteboard extras in WebKit.
-    // This is not abstract as that would require another #if PLATFORM(MAC) for the SVGImage client empty implentation.
+    // This is not abstract as that would require another #if PLATFORM(COCOA) for the SVGImage client empty implentation.
     virtual void declareAndWriteDragImage(const String&, Element&, const URL&, const String&, Frame*) { }
 #endif
 
index 53376f6..310feca 100644 (file)
@@ -682,7 +682,7 @@ static void selectElement(Element& element)
 static IntPoint dragLocForDHTMLDrag(const IntPoint& mouseDraggedPoint, const IntPoint& dragOrigin, const IntPoint& dragImageOffset, bool isLinkImage)
 {
     // dragImageOffset is the cursor position relative to the lower-left corner of the image.
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     // We add in the Y dimension because we are a flipped view, so adding moves the image down.
     const int yOffset = dragImageOffset.y();
 #else
@@ -701,7 +701,7 @@ static IntPoint dragLocForSelectionDrag(Frame& src)
     int xpos = draggingRect.maxX();
     xpos = draggingRect.x() < xpos ? draggingRect.x() : xpos;
     int ypos = draggingRect.maxY();
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     // Deal with flipped coordinates on Mac
     ypos = draggingRect.y() > ypos ? draggingRect.y() : ypos;
 #else
@@ -769,7 +769,7 @@ bool DragController::startDrag(Frame& src, const DragState& state, DragOperation
             if (enclosingTextFormControl(src.selection().selection().start()))
                 clipboard.pasteboard().writePlainText(src.editor().selectedTextForClipboard(), Pasteboard::CannotSmartReplace);
             else {
-#if PLATFORM(MAC) || PLATFORM(EFL)
+#if PLATFORM(COCOA) || PLATFORM(EFL)
                 src.editor().writeSelectionToPasteboard(clipboard.pasteboard());
 #else
                 // FIXME: Convert all other platforms to match Mac and delete this.
@@ -880,7 +880,7 @@ void DragController::doImageDrag(Element& element, const IntPoint& dragOrigin, c
         float scale = fittedSize.width() / (float)layoutRect.width();
         float dx = scale * (layoutRect.x() - mouseDownPoint.x());
         float originY = layoutRect.y();
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
         // Compensate for accursed flipped coordinates in Cocoa.
         originY += layoutRect.height();
 #endif
index 8623994..1561263 100644 (file)
@@ -35,7 +35,7 @@
 #include <wtf/Forward.h>
 #include <wtf/Vector.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 OBJC_CLASS NSAttributedString;
 OBJC_CLASS NSString;
 OBJC_CLASS NSURL;
@@ -133,7 +133,7 @@ public:
     virtual int pasteboardChangeCount() = 0;
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     virtual NSString* userVisibleString(NSURL*) = 0;
     virtual DocumentFragment* documentFragmentFromAttributedString(NSAttributedString*, Vector< RefPtr<ArchiveResource>>&) = 0;
     virtual void setInsertionPasteboard(const String& pasteboardName) = 0;
index 1a3f10e..81f8d33 100644 (file)
@@ -298,7 +298,7 @@ static inline bool shouldGesturesTriggerActive()
 }
 #endif
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
 
 inline bool EventHandler::eventLoopHandleMouseUp(const MouseEventWithHitTestResults&)
 {
@@ -350,7 +350,7 @@ EventHandler::EventHandler(Frame& frame)
     , m_mouseDownTimestamp(0)
     , m_recentWheelEventDeltaTracker(adoptPtr(new WheelEventDeltaTracker))
     , m_widgetIsLatched(false)
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     , m_mouseDownView(nil)
     , m_sendingEventToSubview(false)
 #if !PLATFORM(IOS)
@@ -759,7 +759,7 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
             return false;
     }
 
-#if PLATFORM(MAC) // FIXME: Why does this assertion fire on other platforms?
+#if PLATFORM(COCOA) // FIXME: Why does this assertion fire on other platforms?
     ASSERT(m_mouseDownMayStartSelect || m_mouseDownMayStartAutoscroll);
 #endif
 
@@ -1155,7 +1155,7 @@ bool EventHandler::logicalScrollRecursively(ScrollLogicalDirection direction, Sc
     FrameView* view = frame->view();
     
     bool scrolled = false;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     // Mac also resets the scroll position in the inline direction.
     if (granularity == ScrollByDocument && view && view->logicalScroll(ScrollInlineDirectionBackward, ScrollByDocument))
         scrolled = true;
@@ -2217,7 +2217,7 @@ void EventHandler::clearDragState()
     m_dragTarget = nullptr;
     m_capturingMouseEventsElement = nullptr;
     m_shouldOnlyFireDragOverEvent = false;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     m_sendingEventToSubview = false;
 #endif
 }
@@ -2492,7 +2492,7 @@ bool EventHandler::handleWheelEvent(const PlatformWheelEvent& e)
     if (m_baseEventType == PlatformEvent::NoType && shouldTurnVerticalTicksIntoHorizontal(result, e))
         event = event.copyTurningVerticalTicksIntoHorizontalTicks();
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     switch (event.phase()) {
     case PlatformWheelEventPhaseBegan:
         m_recentWheelEventDeltaTracker->beginTrackingDeltas();
@@ -2543,7 +2543,7 @@ void EventHandler::defaultWheelEventHandler(Node* startNode, WheelEvent* wheelEv
     DominantScrollGestureDirection dominantDirection = DominantScrollGestureDirection::None;
 
     // Workaround for scrolling issues <rdar://problem/14758615>.
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     if (m_recentWheelEventDeltaTracker->isTrackingDeltas())
         dominantDirection = m_recentWheelEventDeltaTracker->dominantScrollGestureDirection();
 #endif
@@ -2926,7 +2926,7 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent)
     keypress->setTarget(element);
     if (keydownResult)
         keypress->setDefaultPrevented(true);
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     keypress->keypressCommands() = keydown->keypressCommands();
 #endif
     element->dispatchEvent(keypress, IGNORE_EXCEPTION);
@@ -3293,7 +3293,7 @@ bool EventHandler::isKeyboardOptionTab(KeyboardEvent* event)
 
 bool EventHandler::eventInvertsTabsToLinksClientCallResult(KeyboardEvent* event)
 {
-#if PLATFORM(MAC) || PLATFORM(EFL)
+#if PLATFORM(COCOA) || PLATFORM(EFL)
     return EventHandler::isKeyboardOptionTab(event);
 #else
     UNUSED_PARAM(event);
index 5175ccc..17e47a2 100644 (file)
@@ -52,7 +52,7 @@ class WebEvent;
 #endif
 #endif // PLATFORM(IOS)
 
-#if PLATFORM(MAC) && !defined(__OBJC__)
+#if PLATFORM(COCOA) && !defined(__OBJC__)
 class NSView;
 #endif
 
@@ -246,7 +246,7 @@ public:
     
     void sendScrollEvent(); // Ditto
 
-#if PLATFORM(MAC) && defined(__OBJC__)
+#if PLATFORM(COCOA) && defined(__OBJC__)
 #if !PLATFORM(IOS)
     void mouseDown(NSEvent *);
     void mouseDragged(NSEvent *);
@@ -279,7 +279,7 @@ public:
 #else
     static WebEvent *currentEvent();
 #endif // !PLATFORM(IOS)
-#endif // PLATFORM(MAC) && defined(__OBJC__)
+#endif // PLATFORM(COCOA) && defined(__OBJC__)
 
 #if PLATFORM(IOS)
     void invalidateClick();
@@ -413,7 +413,7 @@ private:
 
     bool capturesDragging() const { return m_capturesDragging; }
 
-#if PLATFORM(MAC) && defined(__OBJC__)
+#if PLATFORM(COCOA) && defined(__OBJC__)
     NSView *mouseDownViewIfStillGood();
 
     PlatformMouseEvent currentPlatformMouseEvent() const;
@@ -518,7 +518,7 @@ private:
 
     RefPtr<Element> m_previousWheelScrolledElement;
 
-#if PLATFORM(MAC) || PLATFORM(IOS)
+#if PLATFORM(COCOA)
     NSView *m_mouseDownView;
     bool m_sendingEventToSubview;
 #if !PLATFORM(IOS)
index 584f0fb..4983328 100644 (file)
@@ -1296,7 +1296,7 @@ void FrameView::layout(bool allowSubtree)
     
     m_layoutCount++;
 
-#if PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(EFL)
+#if PLATFORM(COCOA) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(EFL)
     if (AXObjectCache* cache = root->document().existingAXObjectCache())
         cache->postNotification(root, AXObjectCache::AXLayoutComplete);
 #endif
index 06cd7bb..73ae9c9 100644 (file)
@@ -45,7 +45,7 @@
 #include <sys/time.h> // For time_t structure.
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include <wtf/SchedulePair.h>
 #endif
 
@@ -249,7 +249,7 @@ public:
     // NoMatchAfterUserSelection if there is no matching text after the user selection.
     enum { NoMatchAfterUserSelection = -1 };
     void findStringMatchingRanges(const String&, FindOptions, int maxCount, Vector<RefPtr<Range>>*, int& indexForSelection);
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     void addSchedulePair(PassRefPtr<SchedulePair>);
     void removeSchedulePair(PassRefPtr<SchedulePair>);
     SchedulePairHashSet* scheduledRunLoopPairs() { return m_scheduledRunLoopPairs.get(); }
index 2c69c63..b45c251 100644 (file)
@@ -78,7 +78,7 @@ bool Settings::gShouldPaintNativeControls = true;
 bool Settings::gAVFoundationEnabled = false;
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 bool Settings::gQTKitEnabled = true;
 #endif
 
@@ -239,14 +239,14 @@ double Settings::hiddenPageDOMTimerAlignmentInterval()
     return gHiddenPageDOMTimerAlignmentInterval;
 }
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
 bool Settings::shouldEnableScreenFontSubstitutionByDefault()
 {
     return true;
 }
 #endif
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
 void Settings::initializeDefaultFontFamilies()
 {
     // Other platforms can set up fonts from a client, but on Mac, we want it in WebCore to share code between WebKit1 and WebKit2.
@@ -620,7 +620,7 @@ void Settings::setAVFoundationEnabled(bool enabled)
 }
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 void Settings::setQTKitEnabled(bool enabled)
 {
     if (gQTKitEnabled == enabled)
index 2685865..6f3c389 100644 (file)
@@ -240,7 +240,7 @@ public:
     static bool isAVFoundationEnabled() { return gAVFoundationEnabled; }
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     static void setQTKitEnabled(bool flag);
     static bool isQTKitEnabled() { return gQTKitEnabled; }
 #endif
@@ -388,7 +388,7 @@ private:
     static bool gAVFoundationEnabled;
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     static bool gQTKitEnabled;
 #endif
         
index 8beb875..0749c84 100644 (file)
@@ -48,7 +48,7 @@
 
 namespace WebCore {
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
 PassRefPtr<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
 {
 #if USE(COORDINATED_GRAPHICS)
@@ -255,7 +255,7 @@ void ScrollingCoordinator::frameViewRootLayerDidChange(FrameView* frameView)
     updateSynchronousScrollingReasons();
 }
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 void ScrollingCoordinator::handleWheelEventPhase(PlatformWheelEventPhase phase)
 {
     ASSERT(isMainThread());
index 600b73e..2aa633a 100644 (file)
@@ -39,7 +39,7 @@
 #include <wtf/Threading.h>
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include <wtf/RetainPtr.h>
 #endif
 
@@ -135,7 +135,7 @@ public:
     // containers while scrolling.
     virtual bool supportsFixedPositionLayers() const { return false; }
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     // Dispatched by the scrolling tree during handleWheelEvent. This is required as long as scrollbars are painted on the main thread.
     void handleWheelEventPhase(PlatformWheelEventPhase);
 #endif
index ca705f3..4880cae 100644 (file)
 #include <wtf/PassOwnPtr.h>
 #include <wtf/Vector.h>
 
-#if PLATFORM(MAC)
-#include <wtf/RetainPtr.h>
-#endif
-
 namespace WebCore {
 
 class GraphicsLayer;
index 0b8915e..5f7f90e 100644 (file)
@@ -83,7 +83,7 @@ void ScrollingThread::createThreadIfNeeded()
 
         m_threadIdentifier = createThread(threadCallback, this, "WebCore: Scrolling");
         
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
         m_initializeRunLoopConditionVariable.wait(lock, [this]{ return m_threadRunLoop; });
 #endif
     }
index b258753..a2ca5fc 100644 (file)
@@ -35,7 +35,7 @@
 #include <wtf/Threading.h>
 #include <wtf/Vector.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include <wtf/RetainPtr.h>
 #endif
 
@@ -67,7 +67,7 @@ private:
     void initializeRunLoop();
     void wakeUpRunLoop();
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     static void threadRunLoopSourceCallback(void* scrollingThread);
     void threadRunLoopSourceCallback();
 #endif
@@ -80,7 +80,7 @@ private:
     std::mutex m_functionsMutex;
     Vector<std::function<void ()>> m_functions;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     // FIXME: We should use WebCore::RunLoop here.
     RetainPtr<CFRunLoopRef> m_threadRunLoop;
     RetainPtr<CFRunLoopSourceRef> m_threadRunLoopSource;
index bc297f5..5341988 100644 (file)
@@ -104,8 +104,10 @@ namespace WebCore {
 
         void updateFromDelegatePreservingOldHTTPBody(const ResourceRequest&);
 
-#if PLATFORM(COCOA)
+#if PLATFORM(MAC) && !PLATFORM(IOS)
         void applyWebArchiveHackForMail();
+#endif
+#if PLATFORM(COCOA)
         NSURLRequest *nsURLRequest(HTTPBodyUpdatePolicy) const;
 #endif
 
index 1ba0324..4aaa22d 100644 (file)
@@ -337,13 +337,11 @@ void ResourceRequest::setStorageSession(CFURLStorageSessionRef storageSession)
 #endif
 }
 
-#if PLATFORM(COCOA)
+#if PLATFORM(MAC) && !PLATFORM(IOS)
 void ResourceRequest::applyWebArchiveHackForMail()
 {
-#if !PLATFORM(IOS)
     // Hack because Mail checks for this property to detect data / archive loads
     _CFURLRequestSetProtocolProperty(cfURLRequest(DoNotUpdateHTTPBody), CFSTR("WebDataRequest"), CFSTR(""));
-#endif
 }
 #endif
 
index 901fc22..1a8712a 100644 (file)
@@ -250,13 +250,13 @@ void ResourceRequest::updateFromDelegatePreservingOldHTTPBody(const ResourceRequ
     setHTTPBody(oldHTTPBody.release());
 }
 
+#if !PLATFORM(IOS)
 void ResourceRequest::applyWebArchiveHackForMail()
 {
-#if !PLATFORM(IOS)
     // Hack because Mail checks for this property to detect data / archive loads
     [NSURLProtocol setProperty:@"" forKey:@"WebDataRequest" inRequest:(NSMutableURLRequest *)nsURLRequest(DoNotUpdateHTTPBody)];
-#endif
 }
+#endif
 
 void ResourceRequest::setStorageSession(CFURLStorageSessionRef storageSession)
 {
index 993541e..9dc024e 100644 (file)
@@ -132,7 +132,7 @@ void PluginView::handleFocusOutEvent()
 // ports using PluginView, but until then, if new functions like this are 
 // added, please make sure they have the proper platform #ifs so that changes
 // do not break ports who compile both this file and PluginView.cpp.   
-#if PLATFORM(MAC) || PLATFORM(EFL) || OS(WINCE)
+#if PLATFORM(COCOA) || PLATFORM(EFL) || OS(WINCE)
 #if ENABLE(NETSCAPE_PLUGIN_API)
 void PluginView::keepAlive(NPP)
 {
index b7d4fb3..800cdbf 100644 (file)
@@ -794,7 +794,7 @@ bool RenderBox::logicalScroll(ScrollLogicalDirection direction, ScrollGranularit
     
     RenderLayer* l = layer();
     if (l) {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
         // On Mac only we reset the inline direction position when doing a document scroll (e.g., hitting Home/End).
         if (granularity == ScrollByDocument)
             scrolled = l->scroll(logicalToPhysical(ScrollInlineDirectionBackward, isHorizontalWritingMode(), style().isFlippedBlocksWritingMode()), ScrollByDocument, multiplier);
index 611fc68..0bd5dd5 100644 (file)
@@ -179,7 +179,7 @@ std::unique_ptr<GraphicsLayer> RenderLayerBacking::createGraphicsLayer(const Str
 #endif
     graphicsLayer->setMaintainsPixelAlignment(compositor().keepLayersPixelAligned());
 
-#if PLATFORM(MAC) && USE(CA)
+#if PLATFORM(COCOA) && USE(CA)
     graphicsLayer->setAcceleratesDrawing(compositor().acceleratedDrawingEnabled());
 #endif    
     
@@ -309,7 +309,7 @@ void RenderLayerBacking::createPrimaryGraphicsLayer()
 #endif
     }
 
-#if PLATFORM(MAC) && USE(CA)
+#if PLATFORM(COCOA) && USE(CA)
     if (!compositor().acceleratedDrawingEnabled() && renderer().isCanvas()) {
         const HTMLCanvasElement* canvas = toHTMLCanvasElement(renderer().element());
         if (canvas->shouldAccelerate(canvas->size()))
index 9329a98..efcbb4d 100644 (file)
@@ -29,7 +29,7 @@
 #include "PopupMenuClient.h"
 #include "RenderFlexibleBox.h"
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #define POPUP_MENU_PULLS_DOWN 0
 #else
 #define POPUP_MENU_PULLS_DOWN 1
index 527fb33..9f2e937 100644 (file)
@@ -1352,7 +1352,7 @@ int RenderText::previousOffset(int current) const
     return result;
 }
 
-#if PLATFORM(MAC) || PLATFORM(EFL)
+#if PLATFORM(COCOA) || PLATFORM(EFL)
 
 #define HANGUL_CHOSEONG_START (0x1100)
 #define HANGUL_CHOSEONG_END (0x115F)
@@ -1394,7 +1394,7 @@ inline bool isRegionalIndicator(UChar32 c)
 
 int RenderText::previousOffsetForBackwardDeletion(int current) const
 {
-#if PLATFORM(MAC) || PLATFORM(EFL)
+#if PLATFORM(COCOA) || PLATFORM(EFL)
     ASSERT(m_text);
     StringImpl& text = *m_text.impl();
     UChar32 character;
index 704dffe..f9ebc1c 100644 (file)
 #include <wtf/StdLibExtras.h>
 #include <wtf/unicode/CharacterNames.h>
 
-#if PLATFORM(MAC) && !PLATFORM(IOS)
-#include <CoreServices/CoreServices.h>
-#endif
-
 namespace WebCore {
 
 // Pack 8 bits into one byte
index de7fc74..619f8fe 100644 (file)
@@ -28,7 +28,7 @@
 
 typedef const struct OpaqueJSContext* JSContextRef;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #define TEST_SUPPORT_EXPORT WTF_EXPORT_PRIVATE
 #else
 #define TEST_SUPPORT_EXPORT
index 28a4304..1192bf0 100644 (file)
 #include <libxml/uri.h>
 #include <libxslt/xsltutils.h>
 
-#if PLATFORM(MAC)
+#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)
 #include "SoftLinking.h"
 #endif
 
-#if PLATFORM(MAC)
+#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)
 SOFT_LINK_LIBRARY(libxslt)
 SOFT_LINK(libxslt, xsltIsBlank, int, (xmlChar *str), (str))
 SOFT_LINK(libxslt, xsltGetNsProp, xmlChar *, (xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace), (node, name, nameSpace))
index 069ddd8..719b959 100644 (file)
 #include <libxslt/extensions.h>
 #include <libxslt/extra.h>
 
-#if PLATFORM(MAC)
+#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)
 #include "SoftLinking.h"
 #endif
 
-#if PLATFORM(MAC)
+#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)
 SOFT_LINK_LIBRARY(libxslt)
 SOFT_LINK(libxslt, xsltRegisterExtFunction, int, (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *URI, xmlXPathFunction function), (ctxt, name, URI, function))
 SOFT_LINK(libxslt, xsltFunctionNodeSet, void, (xmlXPathParserContextPtr ctxt, int nargs), (ctxt, nargs))
index 1c0d7c7..ac25f39 100644 (file)
@@ -49,7 +49,7 @@
 #include <wtf/text/StringBuffer.h>
 #include <wtf/unicode/UTF8.h>
 
-#if PLATFORM(MAC)
+#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)
 #include "SoftLinking.h"
 
 SOFT_LINK_LIBRARY(libxslt);
index a853734..6101ee5 100644 (file)
 #include <wtf/text/WTFString.h>
 #include <wtf/unicode/Collator.h>
 
-#if PLATFORM(MAC)
+#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)
 #include "SoftLinking.h"
 #endif
 
-#if PLATFORM(MAC)
+#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)
 
 SOFT_LINK_LIBRARY(libxslt)
 SOFT_LINK(libxslt, xsltComputeSortResult, xmlXPathObjectPtr*, (xsltTransformContextPtr ctxt, xmlNodePtr sort), (ctxt, sort))