Move ENABLE macros for WebCore out from Platform.h
https://bugs.webkit.org/show_bug.cgi?id=105735

Source/WebKit/chromium:

Move the chromium specific WebCore ENABLE macro definitions
from Platform.h to features.gypi.

Patch by Laszlo Gombos <l.gombos@samsung.com> on 2013-02-18
Reviewed by Darin Adler and Benjamin Poulain.

* features.gypi: Set ENABLE_SUBPIXEL_LAYOUT to 1.

Source/WTF:

Patch by Laszlo Gombos <l.gombos@samsung.com> on 2013-02-18
Reviewed by Darin Adler and Benjamin Poulain.

Introduce FeatureDefines.h by combining the existing rules from
Platform.h and adding new rules for all the ENABLE flags that are
listed in the FeatureFlags wiki.

The new rules are not used at the moment by any ports
as the port specific build systems already define these flags
so the !defined() guard will prevent redefinition of the macros.

* GNUmakefile.list.am: Add FeatureDefines.h.
* WTF.gypi: Ditto.
* WTF.pro: Ditto.
* WTF.vcproj/WTF.vcproj: Ditto.
* WTF.xcodeproj/project.pbxproj: Ditto.
* wtf/CMakeLists.txt: Ditto.
* wtf/FeatureDefines.h: Added.
* wtf/Platform.h: Move macro definitions to FeatureDefines.h.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog
index 1dab931..0a39cf1 100644
--- a/Source/WTF/ChangeLog
+++ b/Source/WTF/ChangeLog
@@ -1,3 +1,27 @@
+2013-02-18  Laszlo Gombos  <l.gombos@samsung.com>
+
+        Move ENABLE macros for WebCore out from Platform.h
+        https://bugs.webkit.org/show_bug.cgi?id=105735
+
+        Reviewed by Darin Adler and Benjamin Poulain.
+
+        Introduce FeatureDefines.h by combining the existing rules from
+        Platform.h and adding new rules for all the ENABLE flags that are
+        listed in the FeatureFlags wiki.
+
+        The new rules are not used at the moment by any ports
+        as the port specific build systems already define these flags
+        so the !defined() guard will prevent redefinition of the macros.
+
+        * GNUmakefile.list.am: Add FeatureDefines.h.
+        * WTF.gypi: Ditto.
+        * WTF.pro: Ditto.
+        * WTF.vcproj/WTF.vcproj: Ditto.
+        * WTF.xcodeproj/project.pbxproj: Ditto.
+        * wtf/CMakeLists.txt: Ditto.
+        * wtf/FeatureDefines.h: Added.
+        * wtf/Platform.h: Move macro definitions to FeatureDefines.h.
+
 2013-02-16  Darin Adler  <darin@apple.com>
 
         Remove redundant use of inline keyword in StringHasher.h
diff --git a/Source/WTF/GNUmakefile.list.am b/Source/WTF/GNUmakefile.list.am
index 0c01579..3757d9b 100644
--- a/Source/WTF/GNUmakefile.list.am
+++ b/Source/WTF/GNUmakefile.list.am
@@ -49,6 +49,7 @@
     Source/WTF/wtf/FastBitVector.h \
     Source/WTF/wtf/FastMalloc.cpp \
     Source/WTF/wtf/FastMalloc.h \
+    Source/WTF/wtf/FeatureDefines.h \
     Source/WTF/wtf/FilePrintStream.cpp \
     Source/WTF/wtf/FilePrintStream.h \
     Source/WTF/wtf/FixedArray.h \
diff --git a/Source/WTF/WTF.gypi b/Source/WTF/WTF.gypi
index bdb8ac5..1541ebe 100644
--- a/Source/WTF/WTF.gypi
+++ b/Source/WTF/WTF.gypi
@@ -31,6 +31,7 @@
             'wtf/Encoder.h',
             'wtf/FastAllocBase.h',
             'wtf/FastMalloc.h',
+            'wtf/FeatureDefines.h',
             'wtf/FilePrintStream.h',
             'wtf/FixedArray.h',
             'wtf/Forward.h',
diff --git a/Source/WTF/WTF.pro b/Source/WTF/WTF.pro
index 727d78b..a312295 100644
--- a/Source/WTF/WTF.pro
+++ b/Source/WTF/WTF.pro
@@ -61,6 +61,7 @@
     ExportMacros.h \
     FastAllocBase.h \
     FastMalloc.h \
+    FeatureDefines.h \
     FilePrintStream.h \
     FixedArray.h \
     Float32Array.h \
diff --git a/Source/WTF/WTF.vcproj/WTF.vcproj b/Source/WTF/WTF.vcproj/WTF.vcproj
index efb4795..d5b8b2b 100644
--- a/Source/WTF/WTF.vcproj/WTF.vcproj
+++ b/Source/WTF/WTF.vcproj/WTF.vcproj
@@ -781,6 +781,10 @@
 			>
 		</File>
 		<File
+			RelativePath="..\wtf\FeatureDefines.h"
+			>
+		</File>
+		<File
 			RelativePath="..\wtf\FilePrintStream.cpp"
 			>
 		</File>
diff --git a/Source/WTF/WTF.xcodeproj/project.pbxproj b/Source/WTF/WTF.xcodeproj/project.pbxproj
index 5132ee6..2ce0a1e 100644
--- a/Source/WTF/WTF.xcodeproj/project.pbxproj
+++ b/Source/WTF/WTF.xcodeproj/project.pbxproj
@@ -299,6 +299,7 @@
 		A8A47486151A825B004123FF /* WTFThreadData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A4737A151A825B004123FF /* WTFThreadData.cpp */; };
 		A8A47487151A825B004123FF /* WTFThreadData.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4737B151A825B004123FF /* WTFThreadData.h */; };
 		A8A4748C151A8264004123FF /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4748B151A8264004123FF /* config.h */; };
+		B38FD7BD168953E80065C969 /* FeatureDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = B38FD7BC168953E80065C969 /* FeatureDefines.h */; };
 		CD5497AC15857D0300B5BC30 /* MediaTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD5497AA15857D0300B5BC30 /* MediaTime.cpp */; };
 		CD5497AD15857D0300B5BC30 /* MediaTime.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5497AB15857D0300B5BC30 /* MediaTime.h */; };
 		EB95E1F0161A72410089A2F5 /* ByteOrder.h in Headers */ = {isa = PBXBuildFile; fileRef = EB95E1EF161A72410089A2F5 /* ByteOrder.h */; };
