webkit: Fix build in ISO C++ 11 mode

Change-Id: I32b3121ae46678f847dcd74ea74484aaf8f34eaf
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
diff --git a/Source/JavaScriptCore/wtf/NullPtr.h b/Source/JavaScriptCore/wtf/NullPtr.h
index 08ece56..eaf86a7 100644
--- a/Source/JavaScriptCore/wtf/NullPtr.h
+++ b/Source/JavaScriptCore/wtf/NullPtr.h
@@ -35,10 +35,13 @@
     #define __has_feature(feature) 0
 #endif
 
-#if __has_feature(cxx_nullptr) || (defined(_MSC_VER) && _MSC_VER >= 1600)
+#if __has_feature(cxx_nullptr) || (defined(_MSC_VER) && _MSC_VER >= 1600) || defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
 
 #define HAVE_NULLPTR 1
 
+namespace std {
+	typedef decltype(nullptr) nullptr_t; // nullptr_t seems to be missing in gcc 4.7
+}
 #else
 
 namespace std {
diff --git a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h
index dc844b3..f740c0b 100644
--- a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h
+++ b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h
@@ -17,6 +17,10 @@
 #ifndef LayerAndroid_h
 #define LayerAndroid_h
 
+#if __cplusplus < 201103L && !defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(char16_t)
+#define constexpr const
+#endif
+
 #if USE(ACCELERATED_COMPOSITING)
 
 #include "FloatPoint.h"
@@ -382,7 +386,7 @@
     float m_scale;
 
     // We try to not always compute the texture size, as this is quite heavy
-    static const double s_computeTextureDelay = 0.2; // 200 ms
+    static constexpr double s_computeTextureDelay = 0.2; // 200 ms
     double m_lastComputeTextureSize;
 
     RenderLayer* m_owningLayer;
diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceBacking.h b/Source/WebCore/platform/graphics/android/rendering/SurfaceBacking.h
index ff866bf..1f0bda6 100644
--- a/Source/WebCore/platform/graphics/android/rendering/SurfaceBacking.h
+++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceBacking.h
@@ -29,6 +29,10 @@
 #include "SkRefCnt.h"
 #include "TileGrid.h"
 
+#if __cplusplus < 201103L && !defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(char16_t)
+#define constexpr const
+#endif
+
 namespace WebCore {
 
 class LayerAndroid;
@@ -85,7 +89,7 @@
     void swapTileGrids();
 
     // Delay before we schedule a new tile at the new scale factor
-    static const double s_zoomUpdateDelay = 0.1; // 100 ms
+    static constexpr double s_zoomUpdateDelay = 0.1; // 100 ms
 
     TileGrid* m_frontTileGrid;
     TileGrid* m_backTileGrid;
diff --git a/Source/WebCore/platform/sql/SQLiteFileSystem.cpp b/Source/WebCore/platform/sql/SQLiteFileSystem.cpp
index 362005c..c4ca6aa 100644
--- a/Source/WebCore/platform/sql/SQLiteFileSystem.cpp
+++ b/Source/WebCore/platform/sql/SQLiteFileSystem.cpp
@@ -77,10 +77,10 @@
     String fileName;
     do {
         ++seq;
-        fileName = pathByAppendingComponent(dbDir, String::format("%016"PRIx64".db", seq));
+        fileName = pathByAppendingComponent(dbDir, String::format("%016" PRIx64 ".db", seq));
     } while (fileExists(fileName));
 
-    return String::format("%016"PRIx64".db", seq);
+    return String::format("%016" PRIx64 ".db", seq);
 }
 
 String SQLiteFileSystem::appendDatabaseFileNameToPath(const String& path, const String& fileName)