Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / content / child / runtime_features.cc
index 796f684..de57e78 100644 (file)
@@ -11,7 +11,6 @@
 
 #if defined(OS_ANDROID)
 #include <cpu-features.h>
-#include "base/android/build_info.h"
 #include "media/base/android/media_codec_bridge.h"
 #endif
 
@@ -30,7 +29,8 @@ static void SetRuntimeFeatureDefaultsForPlatform() {
   // WebAudio is enabled by default only on ARM and only when the
   // MediaCodec API is available.
   WebRuntimeFeatures::enableWebAudio(
-    media::MediaCodecBridge::IsAvailable());
+      media::MediaCodecBridge::IsAvailable() &&
+      (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM));
   // Android does not support the Gamepad API.
   WebRuntimeFeatures::enableGamepad(false);
   // Android does not have support for PagePopup
@@ -75,9 +75,6 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
   if (command_line.HasSwitch(switches::kDisableSessionStorage))
     WebRuntimeFeatures::enableSessionStorage(false);
 
-  if (command_line.HasSwitch(switches::kDisableGeolocation))
-    WebRuntimeFeatures::enableGeolocation(false);
-
   if (command_line.HasSwitch(switches::kDisableWebKitMediaSource))
     WebRuntimeFeatures::enableWebKitMediaSource(false);
 
@@ -142,12 +139,6 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
   if (command_line.HasSwitch(switches::kEnableWebMIDI))
     WebRuntimeFeatures::enableWebMIDI(true);
 
-  if (command_line.HasSwitch(switches::kDisableDeviceMotion))
-    WebRuntimeFeatures::enableDeviceMotion(false);
-
-  if (command_line.HasSwitch(switches::kDisableDeviceOrientation))
-    WebRuntimeFeatures::enableDeviceOrientation(false);
-
   if (command_line.HasSwitch(switches::kDisableSpeechInput))
     WebRuntimeFeatures::enableSpeechInput(false);
 
@@ -183,8 +174,14 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
   if (command_line.HasSwitch(switches::kEnableFastTextAutosizing))
     WebRuntimeFeatures::enableFastTextAutosizing(true);
 
+  if (command_line.HasSwitch(switches::kDisableRepaintAfterLayout))
+    WebRuntimeFeatures::enableRepaintAfterLayout(false);
+
   if (command_line.HasSwitch(switches::kEnableRepaintAfterLayout))
     WebRuntimeFeatures::enableRepaintAfterLayout(true);
+
+  if (command_line.HasSwitch(switches::kEnableTargetedStyleRecalc))
+    WebRuntimeFeatures::enableTargetedStyleRecalc(true);
 }
 
 }  // namespace content