@@ -610,6 +611,7 @@
 		A8A4737A151A825B004123FF /* WTFThreadData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WTFThreadData.cpp; sourceTree = "<group>"; };
 		A8A4737B151A825B004123FF /* WTFThreadData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WTFThreadData.h; sourceTree = "<group>"; };
 		A8A4748B151A8264004123FF /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
+		B38FD7BC168953E80065C969 /* FeatureDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FeatureDefines.h; sourceTree = "<group>"; };
 		CD5497AA15857D0300B5BC30 /* MediaTime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaTime.cpp; sourceTree = "<group>"; };
 		CD5497AB15857D0300B5BC30 /* MediaTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaTime.h; sourceTree = "<group>"; };
 		EB95E1EF161A72410089A2F5 /* ByteOrder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByteOrder.h; sourceTree = "<group>"; };
@@ -730,6 +732,7 @@
 				0FD81AC4154FB22E00983E72 /* FastBitVector.h */,
 				A8A472A1151A825A004123FF /* FastMalloc.cpp */,
 				A8A472A2151A825A004123FF /* FastMalloc.h */,
+				B38FD7BC168953E80065C969 /* FeatureDefines.h */,
 				0F9D335B165DBA73005AD387 /* FilePrintStream.cpp */,
 				0F9D335C165DBA73005AD387 /* FilePrintStream.h */,
 				A8A472A3151A825A004123FF /* FixedArray.h */,
@@ -1103,6 +1106,7 @@
 				A8A473C2151A825B004123FF /* FastAllocBase.h in Headers */,
 				0FD81AC5154FB22E00983E72 /* FastBitVector.h in Headers */,
 				A8A473C4151A825B004123FF /* FastMalloc.h in Headers */,
+				B38FD7BD168953E80065C969 /* FeatureDefines.h in Headers */,
 				0F9D3361165DBA73005AD387 /* FilePrintStream.h in Headers */,
 				A8A473B6151A825B004123FF /* fixed-dtoa.h in Headers */,
 				A8A473C5151A825B004123FF /* FixedArray.h in Headers */,
diff --git a/Source/WTF/wtf/CMakeLists.txt b/Source/WTF/wtf/CMakeLists.txt
index 34fff7c4e..a8798f7 100644
--- a/Source/WTF/wtf/CMakeLists.txt
+++ b/Source/WTF/wtf/CMakeLists.txt
@@ -26,6 +26,7 @@
     Encoder.h
     FastAllocBase.h
     FastMalloc.h
+    FeatureDefines.h
     FilePrintStream.h
     FixedArray.h
     Forward.h
