Stop using PLATFORM(MAC) in WTF except where it means “OS X but not iOS”
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Feb 2014 07:31:40 +0000 (07:31 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Feb 2014 07:31:40 +0000 (07:31 +0000)
commit3f3dbaf96ffdb3f5d67497e7541b20acb2a12b8b
treed857f9dcbbe23ebfb921d2f3f3ac9f1c6041710e
parent061581f5abeeddabe4de29aaf6ab6fa7399b2441
Stop using PLATFORM(MAC) in WTF except where it means “OS X but not iOS”
https://bugs.webkit.org/show_bug.cgi?id=128089

Reviewed by Darin Adler.

Replaced all uses of PLATFORM(MAC) that weren’t accompanied by !PLATFORM(IOS) with
equivalent(*) tests that are more idiomatic and will not change once PLATFORM(MAC) changes to
be false when building for iOS.

* - One exception noted below.

* wtf/AutodrainedPool.h: Changed PLATFORM(MAC) to USE(FOUNDATION), because NSAutoreleasePool
is a Foundation class.

* wtf/CurrentTime.cpp:
(WTF::monotonicallyIncreasingTime): Changed PLATFORM(MAC) to OS(DARWIN), because Mach is
part of the Darwin kernel, but reordered such that the EFL and GLIB implementations continue
to take precedence regardless of the OS.

* wtf/MainThread.cpp: Changed PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK).
* wtf/MainThread.h: Ditto.

* wtf/Platform.h: Changed USE(CG) and USE(CA) to depend on COCOA, rather than MAC or IOS.
Ditto for USE(CFURLCACHE), HAVE(ACCESSIBILITY), USE(PROTECTION_SPACE_AUTH_CALLBACK),
USE(ACCESSIBILITY_CONTEXT_MENUS), USE(EXPORT_MACROS), USE(AVFOUNDATION),
USE(REQUEST_ANIMATION_FRAME_TIMER), USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR),
USE(CONTENT_FILTERING), USE(UNIFIED_TEXT_CHECKING), USE(MARKER_REMOVAL_UPON_EDITING),
USE(AUDIO_SESSION), USE(IOSURFACE), and ENABLE(CSS3_TEXT_DECORATION_SKIP_INK). Changed
PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK) in controlling various
JavaScriptCore or JavaScriptCore-dependent behaviors.

* wtf/RunLoop.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* wtf/RunLoopTimerCF.cpp: Ditto.

* wtf/SchedulePair.h: Changed PLATFORM(MAC) to USE(FOUNDATION), since it was used to guard
usage of Foundation API.

* wtf/Threading.cpp: Added an explicit !PLATFORM(IOS) in a guard around something needed
only on OS X and Windows.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/AutodrainedPool.h
Source/WTF/wtf/CurrentTime.cpp
Source/WTF/wtf/MainThread.cpp
Source/WTF/wtf/MainThread.h
Source/WTF/wtf/Platform.h
Source/WTF/wtf/RunLoop.h
Source/WTF/wtf/RunLoopTimerCF.cpp
Source/WTF/wtf/SchedulePair.h
Source/WTF/wtf/Threading.cpp