Changeset 163725 in webkit


Ignore:
Timestamp:
Feb 8, 2014 2:26:50 PM (10 years ago)
Author:
mitz@apple.com
Message:

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.
Location:
trunk/Source/WebCore
Files:
71 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r163724 r163725  
     12014-02-08  Dan Bernstein  <mitz@apple.com>
     2
     3        Stop using PLATFORM(MAC) in WebCore except where it means “OS X but not iOS”
     4        https://bugs.webkit.org/show_bug.cgi?id=128464
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * Modules/webaudio/AudioContext.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
     9        (WebCore::AudioContext::constructCommon):
     10        * accessibility/AccessibilityNodeObject.cpp: Ditto.
     11        (WebCore::AccessibilityNodeObject::visibleText):
     12        * accessibility/AccessibilityObject.h: Ditto.
     13        * accessibility/AccessibilityRenderObject.cpp: Ditto.
     14        (WebCore::AccessibilityRenderObject::clickPoint):
     15        (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
     16        (WebCore::AccessibilityRenderObject::addChildren):
     17        * accessibility/AccessibilityRenderObject.h: Ditto.
     18        * bindings/js/JSInspectorFrontendHostCustom.cpp:
     19        (WebCore::JSInspectorFrontendHost::platform): Made it explicit that this function returns
     20        "mac" when built for iOS.
     21        * bindings/js/ScriptController.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
     22        (WebCore::ScriptController::ScriptController):
     23        * bindings/js/ScriptController.h: Ditto.
     24        * crypto/CryptoKey.cpp: Changed PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) &&
     25        !PLATFORM(GTK) when checking for whether to use CoreCrypto.
     26        * crypto/keys/CryptoKeyRSA.h: Ditto.
     27        * dom/Clipboard.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
     28        * dom/Document.cpp: Ditto.
     29        (WebCore::Document::implicitClose):
     30        * dom/KeyboardEvent.h: Ditto.
     31        * editing/Editor.cpp: Ditto.
     32        (WebCore::Editor::cut):
     33        (WebCore::Editor::copy):
     34        (WebCore::Editor::copyImage):
     35        * editing/Editor.h: Ditto.
     36        * editing/FrameSelection.h: Ditto.
     37        * editing/TypingCommand.cpp: Ditto.
     38        (WebCore::TypingCommand::typingAddedToOpenCommand):
     39        * history/HistoryItem.h: Ditto.
     40        * html/HTMLMediaElement.cpp: Ditto.
     41        (WebCore::HTMLMediaElement::parseAttribute):
     42        * html/HTMLMediaElement.h: Ditto.
     43        * html/HTMLPlugInElement.cpp: Ditto.
     44        (WebCore::registeredPluginReplacements):
     45        * html/HTMLPlugInImageElement.cpp: Ditto.
     46        (WebCore::HTMLPlugInImageElement::setDisplayState):
     47        * html/HTMLSelectElement.cpp: Ditto.
     48        (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
     49        * html/shadow/MediaControlElements.cpp: Ditto.
     50        (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
     51        (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
     52        * html/shadow/MediaControlElements.h: Ditto.
     53        * inspector/InspectorIndexedDBAgent.cpp: Ditto.
     54        * loader/CookieJar.cpp: Ditto.
     55        * loader/DocumentLoader.cpp: Ditto.
     56        (WebCore::DocumentLoader::dataReceived):
     57        * loader/DocumentLoader.h: Ditto.
     58        (WebCore::DocumentLoader::didTellClientAboutLoad):
     59        * loader/EmptyClients.h: Ditto.
     60        * loader/FrameLoader.cpp:
     61        (WebCore::FrameLoader::loadArchive): Added !PLATFORM(IOS) around Mac-only workaround.
     62        (WebCore::FrameLoader::defaultObjectContentType): Changed PLATFORM(MAC) to PLATFORM(COCOA).
     63        (WebCore::FrameLoader::subresourceCachePolicy): Ditto.
     64        * loader/ResourceBuffer.h: Changed PLATFORM(MAC) to USE(FOUNDATION) around functions that
     65        are implemented using Foundation.
     66        * loader/ResourceLoadScheduler.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
     67        (WebCore::ResourceLoadScheduler::scheduleLoad):
     68        * loader/ResourceLoader.cpp: Ditto.
     69        (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
     70        * loader/ResourceLoader.h: Ditto.
     71        * loader/archive/cf/LegacyWebArchive.cpp: Ditto.
     72        * loader/cache/CachedResource.cpp: Changed PLATFORM(MAC) to USE(FOUNDATION) around function
     73        that is implemented using other USE(FOUNDATION)-guarded code.
     74        * loader/cache/CachedResource.h: Ditto.
     75        * page/Chrome.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
     76        * page/ChromeClient.h: Ditto.
     77        * page/ContextMenuClient.h: Ditto.
     78        * page/ContextMenuController.cpp: Ditto.
     79        (WebCore::ContextMenuController::contextMenuItemSelected):
     80        (WebCore::ContextMenuController::createAndAppendFontSubMenu):
     81        (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu):
     82        (WebCore::ContextMenuController::populate):
     83        (WebCore::ContextMenuController::checkOrEnableIfNeeded):
     84        * page/DragClient.h: Ditto.
     85        * page/DragController.cpp: Ditto.
     86        (WebCore::dragLocForDHTMLDrag):
     87        (WebCore::dragLocForSelectionDrag):
     88        (WebCore::DragController::startDrag):
     89        (WebCore::DragController::doImageDrag):
     90        * page/EditorClient.h: Ditto.
     91        * page/EventHandler.cpp: Ditto.
     92        (WebCore::EventHandler::EventHandler):
     93        (WebCore::EventHandler::handleMouseDraggedEvent):
     94        (WebCore::EventHandler::logicalScrollRecursively):
     95        (WebCore::EventHandler::clearDragState):
     96        (WebCore::EventHandler::handleWheelEvent):
     97        (WebCore::EventHandler::defaultWheelEventHandler):
     98        (WebCore::EventHandler::keyEvent):
     99        (WebCore::EventHandler::eventInvertsTabsToLinksClientCallResult):
     100        * page/EventHandler.h: Ditto.
     101        * page/FrameView.cpp: Ditto.
     102        (WebCore::FrameView::layout):
     103        * page/Page.h: Ditto.
     104        * page/Settings.cpp: Ditto.
     105        * page/Settings.h: Ditto.
     106        * page/scrolling/ScrollingCoordinator.cpp: Ditto.
     107        * page/scrolling/ScrollingCoordinator.h: Ditto.
     108        * page/scrolling/ScrollingStateNode.h: Removed unused #include.
     109        * page/scrolling/ScrollingThread.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
     110        (WebCore::ScrollingThread::createThreadIfNeeded):
     111        * page/scrolling/ScrollingThread.h: Ditto.
     112        * platform/network/cf/ResourceRequest.h: Added !PLATFORM(IOS) around
     113        applyWebArchiveHackForMail.
     114        * platform/network/cf/ResourceRequestCFNet.cpp:
     115        (WebCore::ResourceRequest::applyWebArchiveHackForMail): Ditto.
     116        * platform/network/mac/ResourceRequestMac.mm:
     117        (WebCore::ResourceRequest::applyWebArchiveHackForMail): Ditto.
     118        * plugins/PluginViewNone.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA)
     119        * rendering/RenderBox.cpp: Ditto.
     120        (WebCore::RenderBox::logicalScroll):
     121        * rendering/RenderLayerBacking.cpp: Ditto.
     122        (WebCore::RenderLayerBacking::createGraphicsLayer):
     123        (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
     124        * rendering/RenderMenuList.h: Ditto.
     125        * rendering/RenderText.cpp: Ditto.
     126        (WebCore::RenderText::previousOffsetForBackwardDeletion):
     127        * rendering/break_lines.cpp: Removed unused #include.
     128        * testing/js/WebCoreTestSupport.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
     129        * xml/XSLStyleSheetLibxslt.cpp: Changed PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) &&
     130        !PLATFORM(GTK) around soft-linking libxslt.
     131        * xml/XSLTExtensions.cpp: Ditto.
     132        * xml/XSLTProcessorLibxslt.cpp: Ditto.
     133        * xml/XSLTUnicodeSort.cpp: Ditto.
     134
    11352014-02-08  Andreas Kling  <akling@apple.com>
    2136
  • trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp

    r163568 r163725  
    197197#endif
    198198
    199 #if PLATFORM(MAC)
     199#if PLATFORM(COCOA)
    200200    addBehaviorRestriction(RequirePageConsentForAudioStartRestriction);
    201201#endif
  • trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp

    r163712 r163725  
    13511351    case ListBoxOptionRole:
    13521352    // MacOS does not expect native <li> elements to expose label information, it only expects leaf node elements to do that.
    1353 #if !PLATFORM(MAC)
     1353#if !PLATFORM(COCOA)
    13541354    case ListItemRole:
    13551355#endif
  • trunk/Source/WebCore/accessibility/AccessibilityObject.h

    r163632 r163725  
    4141#include <wtf/Vector.h>
    4242
    43 #if PLATFORM(MAC)
     43#if PLATFORM(COCOA)
    4444#include <wtf/RetainPtr.h>
    4545#elif PLATFORM(WIN)
     
    4848#endif
    4949
    50 #if PLATFORM(MAC)
     50#if PLATFORM(COCOA)
    5151
    5252typedef struct _NSRange NSRange;
     
    733733    virtual void setNeedsToUpdateChildren() { }
    734734    virtual void clearChildren();
    735 #if PLATFORM(MAC)
     735#if PLATFORM(COCOA)
    736736    virtual void detachFromParent();
    737737#else
     
    912912#endif
    913913   
    914 #if PLATFORM(MAC)
     914#if PLATFORM(COCOA)
    915915    void overrideAttachmentParent(AccessibilityObject* parent);
    916916#else
     
    964964#endif
    965965
    966 #if PLATFORM(MAC)
     966#if PLATFORM(COCOA)
    967967    RetainPtr<WebAccessibilityObjectWrapper> m_wrapper;
    968968#elif PLATFORM(WIN)
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r163586 r163725  
    911911    VisiblePositionRange range = VisiblePositionRange(visSelection.visibleStart(), visSelection.visibleEnd());
    912912    IntRect bounds = boundsForVisiblePositionRange(range);
    913 #if PLATFORM(MAC)
     913#if PLATFORM(COCOA)
    914914    bounds.setLocation(m_renderer->view().frameView().screenToContents(bounds.location()));
    915915#endif       
     
    19951995        return VisiblePosition();
    19961996
    1997 #if PLATFORM(MAC)
     1997#if PLATFORM(COCOA)
    19981998    FrameView* frameView = &renderView->frameView();
    19991999#endif
     
    20342034        Frame& frame = toFrameView(widget)->frame();
    20352035        renderView = frame.document()->renderView();
    2036 #if PLATFORM(MAC)
     2036#if PLATFORM(COCOA)
    20372037        frameView = toFrameView(widget);
    20382038#endif
     
    29142914}
    29152915
    2916 #if PLATFORM(MAC)
     2916#if PLATFORM(COCOA)
    29172917void AccessibilityRenderObject::updateAttachmentViewParents()
    29182918{
     
    30033003    addRemoteSVGChildren();
    30043004   
    3005 #if PLATFORM(MAC)
     3005#if PLATFORM(COCOA)
    30063006    updateAttachmentViewParents();
    30073007#endif
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h

    r163296 r163725  
    265265    void addAttachmentChildren();
    266266    void addRemoteSVGChildren();
    267 #if PLATFORM(MAC)
     267#if PLATFORM(COCOA)
    268268    void updateAttachmentViewParents();
    269269#endif
  • trunk/Source/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp

    r157215 r163725  
    5454JSValue JSInspectorFrontendHost::platform(ExecState* execState)
    5555{
    56 #if PLATFORM(MAC)
     56#if PLATFORM(MAC) || PLATFORM(IOS)
    5757    DEFINE_STATIC_LOCAL(const String, platform, (ASCIILiteral("mac")));
    5858#elif OS(WINDOWS)
  • trunk/Source/WebCore/bindings/js/ScriptController.cpp

    r163568 r163725  
    7575    , m_windowScriptNPObject(0)
    7676#endif
    77 #if PLATFORM(MAC)
     77#if PLATFORM(COCOA)
    7878    , m_windowScriptObject(0)
    7979#endif
     
    380380#endif
    381381
    382 #if !PLATFORM(MAC)
     382#if !PLATFORM(COCOA)
    383383PassRefPtr<JSC::Bindings::Instance> ScriptController::createScriptInstanceForWidget(Widget* widget)
    384384{
     
    407407}
    408408
    409 #if !PLATFORM(MAC)
     409#if !PLATFORM(COCOA)
    410410
    411411void ScriptController::updatePlatformScriptObjects()
  • trunk/Source/WebCore/bindings/js/ScriptController.h

    r163135 r163725  
    3131#include <wtf/text/TextPosition.h>
    3232
    33 #if PLATFORM(MAC)
     33#if PLATFORM(COCOA)
    3434#include <wtf/RetainPtr.h>
    3535OBJC_CLASS WebScriptObject;
     
    152152#endif
    153153
    154 #if PLATFORM(MAC)
     154#if PLATFORM(COCOA)
    155155    WebScriptObject* windowScriptObject();
    156156    JSContext *javaScriptContext();
     
    188188    NPObject* m_windowScriptNPObject;
    189189#endif
    190 #if PLATFORM(MAC)
     190#if PLATFORM(COCOA)
    191191    RetainPtr<WebScriptObject> m_windowScriptObject;
    192192#endif
  • trunk/Source/WebCore/crypto/CryptoKey.cpp

    r160547 r163725  
    9090}
    9191
    92 #if !PLATFORM(MAC)
     92#if !OS(DARWIN) || PLATFORM(EFL) || PLATFORM(GTK)
    9393Vector<uint8_t> CryptoKey::randomData(size_t size)
    9494{
  • trunk/Source/WebCore/crypto/keys/CryptoKeyRSA.h

    r162158 r163725  
    3232#if ENABLE(SUBTLE_CRYPTO)
    3333
    34 #if PLATFORM(MAC) || PLATFORM(IOS)
     34#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)
    3535typedef struct _CCRSACryptor *CCRSACryptorRef;
    3636typedef CCRSACryptorRef PlatformRSAKey;
  • trunk/Source/WebCore/dom/Clipboard.cpp

    r162158 r163725  
    267267}
    268268
    269 #if !PLATFORM(MAC)
     269#if !PLATFORM(COCOA)
    270270
    271271DragImageRef Clipboard::createDragImage(IntPoint& location) const
  • trunk/Source/WebCore/dom/Document.cpp

    r163568 r163725  
    24252425    m_processingLoadEvent = false;
    24262426
    2427 #if PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(EFL)
     2427#if PLATFORM(COCOA) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(EFL)
    24282428    if (f && hasLivingRenderTree() && AXObjectCache::accessibilityEnabled()) {
    24292429        // The AX cache may have been cleared at this point, but we need to make sure it contains an
  • trunk/Source/WebCore/dom/KeyboardEvent.h

    r162139 r163725  
    3333class PlatformKeyboardEvent;
    3434
    35 #if PLATFORM(MAC)
     35#if PLATFORM(COCOA)
    3636struct KeypressCommand {
    3737    KeypressCommand() { }
     
    104104    virtual int which() const override;
    105105
    106 #if PLATFORM(MAC)
     106#if PLATFORM(COCOA)
    107107    // We only have this need to store keypress command info on the Mac.
    108108    Vector<KeypressCommand>& keypressCommands() { return m_keypressCommands; }
     
    119119    bool m_altGraphKey : 1;
    120120
    121 #if PLATFORM(MAC)
     121#if PLATFORM(COCOA)
    122122    // Commands that were sent by AppKit when interpreting the event. Doesn't include input method commands.
    123123    Vector<KeypressCommand> m_keypressCommands;
  • trunk/Source/WebCore/editing/Editor.cpp

    r163721 r163725  
    12851285            Pasteboard::createForCopyAndPaste()->writePlainText(selectedTextForClipboard(), canSmartCopyOrDelete() ? Pasteboard::CanSmartReplace : Pasteboard::CannotSmartReplace);
    12861286        else {
    1287 #if PLATFORM(MAC) || PLATFORM(EFL)
     1287#if PLATFORM(COCOA) || PLATFORM(EFL)
    12881288            writeSelectionToPasteboard(*Pasteboard::createForCopyAndPaste());
    12891289#else
     
    13121312    } else {
    13131313        if (HTMLImageElement* imageElement = imageElementFromImageDocument(document())) {
    1314 #if PLATFORM(MAC) || PLATFORM(EFL)
     1314#if PLATFORM(COCOA) || PLATFORM(EFL)
    13151315            writeImageToPasteboard(*Pasteboard::createForCopyAndPaste(), *imageElement, document().url(), document().title());
    13161316#else
     
    13181318#endif
    13191319        } else {
    1320 #if PLATFORM(MAC) || PLATFORM(EFL)
     1320#if PLATFORM(COCOA) || PLATFORM(EFL)
    13211321            writeSelectionToPasteboard(*Pasteboard::createForCopyAndPaste());
    13221322#else
     
    14221422        url = result.absoluteImageURL();
    14231423
    1424 #if PLATFORM(MAC) || PLATFORM(EFL)
     1424#if PLATFORM(COCOA) || PLATFORM(EFL)
    14251425    writeImageToPasteboard(*Pasteboard::createForCopyAndPaste(), *element, url, result.altDisplayString());
    14261426#else
  • trunk/Source/WebCore/editing/Editor.h

    r162997 r163725  
    4242#include "WritingDirection.h"
    4343
    44 #if PLATFORM(MAC)
     44#if PLATFORM(COCOA)
    4545OBJC_CLASS NSAttributedString;
    4646OBJC_CLASS NSDictionary;
     
    420420#endif
    421421
    422 #if PLATFORM(MAC)
     422#if PLATFORM(COCOA)
    423423    bool insertParagraphSeparatorInQuotedContent();
    424424    const SimpleFontData* fontForSelection(bool&) const;
     
    435435#endif
    436436
    437 #if PLATFORM(MAC) || PLATFORM(EFL)
     437#if PLATFORM(COCOA) || PLATFORM(EFL)
    438438    void writeSelectionToPasteboard(Pasteboard&);
    439439    void writeImageToPasteboard(Pasteboard&, Element& imageElement, const URL&, const String& title);
     
    470470    bool unifiedTextCheckerEnabled() const;
    471471
    472 #if PLATFORM(MAC)
     472#if PLATFORM(COCOA)
    473473    PassRefPtr<SharedBuffer> selectionInWebArchiveFormat();
    474474    PassRefPtr<Range> adjustedSelectionRange();
  • trunk/Source/WebCore/editing/FrameSelection.h

    r163721 r163725  
    367367}
    368368
    369 #if !(PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL))
     369#if !(PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(EFL))
    370370#if HAVE(ACCESSIBILITY)
    371371inline void FrameSelection::notifyAccessibilityForSelectionChange()
  • trunk/Source/WebCore/editing/TypingCommand.cpp

    r162784 r163725  
    346346    updatePreservesTypingStyle(commandTypeForAddedTyping);
    347347
    348 #if PLATFORM(MAC)
     348#if PLATFORM(COCOA)
    349349    frame.editor().appliedEditing(this);
    350350    // Since the spellchecking code may also perform corrections and other replacements, it should happen after the typing changes.
  • trunk/Source/WebCore/history/HistoryItem.h

    r162808 r163725  
    3838#endif
    3939
    40 #if PLATFORM(MAC)
     40#if PLATFORM(COCOA)
    4141#import <wtf/RetainPtr.h>
    4242typedef struct objc_object* id;
     
    165165    bool isCurrentDocument(Document*) const;
    166166   
    167 #if PLATFORM(MAC)
     167#if PLATFORM(COCOA)
    168168    id viewState() const;
    169169    void setViewState(id);
     
    264264#endif
    265265
    266 #if PLATFORM(MAC)
     266#if PLATFORM(COCOA)
    267267    RetainPtr<id> m_viewState;
    268268    std::unique_ptr<HashMap<String, RetainPtr<id>>> m_transientProperties;
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r163649 r163725  
    112112#endif
    113113
    114 #if PLATFORM(MAC)
     114#if PLATFORM(COCOA)
    115115#include "DisplaySleepDisabler.h"
    116116#endif
     
    54775477void HTMLMediaElement::updateSleepDisabling()
    54785478{
    5479 #if PLATFORM(MAC)
     5479#if PLATFORM(COCOA)
    54805480    if (!shouldDisableSleep() && m_sleepDisabler)
    54815481        m_sleepDisabler = nullptr;
     
    54855485}
    54865486
    5487 #if PLATFORM(MAC)
     5487#if PLATFORM(COCOA)
    54885488bool HTMLMediaElement::shouldDisableSleep() const
    54895489{
  • trunk/Source/WebCore/html/HTMLMediaElement.h

    r163649 r163725  
    7676class Widget;
    7777#endif
    78 #if PLATFORM(MAC)
     78#if PLATFORM(COCOA)
    7979class DisplaySleepDisabler;
    8080#endif
     
    660660
    661661    void updateSleepDisabling();
    662 #if PLATFORM(MAC)
     662#if PLATFORM(COCOA)
    663663    bool shouldDisableSleep() const;
    664664#endif
     
    812812    RefPtr<MediaController> m_mediaController;
    813813
    814 #if PLATFORM(MAC)
     814#if PLATFORM(COCOA)
    815815    OwnPtr<DisplaySleepDisabler> m_sleepDisabler;
    816816#endif
  • trunk/Source/WebCore/html/HTMLPlugInElement.cpp

    r161768 r163725  
    5656#endif
    5757
    58 #if PLATFORM(MAC)
     58#if PLATFORM(COCOA)
    5959#include "QuickTimePluginReplacement.h"
    6060#endif
     
    314314}
    315315
    316 #if PLATFORM(MAC)
     316#if PLATFORM(COCOA)
    317317static void registrar(const ReplacementPlugin&);
    318318#endif
     
    327327    enginesQueried = true;
    328328
    329 #if PLATFORM(MAC)
     329#if PLATFORM(COCOA)
    330330    QuickTimePluginReplacement::registerPluginReplacement(registrar);
    331331#endif
     
    334334}
    335335
    336 #if PLATFORM(MAC)
     336#if PLATFORM(COCOA)
    337337static void registrar(const ReplacementPlugin& replacement)
    338338{
  • trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp

    r163457 r163725  
    134134void HTMLPlugInImageElement::setDisplayState(DisplayState state)
    135135{
    136 #if PLATFORM(MAC)
     136#if PLATFORM(COCOA)
    137137    if (state == RestartingWithPendingMouseClick || state == Restarting) {
    138138        m_isRestartedPlugin = true;
  • trunk/Source/WebCore/html/HTMLSelectElement.cpp

    r163724 r163725  
    13521352        if (listIndex >= 0) {
    13531353            if (!isDisabledFormControl()) {
    1354 #if PLATFORM(MAC)
     1354#if PLATFORM(COCOA)
    13551355                updateSelectedState(listIndex, mouseEvent->metaKey(), mouseEvent->shiftKey());
    13561356#else
     
    14571457            setActiveSelectionEndIndex(endIndex);
    14581458
    1459 #if PLATFORM(MAC)
     1459#if PLATFORM(COCOA)
    14601460            m_allowsNonContiguousSelection = m_multiple && isSpatialNavigationEnabled(document().frame());
    14611461#else
  • trunk/Source/WebCore/html/shadow/MediaControlElements.cpp

    r163649 r163725  
    674674MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement(Document& document, MediaControls* controls)
    675675    : MediaControlInputElement(document, MediaShowClosedCaptionsButton)
    676 #if PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK)
     676#if PLATFORM(COCOA) || PLATFORM(WIN) || PLATFORM(GTK)
    677677    , m_controls(controls)
    678678#endif
    679679{
    680 #if !PLATFORM(MAC) && !PLATFORM(WIN) || !PLATFORM(GTK)
     680#if !PLATFORM(COCOA) && !PLATFORM(WIN) || !PLATFORM(GTK)
    681681    UNUSED_PARAM(controls);
    682682#endif
     
    708708        // we have to use #if.
    709709        // https://bugs.webkit.org/show_bug.cgi?id=101877
    710 #if !PLATFORM(MAC) && !PLATFORM(WIN) && !PLATFORM(GTK)
     710#if !PLATFORM(COCOA) && !PLATFORM(WIN) && !PLATFORM(GTK)
    711711        mediaController()->setClosedCaptionsVisible(!mediaController()->closedCaptionsVisible());
    712712        setChecked(mediaController()->closedCaptionsVisible());
  • trunk/Source/WebCore/html/shadow/MediaControlElements.h

    r162158 r163725  
    296296    virtual void defaultEventHandler(Event*) override;
    297297
    298 #if PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK)
     298#if PLATFORM(COCOA) || PLATFORM(WIN) || PLATFORM(GTK)
    299299    MediaControls* m_controls;
    300300#endif
  • trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp

    r162676 r163725  
    239239}
    240240
    241 #if !PLATFORM(MAC)
     241#if !PLATFORM(COCOA)
    242242static PassRefPtr<KeyPath> keyPathFromIDBKeyPath(const IDBKeyPath& idbKeyPath)
    243243{
     
    266266    return keyPath.release();
    267267}
    268 #endif // !PLATFORM(MAC)
     268#endif // !PLATFORM(COCOA)
    269269
    270270class DatabaseLoader : public ExecutableWithDatabase {
     
    279279    virtual void execute(PassRefPtr<IDBDatabase> prpDatabase) override
    280280    {
    281 #if PLATFORM(MAC)
     281#if PLATFORM(COCOA)
    282282        ASSERT_UNUSED(prpDatabase, prpDatabase);
    283283#else
     
    320320
    321321        m_requestCallback->sendSuccess(result);
    322 #endif // PLATFORM(MAC)
     322#endif // PLATFORM(COCOA)
    323323    }
    324324
  • trunk/Source/WebCore/loader/CookieJar.cpp

    r156550 r163725  
    4949}
    5050
    51 #if PLATFORM(MAC) || USE(CFNETWORK) || USE(SOUP)
     51#if PLATFORM(COCOA) || USE(CFNETWORK) || USE(SOUP)
    5252inline NetworkStorageSession& storageSession(const Document* document)
    5353{
  • trunk/Source/WebCore/loader/DocumentLoader.cpp

    r163568 r163725  
    851851    ASSERT(!m_response.isNull());
    852852
    853 #if USE(CFNETWORK) || PLATFORM(MAC)
     853#if USE(CFNETWORK) || PLATFORM(COCOA)
    854854    // Workaround for <rdar://problem/6060782>
    855855    if (m_response.isNull())
  • trunk/Source/WebCore/loader/DocumentLoader.h

    r162139 r163725  
    145145        const String& overrideEncoding() const { return m_overrideEncoding; }
    146146
    147 #if PLATFORM(MAC)
     147#if PLATFORM(COCOA)
    148148        void schedule(WTF::SchedulePair*);
    149149        void unschedule(WTF::SchedulePair*);
     
    239239        void didTellClientAboutLoad(const String& url)
    240240        {
    241 #if !PLATFORM(MAC)
     241#if !PLATFORM(COCOA)
    242242            // Don't include data urls here, as if a lot of data is loaded
    243243            // that way, we hold on to the (large) url string for too long.
  • trunk/Source/WebCore/loader/EmptyClients.h

    r163724 r163725  
    383383    virtual void registerForIconNotification(bool) override { }
    384384
    385 #if PLATFORM(MAC)
     385#if PLATFORM(COCOA)
    386386    virtual RemoteAXObjectRef accessibilityRemoteObject() override { return 0; }
    387387    virtual NSCachedURLResponse* willCacheResponse(DocumentLoader*, unsigned long, NSCachedURLResponse* response) const override { return response; }
     
    485485#endif
    486486
    487 #if PLATFORM(MAC)
     487#if PLATFORM(COCOA)
    488488    virtual NSString* userVisibleString(NSURL*) override { return 0; }
    489489    virtual DocumentFragment* documentFragmentFromAttributedString(NSAttributedString*, Vector<RefPtr<ArchiveResource>>&) override { return 0; };
     
    558558    virtual void stopSpeaking() override { }
    559559
    560 #if PLATFORM(MAC)
     560#if PLATFORM(COCOA)
    561561    virtual void searchWithSpotlight() override { }
    562562#endif
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r163568 r163725  
    925925   
    926926    ResourceRequest request(mainResource->url());
    927 #if PLATFORM(MAC)
     927#if PLATFORM(MAC) && !PLATFORM(IOS)
    928928    request.applyWebArchiveHackForMail();
    929929#endif
     
    942942        mimeType = mimeTypeFromURL(url);
    943943
    944 #if !PLATFORM(MAC) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does EFL
     944#if !PLATFORM(COCOA) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does EFL
    945945    if (mimeType.isEmpty()) {
    946946        String decodedPath = decodeURLEscapeSequences(url.path());
     
    952952        return ObjectContentFrame; // Go ahead and hope that we can display the content.
    953953
    954 #if !PLATFORM(MAC) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does EFL
     954#if !PLATFORM(COCOA) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does EFL
    955955    bool plugInSupportsMIMEType = PluginDatabase::installedPlugins()->isMIMETypeRegistered(mimeType);
    956956#else
     
    21582158
    21592159    const ResourceRequest& request(documentLoader()->request());
    2160 #if PLATFORM(MAC)
     2160#if PLATFORM(COCOA)
    21612161    if (request.cachePolicy() == ReloadIgnoringCacheData && !equalIgnoringCase(request.httpMethod(), "post") && ResourceRequest::useQuickLookResourceCachingQuirks())
    21622162        return CachePolicyRevalidate;
  • trunk/Source/WebCore/loader/ResourceBuffer.h

    r161338 r163725  
    3333#include <wtf/RefCounted.h>
    3434
    35 #if PLATFORM(MAC)
     35#if USE(FOUNDATION)
    3636OBJC_CLASS NSData;
    3737#endif
     
    6565   
    6666    SharedBuffer* sharedBuffer() const;
    67 #if PLATFORM(MAC)
     67#if USE(FOUNDATION)
    6868    void tryReplaceSharedBufferContents(SharedBuffer*);
    6969#endif
     
    8181    PassOwnPtr<PurgeableBuffer> releasePurgeableBuffer();
    8282
    83 #if PLATFORM(MAC)
     83#if USE(FOUNDATION)
    8484    SharedBuffer::NSDataRetainPtrWithoutImplicitConversionOperator createNSData();
    8585#endif
  • trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp

    r161796 r163725  
    163163    host->schedule(resourceLoader, priority);
    164164
    165 #if PLATFORM(MAC) || USE(CFNETWORK)
     165#if PLATFORM(COCOA) || USE(CFNETWORK)
    166166    if (!isSuspendingPendingRequests()) {
    167167        // Serve all requests at once to keep the pipeline full at the network layer.
  • trunk/Source/WebCore/loader/ResourceLoader.cpp

    r161338 r163725  
    560560    // Only these platforms provide a way to continue without credentials.
    561561    // If we can't continue with credentials, we need to cancel the load altogether.
    562 #if PLATFORM(MAC) || USE(CFNETWORK) || USE(CURL) || PLATFORM(GTK) || PLATFORM(EFL)
     562#if PLATFORM(COCOA) || USE(CFNETWORK) || USE(CURL) || PLATFORM(GTK) || PLATFORM(EFL)
    563563    challenge.authenticationClient()->receivedRequestToContinueWithoutCredential(challenge);
    564564    ASSERT(!handle() || !handle()->hasAuthenticationChallenge());
  • trunk/Source/WebCore/loader/ResourceLoader.h

    r162139 r163725  
    121121    virtual void wasBlocked(ResourceHandle*) override;
    122122    virtual void cannotShowURL(ResourceHandle*) override;
    123 #if PLATFORM(MAC) && !USE(CFNETWORK)
     123#if PLATFORM(COCOA) && !USE(CFNETWORK)
    124124    virtual void willStopBufferingData(ResourceHandle*, const char* data, unsigned length) override { willStopBufferingData(data, length); }
    125125#endif
     
    134134#endif
    135135    virtual void receivedCancellation(ResourceHandle*, const AuthenticationChallenge& challenge) override { receivedCancellation(challenge); }
    136 #if PLATFORM(MAC)
     136#if PLATFORM(COCOA)
    137137#if USE(CFNETWORK)
    138138    virtual CFCachedURLResponseRef willCacheResponse(ResourceHandle*, CFCachedURLResponseRef) override;
     
    140140    virtual NSCachedURLResponse* willCacheResponse(ResourceHandle*, NSCachedURLResponse*) override;
    141141#endif
    142 #endif // PLATFORM(MAC)
     142#endif // PLATFORM(COCOA)
    143143#if PLATFORM(WIN) && USE(CFNETWORK)
    144144    // FIXME: Windows should use willCacheResponse - <https://bugs.webkit.org/show_bug.cgi?id=57257>.
  • trunk/Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp

    r161775 r163725  
    407407}
    408408
    409 #if !PLATFORM(MAC)
     409#if !PLATFORM(COCOA)
    410410
    411411ResourceResponse LegacyWebArchive::createResourceResponseFromMacArchivedData(CFDataRef responseData)
  • trunk/Source/WebCore/loader/cache/CachedResource.cpp

    r163440 r163725  
    889889#endif
    890890
    891 #if PLATFORM(MAC)
     891#if USE(FOUNDATION)
    892892void CachedResource::tryReplaceEncodedData(PassRefPtr<SharedBuffer> newBuffer)
    893893{
  • trunk/Source/WebCore/loader/cache/CachedResource.h

    r163440 r163725  
    257257    virtual bool canReuse(const ResourceRequest&) const { return true; }
    258258
    259 #if PLATFORM(MAC)
     259#if USE(FOUNDATION)
    260260    void tryReplaceEncodedData(PassRefPtr<SharedBuffer>);
    261261#endif
  • trunk/Source/WebCore/page/Chrome.h

    r163483 r163725  
    2929#include <wtf/RefPtr.h>
    3030
    31 #if PLATFORM(MAC)
     31#if PLATFORM(COCOA)
    3232#ifndef __OBJC__
    3333class NSView;
     
    168168    bool requiresFullscreenForVideoPlayback();
    169169
    170 #if PLATFORM(MAC)
     170#if PLATFORM(COCOA)
    171171    void focusNSView(NSView*);
    172172#endif
  • trunk/Source/WebCore/page/ChromeClient.h

    r163724 r163725  
    331331#endif
    332332
    333 #if PLATFORM(MAC)
     333#if PLATFORM(COCOA)
    334334    virtual NSResponder *firstResponder() { return 0; }
    335335    virtual void makeFirstResponder(NSResponder *) { }
  • trunk/Source/WebCore/page/ContextMenuClient.h

    r156550 r163725  
    6060        virtual void stopSpeaking() = 0;
    6161
    62 #if PLATFORM(MAC)
     62#if PLATFORM(COCOA)
    6363        virtual void searchWithSpotlight() = 0;
    6464#endif
  • trunk/Source/WebCore/page/ContextMenuController.cpp

    r163310 r163725  
    429429        frame->editor().command("MakeTextWritingDirectionRightToLeft").execute();
    430430        break;
    431 #if PLATFORM(MAC)
     431#if PLATFORM(COCOA)
    432432    case ContextMenuItemTagSearchInSpotlight:
    433433        m_client.searchWithSpotlight();
     
    446446        frame->editor().toggleGrammarChecking();
    447447        break;
    448 #if PLATFORM(MAC)
     448#if PLATFORM(COCOA)
    449449    case ContextMenuItemTagShowFonts:
    450450        frame->editor().showFontPanel();
     
    468468        break;
    469469#endif
    470 #if PLATFORM(MAC)
     470#if PLATFORM(COCOA)
    471471    case ContextMenuItemTagChangeBack:
    472472        frame->editor().changeBackToReplacedString(m_hitTestResult.replacedString());
     
    521521    ContextMenu fontMenu;
    522522
    523 #if PLATFORM(MAC)
     523#if PLATFORM(COCOA)
    524524    ContextMenuItem showFonts(ActionType, ContextMenuItemTagShowFonts, contextMenuItemTagShowFonts());
    525525#endif
     
    528528    ContextMenuItem underline(CheckableActionType, ContextMenuItemTagUnderline, contextMenuItemTagUnderline());
    529529    ContextMenuItem outline(ActionType, ContextMenuItemTagOutline, contextMenuItemTagOutline());
    530 #if PLATFORM(MAC)
     530#if PLATFORM(COCOA)
    531531    ContextMenuItem styles(ActionType, ContextMenuItemTagStyles, contextMenuItemTagStyles());
    532532    ContextMenuItem showColors(ActionType, ContextMenuItemTagShowColors, contextMenuItemTagShowColors());
    533533#endif
    534534
    535 #if PLATFORM(MAC)
     535#if PLATFORM(COCOA)
    536536    appendItem(showFonts, &fontMenu);
    537537#endif
     
    540540    appendItem(underline, &fontMenu);
    541541    appendItem(outline, &fontMenu);
    542 #if PLATFORM(MAC)
     542#if PLATFORM(COCOA)
    543543    appendItem(styles, &fontMenu);
    544544    appendItem(*separatorItem(), &fontMenu);
     
    564564    ContextMenuItem grammarWithSpelling(CheckableActionType, ContextMenuItemTagCheckGrammarWithSpelling,
    565565        contextMenuItemTagCheckGrammarWithSpelling());
    566 #if PLATFORM(MAC)
     566#if PLATFORM(COCOA)
    567567    ContextMenuItem correctSpelling(CheckableActionType, ContextMenuItemTagCorrectSpellingAutomatically,
    568568        contextMenuItemTagCorrectSpellingAutomatically());
     
    571571    appendItem(showSpellingPanel, &spellingAndGrammarMenu);
    572572    appendItem(checkSpelling, &spellingAndGrammarMenu);
    573 #if PLATFORM(MAC)
     573#if PLATFORM(COCOA)
    574574    appendItem(*separatorItem(), &spellingAndGrammarMenu);
    575575#endif
    576576    appendItem(checkAsYouType, &spellingAndGrammarMenu);
    577577    appendItem(grammarWithSpelling, &spellingAndGrammarMenu);
    578 #if PLATFORM(MAC)
     578#if PLATFORM(COCOA)
    579579    appendItem(correctSpelling, &spellingAndGrammarMenu);
    580580#endif
     
    586586
    587587
    588 #if PLATFORM(MAC)
     588#if PLATFORM(COCOA)
    589589
    590590void ContextMenuController::createAndAppendSpeechSubMenu(ContextMenuItem& speechMenuItem)
     
    669669#endif
    670670
    671 #if PLATFORM(MAC)
     671#if PLATFORM(COCOA)
    672672
    673673void ContextMenuController::createAndAppendSubstitutionsSubMenu(ContextMenuItem& substitutionsMenuItem)
     
    723723}
    724724
    725 #if PLATFORM(MAC)
     725#if PLATFORM(COCOA)
    726726#define SUPPORTS_TOGGLE_VIDEO_FULLSCREEN 1
    727727#else
     
    729729#endif
    730730
    731 #if PLATFORM(MAC)
     731#if PLATFORM(COCOA)
    732732#define SUPPORTS_TOGGLE_SHOW_HIDE_MEDIA_CONTROLS 1
    733733#else
     
    774774    ContextMenuItem ToggleVideoFullscreen(ActionType, ContextMenuItemTagToggleVideoFullscreen,
    775775        contextMenuItemTagEnterVideoFullscreen());
    776 #if PLATFORM(MAC)
     776#if PLATFORM(COCOA)
    777777    ContextMenuItem SearchSpotlightItem(ActionType, ContextMenuItemTagSearchInSpotlight,
    778778        contextMenuItemTagSearchInSpotlight());
     
    866866            if (m_hitTestResult.isSelected()) {
    867867                if (selectionContainsPossibleWord(frame)) {
    868 #if PLATFORM(MAC)
     868#if PLATFORM(COCOA)
    869869                    String selectedString = frame->displayStringModifiedByEncoding(frame->editor().selectedText());
    870870                    ContextMenuItem LookUpInDictionaryItem(ActionType, ContextMenuItemTagLookUpInDictionary, contextMenuItemTagLookUpInDictionary(selectedString));
     
    880880
    881881                appendItem(CopyItem, m_contextMenu.get());
    882 #if PLATFORM(MAC)
     882#if PLATFORM(COCOA)
    883883                appendItem(*separatorItem(), m_contextMenu.get());
    884884
     
    957957                    appendItem(*separatorItem(), m_contextMenu.get());
    958958                    haveContextMenuItemsForMisspellingOrGrammer = true;
    959 #if PLATFORM(MAC)
     959#if PLATFORM(COCOA)
    960960                } else {
    961961                    // If the string was autocorrected, generate a contextual menu item allowing it to be changed back.
     
    997997
    998998        if (m_hitTestResult.isSelected() && !inPasswordField && selectionContainsPossibleWord(frame)) {
    999 #if PLATFORM(MAC)
     999#if PLATFORM(COCOA)
    10001000            String selectedString = frame->displayStringModifiedByEncoding(frame->editor().selectedText());
    10011001            ContextMenuItem LookUpInDictionaryItem(ActionType, ContextMenuItemTagLookUpInDictionary, contextMenuItemTagLookUpInDictionary(selectedString));
     
    10291029            appendItem(SpellingAndGrammarMenuItem, m_contextMenu.get());
    10301030#endif
    1031 #if PLATFORM(MAC)
     1031#if PLATFORM(COCOA)
    10321032            ContextMenuItem substitutionsMenuItem(SubmenuType, ContextMenuItemTagSubstitutionsMenu,
    10331033                contextMenuItemTagSubstitutionsMenu());
     
    10501050                appendItem(FontMenuItem, m_contextMenu.get());
    10511051            }
    1052 #if PLATFORM(MAC)
     1052#if PLATFORM(COCOA)
    10531053            ContextMenuItem SpeechMenuItem(SubmenuType, ContextMenuItemTagSpeechMenu, contextMenuItemTagSpeechMenu());
    10541054            createAndAppendSpeechSubMenu(SpeechMenuItem);
     
    12331233            shouldCheck = frame->editor().isContinuousSpellCheckingEnabled();
    12341234            break;
    1235 #if PLATFORM(MAC)
     1235#if PLATFORM(COCOA)
    12361236        case ContextMenuItemTagSubstitutionsMenu:
    12371237        case ContextMenuItemTagTransformationsMenu:
     
    12711271            shouldEnable = m_client.isSpeaking();
    12721272            break;
    1273 #else // PLATFORM(MAC) ends here
     1273#else // PLATFORM(COCOA) ends here
    12741274        case ContextMenuItemTagStopSpeaking:
    12751275            break;
  • trunk/Source/WebCore/page/DragClient.h

    r157058 r163725  
    5252    virtual void dragEnded() { }
    5353
    54 #if PLATFORM(MAC)
     54#if PLATFORM(COCOA)
    5555    // Mac-specific helper function to allow access to web archives and NSPasteboard extras in WebKit.
    56     // This is not abstract as that would require another #if PLATFORM(MAC) for the SVGImage client empty implentation.
     56    // This is not abstract as that would require another #if PLATFORM(COCOA) for the SVGImage client empty implentation.
    5757    virtual void declareAndWriteDragImage(const String&, Element&, const URL&, const String&, Frame*) { }
    5858#endif
  • trunk/Source/WebCore/page/DragController.cpp

    r163232 r163725  
    683683{
    684684    // dragImageOffset is the cursor position relative to the lower-left corner of the image.
    685 #if PLATFORM(MAC)
     685#if PLATFORM(COCOA)
    686686    // We add in the Y dimension because we are a flipped view, so adding moves the image down.
    687687    const int yOffset = dragImageOffset.y();
     
    702702    xpos = draggingRect.x() < xpos ? draggingRect.x() : xpos;
    703703    int ypos = draggingRect.maxY();
    704 #if PLATFORM(MAC)
     704#if PLATFORM(COCOA)
    705705    // Deal with flipped coordinates on Mac
    706706    ypos = draggingRect.y() > ypos ? draggingRect.y() : ypos;
     
    770770                clipboard.pasteboard().writePlainText(src.editor().selectedTextForClipboard(), Pasteboard::CannotSmartReplace);
    771771            else {
    772 #if PLATFORM(MAC) || PLATFORM(EFL)
     772#if PLATFORM(COCOA) || PLATFORM(EFL)
    773773                src.editor().writeSelectionToPasteboard(clipboard.pasteboard());
    774774#else
     
    881881        float dx = scale * (layoutRect.x() - mouseDownPoint.x());
    882882        float originY = layoutRect.y();
    883 #if PLATFORM(MAC)
     883#if PLATFORM(COCOA)
    884884        // Compensate for accursed flipped coordinates in Cocoa.
    885885        originY += layoutRect.height();
  • trunk/Source/WebCore/page/EditorClient.h

    r161106 r163725  
    3636#include <wtf/Vector.h>
    3737
    38 #if PLATFORM(MAC)
     38#if PLATFORM(COCOA)
    3939OBJC_CLASS NSAttributedString;
    4040OBJC_CLASS NSString;
     
    134134#endif
    135135
    136 #if PLATFORM(MAC)
     136#if PLATFORM(COCOA)
    137137    virtual NSString* userVisibleString(NSURL*) = 0;
    138138    virtual DocumentFragment* documentFragmentFromAttributedString(NSAttributedString*, Vector< RefPtr<ArchiveResource>>&) = 0;
  • trunk/Source/WebCore/page/EventHandler.cpp

    r163589 r163725  
    299299#endif
    300300
    301 #if !PLATFORM(MAC)
     301#if !PLATFORM(COCOA)
    302302
    303303inline bool EventHandler::eventLoopHandleMouseUp(const MouseEventWithHitTestResults&)
     
    351351    , m_recentWheelEventDeltaTracker(adoptPtr(new WheelEventDeltaTracker))
    352352    , m_widgetIsLatched(false)
    353 #if PLATFORM(MAC)
     353#if PLATFORM(COCOA)
    354354    , m_mouseDownView(nil)
    355355    , m_sendingEventToSubview(false)
     
    760760    }
    761761
    762 #if PLATFORM(MAC) // FIXME: Why does this assertion fire on other platforms?
     762#if PLATFORM(COCOA) // FIXME: Why does this assertion fire on other platforms?
    763763    ASSERT(m_mouseDownMayStartSelect || m_mouseDownMayStartAutoscroll);
    764764#endif
     
    11561156   
    11571157    bool scrolled = false;
    1158 #if PLATFORM(MAC)
     1158#if PLATFORM(COCOA)
    11591159    // Mac also resets the scroll position in the inline direction.
    11601160    if (granularity == ScrollByDocument && view && view->logicalScroll(ScrollInlineDirectionBackward, ScrollByDocument))
     
    22182218    m_capturingMouseEventsElement = nullptr;
    22192219    m_shouldOnlyFireDragOverEvent = false;
    2220 #if PLATFORM(MAC)
     2220#if PLATFORM(COCOA)
    22212221    m_sendingEventToSubview = false;
    22222222#endif
     
    24932493        event = event.copyTurningVerticalTicksIntoHorizontalTicks();
    24942494
    2495 #if PLATFORM(MAC)
     2495#if PLATFORM(COCOA)
    24962496    switch (event.phase()) {
    24972497    case PlatformWheelEventPhaseBegan:
     
    25442544
    25452545    // Workaround for scrolling issues <rdar://problem/14758615>.
    2546 #if PLATFORM(MAC)
     2546#if PLATFORM(COCOA)
    25472547    if (m_recentWheelEventDeltaTracker->isTrackingDeltas())
    25482548        dominantDirection = m_recentWheelEventDeltaTracker->dominantScrollGestureDirection();
     
    29272927    if (keydownResult)
    29282928        keypress->setDefaultPrevented(true);
    2929 #if PLATFORM(MAC)
     2929#if PLATFORM(COCOA)
    29302930    keypress->keypressCommands() = keydown->keypressCommands();
    29312931#endif
     
    32943294bool EventHandler::eventInvertsTabsToLinksClientCallResult(KeyboardEvent* event)
    32953295{
    3296 #if PLATFORM(MAC) || PLATFORM(EFL)
     3296#if PLATFORM(COCOA) || PLATFORM(EFL)
    32973297    return EventHandler::isKeyboardOptionTab(event);
    32983298#else
  • trunk/Source/WebCore/page/EventHandler.h

    r163440 r163725  
    5353#endif // PLATFORM(IOS)
    5454
    55 #if PLATFORM(MAC) && !defined(__OBJC__)
     55#if PLATFORM(COCOA) && !defined(__OBJC__)
    5656class NSView;
    5757#endif
     
    247247    void sendScrollEvent(); // Ditto
    248248
    249 #if PLATFORM(MAC) && defined(__OBJC__)
     249#if PLATFORM(COCOA) && defined(__OBJC__)
    250250#if !PLATFORM(IOS)
    251251    void mouseDown(NSEvent *);
     
    280280    static WebEvent *currentEvent();
    281281#endif // !PLATFORM(IOS)
    282 #endif // PLATFORM(MAC) && defined(__OBJC__)
     282#endif // PLATFORM(COCOA) && defined(__OBJC__)
    283283
    284284#if PLATFORM(IOS)
     
    414414    bool capturesDragging() const { return m_capturesDragging; }
    415415
    416 #if PLATFORM(MAC) && defined(__OBJC__)
     416#if PLATFORM(COCOA) && defined(__OBJC__)
    417417    NSView *mouseDownViewIfStillGood();
    418418
     
    519519    RefPtr<Element> m_previousWheelScrolledElement;
    520520
    521 #if PLATFORM(MAC) || PLATFORM(IOS)
     521#if PLATFORM(COCOA)
    522522    NSView *m_mouseDownView;
    523523    bool m_sendingEventToSubview;
  • trunk/Source/WebCore/page/FrameView.cpp

    r163675 r163725  
    12971297    m_layoutCount++;
    12981298
    1299 #if PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(EFL)
     1299#if PLATFORM(COCOA) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(EFL)
    13001300    if (AXObjectCache* cache = root->document().existingAXObjectCache())
    13011301        cache->postNotification(root, AXObjectCache::AXLayoutComplete);
  • trunk/Source/WebCore/page/Page.h

    r163679 r163725  
    4646#endif
    4747
    48 #if PLATFORM(MAC)
     48#if PLATFORM(COCOA)
    4949#include <wtf/SchedulePair.h>
    5050#endif
     
    250250    enum { NoMatchAfterUserSelection = -1 };
    251251    void findStringMatchingRanges(const String&, FindOptions, int maxCount, Vector<RefPtr<Range>>*, int& indexForSelection);
    252 #if PLATFORM(MAC)
     252#if PLATFORM(COCOA)
    253253    void addSchedulePair(PassRefPtr<SchedulePair>);
    254254    void removeSchedulePair(PassRefPtr<SchedulePair>);
  • trunk/Source/WebCore/page/Settings.cpp

    r163157 r163725  
    7979#endif
    8080
    81 #if PLATFORM(MAC)
     81#if PLATFORM(COCOA)
    8282bool Settings::gQTKitEnabled = true;
    8383#endif
     
    240240}
    241241
    242 #if !PLATFORM(MAC)
     242#if !PLATFORM(COCOA)
    243243bool Settings::shouldEnableScreenFontSubstitutionByDefault()
    244244{
     
    247247#endif
    248248
    249 #if !PLATFORM(MAC)
     249#if !PLATFORM(COCOA)
    250250void Settings::initializeDefaultFontFamilies()
    251251{
     
    621621#endif
    622622
    623 #if PLATFORM(MAC)
     623#if PLATFORM(COCOA)
    624624void Settings::setQTKitEnabled(bool enabled)
    625625{
  • trunk/Source/WebCore/page/Settings.h

    r163310 r163725  
    241241#endif
    242242
    243 #if PLATFORM(MAC)
     243#if PLATFORM(COCOA)
    244244    static void setQTKitEnabled(bool flag);
    245245    static bool isQTKitEnabled() { return gQTKitEnabled; }
     
    389389#endif
    390390
    391 #if PLATFORM(MAC)
     391#if PLATFORM(COCOA)
    392392    static bool gQTKitEnabled;
    393393#endif
  • trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp

    r163516 r163725  
    4949namespace WebCore {
    5050
    51 #if !PLATFORM(MAC)
     51#if !PLATFORM(COCOA)
    5252PassRefPtr<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
    5353{
     
    256256}
    257257
    258 #if PLATFORM(MAC)
     258#if PLATFORM(COCOA)
    259259void ScrollingCoordinator::handleWheelEventPhase(PlatformWheelEventPhase phase)
    260260{
  • trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h

    r163516 r163725  
    4040#endif
    4141
    42 #if PLATFORM(MAC)
     42#if PLATFORM(COCOA)
    4343#include <wtf/RetainPtr.h>
    4444#endif
     
    136136    virtual bool supportsFixedPositionLayers() const { return false; }
    137137
    138 #if PLATFORM(MAC)
     138#if PLATFORM(COCOA)
    139139    // Dispatched by the scrolling tree during handleWheelEvent. This is required as long as scrollbars are painted on the main thread.
    140140    void handleWheelEventPhase(PlatformWheelEventPhase);
  • trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h

    r161315 r163725  
    3535#include <wtf/Vector.h>
    3636
    37 #if PLATFORM(MAC)
    38 #include <wtf/RetainPtr.h>
    39 #endif
    40 
    4137namespace WebCore {
    4238
  • trunk/Source/WebCore/page/scrolling/ScrollingThread.cpp

    r162276 r163725  
    8484        m_threadIdentifier = createThread(threadCallback, this, "WebCore: Scrolling");
    8585       
    86 #if PLATFORM(MAC)
     86#if PLATFORM(COCOA)
    8787        m_initializeRunLoopConditionVariable.wait(lock, [this]{ return m_threadRunLoop; });
    8888#endif
  • trunk/Source/WebCore/page/scrolling/ScrollingThread.h

    r162276 r163725  
    3636#include <wtf/Vector.h>
    3737
    38 #if PLATFORM(MAC)
     38#if PLATFORM(COCOA)
    3939#include <wtf/RetainPtr.h>
    4040#endif
     
    6868    void wakeUpRunLoop();
    6969
    70 #if PLATFORM(MAC)
     70#if PLATFORM(COCOA)
    7171    static void threadRunLoopSourceCallback(void* scrollingThread);
    7272    void threadRunLoopSourceCallback();
     
    8181    Vector<std::function<void ()>> m_functions;
    8282
    83 #if PLATFORM(MAC)
     83#if PLATFORM(COCOA)
    8484    // FIXME: We should use WebCore::RunLoop here.
    8585    RetainPtr<CFRunLoopRef> m_threadRunLoop;
  • trunk/Source/WebCore/platform/network/cf/ResourceRequest.h

    r163657 r163725  
    105105        void updateFromDelegatePreservingOldHTTPBody(const ResourceRequest&);
    106106
     107#if PLATFORM(MAC) && !PLATFORM(IOS)
     108        void applyWebArchiveHackForMail();
     109#endif
    107110#if PLATFORM(COCOA)
    108         void applyWebArchiveHackForMail();
    109111        NSURLRequest *nsURLRequest(HTTPBodyUpdatePolicy) const;
    110112#endif
  • trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp

    r163657 r163725  
    338338}
    339339
    340 #if PLATFORM(COCOA)
     340#if PLATFORM(MAC) && !PLATFORM(IOS)
    341341void ResourceRequest::applyWebArchiveHackForMail()
    342342{
    343 #if !PLATFORM(IOS)
    344343    // Hack because Mail checks for this property to detect data / archive loads
    345344    _CFURLRequestSetProtocolProperty(cfURLRequest(DoNotUpdateHTTPBody), CFSTR("WebDataRequest"), CFSTR(""));
    346 #endif
    347345}
    348346#endif
  • trunk/Source/WebCore/platform/network/mac/ResourceRequestMac.mm

    r163089 r163725  
    251251}
    252252
     253#if !PLATFORM(IOS)
    253254void ResourceRequest::applyWebArchiveHackForMail()
    254255{
    255 #if !PLATFORM(IOS)
    256256    // Hack because Mail checks for this property to detect data / archive loads
    257257    [NSURLProtocol setProperty:@"" forKey:@"WebDataRequest" inRequest:(NSMutableURLRequest *)nsURLRequest(DoNotUpdateHTTPBody)];
    258 #endif
    259 }
     258}
     259#endif
    260260
    261261void ResourceRequest::setStorageSession(CFURLStorageSessionRef storageSession)
  • trunk/Source/WebCore/plugins/PluginViewNone.cpp

    r162451 r163725  
    133133// added, please make sure they have the proper platform #ifs so that changes
    134134// do not break ports who compile both this file and PluginView.cpp.   
    135 #if PLATFORM(MAC) || PLATFORM(EFL) || OS(WINCE)
     135#if PLATFORM(COCOA) || PLATFORM(EFL) || OS(WINCE)
    136136#if ENABLE(NETSCAPE_PLUGIN_API)
    137137void PluginView::keepAlive(NPP)
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r163717 r163725  
    795795    RenderLayer* l = layer();
    796796    if (l) {
    797 #if PLATFORM(MAC)
     797#if PLATFORM(COCOA)
    798798        // On Mac only we reset the inline direction position when doing a document scroll (e.g., hitting Home/End).
    799799        if (granularity == ScrollByDocument)
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r163675 r163725  
    180180    graphicsLayer->setMaintainsPixelAlignment(compositor().keepLayersPixelAligned());
    181181
    182 #if PLATFORM(MAC) && USE(CA)
     182#if PLATFORM(COCOA) && USE(CA)
    183183    graphicsLayer->setAcceleratesDrawing(compositor().acceleratedDrawingEnabled());
    184184#endif   
     
    310310    }
    311311
    312 #if PLATFORM(MAC) && USE(CA)
     312#if PLATFORM(COCOA) && USE(CA)
    313313    if (!compositor().acceleratedDrawingEnabled() && renderer().isCanvas()) {
    314314        const HTMLCanvasElement* canvas = toHTMLCanvasElement(renderer().element());
  • trunk/Source/WebCore/rendering/RenderMenuList.h

    r163560 r163725  
    3030#include "RenderFlexibleBox.h"
    3131
    32 #if PLATFORM(MAC)
     32#if PLATFORM(COCOA)
    3333#define POPUP_MENU_PULLS_DOWN 0
    3434#else
  • trunk/Source/WebCore/rendering/RenderText.cpp

    r163465 r163725  
    13531353}
    13541354
    1355 #if PLATFORM(MAC) || PLATFORM(EFL)
     1355#if PLATFORM(COCOA) || PLATFORM(EFL)
    13561356
    13571357#define HANGUL_CHOSEONG_START (0x1100)
     
    13951395int RenderText::previousOffsetForBackwardDeletion(int current) const
    13961396{
    1397 #if PLATFORM(MAC) || PLATFORM(EFL)
     1397#if PLATFORM(COCOA) || PLATFORM(EFL)
    13981398    ASSERT(m_text);
    13991399    StringImpl& text = *m_text.impl();
  • trunk/Source/WebCore/rendering/break_lines.cpp

    r160236 r163725  
    3232#include <wtf/StdLibExtras.h>
    3333#include <wtf/unicode/CharacterNames.h>
    34 
    35 #if PLATFORM(MAC) && !PLATFORM(IOS)
    36 #include <CoreServices/CoreServices.h>
    37 #endif
    3834
    3935namespace WebCore {
  • trunk/Source/WebCore/testing/js/WebCoreTestSupport.h

    r157667 r163725  
    2929typedef const struct OpaqueJSContext* JSContextRef;
    3030
    31 #if PLATFORM(MAC)
     31#if PLATFORM(COCOA)
    3232#define TEST_SUPPORT_EXPORT WTF_EXPORT_PRIVATE
    3333#else
  • trunk/Source/WebCore/xml/XSLStyleSheetLibxslt.cpp

    r161851 r163725  
    3838#include <libxslt/xsltutils.h>
    3939
    40 #if PLATFORM(MAC)
     40#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)
    4141#include "SoftLinking.h"
    4242#endif
    4343
    44 #if PLATFORM(MAC)
     44#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)
    4545SOFT_LINK_LIBRARY(libxslt)
    4646SOFT_LINK(libxslt, xsltIsBlank, int, (xmlChar *str), (str))
  • trunk/Source/WebCore/xml/XSLTExtensions.cpp

    r40171 r163725  
    3636#include <libxslt/extra.h>
    3737
    38 #if PLATFORM(MAC)
     38#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)
    3939#include "SoftLinking.h"
    4040#endif
    4141
    42 #if PLATFORM(MAC)
     42#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)
    4343SOFT_LINK_LIBRARY(libxslt)
    4444SOFT_LINK(libxslt, xsltRegisterExtFunction, int, (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *URI, xmlXPathFunction function), (ctxt, name, URI, function))
  • trunk/Source/WebCore/xml/XSLTProcessorLibxslt.cpp

    r163568 r163725  
    5050#include <wtf/unicode/UTF8.h>
    5151
    52 #if PLATFORM(MAC)
     52#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)
    5353#include "SoftLinking.h"
    5454
  • trunk/Source/WebCore/xml/XSLTUnicodeSort.cpp

    r161851 r163725  
    3737#include <wtf/unicode/Collator.h>
    3838
    39 #if PLATFORM(MAC)
     39#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)
    4040#include "SoftLinking.h"
    4141#endif
    4242
    43 #if PLATFORM(MAC)
     43#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK)
    4444
    4545SOFT_LINK_LIBRARY(libxslt)
Note: See TracChangeset for help on using the changeset viewer.