diff --git a/Source/WTF/wtf/FeatureDefines.h b/Source/WTF/wtf/FeatureDefines.h
new file mode 100644
index 0000000..e42222a
--- /dev/null
+++ b/Source/WTF/wtf/FeatureDefines.h
@@ -0,0 +1,879 @@
+/*
+ * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2007-2009 Torch Mobile, Inc.
+ * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved.
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WTF_FeatureDefines_h
+#define WTF_FeatureDefines_h
+
+/* Use this file to list _all_ ENABLE() macros. Define the macros to be one of the following values:
+ *  - "0" disables the feature by default. The feature can still be enabled for a specific port or environment.
+ *  - "1" enables the feature by default. The feature can still be disabled for a specific port or environment.
+ *
+ * The feature defaults in this file are only taken into account if the (port specific) build system
+ * has not enabled or disabled a particular feature. 
+ *
+ * Use this file to define ENABLE() macros only. Do not use this file to define USE() or macros !
+ *
+ * Only define a macro if it was not defined before - always check for !defined first.
+ * 
+ * Keep the file sorted by the name of the defines. As an exception you can change the order
+ * to allow interdependencies between the default values.
+ * 
+ * Below are a few potential commands to take advantage of this file running from the Source/WTF directory
+ *
+ * Get the list of feature defines: grep -o "ENABLE_\(\w\+\)" wtf/FeatureDefines.h | sort | uniq
+ * Get the list of features enabled by default for a PLATFORM(XXX): gcc -E -dM -I. -DWTF_PLATFORM_XXX "wtf/Platform.h" | grep "ENABLE_\w\+ 1" | cut -d' ' -f2 | sort 
+ */
+
+/* FIXME: Move out the PLATFORM specific rules into platform specific files. */
+
+/* --------- Apple IOS (but not MAC) port --------- */
+/* PLATFORM(IOS) is a specialization of PLATFORM(MAC). */
+/* PLATFORM(MAC) is always enabled when PLATFORM(IOS) is enabled. */
+#if PLATFORM(IOS)
+
+#if !defined(ENABLE_8BIT_TEXTRUN)
+#define ENABLE_8BIT_TEXTRUN 1
+#endif
+
+#if !defined(ENABLE_CONTEXT_MENUS)
+#define ENABLE_CONTEXT_MENUS 0
+#endif
+
+#if !defined(ENABLE_CSS_IMAGE_SET)
+#define ENABLE_CSS_IMAGE_SET 1
+#endif
+
+#if !defined(ENABLE_DRAG_SUPPORT)
+#define ENABLE_DRAG_SUPPORT 0
+#endif
+
+#if !defined(ENABLE_GEOLOCATION)
+#define ENABLE_GEOLOCATION 1
+#endif
+
+#if !defined(ENABLE_ICONDATABASE)
+#define ENABLE_ICONDATABASE 0
+#endif
+
+#if !defined(ENABLE_NETSCAPE_PLUGIN_API)
+#define ENABLE_NETSCAPE_PLUGIN_API 0
+#endif
+
+#if !defined(ENABLE_ORIENTATION_EVENTS)
+#define ENABLE_ORIENTATION_EVENTS 1 
+#endif
+
+#if !defined(ENABLE_REPAINT_THROTTLING)
+#define ENABLE_REPAINT_THROTTLING 1 
+#endif
+
+#if !defined(ENABLE_TEXT_CARET)
+#define ENABLE_TEXT_CARET 0
+#endif
+
+#if ENABLE(NOTIFICATIONS)
+#if !defined(ENABLE_TEXT_NOTIFICATIONS_ONLY)
+#define ENABLE_TEXT_NOTIFICATIONS_ONLY 1
+#endif
+#endif
+
+#if !defined(ENABLE_WEB_ARCHIVE)
+#define ENABLE_WEB_ARCHIVE 1
+#endif
+
+#if !defined(ENABLE_WEBGL)
+#define ENABLE_WEBGL 1
+#endif
+
+#endif /* PLATFORM(IOS) */
+
+/* --------- Apple MAC port (not IOS) --------- */
+#if PLATFORM(MAC) && !PLATFORM(IOS)
+
+#if !defined(ENABLE_8BIT_TEXTRUN)
+#define ENABLE_8BIT_TEXTRUN 1
+#endif
+
+#if !defined(ENABLE_CSS_IMAGE_SET)
+#define ENABLE_CSS_IMAGE_SET 1
+#endif
+
+#if !defined(ENABLE_DASHBOARD_SUPPORT)
+#define ENABLE_DASHBOARD_SUPPORT 1
+#endif
+
+#if !defined(ENABLE_DELETION_UI)
+#define ENABLE_DELETION_UI 1
+#endif
+
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+#if !defined(ENABLE_ENCRYPTED_MEDIA_V2)
+#define ENABLE_ENCRYPTED_MEDIA_V2 1
+#endif
+#endif
+
+#if !defined(ENABLE_FULLSCREEN_API)
+#define ENABLE_FULLSCREEN_API 1
+#endif
+
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if !defined(ENABLE_GESTURE_EVENTS)
+#define ENABLE_GESTURE_EVENTS 1
+#endif
+#endif
+
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if !defined(ENABLE_RUBBER_BANDING)
+#define ENABLE_RUBBER_BANDING 1
+#endif
+#endif
+
+#if !defined(ENABLE_SMOOTH_SCROLLING)
+#define ENABLE_SMOOTH_SCROLLING 1
+#endif
+
+#if ENABLE(NOTIFICATIONS)
+#if !defined(ENABLE_TEXT_NOTIFICATIONS_ONLY)
+#define ENABLE_TEXT_NOTIFICATIONS_ONLY 1
+#endif
+#endif
+
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
+#if !defined(ENABLE_THREADED_SCROLLING)
+#define ENABLE_THREADED_SCROLLING 1
+#endif
+#endif
+
+#if ENABLE(VIDEO)
+#if !defined(ENABLE_VIDEO_TRACK)
+#define ENABLE_VIDEO_TRACK 1
+#endif
+#endif
+
+#if !defined(ENABLE_WEB_ARCHIVE)
+#define ENABLE_WEB_ARCHIVE 1
+#endif
+
+#if !defined(ENABLE_WEB_AUDIO)
+#define ENABLE_WEB_AUDIO 1
+#endif
+
+#endif /* PLATFORM(MAC) && !PLATFORM(IOS) */
+
+/* --------- Apple Windows port --------- */
+#if PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)
+
+#if !defined(ENABLE_FULLSCREEN_API)
+#define ENABLE_FULLSCREEN_API 1
+#endif
+
+#if !defined(ENABLE_WEB_ARCHIVE)
+#define ENABLE_WEB_ARCHIVE 1
+#endif
+
+#endif /* PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO) */
+
+/* --------- WinCE port --------- */
+/* WinCE port is a specialization of PLATFORM(WIN). */
+/* PLATFORM(WIN) is always enabled when building for the WinCE port. */
+#if PLATFORM(WIN) && OS(WINCE)
+
+#if !defined(ENABLE_DRAG_SUPPORT)
+#define ENABLE_DRAG_SUPPORT 0
+#endif
+
+#if !defined(ENABLE_FTPDIR)
+#define ENABLE_FTPDIR 0
+#endif
+
+#if !defined(ENABLE_INSPECTOR)
+#define ENABLE_INSPECTOR 0
+#endif
+
+#endif /* PLATFORM(WIN) && OS(WINCE) */
+
+/* --------- Windows CAIRO port --------- */
+/* PLATFORM(WIN_CAIRO) is a specialization of PLATFORM(WIN). */
+/* PLATFORM(WIN) is always enabled when PLATFORM(WIN_CAIRO) is enabled. */
+#if PLATFORM(WIN_CAIRO)
+
+#if !defined(ENABLE_WEB_ARCHIVE)
+#define ENABLE_WEB_ARCHIVE 1
+#endif
+
+#endif /* PLATFORM(WIN_CAIRO) */
+
+/* --------- WX port (Mac OS and Windows) --------- */
+#if PLATFORM(WX)
+
+#if OS(DARWIN)
+#if !defined(ENABLE_WEB_ARCHIVE)
+#define ENABLE_WEB_ARCHIVE 1
+#endif
+#endif
+
+#if OS(UNIX) && ENABLE(NETSCAPE_PLUGIN_API)
+#if !defined(ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH)
+#define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1
+#endif
+#endif
+
+#endif /* PLATFORM(WX) */
+
+/* --------- EFL port (Unix) --------- */
+#if PLATFORM(EFL)
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
+#if !defined(ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH)
+#define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1
+#endif
+#endif
+
+#if !defined(ENABLE_SUBPIXEL_LAYOUT)
+#define ENABLE_SUBPIXEL_LAYOUT 1
+#endif
+
+#endif /* PLATFORM(EFL) */
+
+/* --------- Gtk port (Unix, Windows, Mac) --------- */
+#if PLATFORM(GTK)
+
+#if OS(UNIX) && ENABLE(NETSCAPE_PLUGIN_API)
+#if !defined(ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH)
+#define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1
+#endif
+#endif
+
+#endif /* PLATFORM(GTK) */
+
+/* --------- Qt port (Unix, Windows, Mac, WinCE) --------- */
+#if PLATFORM(QT)
+
+#if OS(UNIX) && ENABLE(NETSCAPE_PLUGIN_API)
+#if !defined(ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH)
+#define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1
+#endif
+#endif
+
+#endif /* PLATFORM(QT) */
+
+/* --------- Blackberry port (QNX) --------- */
+#if PLATFORM(BLACKBERRY)
+
+#if !defined(ENABLE_BLACKBERRY_CREDENTIAL_PERSIST)
+#define ENABLE_BLACKBERRY_CREDENTIAL_PERSIST 1
+#endif
+
+#endif /* PLATFORM(BLACKBERRY) */
+
+/* ENABLE macro defaults for WebCore */
+/* Do not use PLATFORM() tests in this section ! */
+
+#if !defined(ENABLE_3D_PLUGIN)
+#define ENABLE_3D_PLUGIN 0
+#endif
+
+#if !defined(ENABLE_3D_RENDERING)
+#define ENABLE_3D_RENDERING 0
+#endif
+
+#if !defined(ENABLE_8BIT_TEXTRUN)
+#define ENABLE_8BIT_TEXTRUN 0
+#endif
+
+#if !defined(ENABLE_ACCELERATED_2D_CANVAS)
+#define ENABLE_ACCELERATED_2D_CANVAS 0
+#endif
+
+#if !defined(ENABLE_ACCELERATED_OVERFLOW_SCROLLING)
+#define ENABLE_ACCELERATED_OVERFLOW_SCROLLING 0
+#endif
+
+#if !defined(ENABLE_BATTERY_STATUS)
+#define ENABLE_BATTERY_STATUS 0
+#endif
+
+#if !defined(ENABLE_BLOB)
+#define ENABLE_BLOB 0
+#endif
+
+#if !defined(ENABLE_CALENDAR_PICKER)
+#define ENABLE_CALENDAR_PICKER 0
+#endif
+
+#if !defined(ENABLE_CANVAS_PATH)
+#define ENABLE_CANVAS_PATH 0
+#endif
+
+#if !defined(ENABLE_CANVAS_PROXY)
+#define ENABLE_CANVAS_PROXY 0
+#endif
+
+#if !defined(ENABLE_CHANNEL_MESSAGING)
+#define ENABLE_CHANNEL_MESSAGING 1
+#endif
+
+#if !defined(ENABLE_CONTEXT_MENUS)
+#define ENABLE_CONTEXT_MENUS 1
+#endif
+
+#if !defined(ENABLE_CSP_NEXT)
+#define ENABLE_CSP_NEXT 0
+#endif
+
+#if !defined(ENABLE_CSS3_CONDITIONAL_RULES)
+#define ENABLE_CSS3_CONDITIONAL_RULES 0
+#endif
+
+#if !defined(ENABLE_CSS3_TEXT)
+#define ENABLE_CSS3_TEXT 0
+#endif
+
+#if !defined(ENABLE_CSS_BOX_DECORATION_BREAK)
+#define ENABLE_CSS_BOX_DECORATION_BREAK 1
+#endif
+
+#if !defined(ENABLE_CSS_DEVICE_ADAPTATION)
+#define ENABLE_CSS_DEVICE_ADAPTATION 0
+#endif
+
+#if !defined(ENABLE_CSS_COMPOSITING)
+#define ENABLE_CSS_COMPOSITING 0
+#endif
+
+#if !defined(ENABLE_CSS_FILTERS)
+#define ENABLE_CSS_FILTERS 0
+#endif
+
+#if !defined(ENABLE_CSS_IMAGE_ORIENTATION)
+#define ENABLE_CSS_IMAGE_ORIENTATION 0
+#endif
+
+#if !defined(ENABLE_CSS_IMAGE_RESOLUTION)
+#define ENABLE_CSS_IMAGE_RESOLUTION 0
+#endif
+
+#if !defined(ENABLE_CSS_IMAGE_SET)
+#define ENABLE_CSS_IMAGE_SET 0
+#endif
+
+#if !defined(ENABLE_CSS_SHADERS)
+#define ENABLE_CSS_SHADERS 0
+#endif
+
+#if !defined(ENABLE_CSS_STICKY_POSITION)
+#define ENABLE_CSS_STICKY_POSITION 0
+#endif
+
+#if !defined(ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED)
+#define ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED 0
+#endif
+
+#if !defined(ENABLE_CSS_VARIABLES)
+#define ENABLE_CSS_VARIABLES 0
+#endif
+
+#if !defined(ENABLE_CUSTOM_SCHEME_HANDLER)
+#define ENABLE_CUSTOM_SCHEME_HANDLER 0
+#endif
+
+#if !defined(ENABLE_DASHBOARD_SUPPORT)
+#define ENABLE_DASHBOARD_SUPPORT 0
+#endif
+
+#if !defined(ENABLE_DATALIST_ELEMENT)
+#define ENABLE_DATALIST_ELEMENT 0
+#endif
+
+#if !defined(ENABLE_DATA_TRANSFER_ITEMS)
+#define ENABLE_DATA_TRANSFER_ITEMS 0
+#endif
+
+#if !defined(ENABLE_DELETION_UI)
+#define ENABLE_DELETION_UI 0
+#endif
+
+#if !defined(ENABLE_DETAILS_ELEMENT)
+#define ENABLE_DETAILS_ELEMENT 1
+#endif
+
+#if !defined(ENABLE_DEVICE_ORIENTATION)
+#define ENABLE_DEVICE_ORIENTATION 0
+#endif
+
+#if !defined(ENABLE_DIALOG_ELEMENT)
+#define ENABLE_DIALOG_ELEMENT 0
+#endif
+
+#if !defined(ENABLE_DIRECTORY_UPLOAD)
+#define ENABLE_DIRECTORY_UPLOAD 0
+#endif
+
+#if !defined(ENABLE_DOWNLOAD_ATTRIBUTE)
+#define ENABLE_DOWNLOAD_ATTRIBUTE 0
+#endif
+
+#if !defined(ENABLE_DRAGGABLE_REGION)
+#define ENABLE_DRAGGABLE_REGION 0
+#endif
+
+#if !defined(ENABLE_DRAG_SUPPORT)
+#define ENABLE_DRAG_SUPPORT 1
+#endif
+
+#if !defined(ENABLE_ENCRYPTED_MEDIA)
+#define ENABLE_ENCRYPTED_MEDIA 0
+#endif
+
+#if !defined(ENABLE_ENCRYPTED_MEDIA_V2)
+#define ENABLE_ENCRYPTED_MEDIA_V2 0
+#endif
+
+#if !defined(ENABLE_FAST_MOBILE_SCROLLING)
+#define ENABLE_FAST_MOBILE_SCROLLING 0
+#endif
+
+#if !defined(ENABLE_FILE_SYSTEM)
+#define ENABLE_FILE_SYSTEM 0
+#endif
+
+#if !defined(ENABLE_FILTERS)
+#define ENABLE_FILTERS 0
+#endif
+
+#if !defined(ENABLE_FTPDIR)
+#define ENABLE_FTPDIR 1
+#endif
+
+#if !defined(ENABLE_FULLSCREEN_API)
+#define ENABLE_FULLSCREEN_API 0
+#endif
+
+#if !defined(ENABLE_GAMEPAD)
+#define ENABLE_GAMEPAD 0
+#endif
+
+#if !defined(ENABLE_GEOLOCATION)
+#define ENABLE_GEOLOCATION 0
+#endif
+
+#if !defined(ENABLE_GESTURE_EVENTS)
+#define ENABLE_GESTURE_EVENTS 0
+#endif
+
+#if !defined(ENABLE_GLIB_SUPPORT)
+#define ENABLE_GLIB_SUPPORT 0
+#endif
+
+#if !defined(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING)
+#define ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING 0
+#endif
+
+#if !defined(ENABLE_HIGH_DPI_CANVAS)
+#define ENABLE_HIGH_DPI_CANVAS 0
+#endif
+
+#if !defined(ENABLE_ICONDATABASE)
+#define ENABLE_ICONDATABASE 1
+#endif
+
+#if !defined(ENABLE_IFRAME_SEAMLESS)
+#define ENABLE_IFRAME_SEAMLESS 1
+#endif
+
+#if !defined(ENABLE_IMAGE_DECODER_DOWN_SAMPLING)
+#define ENABLE_IMAGE_DECODER_DOWN_SAMPLING 0
+#endif
+
+#if !defined(ENABLE_INDEXED_DATABASE)
+#define ENABLE_INDEXED_DATABASE 0
+#endif
+
+#if !defined(ENABLE_INPUT_MULTIPLE_FIELDS_UI)
+#define ENABLE_INPUT_MULTIPLE_FIELDS_UI 0
+#endif
+
+#if !defined(ENABLE_INPUT_SPEECH)
+#define ENABLE_INPUT_SPEECH 0
+#endif
+
+#if !defined(ENABLE_INPUT_TYPE_COLOR)
+#define ENABLE_INPUT_TYPE_COLOR 0
+#endif
+
+#if !defined(ENABLE_INPUT_TYPE_DATE)
+#define ENABLE_INPUT_TYPE_DATE 0
+#endif
+
+#if !defined(ENABLE_INPUT_TYPE_DATETIME)
+#define ENABLE_INPUT_TYPE_DATETIME 0
+#endif
+
+#if !defined(ENABLE_INPUT_TYPE_DATETIMELOCAL)
+#define ENABLE_INPUT_TYPE_DATETIMELOCAL 0
+#endif
+
+#if !defined(ENABLE_INPUT_TYPE_MONTH)
+#define ENABLE_INPUT_TYPE_MONTH 0
+#endif
+
+#if !defined(ENABLE_INPUT_TYPE_TIME)
+#define ENABLE_INPUT_TYPE_TIME 0
+#endif
+
+#if !defined(ENABLE_INPUT_TYPE_WEEK)
+#define ENABLE_INPUT_TYPE_WEEK 0
+#endif
+
+#if ENABLE(INPUT_TYPE_DATE) || ENABLE(INPUT_TYPE_DATETIME) || ENABLE(INPUT_TYPE_DATETIMELOCAL) || ENABLE(INPUT_TYPE_MONTH) || ENABLE(INPUT_TYPE_TIME) || ENABLE(INPUT_TYPE_WEEK)
+#if !defined(ENABLE_DATE_AND_TIME_INPUT_TYPES)
+#define ENABLE_DATE_AND_TIME_INPUT_TYPES 1
+#endif
+#endif
+
+#if !defined(ENABLE_INSPECTOR)
+#define ENABLE_INSPECTOR 1
+#endif
+
+#if !defined(ENABLE_JAVASCRIPT_DEBUGGER)
+#define ENABLE_JAVASCRIPT_DEBUGGER 1
+#endif
+
+#if !defined(ENABLE_JAVASCRIPT_I18N_API)
+#define ENABLE_JAVASCRIPT_I18N_API 0
+#endif
+
+#if !defined(ENABLE_LEGACY_CSS_VENDOR_PREFIXES)
+#define ENABLE_LEGACY_CSS_VENDOR_PREFIXES 0
+#endif
+
+#if !defined(ENABLE_LEGACY_NOTIFICATIONS)
+#define ENABLE_LEGACY_NOTIFICATIONS 0
+#endif
+
+#if !defined(ENABLE_LEGACY_VENDOR_PREFIXES)
+#define ENABLE_LEGACY_VENDOR_PREFIXES 0
+#endif
+
+#if !defined(ENABLE_LEGACY_VIEWPORT_ADAPTION)
+#define ENABLE_LEGACY_VIEWPORT_ADAPTION 0
+#endif
+
+#if !defined(ENABLE_LINK_PREFETCH)
+#define ENABLE_LINK_PREFETCH 0
+#endif
+
+#if !defined(ENABLE_LINK_PRERENDER)
+#define ENABLE_LINK_PRERENDER 0
+#endif
+
+#if !defined(ENABLE_MATHML)
+#define ENABLE_MATHML 1
+#endif
+
+#if !defined(ENABLE_MEDIA_CAPTURE)
+#define ENABLE_MEDIA_CAPTURE 0
+#endif
+
+#if !defined(ENABLE_MEDIA_SOURCE)
+#define ENABLE_MEDIA_SOURCE 0
+#endif
+
+#if !defined(ENABLE_MEDIA_STATISTICS)
+#define ENABLE_MEDIA_STATISTICS 0
+#endif
+
+#if !defined(ENABLE_MEDIA_STREAM)
+#define ENABLE_MEDIA_STREAM 0
+#endif
+
+#if !defined(ENABLE_METER_ELEMENT)
+#define ENABLE_METER_ELEMENT 1
+#endif
+
+#if !defined(ENABLE_MHTML)
+#define ENABLE_MHTML 0
+#endif
+
+#if !defined(ENABLE_MICRODATA)
+#define ENABLE_MICRODATA 0
+#endif
+
+#if !defined(ENABLE_MOUSE_CURSOR_SCALE)
+#define ENABLE_MOUSE_CURSOR_SCALE 0
+#endif
+
+#if !defined(ENABLE_NAVIGATOR_CONTENT_UTILS)
+#define ENABLE_NAVIGATOR_CONTENT_UTILS 0
+#endif
+
+#if !defined(ENABLE_NETSCAPE_PLUGIN_API)
+#define ENABLE_NETSCAPE_PLUGIN_API 1
+#endif
+
+#if !defined(ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE)
+#define ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE 0
+#endif
+
+#if !defined(ENABLE_NETWORK_INFO)
+#define ENABLE_NETWORK_INFO 0
+#endif
+
+#if !defined(ENABLE_NOTIFICATIONS)
+#define ENABLE_NOTIFICATIONS 0
+#endif
+
+#if !defined(ENABLE_OBJECT_MARK_LOGGING)
+#define ENABLE_OBJECT_MARK_LOGGING 0
+#endif
+
+#if !defined(ENABLE_OPENCL)
+#define ENABLE_OPENCL 0
+#endif
+
+#if !defined(ENABLE_OPENTYPE_VERTICAL)
+#define ENABLE_OPENTYPE_VERTICAL 0
+#endif
+
+#if !defined(ENABLE_ORIENTATION_EVENTS)
+#define ENABLE_ORIENTATION_EVENTS 0
+#endif
+
+#if !defined(ENABLE_PAGE_POPUP)
+#define ENABLE_PAGE_POPUP 0
+#endif
+
+#if !defined(ENABLE_PAGE_VISIBILITY_API)
+#define ENABLE_PAGE_VISIBILITY_API 0
+#endif
+
+#if OS(WINDOWS)
+#if !defined(ENABLE_PAN_SCROLLING)
+#define ENABLE_PAN_SCROLLING 1
+#endif
+#endif
+
+#if !defined(ENABLE_PARSED_STYLE_SHEET_CACHING)
+#define ENABLE_PARSED_STYLE_SHEET_CACHING 1
+#endif
+
+#if !defined(ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH)
+#define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 0
+#endif
+
+#if !defined(ENABLE_PLUGIN_PROXY_FOR_VIDEO)
+#define ENABLE_PLUGIN_PROXY_FOR_VIDEO 0
+#endif
+
+#if !defined(ENABLE_POINTER_LOCK)
+#define ENABLE_POINTER_LOCK 0
+#endif
+
+#if !defined(ENABLE_PROGRESS_ELEMENT)
+#define ENABLE_PROGRESS_ELEMENT 0
+#endif
+
+#if !defined(ENABLE_PROXIMITY_EVENTS)
+#define ENABLE_PROXIMITY_EVENTS 0
+#endif
+
+#if !defined(ENABLE_QUOTA)
+#define ENABLE_QUOTA 0
+#endif
+
+#if !defined(ENABLE_REPAINT_THROTTLING)
+#define ENABLE_REPAINT_THROTTLING 0
+#endif
+
+#if !defined(ENABLE_REQUEST_ANIMATION_FRAME)
+#define ENABLE_REQUEST_ANIMATION_FRAME 0
+#endif
+
+#if !defined(ENABLE_REQUEST_AUTOCOMPLETE)
+#define ENABLE_REQUEST_AUTOCOMPLETE 0
+#endif
+
+#if !defined(ENABLE_RUBBER_BANDING)
+#define ENABLE_RUBBER_BANDING 0
+#endif
+
+#if !defined(ENABLE_SATURATED_LAYOUT_ARITHMETIC)
+#define ENABLE_SATURATED_LAYOUT_ARITHMETIC 0
+#endif
+
+#if !defined(ENABLE_SCRIPTED_SPEECH)
+#define ENABLE_SCRIPTED_SPEECH 0
+#endif
+
+#if !defined(ENABLE_SHADOW_DOM)
+#define ENABLE_SHADOW_DOM 0
+#endif
+
+#if !defined(ENABLE_SHARED_WORKERS)
+#define ENABLE_SHARED_WORKERS 0
+#endif
+
+#if !defined(ENABLE_SMOOTH_SCROLLING)
+#define ENABLE_SMOOTH_SCROLLING 0
+#endif
+
+#if !defined(ENABLE_SPEECH_SYNTHESIS)
+#define ENABLE_SPEECH_SYNTHESIS 0
+#endif
+
+#if !defined(ENABLE_SPELLCHECK)
+#define ENABLE_SPELLCHECK 0
+#endif
+
+#if !defined(ENABLE_SQL_DATABASE)
+#define ENABLE_SQL_DATABASE 1
+#endif
+
+#if !defined(ENABLE_STYLE_SCOPED)
+#define ENABLE_STYLE_SCOPED 0
+#endif
+
+#if !defined(ENABLE_SUBPIXEL_LAYOUT)
+#define ENABLE_SUBPIXEL_LAYOUT 0
+#endif
+
+#if !defined(ENABLE_SVG)
+#define ENABLE_SVG 1
+#endif
+
+#if ENABLE(SVG)
+#if !defined(ENABLE_SVG_DOM_OBJC_BINDINGS)
+#define ENABLE_SVG_DOM_OBJC_BINDINGS 0
+#endif
+#endif
+
+#if ENABLE(SVG)
+#if !defined(ENABLE_SVG_FONTS)
+#define ENABLE_SVG_FONTS 1
+#endif
+#endif
+
+#if !defined(ENABLE_TEMPLATE_ELEMENT)
+#define ENABLE_TEMPLATE_ELEMENT 0
+#endif
+
+#if !defined(ENABLE_TEXT_AUTOSIZING)
+#define ENABLE_TEXT_AUTOSIZING 0
+#endif
+
+#if !defined(ENABLE_TEXT_CARET)
+#define ENABLE_TEXT_CARET 1
+#endif
+
+#if !defined(ENABLE_TEXT_NOTIFICATIONS_ONLY)
+#define ENABLE_TEXT_NOTIFICATIONS_ONLY 0
+#endif
+
+#if !defined(ENABLE_THREADED_HTML_PARSER)
+#define ENABLE_THREADED_HTML_PARSER 0
+#endif
+
+#if !defined(ENABLE_THREADED_SCROLLING)
+#define ENABLE_THREADED_SCROLLING 0
+#endif
+
+#if !defined(ENABLE_TOUCH_EVENTS)
+#define ENABLE_TOUCH_EVENTS 0
+#endif
+
+#if !defined(ENABLE_TOUCH_ICON_LOADING)
+#define ENABLE_TOUCH_ICON_LOADING 0
+#endif
+
+#if !defined(ENABLE_VIBRATION)
+#define ENABLE_VIBRATION 0
+#endif
+
+#if !defined(ENABLE_VIDEO)
+#define ENABLE_VIDEO 0
+#endif
+
+#if !defined(ENABLE_VIDEO_TRACK)
+#define ENABLE_VIDEO_TRACK 0
+#endif
+
+#if !defined(ENABLE_VIEWPORT)
+#define ENABLE_VIEWPORT 0
+#endif
+
+#if !defined(ENABLE_WEBGL)
+#define ENABLE_WEBGL 0
+#endif
+
+#if !defined(ENABLE_WEB_ARCHIVE)
+#define ENABLE_WEB_ARCHIVE 0
+#endif
+
+#if !defined(ENABLE_WEB_AUDIO)
+#define ENABLE_WEB_AUDIO 0
+#endif
+
+#if !defined(ENABLE_WEB_SOCKETS)
+#define ENABLE_WEB_SOCKETS 1
+#endif
+
+#if !defined(ENABLE_WEB_TIMING)
+#define ENABLE_WEB_TIMING 0
+#endif
+
+#if !defined(ENABLE_WORKERS)
+#define ENABLE_WORKERS 0
+#endif
+
+#if !defined(ENABLE_XHR_TIMEOUT)
+#define ENABLE_XHR_TIMEOUT 0
+#endif
+
+#if !defined(ENABLE_XSLT)
+#define ENABLE_XSLT 1
+#endif
+
+/* Asserts, invariants for macro definitions */
+
+#if ENABLE(SATURATED_LAYOUT_ARITHMETIC) && !ENABLE(SUBPIXEL_LAYOUT)
+#error "ENABLE(SATURATED_LAYOUT_ARITHMETIC) requires ENABLE(SUBPIXEL_LAYOUT)"
+#endif
+
+#if ENABLE(SVG_DOM_OBJC_BINDINGS) && !ENABLE(SVG)
+#error "ENABLE(SVG_DOM_OBJC_BINDINGS) requires ENABLE(SVG)"
+#endif
+
+#if ENABLE(SVG_FONTS) && !ENABLE(SVG)
+#error "ENABLE(SVG_FONTS) requires ENABLE(SVG)"
+#endif
+
+#if ENABLE(VIDEO_TRACK) && !ENABLE(VIDEO)
+#error "ENABLE(VIDEO_TRACK) requires ENABLE(VIDEO)"
+#endif
+
+#endif /* WTF_FeatureDefines_h */
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
index 97c67a3..1698247 100644
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -548,25 +548,12 @@
 #define WTF_USE_PLUGIN_HOST_PROCESS 1
 #endif
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
-#define ENABLE_GESTURE_EVENTS 1
-#define ENABLE_RUBBER_BANDING 1
 #define WTF_USE_SCROLLBAR_PAINTER 1
 #define HAVE_XPC 1
 #endif
-#if !defined(ENABLE_DASHBOARD_SUPPORT)
-#define ENABLE_DASHBOARD_SUPPORT 1
-#endif
 #define WTF_USE_CF 1
 #define HAVE_READLINE 1
 #define HAVE_RUNLOOP_TIMER 1
-#define ENABLE_FULLSCREEN_API 1
-#define ENABLE_SMOOTH_SCROLLING 1
-#define ENABLE_WEB_ARCHIVE 1
-#define ENABLE_WEB_AUDIO 1
-#define ENABLE_DELETION_UI 1
-#if defined(ENABLE_VIDEO)
-#define ENABLE_VIDEO_TRACK 1
-#endif
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 #define HAVE_LAYER_HOSTING_IN_WINDOW_SERVER 1
 #endif
@@ -604,18 +591,6 @@
 #endif
 
 #if PLATFORM(IOS)
-#define ENABLE_CONTEXT_MENUS 0
-#define ENABLE_DASHBOARD_SUPPORT 0
-#define ENABLE_DELETION_UI 0
-#define ENABLE_DRAG_SUPPORT 0
-#define ENABLE_GEOLOCATION 1
-#define ENABLE_ICONDATABASE 0
-#define ENABLE_INSPECTOR 1
-#define ENABLE_NETSCAPE_PLUGIN_API 0
-#define ENABLE_ORIENTATION_EVENTS 1
-#define ENABLE_REPAINT_THROTTLING 1
-#define ENABLE_WEB_ARCHIVE 1
-#define ENABLE_WEBGL 1
 #define HAVE_READLINE 1
 #define WTF_USE_APPKIT 0
 #define WTF_USE_CF 1
@@ -637,14 +612,6 @@
 #define WTF_USE_CFURLCACHE 1
 #endif
 
-#if PLATFORM(WIN) && !OS(WINCE)
-#define ENABLE_WEB_ARCHIVE 1
-#endif
-
-#if PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)
-#define ENABLE_FULLSCREEN_API 1
-#endif
-
 #if PLATFORM(WX)
 #if !CPU(PPC)
 #if !defined(ENABLE_ASSEMBLER)
@@ -656,7 +623,6 @@
 #define ENABLE_LLINT 0
 #if OS(DARWIN)
 #define WTF_USE_CF 1
-#define ENABLE_WEB_ARCHIVE 1
 #endif
 #endif
 
@@ -742,6 +708,11 @@
 
 /* ENABLE macro defaults */
 
+/* FIXME: move out all ENABLE() defines from here to FeatureDefines.h */
+
+/* Include feature macros */
+#include <wtf/FeatureDefines.h>
+
 #if PLATFORM(QT)
 /* We must not customize the global operator new and delete for the Qt port. */
 #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
@@ -750,70 +721,10 @@
 #endif
 #endif
 
-#if !defined(ENABLE_ICONDATABASE)
-#define ENABLE_ICONDATABASE 1
-#endif
-
-#if !defined(ENABLE_SQL_DATABASE)
-#define ENABLE_SQL_DATABASE 1
-#endif
-
-#if !defined(ENABLE_JAVASCRIPT_DEBUGGER)
-#define ENABLE_JAVASCRIPT_DEBUGGER 1
-#endif
-
-#if !defined(ENABLE_FTPDIR)
-#define ENABLE_FTPDIR 1
-#endif
-
-#if !defined(ENABLE_CONTEXT_MENUS)
-#define ENABLE_CONTEXT_MENUS 1
-#endif
-
-#if !defined(ENABLE_DRAG_SUPPORT)
-#define ENABLE_DRAG_SUPPORT 1
-#endif
-
-#if !defined(ENABLE_INSPECTOR)
-#define ENABLE_INSPECTOR 1
-#endif
-
-#if !defined(ENABLE_DELETION_UI)
-#define ENABLE_DELETION_UI 0
-#endif
-
-#if !defined(ENABLE_NETSCAPE_PLUGIN_API)
-#define ENABLE_NETSCAPE_PLUGIN_API 1
-#endif
-
 #if !defined(ENABLE_GLOBAL_FASTMALLOC_NEW)
 #define ENABLE_GLOBAL_FASTMALLOC_NEW 1
 #endif
 
-#if !defined(ENABLE_PARSED_STYLE_SHEET_CACHING)
-#define ENABLE_PARSED_STYLE_SHEET_CACHING 1
-#endif
-
-#if !defined(ENABLE_SUBPIXEL_LAYOUT)
-#if PLATFORM(CHROMIUM) || PLATFORM(EFL)
-#define ENABLE_SUBPIXEL_LAYOUT 1
-#else
-#define ENABLE_SUBPIXEL_LAYOUT 0
-#endif
-#endif
-
-#if !defined(ENABLE_SATURATED_LAYOUT_ARITHMETIC)
-#define ENABLE_SATURATED_LAYOUT_ARITHMETIC 0
-#endif
-
-#if ENABLE(ENABLE_SATURATED_LAYOUT_ARITHMETIC) && !ENABLE(ENABLE_SUBPIXEL_LAYOUT)
-#error "ENABLE_SATURATED_LAYOUT_ARITHMETIC requires ENABLE_SUBPIXEL_LAYOUT"
-#endif
-
-#if ENABLE(INPUT_TYPE_DATE) || ENABLE(INPUT_TYPE_DATETIME) || ENABLE(INPUT_TYPE_DATETIMELOCAL) || ENABLE(INPUT_TYPE_MONTH) || ENABLE(INPUT_TYPE_TIME) || ENABLE(INPUT_TYPE_WEEK)
-#define ENABLE_DATE_AND_TIME_INPUT_TYPES 1
-#endif
-
 #define ENABLE_DEBUG_WITH_BREAKPOINT 0
 #define ENABLE_SAMPLING_COUNTERS 0
 #define ENABLE_SAMPLING_FLAGS 0
@@ -827,10 +738,6 @@
 #define ENABLE_SAMPLING_THREAD 1
 #endif
 
-#if !defined(ENABLE_TEXT_CARET) && !PLATFORM(IOS)
-#define ENABLE_TEXT_CARET 1
-#endif
-
 #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32_64)
 #if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS))) \
     || (CPU(IA64) && !CPU(IA64_32)) \
@@ -1002,15 +909,6 @@
 #endif
 #endif
 
-#if !defined(ENABLE_PAN_SCROLLING) && OS(WINDOWS)
-#define ENABLE_PAN_SCROLLING 1
-#endif
-
-/*Add other platforms as they update their platfrom specific code to handle TextRun's with 8 bit data. */
-#if PLATFORM(MAC)
-#define ENABLE_8BIT_TEXTRUN 1
-#endif
-
 /* Use the QXmlStreamReader implementation for XMLDocumentParser */
 /* Use the QXmlQuery implementation for XSLTProcessor */
 #if PLATFORM(QT)
@@ -1025,10 +923,6 @@
 #define WTF_USE_ACCELERATED_COMPOSITING 1
 #endif
 
-#if PLATFORM(MAC) || PLATFORM(IOS)
-#define ENABLE_CSS_IMAGE_SET 1
-#endif
-
 #if ENABLE(WEBGL) && !defined(WTF_USE_3D_GRAPHICS)
 #define WTF_USE_3D_GRAPHICS 1
 #endif
@@ -1051,14 +945,6 @@
 #define WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK 1
 #endif
 
-#if !ENABLE(NETSCAPE_PLUGIN_API) || (ENABLE(NETSCAPE_PLUGIN_API) && ((OS(UNIX) && (PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(WX))) || PLATFORM(EFL)))
-#define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1
-#endif
-
-#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
-#define ENABLE_THREADED_SCROLLING 1
-#endif
-
 /* Set up a define for a common error that is intended to cause a build error -- thus the space after Error. */
 #define WTF_PLATFORM_CFNETWORK Error USE_macro_should_be_used_with_CFNETWORK
 
@@ -1134,7 +1020,6 @@
 
 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
 #define HAVE_AVFOUNDATION_TEXT_TRACK_SUPPORT 1
-#define ENABLE_ENCRYPTED_MEDIA_V2 1
 #endif
 
 #if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)) || PLATFORM(BLACKBERRY)
@@ -1162,10 +1047,6 @@
 #define WTF_USE_JSC 1
 #endif
 
-#if ENABLE(NOTIFICATIONS) && PLATFORM(MAC)
-#define ENABLE_TEXT_NOTIFICATIONS_ONLY 1
-#endif
-
 #if !defined(WTF_USE_ZLIB) && !PLATFORM(QT)
 #define WTF_USE_ZLIB 1
 #endif
diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog
index 3494fb8..37103b2 100644
--- a/Source/WebKit/chromium/ChangeLog
+++ b/Source/WebKit/chromium/ChangeLog
@@ -1,3 +1,15 @@
+2013-02-18  Laszlo Gombos  <l.gombos@samsung.com>
+
+        Move ENABLE macros for WebCore out from Platform.h
+        https://bugs.webkit.org/show_bug.cgi?id=105735
+
+        Move the chromium specific WebCore ENABLE macro definitions
+        from Platform.h to features.gypi.
+
+        Reviewed by Darin Adler and Benjamin Poulain.
+
+        * features.gypi: Set ENABLE_SUBPIXEL_LAYOUT to 1.
+
 2013-02-15  Alec Flett  <alecflett@chromium.org>
 
         IndexedDB: Stub out SharedBuffer version of get()
diff --git a/Source/WebKit/chromium/features.gypi b/Source/WebKit/chromium/features.gypi
index f3f9fd5..f2e0a41 100644
--- a/Source/WebKit/chromium/features.gypi
+++ b/Source/WebKit/chromium/features.gypi
@@ -114,6 +114,7 @@
       'ENABLE_SPEECH_SYNTHESIS=0',
       'ENABLE_SQL_DATABASE=1',
       'ENABLE_STYLE_SCOPED=1',
+      'ENABLE_SUBPIXEL_LAYOUT=1',
       'ENABLE_SVG=<(enable_svg)',
       'ENABLE_SVG_FONTS=<(enable_svg)',
       'ENABLE_TEMPLATE_ELEMENT=1',