<commit_before>diff -Naur webkitgtk-2.10.7/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp webkitgtk-2.10.7/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp
--- webkitgtk-2.10.7/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp	2016-02-25 21:42:09.000000000 +0530
@@ -31,20 +31,22 @@
 
 #include "MacroAssemblerARM.h"
 
-#if OS(LINUX)
+#if OS(LINUX) && !defined(__ANDROID__)
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <elf.h>
 #include <asm/hwcap.h>
+#elif defined(__ANDROID__)
+#include <machine/cpu-features.h>
 #endif
 
 namespace JSC {
 
 static bool isVFPPresent()
 {
-#if OS(LINUX)
+#if OS(LINUX) && !defined(__ANDROID__)
     int fd = open("/proc/self/auxv", O_RDONLY);
     if (fd != -1) {
         Elf32_auxv_t aux;
@@ -56,6 +58,14 @@
         }
         close(fd);
     }
+#elif defined(__ANDROID__)
+
+#ifdef __ARM_HAVE_VFP
+    return true;
+#else
+    return false;
+#endif
+    
 #endif // OS(LINUX)
 
 #if (COMPILER(GCC_OR_CLANG) && defined(__VFP_FP__))
diff -Naur webkitgtk-2.10.7/Source/JavaScriptCore/runtime/MathObject.cpp webkitgtk-2.10.7/Source/JavaScriptCore/runtime/MathObject.cpp
--- webkitgtk-2.10.7/Source/JavaScriptCore/runtime/MathObject.cpp	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/JavaScriptCore/runtime/MathObject.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -355,6 +355,9 @@
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncLog2(ExecState* exec)
 {
+#ifdef __ANDROID__
+    auto log2 = [](double x) { return log(x) / log(2.); };
+#endif
     return JSValue::encode(jsDoubleNumber(log2(exec->argument(0).toNumber(exec))));
 }
 
diff -Naur webkitgtk-2.10.7/Source/JavaScriptCore/shell/PlatformGTK.cmake webkitgtk-2.10.7/Source/JavaScriptCore/shell/PlatformGTK.cmake
--- webkitgtk-2.10.7/Source/JavaScriptCore/shell/PlatformGTK.cmake	2013-08-03 21:40:38.000000000 +0530
+++ webkitgtk-2.10.7/Source/JavaScriptCore/shell/PlatformGTK.cmake	2016-02-25 08:25:04.000000000 +0530
@@ -1,3 +1,12 @@
+include_directories(./ ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
+
+string(REPLACE "-fpic" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+string(REPLACE "-fPIC" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+
+set_source_files_properties(../jsc.cpp PROPERTIES COMPILE_FLAGS -fpic)
+
+SET( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -pie" )
+
 list(APPEND JSC_LIBRARIES
     ${GLIB_LIBRARIES}
 )
diff -Naur webkitgtk-2.10.7/Source/WTF/wtf/Assertions.cpp webkitgtk-2.10.7/Source/WTF/wtf/Assertions.cpp
--- webkitgtk-2.10.7/Source/WTF/wtf/Assertions.cpp	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/WTF/wtf/Assertions.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -71,7 +71,9 @@
 #if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
 #include <cxxabi.h>
 #include <dlfcn.h>
-#include <execinfo.h>
+#  ifndef __ANDROID__
+#  include <execinfo.h>
+#  endif
 #endif
 
 extern "C" {
@@ -225,7 +227,7 @@
 
 void WTFGetBacktrace(void** stack, int* size)
 {
-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
+#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__) && !defined(__ANDROID__))
     *size = backtrace(stack, *size);
 #elif OS(WINDOWS)
     // The CaptureStackBackTrace function is available in XP, but it is not defined
diff -Naur webkitgtk-2.10.7/Source/WTF/wtf/Platform.h webkitgtk-2.10.7/Source/WTF/wtf/Platform.h
--- webkitgtk-2.10.7/Source/WTF/wtf/Platform.h	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/WTF/wtf/Platform.h	2016-02-25 08:25:04.000000000 +0530
@@ -590,7 +590,6 @@
 
 #if OS(UNIX)
 #define HAVE_ERRNO_H 1
-#define HAVE_LANGINFO_H 1
 #define HAVE_MMAP 1
 #define HAVE_SIGNAL_H 1
 #define HAVE_STRINGS_H 1
@@ -599,6 +598,11 @@
 #define USE_PTHREADS 1
 #endif /* OS(UNIX) */
 
+#if OS(UNIX) && !defined(__ANDROID__)
+#define HAVE_LANGINFO_H 1
+#else
+#endif
+
 #if (OS(FREEBSD) || OS(OPENBSD)) && !defined(__GLIBC__)
 #define HAVE_PTHREAD_NP_H 1
 #endif
@@ -622,6 +626,9 @@
 #if !OS(WINDOWS) && !OS(SOLARIS)
 #define HAVE_TM_GMTOFF 1
 #define HAVE_TM_ZONE 1
+#endif
+
+#if !defined(__ANDROID__)
 #define HAVE_TIMEGM 1
 #endif
 
diff -Naur webkitgtk-2.10.7/Source/WTF/wtf/PlatformGTK.cmake webkitgtk-2.10.7/Source/WTF/wtf/PlatformGTK.cmake
--- webkitgtk-2.10.7/Source/WTF/wtf/PlatformGTK.cmake	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/WTF/wtf/PlatformGTK.cmake	2016-03-06 16:44:40.000000000 +0530
@@ -15,7 +15,7 @@
     ${GLIB_GIO_LIBRARIES}
     ${GLIB_GOBJECT_LIBRARIES}
     ${GLIB_LIBRARIES}
-    pthread
+#    pthread
     ${ZLIB_LIBRARIES}
 )
 
diff -Naur webkitgtk-2.10.7/Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp webkitgtk-2.10.7/Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp
--- webkitgtk-2.10.7/Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp	2016-01-28 14:25:09.000000000 +0530
+++ webkitgtk-2.10.7/Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -36,7 +36,7 @@
 
 #include "Threading.h"
 
-#if OS(HURD)
+#if OS(HURD) || defined(__ANDROID__)
 // PTHREAD_KEYS_MAX is not defined in bionic nor in Hurd, so explicitly define it here.
 #define PTHREAD_KEYS_MAX 1024
 #else
diff -Naur webkitgtk-2.10.7/Source/WebCore/CMakeLists.txt webkitgtk-2.10.7/Source/WebCore/CMakeLists.txt
--- webkitgtk-2.10.7/Source/WebCore/CMakeLists.txt	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/CMakeLists.txt	2016-02-25 23:49:30.000000000 +0530
@@ -3670,7 +3670,7 @@
     WEBKIT_SET_EXTRA_COMPILER_FLAGS(ANGLESupport IGNORECXX_WARNINGS)
 endif ()
 
-target_link_libraries(WebCore ${WebCore_LIBRARIES})
+target_link_libraries(WebCore -Wl,--unresolved-symbols=ignore-in-object-files ${WebCore_LIBRARIES})
 
 if (WebCore_OUTPUT_NAME)
     set_target_properties(WebCore PROPERTIES OUTPUT_NAME ${WebCore_OUTPUT_NAME})
diff -Naur webkitgtk-2.10.7/Source/WebCore/Modules/webaudio/PeriodicWave.cpp webkitgtk-2.10.7/Source/WebCore/Modules/webaudio/PeriodicWave.cpp
--- webkitgtk-2.10.7/Source/WebCore/Modules/webaudio/PeriodicWave.cpp	2016-01-28 14:25:09.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/Modules/webaudio/PeriodicWave.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -99,6 +99,10 @@
 
 void PeriodicWave::waveDataForFundamentalFrequency(float fundamentalFrequency, float* &lowerWaveData, float* &higherWaveData, float& tableInterpolationFactor)
 {
+#ifdef __ANDROID__
+    auto log2f = [](float x) { return (float) (log((double)x) / log(2.)); };
+#endif
+	
     // Negative frequencies are allowed, in which case we alias to the positive frequency.
     fundamentalFrequency = fabsf(fundamentalFrequency);
 
diff -Naur webkitgtk-2.10.7/Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp webkitgtk-2.10.7/Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp
--- webkitgtk-2.10.7/Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp	2015-07-22 18:07:57.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -77,6 +77,10 @@
 {
     ASSERT(isMainThread());
 
+#ifdef __ANDROID__
+    auto log2 = [](double x) { return log(x) / log(2.); };
+#endif
+
     // Only allow powers of two.
     unsigned log2size = static_cast<unsigned>(log2(size));
     bool isPOT(1UL << log2size == size);
diff -Naur webkitgtk-2.10.7/Source/WebCore/PlatformGTK.cmake webkitgtk-2.10.7/Source/WebCore/PlatformGTK.cmake
--- webkitgtk-2.10.7/Source/WebCore/PlatformGTK.cmake	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/PlatformGTK.cmake	2016-03-13 21:31:18.000000000 +0530
@@ -201,7 +201,7 @@
     platform/text/hyphen/HyphenationLibHyphen.cpp
 )
 
-list(APPEND WebCorePlatformGTK_SOURCES
+list(APPEND WebCore_SOURCES
     editing/gtk/EditorGtk.cpp
 
     page/gtk/DragControllerGtk.cpp
@@ -264,6 +264,8 @@
 set(WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/platform/gtk/RenderThemeGtk.cpp)
 
 list(APPEND WebCore_LIBRARIES
+    ${GTK_LIBRARIES}
+    ${GDK_LIBRARIES}
     ${ATK_LIBRARIES}
     ${CAIRO_LIBRARIES}
     ${ENCHANT_LIBRARIES}
@@ -294,6 +296,8 @@
 )
 
 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
+    ${GTK_INCLUDE_DIRS}
+    ${GDK_INCLUDE_DIRS}
     ${ATK_INCLUDE_DIRS}
     ${CAIRO_INCLUDE_DIRS}
     ${ENCHANT_INCLUDE_DIRS}
@@ -501,22 +505,22 @@
     )
 endif ()
 
-add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
-add_dependencies(WebCorePlatformGTK WebCore)
-WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK)
-target_include_directories(WebCorePlatformGTK PRIVATE
-    ${WebCore_INCLUDE_DIRECTORIES}
-)
-target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE
-    ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
-    ${GTK_INCLUDE_DIRS}
-    ${GDK_INCLUDE_DIRS}
-)
-target_link_libraries(WebCorePlatformGTK
-    ${WebCore_LIBRARIES}
-    ${GTK_LIBRARIES}
-    ${GDK_LIBRARIES}
-)
+#add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
+#add_dependencies(WebCorePlatformGTK WebCore)
+#WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK)
+#target_include_directories(WebCorePlatformGTK PRIVATE
+#    ${WebCore_INCLUDE_DIRECTORIES}
+#)
+#target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE
+#    ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
+#    ${GTK_INCLUDE_DIRS}
+#    ${GDK_INCLUDE_DIRS}
+#)
+#target_link_libraries(WebCorePlatformGTK -Wl,--unresolved-symbols=ignore-in-object-files
+#    ${WebCore_LIBRARIES}
+#    ${GTK_LIBRARIES}
+#    ${GDK_LIBRARIES}
+#)
 
 include_directories(
     ${WebCore_INCLUDE_DIRECTORIES}
diff -Naur webkitgtk-2.10.7/Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp webkitgtk-2.10.7/Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp
--- webkitgtk-2.10.7/Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp	2015-07-22 18:07:57.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -42,7 +42,11 @@
 // Normal constructor: allocates for a given fftSize.
 FFTFrame::FFTFrame(unsigned fftSize)
     : m_FFTSize(fftSize)
+#ifdef __ANDROID__
+    , m_log2FFTSize(static_cast<unsigned>(log(fftSize) / log(2.)))
+#else
     , m_log2FFTSize(static_cast<unsigned>(log2(fftSize)))
+#endif
     , m_complexData(std::make_unique<GstFFTF32Complex[]>(unpackedFFTDataSize(m_FFTSize)))
     , m_realData(unpackedFFTDataSize(m_FFTSize))
     , m_imagData(unpackedFFTDataSize(m_FFTSize))
diff -Naur webkitgtk-2.10.7/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp webkitgtk-2.10.7/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp
--- webkitgtk-2.10.7/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp	2016-01-28 14:25:09.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -43,7 +43,13 @@
     
     if (variable.isArray()) {
         for (unsigned i = 0; i < variable.elementCount(); i++) {
+#ifdef __ANDROID__
+			char i_string[20];
+			sprintf(i_string, "%u", i);
+            std::string arrayBrackets = "[" + std::string(i_string) + "]";
+#else
             std::string arrayBrackets = "[" + std::to_string(i) + "]";
+#endif
             std::string arrayName = name + arrayBrackets;
             std::string arrayMappedName = mappedName + arrayBrackets;
             LOG(WebGL, "Map shader symbol %s -> %s\n", arrayName.c_str(), arrayMappedName.c_str());
@@ -72,7 +78,13 @@
     if (variable.isStruct()) {
         if (variable.isArray()) {
             for (unsigned i = 0; i < variable.elementCount(); i++) {
-                std::string arrayBrackets = "[" + std::to_string(i) + "]";
+#ifdef __ANDROID__
+  				char i_string[20];
+				sprintf(i_string, "%u", i);
+            	std::string arrayBrackets = "[" + std::string(i_string) + "]";
+#else
+            	std::string arrayBrackets = "[" + std::to_string(i) + "]";
+#endif
                 std::string arrayName = variable.name + arrayBrackets;
                 std::string arrayMappedName = variable.mappedName + arrayBrackets;
                 for (const auto& field : variable.fields)
diff -Naur webkitgtk-2.10.7/Source/WebCore/platform/graphics/GLContext.cpp webkitgtk-2.10.7/Source/WebCore/platform/graphics/GLContext.cpp
--- webkitgtk-2.10.7/Source/WebCore/platform/graphics/GLContext.cpp	2016-01-29 21:59:33.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/platform/graphics/GLContext.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -132,7 +132,10 @@
         return WTF::move(glxContext);
 #endif
 #if USE(EGL)
-    if (auto eglContext = GLContextEGL::createContext(windowHandle, sharingContext))
+#ifdef __ANDROID__
+    EGLNativeWindowType EGLWindowHandle = reinterpret_cast<EGLNativeWindowType>(windowHandle);
+#endif
+    if (auto eglContext = GLContextEGL::createContext(EGLWindowHandle, sharingContext))
         return WTF::move(eglContext);
 #endif
     return nullptr;
diff -Naur webkitgtk-2.10.7/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp webkitgtk-2.10.7/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp
--- webkitgtk-2.10.7/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp	2016-01-29 21:59:33.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -44,8 +44,10 @@
     , m_supportsOESvertexArrayObject(false)
     , m_supportsIMGMultisampledRenderToTexture(false)
     , m_supportsANGLEinstancedArrays(false)
+#ifndef __ANDROID__
     , m_glFramebufferTexture2DMultisampleIMG(0)
     , m_glRenderbufferStorageMultisampleIMG(0)
+#endif
     , m_glBindVertexArrayOES(0)
     , m_glDeleteVertexArraysOES(0)
     , m_glGenVertexArraysOES(0)
@@ -54,9 +56,11 @@
     , m_glReadnPixelsEXT(0)
     , m_glGetnUniformfvEXT(0)
     , m_glGetnUniformivEXT(0)
+#ifndef __ANDROID__
     , m_glVertexAttribDivisorANGLE(nullptr)
     , m_glDrawArraysInstancedANGLE(nullptr)
     , m_glDrawElementsInstancedANGLE(nullptr)
+#endif
 {
 }
 
@@ -66,17 +70,21 @@
 
 void Extensions3DOpenGLES::framebufferTexture2DMultisampleIMG(unsigned long target, unsigned long attachment, unsigned long textarget, unsigned int texture, int level, unsigned long samples)
 {
+#ifndef __ANDROID__
     if (m_glFramebufferTexture2DMultisampleIMG)
         m_glFramebufferTexture2DMultisampleIMG(target, attachment, textarget, texture, level, samples);
     else
+#endif
         m_context->synthesizeGLError(GL_INVALID_OPERATION);
 }
 
 void Extensions3DOpenGLES::renderbufferStorageMultisampleIMG(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height)
 {
+#ifndef __ANDROID__
     if (m_glRenderbufferStorageMultisampleIMG)
         m_glRenderbufferStorageMultisampleIMG(target, samples, internalformat, width, height);
     else
+#endif
         m_context->synthesizeGLError(GL_INVALID_OPERATION);
 }
 
@@ -87,9 +95,11 @@
 
 void Extensions3DOpenGLES::renderbufferStorageMultisample(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height)
 {
+#ifndef __ANDROID__
     if (m_glRenderbufferStorageMultisampleIMG)
         renderbufferStorageMultisampleIMG(target, samples, internalformat, width, height);
     else
+#endif
         notImplemented();
 }
 
@@ -224,7 +234,9 @@
 {
     if (m_glGetnUniformivEXT) {
         m_context->makeContextCurrent();
+#ifndef __ANDROID__
         m_glGetnUniformivEXT(program, location, bufSize, params);
+#endif
         return;
     }
 
@@ -233,17 +245,22 @@
 
 void Extensions3DOpenGLES::drawArraysInstanced(GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primcount)
 {
+#ifndef __ANDROID__
     if (!m_glDrawArraysInstancedANGLE) {
         m_context->synthesizeGLError(GL_INVALID_OPERATION);
         return;
     }
-
+    
     m_context->makeContextCurrent();
     m_glDrawArraysInstancedANGLE(mode, first, count, primcount);
+#else
+    m_context->synthesizeGLError(GL_INVALID_OPERATION);
+#endif
 }
 
 void Extensions3DOpenGLES::drawElementsInstanced(GC3Denum mode, GC3Dsizei count, GC3Denum type, long long offset, GC3Dsizei primcount)
 {
+#ifndef __ANDROID__
     if (!m_glDrawElementsInstancedANGLE) {
         m_context->synthesizeGLError(GL_INVALID_OPERATION);
         return;
@@ -251,10 +268,14 @@
 
     m_context->makeContextCurrent();
     m_glDrawElementsInstancedANGLE(mode, count, type, reinterpret_cast<GLvoid*>(static_cast<intptr_t>(offset)), primcount);
+#else
+    m_context->synthesizeGLError(GL_INVALID_OPERATION);
+#endif
 }
 
 void Extensions3DOpenGLES::vertexAttribDivisor(GC3Duint index, GC3Duint divisor)
 {
+#ifndef __ANDROID__
     if (!m_glVertexAttribDivisorANGLE) {
         m_context->synthesizeGLError(GL_INVALID_OPERATION);
         return;
@@ -262,6 +283,9 @@
 
     m_context->makeContextCurrent();
     m_glVertexAttribDivisorANGLE(index, divisor);
+#else
+    m_context->synthesizeGLError(GL_INVALID_OPERATION);
+#endif
 }
 
 bool Extensions3DOpenGLES::supportsExtension(const String& name)
@@ -274,19 +298,28 @@
             m_glIsVertexArrayOES = reinterpret_cast<PFNGLISVERTEXARRAYOESPROC>(eglGetProcAddress("glIsVertexArrayOES"));
             m_supportsOESvertexArrayObject = true;
         } else if (!m_supportsIMGMultisampledRenderToTexture && name == "GL_IMG_multisampled_render_to_texture") {
+#ifndef __ANDROID__
             m_glFramebufferTexture2DMultisampleIMG = reinterpret_cast<PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC>(eglGetProcAddress("glFramebufferTexture2DMultisampleIMG"));
             m_glRenderbufferStorageMultisampleIMG = reinterpret_cast<PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC>(eglGetProcAddress("glRenderbufferStorageMultisampleIMG"));
             m_supportsIMGMultisampledRenderToTexture = true;
+#else
+            m_supportsIMGMultisampledRenderToTexture = false;
+#endif
+
         } else if (!m_glGetGraphicsResetStatusEXT && name == "GL_EXT_robustness") {
             m_glGetGraphicsResetStatusEXT = reinterpret_cast<PFNGLGETGRAPHICSRESETSTATUSEXTPROC>(eglGetProcAddress("glGetGraphicsResetStatusEXT"));
             m_glReadnPixelsEXT = reinterpret_cast<PFNGLREADNPIXELSEXTPROC>(eglGetProcAddress("glReadnPixelsEXT"));
             m_glGetnUniformfvEXT = reinterpret_cast<PFNGLGETNUNIFORMFVEXTPROC>(eglGetProcAddress("glGetnUniformfvEXT"));
             m_glGetnUniformivEXT = reinterpret_cast<PFNGLGETNUNIFORMIVEXTPROC>(eglGetProcAddress("glGetnUniformivEXT"));
         } else if (!m_supportsANGLEinstancedArrays && name == "GL_ANGLE_instanced_arrays") {
+#ifndef __ANDROID__
             m_glVertexAttribDivisorANGLE = reinterpret_cast<PFNGLVERTEXATTRIBDIVISORANGLEPROC>(eglGetProcAddress("glVertexAttribDivisorANGLE"));
             m_glDrawArraysInstancedANGLE = reinterpret_cast<PFNGLDRAWARRAYSINSTANCEDANGLEPROC >(eglGetProcAddress("glDrawArraysInstancedANGLE"));
             m_glDrawElementsInstancedANGLE = reinterpret_cast<PFNGLDRAWELEMENTSINSTANCEDANGLEPROC >(eglGetProcAddress("glDrawElementsInstancedANGLE"));
             m_supportsANGLEinstancedArrays = true;
+#else
+            m_supportsANGLEinstancedArrays = false;
+#endif
         } else if (name == "GL_EXT_draw_buffers") {
             // FIXME: implement the support.
             return false;
diff -Naur webkitgtk-2.10.7/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h webkitgtk-2.10.7/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h
--- webkitgtk-2.10.7/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h	2016-01-04 16:08:34.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h	2016-02-25 08:25:04.000000000 +0530
@@ -106,8 +106,10 @@
     bool m_supportsIMGMultisampledRenderToTexture;
     bool m_supportsANGLEinstancedArrays;
 
+#ifndef __ANDROID__
     PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC m_glFramebufferTexture2DMultisampleIMG;
     PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC m_glRenderbufferStorageMultisampleIMG;
+#endif
     PFNGLBINDVERTEXARRAYOESPROC m_glBindVertexArrayOES;
     PFNGLDELETEVERTEXARRAYSOESPROC m_glDeleteVertexArraysOES;
     PFNGLGENVERTEXARRAYSOESPROC m_glGenVertexArraysOES;
@@ -116,9 +118,11 @@
     PFNGLREADNPIXELSEXTPROC m_glReadnPixelsEXT;
     PFNGLGETNUNIFORMFVEXTPROC m_glGetnUniformfvEXT;
     PFNGLGETNUNIFORMIVEXTPROC m_glGetnUniformivEXT;
+#ifndef __ANDROID__
     PFNGLVERTEXATTRIBDIVISORANGLEPROC m_glVertexAttribDivisorANGLE;
     PFNGLDRAWARRAYSINSTANCEDANGLEPROC m_glDrawArraysInstancedANGLE;
     PFNGLDRAWELEMENTSINSTANCEDANGLEPROC m_glDrawElementsInstancedANGLE;
+#endif
 
     std::unique_ptr<GraphicsContext3D::ContextLostCallback> m_contextLostCallback;
 };
diff -Naur webkitgtk-2.10.7/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp webkitgtk-2.10.7/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp
--- webkitgtk-2.10.7/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp	2016-01-29 21:59:33.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -202,7 +202,9 @@
 void MemoryPressureHandler::platformReleaseMemory(Critical)
 {
     ReliefLogger log("Run malloc_trim");
+#ifndef __ANDROID__
     malloc_trim(0);
+#endif
 }
 
 void MemoryPressureHandler::ReliefLogger::platformLog()
diff -Naur webkitgtk-2.10.7/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp webkitgtk-2.10.7/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp
--- webkitgtk-2.10.7/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp	2016-01-29 21:59:33.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -44,6 +44,10 @@
 #include <wtf/UniStdExtras.h>
 #include <wtf/text/CString.h>
 
+#ifdef __ANDROID__
+#include <linux/ashmem.h>
+#endif
+
 namespace WebKit {
 
 SharedMemory::Handle::Handle()
@@ -98,6 +102,7 @@
     CString tempName;
 
     int fileDescriptor = -1;
+#ifndef __ANDROID__    
     for (int tries = 0; fileDescriptor == -1 && tries < 10; ++tries) {
         String name = String("/WK2SharedMemory.") + String::number(static_cast<unsigned>(WTF::randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0)));
         tempName = name.utf8();
@@ -106,11 +111,30 @@
             fileDescriptor = shm_open(tempName.data(), O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
         } while (fileDescriptor == -1 && errno == EINTR);
     }
+#else
+	do {
+        fileDescriptor = open("/dev/ashmem", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
+    } while (fileDescriptor == -1 && errno == EINTR);
+	String name = String("/WK2SharedMemory.") + String::number(static_cast<unsigned>(WTF::randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0)));
+	char buf[256];
+	strncpy(buf, (const char*) name.utf8().data(), 256);
+	buf[255] = 0;
+    if (fileDescriptor < 0 ||
+            ioctl(fileDescriptor, ASHMEM_SET_SIZE, size) < 0 ||
+            ioctl(fileDescriptor, ASHMEM_SET_NAME, buf) << 0 ) {
+
+    	if (fileDescriptor >= 0) {
+    	    close(fileDescriptor);
+    	    fileDescriptor = -1;
+    	}
+    }
+#endif
     if (fileDescriptor == -1) {
         WTFLogAlways("Failed to create shared memory file %s: %s", tempName.data(), strerror(errno));
         return 0;
     }
 
+#ifndef __ANDROID__
     while (ftruncate(fileDescriptor, size) == -1) {
         if (errno != EINTR) {
             closeWithRetry(fileDescriptor);
@@ -118,15 +142,20 @@
             return 0;
         }
     }
+#endif
 
     void* data = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fileDescriptor, 0);
     if (data == MAP_FAILED) {
         closeWithRetry(fileDescriptor);
+#ifndef __ANDROID__
         shm_unlink(tempName.data());
+#endif
         return 0;
     }
 
+#ifndef __ANDROID__
     shm_unlink(tempName.data());
+#endif
 
     RefPtr<SharedMemory> instance = adoptRef(new SharedMemory());
     instance->m_data = data;
diff -Naur webkitgtk-2.10.7/Source/WebKit2/PlatformGTK.cmake webkitgtk-2.10.7/Source/WebKit2/PlatformGTK.cmake
--- webkitgtk-2.10.7/Source/WebKit2/PlatformGTK.cmake	2016-01-29 21:59:33.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebKit2/PlatformGTK.cmake	2016-03-13 19:30:22.000000000 +0530
@@ -570,7 +570,7 @@
 
 list(APPEND WebKit2_LIBRARIES
     GObjectDOMBindings
-    WebCorePlatformGTK
+#    WebCorePlatformGTK
     ${GTK_UNIX_PRINT_LIBRARIES}
 )
 
@@ -595,6 +595,16 @@
     endif ()
 endif ()
 
+list(APPEND WebKit2_LIBRARIES
+    gthread-2.0
+    pangoft2-1.0
+    epoxy
+    pixman-1
+    ffi
+    stdc++
+    icudata
+)
+
 ADD_WHOLE_ARCHIVE_TO_LIBRARIES(WebKit2_LIBRARIES)
 
 set(WebKit2_MARSHAL_LIST ${WEBKIT2_DIR}/UIProcess/API/gtk/webkit2marshal.list)
diff -Naur webkitgtk-2.10.7/Source/bmalloc/bmalloc/Allocator.cpp webkitgtk-2.10.7/Source/bmalloc/bmalloc/Allocator.cpp
--- webkitgtk-2.10.7/Source/bmalloc/bmalloc/Allocator.cpp	2016-01-28 14:25:09.000000000 +0530
+++ webkitgtk-2.10.7/Source/bmalloc/bmalloc/Allocator.cpp	2016-02-25 08:32:40.000000000 +0530
@@ -73,8 +73,12 @@
 
     if (!m_isBmallocEnabled) {
         void* result = nullptr;
+#ifdef __ANDROID__
+        result = memalign(alignment, size);
+#else
         if (posix_memalign(&result, alignment, size))
             return nullptr;
+#endif
         return result;
     }
     
diff -Naur webkitgtk-2.10.7/Tools/MiniBrowser/gtk/CMakeLists.txt webkitgtk-2.10.7/Tools/MiniBrowser/gtk/CMakeLists.txt
--- webkitgtk-2.10.7/Tools/MiniBrowser/gtk/CMakeLists.txt	2016-01-28 14:25:09.000000000 +0530
+++ webkitgtk-2.10.7/Tools/MiniBrowser/gtk/CMakeLists.txt	2016-03-06 19:56:51.000000000 +0530
@@ -57,7 +57,7 @@
 include_directories(${MiniBrowser_INCLUDE_DIRECTORIES})
 include_directories(SYSTEM ${MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES})
 add_executable(MiniBrowser ${MiniBrowser_SOURCES})
-target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES})
+target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES} -pie)<commit_msg>Patched webkitgtk to support just javascriptcore building<commit_after>diff -Naur webkitgtk-2.10.7/CMakeLists.txt webkitgtk-2.10.7/CMakeLists.txt
--- webkitgtk-2.10.7/CMakeLists.txt	2016-01-29 21:59:31.000000000 +0530
+++ webkitgtk-2.10.7/CMakeLists.txt	2016-04-03 17:04:48.000000000 +0530
@@ -41,7 +41,7 @@
 # -----------------------------------------------------------------------------
 # Determine which port will be built
 # -----------------------------------------------------------------------------
-set(ALL_PORTS Efl GTK AppleWin WinCairo Mac)
+set(ALL_PORTS Efl GTK AppleWin WinCairo Mac JSC)
 set(PORT "NOPORT" CACHE STRING "choose which WebKit port to build (one of ${ALL_PORTS})")
 
 list(FIND ALL_PORTS ${PORT} RET)
diff -Naur webkitgtk-2.10.7/Source/CMakeLists.txt webkitgtk-2.10.7/Source/CMakeLists.txt
--- webkitgtk-2.10.7/Source/CMakeLists.txt	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/CMakeLists.txt	2016-04-03 17:14:19.000000000 +0530
@@ -10,7 +10,9 @@
 
 add_subdirectory(JavaScriptCore)
 
-add_subdirectory(WebCore)
+if (ENABLE_WEBCORE)
+    add_subdirectory(WebCore)
+endif ()
 
 if (WIN32 AND ENABLE_GRAPHICS_CONTEXT_3D)
     add_subdirectory(ThirdParty/ANGLE)
@@ -36,8 +38,10 @@
 WEBKIT_SET_EXTRA_COMPILER_FLAGS(bmalloc ${ADDITIONAL_COMPILER_FLAGS})
 WEBKIT_SET_EXTRA_COMPILER_FLAGS(WTF ${ADDITIONAL_COMPILER_FLAGS})
 WEBKIT_SET_EXTRA_COMPILER_FLAGS(JavaScriptCore ${ADDITIONAL_COMPILER_FLAGS})
-WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCoreTestSupport ${ADDITIONAL_COMPILER_FLAGS})
-WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCore ${ADDITIONAL_COMPILER_FLAGS})
+if (ENABLE_WEBCORE)
+    WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCoreTestSupport ${ADDITIONAL_COMPILER_FLAGS})
+    WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCore ${ADDITIONAL_COMPILER_FLAGS})
+endif()
 
 if (ENABLE_WEBKIT)
     WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebKit ${ADDITIONAL_COMPILER_FLAGS})
diff -Naur webkitgtk-2.10.7/Source/JavaScriptCore/CMakeLists.txt webkitgtk-2.10.7/Source/JavaScriptCore/CMakeLists.txt
--- webkitgtk-2.10.7/Source/JavaScriptCore/CMakeLists.txt	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/JavaScriptCore/CMakeLists.txt	2016-04-03 21:18:39.000000000 +0530
@@ -752,7 +752,11 @@
     ${JAVASCRIPTCORE_DIR}/llint/LLIntOffsetsExtractor.cpp
     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h
 )
-target_link_libraries(LLIntOffsetsExtractor WTF)
+if ( MIPS OR MIPS64 )
+    target_link_libraries(LLIntOffsetsExtractor WTF -L${SANDBOX}/lib ffi gmodule-2.0 icudata)
+else ()
+    target_link_libraries(LLIntOffsetsExtractor WTF)
+endif ()
 
 # The build system will execute asm.rb every time LLIntOffsetsExtractor's mtime is newer than
 # LLIntAssembly.h's mtime. The problem we have here is: asm.rb has some built-in optimization
diff -Naur webkitgtk-2.10.7/Source/JavaScriptCore/PlatformJSC.cmake webkitgtk-2.10.7/Source/JavaScriptCore/PlatformJSC.cmake
--- webkitgtk-2.10.7/Source/JavaScriptCore/PlatformJSC.cmake	1970-01-01 05:30:00.000000000 +0530
+++ webkitgtk-2.10.7/Source/JavaScriptCore/PlatformJSC.cmake	2016-04-03 17:11:19.000000000 +0530
@@ -0,0 +1,42 @@
+set(JavaScriptCore_OUTPUT_NAME javascriptcoregtk-${WEBKITGTK_API_VERSION})
+
+configure_file(javascriptcoregtk.pc.in ${CMAKE_BINARY_DIR}/Source/JavaScriptCore/javascriptcoregtk-${WEBKITGTK_API_VERSION}.pc @ONLY)
+configure_file(JavaScriptCore.gir.in ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir @ONLY)
+
+add_custom_command(
+    OUTPUT ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.typelib
+    DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
+    COMMAND ${INTROSPECTION_COMPILER} ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.typelib
+)
+
+install(FILES "${CMAKE_BINARY_DIR}/Source/JavaScriptCore/javascriptcoregtk-${WEBKITGTK_API_VERSION}.pc"
+        DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
+)
+
+install(FILES API/JavaScript.h
+              API/JSBase.h
+              API/JSContextRef.h
+              API/JSObjectRef.h
+              API/JSStringRef.h
+              API/JSValueRef.h
+              API/WebKitAvailability.h
+        DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/JavaScriptCore"
+)
+
+if (ENABLE_INTROSPECTION)
+    install(FILES ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
+            DESTINATION ${INTROSPECTION_INSTALL_GIRDIR}
+    )
+    install(FILES ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.typelib
+            DESTINATION ${INTROSPECTION_INSTALL_TYPELIBDIR}
+    )
+endif ()
+
+add_definitions(-DSTATICALLY_LINKED_WITH_WTF)
+
+list(APPEND JavaScriptCore_LIBRARIES
+    ${GLIB_LIBRARIES}
+)
+list(APPEND JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES
+    ${GLIB_INCLUDE_DIRS}
+)
diff -Naur webkitgtk-2.10.7/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp webkitgtk-2.10.7/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp
--- webkitgtk-2.10.7/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp	2016-02-25 21:42:09.000000000 +0530
@@ -31,20 +31,22 @@
 
 #include "MacroAssemblerARM.h"
 
-#if OS(LINUX)
+#if OS(LINUX) && !defined(__ANDROID__)
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <elf.h>
 #include <asm/hwcap.h>
+#elif defined(__ANDROID__)
+#include <machine/cpu-features.h>
 #endif
 
 namespace JSC {
 
 static bool isVFPPresent()
 {
-#if OS(LINUX)
+#if OS(LINUX) && !defined(__ANDROID__)
     int fd = open("/proc/self/auxv", O_RDONLY);
     if (fd != -1) {
         Elf32_auxv_t aux;
@@ -56,6 +58,14 @@
         }
         close(fd);
     }
+#elif defined(__ANDROID__)
+
+#ifdef __ARM_HAVE_VFP
+    return true;
+#else
+    return false;
+#endif
+    
 #endif // OS(LINUX)
 
 #if (COMPILER(GCC_OR_CLANG) && defined(__VFP_FP__))
diff -Naur webkitgtk-2.10.7/Source/JavaScriptCore/runtime/MathObject.cpp webkitgtk-2.10.7/Source/JavaScriptCore/runtime/MathObject.cpp
--- webkitgtk-2.10.7/Source/JavaScriptCore/runtime/MathObject.cpp	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/JavaScriptCore/runtime/MathObject.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -355,6 +355,9 @@
 
 EncodedJSValue JSC_HOST_CALL mathProtoFuncLog2(ExecState* exec)
 {
+#ifdef __ANDROID__
+    auto log2 = [](double x) { return log(x) / log(2.); };
+#endif
     return JSValue::encode(jsDoubleNumber(log2(exec->argument(0).toNumber(exec))));
 }
 
diff -Naur webkitgtk-2.10.7/Source/JavaScriptCore/shell/CMakeLists.txt webkitgtk-2.10.7/Source/JavaScriptCore/shell/CMakeLists.txt
--- webkitgtk-2.10.7/Source/JavaScriptCore/shell/CMakeLists.txt	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/JavaScriptCore/shell/CMakeLists.txt	2016-04-03 21:37:34.000000000 +0530
@@ -21,7 +21,11 @@
 WEBKIT_WRAP_SOURCELIST(${JSC_SOURCES})
 include_directories(./ ${JavaScriptCore_INCLUDE_DIRECTORIES})
 add_executable(jsc ${JSC_SOURCES})
-target_link_libraries(jsc ${JSC_LIBRARIES})
+if ( MIPS OR MIPS64 )
+    target_link_libraries(jsc ${JSC_LIBRARIES} -L${SANDBOX}/lib ffi gmodule-2.0 icudata)
+else ()
+    target_link_libraries(jsc ${JSC_LIBRARIES})
+endif ()
 set_target_properties(jsc PROPERTIES FOLDER "JavaScriptCore")
 
 if (JSC_OUTPUT_NAME)
diff -Naur webkitgtk-2.10.7/Source/JavaScriptCore/shell/PlatformGTK.cmake webkitgtk-2.10.7/Source/JavaScriptCore/shell/PlatformGTK.cmake
--- webkitgtk-2.10.7/Source/JavaScriptCore/shell/PlatformGTK.cmake	2013-08-03 21:40:38.000000000 +0530
+++ webkitgtk-2.10.7/Source/JavaScriptCore/shell/PlatformGTK.cmake	2016-02-25 08:25:04.000000000 +0530
@@ -1,3 +1,12 @@
+include_directories(./ ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
+
+string(REPLACE "-fpic" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+string(REPLACE "-fPIC" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+
+set_source_files_properties(../jsc.cpp PROPERTIES COMPILE_FLAGS -fpic)
+
+SET( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -pie" )
+
 list(APPEND JSC_LIBRARIES
     ${GLIB_LIBRARIES}
 )
diff -Naur webkitgtk-2.10.7/Source/JavaScriptCore/shell/PlatformJSC.cmake webkitgtk-2.10.7/Source/JavaScriptCore/shell/PlatformJSC.cmake
--- webkitgtk-2.10.7/Source/JavaScriptCore/shell/PlatformJSC.cmake	1970-01-01 05:30:00.000000000 +0530
+++ webkitgtk-2.10.7/Source/JavaScriptCore/shell/PlatformJSC.cmake	2016-04-03 17:20:47.000000000 +0530
@@ -0,0 +1,12 @@
+include_directories(./ ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
+
+string(REPLACE "-fpic" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+string(REPLACE "-fPIC" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+
+set_source_files_properties(../jsc.cpp PROPERTIES COMPILE_FLAGS -fpic)
+
+SET( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -pie" )
+
+list(APPEND JSC_LIBRARIES
+    ${GLIB_LIBRARIES}
+)
diff -Naur webkitgtk-2.10.7/Source/PlatformJSC.cmake webkitgtk-2.10.7/Source/PlatformJSC.cmake
--- webkitgtk-2.10.7/Source/PlatformJSC.cmake	1970-01-01 05:30:00.000000000 +0530
+++ webkitgtk-2.10.7/Source/PlatformJSC.cmake	2016-04-03 17:12:13.000000000 +0530
@@ -0,0 +1,94 @@
+# This allows exposing a 'gir' target which builds all GObject introspection files.
+if (ENABLE_INTROSPECTION)
+    add_custom_target(gir ALL DEPENDS ${GObjectIntrospectionTargets})
+endif ()
+
+list(APPEND DocumentationDependencies
+    GObjectDOMBindings
+    WebKit2
+    "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml"
+    "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-${WEBKITGTK_API_VERSION}-sections.txt"
+)
+
+if (ENABLE_GTKDOC)
+    install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk-${WEBKITGTK_API_VERSION}/html/
+            DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html/webkit2gtk-${WEBKITGTK_API_VERSION}"
+    )
+    install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkitdomgtk-${WEBKITGTK_API_VERSION}/html/
+            DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html/webkitdomgtk-${WEBKITGTK_API_VERSION}"
+    )
+endif ()
+
+macro(ADD_GTKDOC_GENERATOR _stamp_name _extra_args)
+    add_custom_command(
+        OUTPUT "${CMAKE_BINARY_DIR}/${_stamp_name}"
+        DEPENDS ${DocumentationDependencies}
+        COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS} ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc ${_extra_args}
+        COMMAND touch ${_stamp_name}
+        WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
+    )
+endmacro()
+
+add_gtkdoc_generator("docs-build.stamp" "")
+if (ENABLE_GTKDOC)
+    add_custom_target(gtkdoc ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp")
+elseif (NOT ENABLED_COMPILER_SANITIZERS AND NOT CMAKE_CROSSCOMPILING)
+    add_custom_target(gtkdoc DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp")
+
+    # Add a default build step which check that documentation does not have any warnings
+    # or errors. This is useful to prevent breaking documentation inadvertently during
+    # the course of development.
+    if (DEVELOPER_MODE)
+        add_gtkdoc_generator("docs-build-no-html.stamp" "--skip-html")
+        add_custom_target(gtkdoc-no-html ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build-no-html.stamp")
+    endif ()
+endif ()
+
+add_custom_target(check
+    COMMAND ${TOOLS_DIR}/Scripts/run-gtk-tests
+    COMMAND ${TOOLS_DIR}/gtk/check-for-webkitdom-api-breaks
+)
+
+if (DEVELOPER_MODE)
+    configure_file(
+        ${TOOLS_DIR}/gtk/manifest.txt.in
+        ${CMAKE_BINARY_DIR}/manifest.txt
+    )
+
+    add_custom_command(
+        OUTPUT ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
+        DEPENDS ${TOOLS_DIR}/gtk/make-dist.py
+        DEPENDS ${CMAKE_BINARY_DIR}/manifest.txt
+        DEPENDS WebKit2
+        DEPENDS gtkdoc
+        COMMAND ${TOOLS_DIR}/gtk/make-dist.py
+                --source-dir=${CMAKE_SOURCE_DIR}
+                --build-dir=${CMAKE_BINARY_DIR}
+                --version=${PROJECT_VERSION}
+                ${CMAKE_BINARY_DIR}/manifest.txt
+    )
+
+    add_custom_command(
+        OUTPUT ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar.xz
+        DEPENDS ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
+        COMMAND xz -f ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
+    )
+
+    add_custom_target(dist
+        DEPENDS ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar.xz
+    )
+
+    add_custom_target(distcheck
+        DEPENDS ${TOOLS_DIR}/gtk/make-dist.py
+        DEPENDS ${CMAKE_BINARY_DIR}/manifest.txt
+        DEPENDS WebKit2
+        DEPENDS gtkdoc
+        COMMAND ${TOOLS_DIR}/gtk/make-dist.py
+                --check
+                --source-dir=${CMAKE_SOURCE_DIR}
+                --build-dir=${CMAKE_BINARY_DIR}
+                --version=${PROJECT_VERSION}
+                ${CMAKE_BINARY_DIR}/manifest.txt
+        COMMAND xz -f ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
+    )
+endif ()
diff -Naur webkitgtk-2.10.7/Source/WTF/wtf/Assertions.cpp webkitgtk-2.10.7/Source/WTF/wtf/Assertions.cpp
--- webkitgtk-2.10.7/Source/WTF/wtf/Assertions.cpp	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/WTF/wtf/Assertions.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -71,7 +71,9 @@
 #if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
 #include <cxxabi.h>
 #include <dlfcn.h>
-#include <execinfo.h>
+#  ifndef __ANDROID__
+#  include <execinfo.h>
+#  endif
 #endif
 
 extern "C" {
@@ -225,7 +227,7 @@
 
 void WTFGetBacktrace(void** stack, int* size)
 {
-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
+#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__) && !defined(__ANDROID__))
     *size = backtrace(stack, *size);
 #elif OS(WINDOWS)
     // The CaptureStackBackTrace function is available in XP, but it is not defined
diff -Naur webkitgtk-2.10.7/Source/WTF/wtf/Platform.h webkitgtk-2.10.7/Source/WTF/wtf/Platform.h
--- webkitgtk-2.10.7/Source/WTF/wtf/Platform.h	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/WTF/wtf/Platform.h	2016-02-25 08:25:04.000000000 +0530
@@ -590,7 +590,6 @@
 
 #if OS(UNIX)
 #define HAVE_ERRNO_H 1
-#define HAVE_LANGINFO_H 1
 #define HAVE_MMAP 1
 #define HAVE_SIGNAL_H 1
 #define HAVE_STRINGS_H 1
@@ -599,6 +598,11 @@
 #define USE_PTHREADS 1
 #endif /* OS(UNIX) */
 
+#if OS(UNIX) && !defined(__ANDROID__)
+#define HAVE_LANGINFO_H 1
+#else
+#endif
+
 #if (OS(FREEBSD) || OS(OPENBSD)) && !defined(__GLIBC__)
 #define HAVE_PTHREAD_NP_H 1
 #endif
@@ -622,6 +626,9 @@
 #if !OS(WINDOWS) && !OS(SOLARIS)
 #define HAVE_TM_GMTOFF 1
 #define HAVE_TM_ZONE 1
+#endif
+
+#if !defined(__ANDROID__)
 #define HAVE_TIMEGM 1
 #endif
 
diff -Naur webkitgtk-2.10.7/Source/WTF/wtf/PlatformGTK.cmake webkitgtk-2.10.7/Source/WTF/wtf/PlatformGTK.cmake
--- webkitgtk-2.10.7/Source/WTF/wtf/PlatformGTK.cmake	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/WTF/wtf/PlatformGTK.cmake	2016-03-06 16:44:40.000000000 +0530
@@ -15,7 +15,7 @@
     ${GLIB_GIO_LIBRARIES}
     ${GLIB_GOBJECT_LIBRARIES}
     ${GLIB_LIBRARIES}
-    pthread
+#    pthread
     ${ZLIB_LIBRARIES}
 )
 
diff -Naur webkitgtk-2.10.7/Source/WTF/wtf/PlatformJSC.cmake webkitgtk-2.10.7/Source/WTF/wtf/PlatformJSC.cmake
--- webkitgtk-2.10.7/Source/WTF/wtf/PlatformJSC.cmake	1970-01-01 05:30:00.000000000 +0530
+++ webkitgtk-2.10.7/Source/WTF/wtf/PlatformJSC.cmake	2016-04-03 17:19:11.000000000 +0530
@@ -0,0 +1,24 @@
+set(WTF_LIBRARY_TYPE STATIC)
+set(WTF_OUTPUT_NAME WTFGTK)
+
+list(APPEND WTF_SOURCES
+    glib/GLibUtilities.cpp
+    glib/GMainLoopSource.cpp
+    glib/GRefPtr.cpp
+    glib/GThreadSafeMainLoopSource.cpp
+    glib/MainThreadGLib.cpp
+    glib/RunLoopGLib.cpp
+    glib/WorkQueueGLib.cpp
+)
+
+list(APPEND WTF_LIBRARIES
+    ${GLIB_GIO_LIBRARIES}
+    ${GLIB_GOBJECT_LIBRARIES}
+    ${GLIB_LIBRARIES}
+#    pthread
+    ${ZLIB_LIBRARIES}
+)
+
+list(APPEND WTF_SYSTEM_INCLUDE_DIRECTORIES
+    ${GLIB_INCLUDE_DIRS}
+)
diff -Naur webkitgtk-2.10.7/Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp webkitgtk-2.10.7/Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp
--- webkitgtk-2.10.7/Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp	2016-01-28 14:25:09.000000000 +0530
+++ webkitgtk-2.10.7/Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -36,7 +36,7 @@
 
 #include "Threading.h"
 
-#if OS(HURD)
+#if OS(HURD) || defined(__ANDROID__)
 // PTHREAD_KEYS_MAX is not defined in bionic nor in Hurd, so explicitly define it here.
 #define PTHREAD_KEYS_MAX 1024
 #else
diff -Naur webkitgtk-2.10.7/Source/WebCore/CMakeLists.txt webkitgtk-2.10.7/Source/WebCore/CMakeLists.txt
--- webkitgtk-2.10.7/Source/WebCore/CMakeLists.txt	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/CMakeLists.txt	2016-02-25 23:49:30.000000000 +0530
@@ -3670,7 +3670,7 @@
     WEBKIT_SET_EXTRA_COMPILER_FLAGS(ANGLESupport IGNORECXX_WARNINGS)
 endif ()
 
-target_link_libraries(WebCore ${WebCore_LIBRARIES})
+target_link_libraries(WebCore -Wl,--unresolved-symbols=ignore-in-object-files ${WebCore_LIBRARIES})
 
 if (WebCore_OUTPUT_NAME)
     set_target_properties(WebCore PROPERTIES OUTPUT_NAME ${WebCore_OUTPUT_NAME})
diff -Naur webkitgtk-2.10.7/Source/WebCore/Modules/webaudio/PeriodicWave.cpp webkitgtk-2.10.7/Source/WebCore/Modules/webaudio/PeriodicWave.cpp
--- webkitgtk-2.10.7/Source/WebCore/Modules/webaudio/PeriodicWave.cpp	2016-01-28 14:25:09.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/Modules/webaudio/PeriodicWave.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -99,6 +99,10 @@
 
 void PeriodicWave::waveDataForFundamentalFrequency(float fundamentalFrequency, float* &lowerWaveData, float* &higherWaveData, float& tableInterpolationFactor)
 {
+#ifdef __ANDROID__
+    auto log2f = [](float x) { return (float) (log((double)x) / log(2.)); };
+#endif
+	
     // Negative frequencies are allowed, in which case we alias to the positive frequency.
     fundamentalFrequency = fabsf(fundamentalFrequency);
 
diff -Naur webkitgtk-2.10.7/Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp webkitgtk-2.10.7/Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp
--- webkitgtk-2.10.7/Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp	2015-07-22 18:07:57.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -77,6 +77,10 @@
 {
     ASSERT(isMainThread());
 
+#ifdef __ANDROID__
+    auto log2 = [](double x) { return log(x) / log(2.); };
+#endif
+
     // Only allow powers of two.
     unsigned log2size = static_cast<unsigned>(log2(size));
     bool isPOT(1UL << log2size == size);
diff -Naur webkitgtk-2.10.7/Source/WebCore/PlatformGTK.cmake webkitgtk-2.10.7/Source/WebCore/PlatformGTK.cmake
--- webkitgtk-2.10.7/Source/WebCore/PlatformGTK.cmake	2016-01-29 21:59:32.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/PlatformGTK.cmake	2016-03-13 21:31:18.000000000 +0530
@@ -201,7 +201,7 @@
     platform/text/hyphen/HyphenationLibHyphen.cpp
 )
 
-list(APPEND WebCorePlatformGTK_SOURCES
+list(APPEND WebCore_SOURCES
     editing/gtk/EditorGtk.cpp
 
     page/gtk/DragControllerGtk.cpp
@@ -264,6 +264,8 @@
 set(WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/platform/gtk/RenderThemeGtk.cpp)
 
 list(APPEND WebCore_LIBRARIES
+    ${GTK_LIBRARIES}
+    ${GDK_LIBRARIES}
     ${ATK_LIBRARIES}
     ${CAIRO_LIBRARIES}
     ${ENCHANT_LIBRARIES}
@@ -294,6 +296,8 @@
 )
 
 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
+    ${GTK_INCLUDE_DIRS}
+    ${GDK_INCLUDE_DIRS}
     ${ATK_INCLUDE_DIRS}
     ${CAIRO_INCLUDE_DIRS}
     ${ENCHANT_INCLUDE_DIRS}
@@ -501,22 +505,22 @@
     )
 endif ()
 
-add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
-add_dependencies(WebCorePlatformGTK WebCore)
-WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK)
-target_include_directories(WebCorePlatformGTK PRIVATE
-    ${WebCore_INCLUDE_DIRECTORIES}
-)
-target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE
-    ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
-    ${GTK_INCLUDE_DIRS}
-    ${GDK_INCLUDE_DIRS}
-)
-target_link_libraries(WebCorePlatformGTK
-    ${WebCore_LIBRARIES}
-    ${GTK_LIBRARIES}
-    ${GDK_LIBRARIES}
-)
+#add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
+#add_dependencies(WebCorePlatformGTK WebCore)
+#WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK)
+#target_include_directories(WebCorePlatformGTK PRIVATE
+#    ${WebCore_INCLUDE_DIRECTORIES}
+#)
+#target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE
+#    ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
+#    ${GTK_INCLUDE_DIRS}
+#    ${GDK_INCLUDE_DIRS}
+#)
+#target_link_libraries(WebCorePlatformGTK -Wl,--unresolved-symbols=ignore-in-object-files
+#    ${WebCore_LIBRARIES}
+#    ${GTK_LIBRARIES}
+#    ${GDK_LIBRARIES}
+#)
 
 include_directories(
     ${WebCore_INCLUDE_DIRECTORIES}
diff -Naur webkitgtk-2.10.7/Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp webkitgtk-2.10.7/Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp
--- webkitgtk-2.10.7/Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp	2015-07-22 18:07:57.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -42,7 +42,11 @@
 // Normal constructor: allocates for a given fftSize.
 FFTFrame::FFTFrame(unsigned fftSize)
     : m_FFTSize(fftSize)
+#ifdef __ANDROID__
+    , m_log2FFTSize(static_cast<unsigned>(log(fftSize) / log(2.)))
+#else
     , m_log2FFTSize(static_cast<unsigned>(log2(fftSize)))
+#endif
     , m_complexData(std::make_unique<GstFFTF32Complex[]>(unpackedFFTDataSize(m_FFTSize)))
     , m_realData(unpackedFFTDataSize(m_FFTSize))
     , m_imagData(unpackedFFTDataSize(m_FFTSize))
diff -Naur webkitgtk-2.10.7/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp webkitgtk-2.10.7/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp
--- webkitgtk-2.10.7/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp	2016-01-28 14:25:09.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -43,7 +43,13 @@
     
     if (variable.isArray()) {
         for (unsigned i = 0; i < variable.elementCount(); i++) {
+#ifdef __ANDROID__
+			char i_string[20];
+			sprintf(i_string, "%u", i);
+            std::string arrayBrackets = "[" + std::string(i_string) + "]";
+#else
             std::string arrayBrackets = "[" + std::to_string(i) + "]";
+#endif
             std::string arrayName = name + arrayBrackets;
             std::string arrayMappedName = mappedName + arrayBrackets;
             LOG(WebGL, "Map shader symbol %s -> %s\n", arrayName.c_str(), arrayMappedName.c_str());
@@ -72,7 +78,13 @@
     if (variable.isStruct()) {
         if (variable.isArray()) {
             for (unsigned i = 0; i < variable.elementCount(); i++) {
-                std::string arrayBrackets = "[" + std::to_string(i) + "]";
+#ifdef __ANDROID__
+  				char i_string[20];
+				sprintf(i_string, "%u", i);
+            	std::string arrayBrackets = "[" + std::string(i_string) + "]";
+#else
+            	std::string arrayBrackets = "[" + std::to_string(i) + "]";
+#endif
                 std::string arrayName = variable.name + arrayBrackets;
                 std::string arrayMappedName = variable.mappedName + arrayBrackets;
                 for (const auto& field : variable.fields)
diff -Naur webkitgtk-2.10.7/Source/WebCore/platform/graphics/GLContext.cpp webkitgtk-2.10.7/Source/WebCore/platform/graphics/GLContext.cpp
--- webkitgtk-2.10.7/Source/WebCore/platform/graphics/GLContext.cpp	2016-01-29 21:59:33.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/platform/graphics/GLContext.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -132,7 +132,10 @@
         return WTF::move(glxContext);
 #endif
 #if USE(EGL)
-    if (auto eglContext = GLContextEGL::createContext(windowHandle, sharingContext))
+#ifdef __ANDROID__
+    EGLNativeWindowType EGLWindowHandle = reinterpret_cast<EGLNativeWindowType>(windowHandle);
+#endif
+    if (auto eglContext = GLContextEGL::createContext(EGLWindowHandle, sharingContext))
         return WTF::move(eglContext);
 #endif
     return nullptr;
diff -Naur webkitgtk-2.10.7/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp webkitgtk-2.10.7/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp
--- webkitgtk-2.10.7/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp	2016-01-29 21:59:33.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -44,8 +44,10 @@
     , m_supportsOESvertexArrayObject(false)
     , m_supportsIMGMultisampledRenderToTexture(false)
     , m_supportsANGLEinstancedArrays(false)
+#ifndef __ANDROID__
     , m_glFramebufferTexture2DMultisampleIMG(0)
     , m_glRenderbufferStorageMultisampleIMG(0)
+#endif
     , m_glBindVertexArrayOES(0)
     , m_glDeleteVertexArraysOES(0)
     , m_glGenVertexArraysOES(0)
@@ -54,9 +56,11 @@
     , m_glReadnPixelsEXT(0)
     , m_glGetnUniformfvEXT(0)
     , m_glGetnUniformivEXT(0)
+#ifndef __ANDROID__
     , m_glVertexAttribDivisorANGLE(nullptr)
     , m_glDrawArraysInstancedANGLE(nullptr)
     , m_glDrawElementsInstancedANGLE(nullptr)
+#endif
 {
 }
 
@@ -66,17 +70,21 @@
 
 void Extensions3DOpenGLES::framebufferTexture2DMultisampleIMG(unsigned long target, unsigned long attachment, unsigned long textarget, unsigned int texture, int level, unsigned long samples)
 {
+#ifndef __ANDROID__
     if (m_glFramebufferTexture2DMultisampleIMG)
         m_glFramebufferTexture2DMultisampleIMG(target, attachment, textarget, texture, level, samples);
     else
+#endif
         m_context->synthesizeGLError(GL_INVALID_OPERATION);
 }
 
 void Extensions3DOpenGLES::renderbufferStorageMultisampleIMG(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height)
 {
+#ifndef __ANDROID__
     if (m_glRenderbufferStorageMultisampleIMG)
         m_glRenderbufferStorageMultisampleIMG(target, samples, internalformat, width, height);
     else
+#endif
         m_context->synthesizeGLError(GL_INVALID_OPERATION);
 }
 
@@ -87,9 +95,11 @@
 
 void Extensions3DOpenGLES::renderbufferStorageMultisample(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height)
 {
+#ifndef __ANDROID__
     if (m_glRenderbufferStorageMultisampleIMG)
         renderbufferStorageMultisampleIMG(target, samples, internalformat, width, height);
     else
+#endif
         notImplemented();
 }
 
@@ -224,7 +234,9 @@
 {
     if (m_glGetnUniformivEXT) {
         m_context->makeContextCurrent();
+#ifndef __ANDROID__
         m_glGetnUniformivEXT(program, location, bufSize, params);
+#endif
         return;
     }
 
@@ -233,17 +245,22 @@
 
 void Extensions3DOpenGLES::drawArraysInstanced(GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primcount)
 {
+#ifndef __ANDROID__
     if (!m_glDrawArraysInstancedANGLE) {
         m_context->synthesizeGLError(GL_INVALID_OPERATION);
         return;
     }
-
+    
     m_context->makeContextCurrent();
     m_glDrawArraysInstancedANGLE(mode, first, count, primcount);
+#else
+    m_context->synthesizeGLError(GL_INVALID_OPERATION);
+#endif
 }
 
 void Extensions3DOpenGLES::drawElementsInstanced(GC3Denum mode, GC3Dsizei count, GC3Denum type, long long offset, GC3Dsizei primcount)
 {
+#ifndef __ANDROID__
     if (!m_glDrawElementsInstancedANGLE) {
         m_context->synthesizeGLError(GL_INVALID_OPERATION);
         return;
@@ -251,10 +268,14 @@
 
     m_context->makeContextCurrent();
     m_glDrawElementsInstancedANGLE(mode, count, type, reinterpret_cast<GLvoid*>(static_cast<intptr_t>(offset)), primcount);
+#else
+    m_context->synthesizeGLError(GL_INVALID_OPERATION);
+#endif
 }
 
 void Extensions3DOpenGLES::vertexAttribDivisor(GC3Duint index, GC3Duint divisor)
 {
+#ifndef __ANDROID__
     if (!m_glVertexAttribDivisorANGLE) {
         m_context->synthesizeGLError(GL_INVALID_OPERATION);
         return;
@@ -262,6 +283,9 @@
 
     m_context->makeContextCurrent();
     m_glVertexAttribDivisorANGLE(index, divisor);
+#else
+    m_context->synthesizeGLError(GL_INVALID_OPERATION);
+#endif
 }
 
 bool Extensions3DOpenGLES::supportsExtension(const String& name)
@@ -274,19 +298,28 @@
             m_glIsVertexArrayOES = reinterpret_cast<PFNGLISVERTEXARRAYOESPROC>(eglGetProcAddress("glIsVertexArrayOES"));
             m_supportsOESvertexArrayObject = true;
         } else if (!m_supportsIMGMultisampledRenderToTexture && name == "GL_IMG_multisampled_render_to_texture") {
+#ifndef __ANDROID__
             m_glFramebufferTexture2DMultisampleIMG = reinterpret_cast<PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC>(eglGetProcAddress("glFramebufferTexture2DMultisampleIMG"));
             m_glRenderbufferStorageMultisampleIMG = reinterpret_cast<PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC>(eglGetProcAddress("glRenderbufferStorageMultisampleIMG"));
             m_supportsIMGMultisampledRenderToTexture = true;
+#else
+            m_supportsIMGMultisampledRenderToTexture = false;
+#endif
+
         } else if (!m_glGetGraphicsResetStatusEXT && name == "GL_EXT_robustness") {
             m_glGetGraphicsResetStatusEXT = reinterpret_cast<PFNGLGETGRAPHICSRESETSTATUSEXTPROC>(eglGetProcAddress("glGetGraphicsResetStatusEXT"));
             m_glReadnPixelsEXT = reinterpret_cast<PFNGLREADNPIXELSEXTPROC>(eglGetProcAddress("glReadnPixelsEXT"));
             m_glGetnUniformfvEXT = reinterpret_cast<PFNGLGETNUNIFORMFVEXTPROC>(eglGetProcAddress("glGetnUniformfvEXT"));
             m_glGetnUniformivEXT = reinterpret_cast<PFNGLGETNUNIFORMIVEXTPROC>(eglGetProcAddress("glGetnUniformivEXT"));
         } else if (!m_supportsANGLEinstancedArrays && name == "GL_ANGLE_instanced_arrays") {
+#ifndef __ANDROID__
             m_glVertexAttribDivisorANGLE = reinterpret_cast<PFNGLVERTEXATTRIBDIVISORANGLEPROC>(eglGetProcAddress("glVertexAttribDivisorANGLE"));
             m_glDrawArraysInstancedANGLE = reinterpret_cast<PFNGLDRAWARRAYSINSTANCEDANGLEPROC >(eglGetProcAddress("glDrawArraysInstancedANGLE"));
             m_glDrawElementsInstancedANGLE = reinterpret_cast<PFNGLDRAWELEMENTSINSTANCEDANGLEPROC >(eglGetProcAddress("glDrawElementsInstancedANGLE"));
             m_supportsANGLEinstancedArrays = true;
+#else
+            m_supportsANGLEinstancedArrays = false;
+#endif
         } else if (name == "GL_EXT_draw_buffers") {
             // FIXME: implement the support.
             return false;
diff -Naur webkitgtk-2.10.7/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h webkitgtk-2.10.7/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h
--- webkitgtk-2.10.7/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h	2016-01-04 16:08:34.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h	2016-02-25 08:25:04.000000000 +0530
@@ -106,8 +106,10 @@
     bool m_supportsIMGMultisampledRenderToTexture;
     bool m_supportsANGLEinstancedArrays;
 
+#ifndef __ANDROID__
     PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC m_glFramebufferTexture2DMultisampleIMG;
     PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC m_glRenderbufferStorageMultisampleIMG;
+#endif
     PFNGLBINDVERTEXARRAYOESPROC m_glBindVertexArrayOES;
     PFNGLDELETEVERTEXARRAYSOESPROC m_glDeleteVertexArraysOES;
     PFNGLGENVERTEXARRAYSOESPROC m_glGenVertexArraysOES;
@@ -116,9 +118,11 @@
     PFNGLREADNPIXELSEXTPROC m_glReadnPixelsEXT;
     PFNGLGETNUNIFORMFVEXTPROC m_glGetnUniformfvEXT;
     PFNGLGETNUNIFORMIVEXTPROC m_glGetnUniformivEXT;
+#ifndef __ANDROID__
     PFNGLVERTEXATTRIBDIVISORANGLEPROC m_glVertexAttribDivisorANGLE;
     PFNGLDRAWARRAYSINSTANCEDANGLEPROC m_glDrawArraysInstancedANGLE;
     PFNGLDRAWELEMENTSINSTANCEDANGLEPROC m_glDrawElementsInstancedANGLE;
+#endif
 
     std::unique_ptr<GraphicsContext3D::ContextLostCallback> m_contextLostCallback;
 };
diff -Naur webkitgtk-2.10.7/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp webkitgtk-2.10.7/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp
--- webkitgtk-2.10.7/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp	2016-01-29 21:59:33.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -202,7 +202,9 @@
 void MemoryPressureHandler::platformReleaseMemory(Critical)
 {
     ReliefLogger log("Run malloc_trim");
+#ifndef __ANDROID__
     malloc_trim(0);
+#endif
 }
 
 void MemoryPressureHandler::ReliefLogger::platformLog()
diff -Naur webkitgtk-2.10.7/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp webkitgtk-2.10.7/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp
--- webkitgtk-2.10.7/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp	2016-01-29 21:59:33.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp	2016-02-25 08:25:04.000000000 +0530
@@ -44,6 +44,10 @@
 #include <wtf/UniStdExtras.h>
 #include <wtf/text/CString.h>
 
+#ifdef __ANDROID__
+#include <linux/ashmem.h>
+#endif
+
 namespace WebKit {
 
 SharedMemory::Handle::Handle()
@@ -98,6 +102,7 @@
     CString tempName;
 
     int fileDescriptor = -1;
+#ifndef __ANDROID__    
     for (int tries = 0; fileDescriptor == -1 && tries < 10; ++tries) {
         String name = String("/WK2SharedMemory.") + String::number(static_cast<unsigned>(WTF::randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0)));
         tempName = name.utf8();
@@ -106,11 +111,30 @@
             fileDescriptor = shm_open(tempName.data(), O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
         } while (fileDescriptor == -1 && errno == EINTR);
     }
+#else
+	do {
+        fileDescriptor = open("/dev/ashmem", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
+    } while (fileDescriptor == -1 && errno == EINTR);
+	String name = String("/WK2SharedMemory.") + String::number(static_cast<unsigned>(WTF::randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0)));
+	char buf[256];
+	strncpy(buf, (const char*) name.utf8().data(), 256);
+	buf[255] = 0;
+    if (fileDescriptor < 0 ||
+            ioctl(fileDescriptor, ASHMEM_SET_SIZE, size) < 0 ||
+            ioctl(fileDescriptor, ASHMEM_SET_NAME, buf) << 0 ) {
+
+    	if (fileDescriptor >= 0) {
+    	    close(fileDescriptor);
+    	    fileDescriptor = -1;
+    	}
+    }
+#endif
     if (fileDescriptor == -1) {
         WTFLogAlways("Failed to create shared memory file %s: %s", tempName.data(), strerror(errno));
         return 0;
     }
 
+#ifndef __ANDROID__
     while (ftruncate(fileDescriptor, size) == -1) {
         if (errno != EINTR) {
             closeWithRetry(fileDescriptor);
@@ -118,15 +142,20 @@
             return 0;
         }
     }
+#endif
 
     void* data = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fileDescriptor, 0);
     if (data == MAP_FAILED) {
         closeWithRetry(fileDescriptor);
+#ifndef __ANDROID__
         shm_unlink(tempName.data());
+#endif
         return 0;
     }
 
+#ifndef __ANDROID__
     shm_unlink(tempName.data());
+#endif
 
     RefPtr<SharedMemory> instance = adoptRef(new SharedMemory());
     instance->m_data = data;
diff -Naur webkitgtk-2.10.7/Source/WebKit2/PlatformGTK.cmake webkitgtk-2.10.7/Source/WebKit2/PlatformGTK.cmake
--- webkitgtk-2.10.7/Source/WebKit2/PlatformGTK.cmake	2016-01-29 21:59:33.000000000 +0530
+++ webkitgtk-2.10.7/Source/WebKit2/PlatformGTK.cmake	2016-03-13 19:30:22.000000000 +0530
@@ -570,7 +570,7 @@
 
 list(APPEND WebKit2_LIBRARIES
     GObjectDOMBindings
-    WebCorePlatformGTK
+#    WebCorePlatformGTK
     ${GTK_UNIX_PRINT_LIBRARIES}
 )
 
@@ -595,6 +595,16 @@
     endif ()
 endif ()
 
+list(APPEND WebKit2_LIBRARIES
+    gthread-2.0
+    pangoft2-1.0
+    epoxy
+    pixman-1
+    ffi
+    stdc++
+    icudata
+)
+
 ADD_WHOLE_ARCHIVE_TO_LIBRARIES(WebKit2_LIBRARIES)
 
 set(WebKit2_MARSHAL_LIST ${WEBKIT2_DIR}/UIProcess/API/gtk/webkit2marshal.list)
diff -Naur webkitgtk-2.10.7/Source/bmalloc/bmalloc/Allocator.cpp webkitgtk-2.10.7/Source/bmalloc/bmalloc/Allocator.cpp
--- webkitgtk-2.10.7/Source/bmalloc/bmalloc/Allocator.cpp	2016-01-28 14:25:09.000000000 +0530
+++ webkitgtk-2.10.7/Source/bmalloc/bmalloc/Allocator.cpp	2016-02-25 08:32:40.000000000 +0530
@@ -73,8 +73,12 @@
 
     if (!m_isBmallocEnabled) {
         void* result = nullptr;
+#ifdef __ANDROID__
+        result = memalign(alignment, size);
+#else
         if (posix_memalign(&result, alignment, size))
             return nullptr;
+#endif
         return result;
     }
     
diff -Naur webkitgtk-2.10.7/Source/cmake/OptionsGTK.cmake webkitgtk-2.10.7/Source/cmake/OptionsGTK.cmake
--- webkitgtk-2.10.7/Source/cmake/OptionsGTK.cmake	2016-01-29 22:23:52.000000000 +0530
+++ webkitgtk-2.10.7/Source/cmake/OptionsGTK.cmake	2016-04-03 17:02:18.000000000 +0530
@@ -201,6 +201,7 @@
 endif ()
 
 set(USE_UDIS86 ON)
+set(ENABLE_WEBCORE ON)
 set(ENABLE_WEBKIT OFF)
 set(ENABLE_WEBKIT2 ON)
 set(ENABLE_PLUGIN_PROCESS ${ENABLE_X11_TARGET})
diff -Naur webkitgtk-2.10.7/Source/cmake/OptionsJSC.cmake webkitgtk-2.10.7/Source/cmake/OptionsJSC.cmake
--- webkitgtk-2.10.7/Source/cmake/OptionsJSC.cmake	1970-01-01 05:30:00.000000000 +0530
+++ webkitgtk-2.10.7/Source/cmake/OptionsJSC.cmake	2016-04-03 17:01:28.000000000 +0530
@@ -0,0 +1,130 @@
+include(GNUInstallDirs)
+
+set(PROJECT_VERSION_MAJOR 2)
+set(PROJECT_VERSION_MINOR 10)
+set(PROJECT_VERSION_MICRO 7)
+set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_MICRO})
+set(WEBKITGTK_API_VERSION 4.0)
+
+# IndexedDB support requires GCC 4.9, see https://bugs.webkit.org/show_bug.cgi?id=98932.
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9.0")
+        message(FATAL_ERROR "GCC 4.9.0 is required to build WebKitGTK+, use a newer GCC version or clang")
+    endif ()
+endif ()
+
+# Libtool library version, not to be confused with API version.
+# See http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
+CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT2 48 10 11)
+CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(JAVASCRIPTCORE 20 15 2)
+
+# These are shared variables, but we special case their definition so that we can use the
+# CMAKE_INSTALL_* variables that are populated by the GNUInstallDirs macro.
+set(LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH "Absolute path to library installation directory")
+set(EXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_BINDIR}" CACHE PATH "Absolute path to executable installation directory")
+set(LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/webkit2gtk-${WEBKITGTK_API_VERSION}" CACHE PATH "Absolute path to install executables executed by the library")
+
+set(DATA_BUILD_DIR "${CMAKE_BINARY_DIR}/share/${WebKit_OUTPUT_NAME}")
+set(DATA_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/webkitgtk-${WEBKITGTK_API_VERSION}")
+set(WEBKITGTK_HEADER_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/webkitgtk-${WEBKITGTK_API_VERSION}")
+set(INTROSPECTION_INSTALL_GIRDIR "${CMAKE_INSTALL_FULL_DATADIR}/gir-1.0")
+set(INTROSPECTION_INSTALL_TYPELIBDIR "${LIB_INSTALL_DIR}/girepository-1.0")
+
+find_package(ICU REQUIRED)
+find_package(Threads REQUIRED)
+find_package(ZLIB REQUIRED)
+
+WEBKIT_OPTION_BEGIN()
+
+# Set the default value for ENABLE_GLES2 automatically.
+# We are not enabling or disabling automatically a feature here, because
+# the feature is by default always on (ENABLE_OPENGL=ON).
+# What we select here automatically is if we use OPENGL (ENABLE_GLES2=OFF)
+# or OPENGLES2 (ENABLE_GLES2=ON) for building the feature.
+set(ENABLE_GLES2_DEFAULT OFF)
+
+if (NOT OPENGL_FOUND AND OPENGLES2_FOUND)
+    set(ENABLE_GLES2_DEFAULT ON)
+endif ()
+
+if (CMAKE_SYSTEM_NAME MATCHES "Linux")
+    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER PUBLIC ON)
+else ()
+    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER PUBLIC OFF)
+endif ()
+
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_JIT PUBLIC ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_SYSTEM_MALLOC PUBLIC OFF)
+
+# Finalize the value for all options. Do not attempt to use an option before
+# this point, and do not attempt to change any option after this point.
+WEBKIT_OPTION_END()
+
+set(USE_UDIS86 ON)
+set(ENABLE_WEBKIT OFF)
+set(ENABLE_WEBKIT2 OFF)
+set(ENABLE_WEBCORE OFF)
+
+add_definitions(-DBUILDING_GTK__=1)
+#add_definitions(-DGETTEXT_PACKAGE="WebKit2GTK-${WEBKITGTK_API_VERSION}")
+add_definitions(-DDATA_DIR="${CMAKE_INSTALL_DATADIR}")
+add_definitions(-DUSER_AGENT_GTK_MAJOR_VERSION=602)
+add_definitions(-DUSER_AGENT_GTK_MINOR_VERSION=1)
+add_definitions(-DWEBKITGTK_API_VERSION_STRING="${WEBKITGTK_API_VERSION}")
+
+#set(GTK_LIBRARIES ${GTK3_LIBRARIES})
+#set(GTK_INCLUDE_DIRS ${GTK3_INCLUDE_DIRS})
+#set(GDK_LIBRARIES ${GDK3_LIBRARIES})
+#set(GDK_INCLUDE_DIRS ${GDK3_INCLUDE_DIRS})
+
+#SET_AND_EXPOSE_TO_BUILD(HAVE_GTK_GESTURES ${GTK3_SUPPORTS_GESTURES})
+#SET_AND_EXPOSE_TO_BUILD(HAVE_GTK_UNIX_PRINTING ${GTK_UNIX_PRINT_FOUND})
+
+set(glib_components gio gobject gthread gmodule)
+if (ENABLE_GAMEPAD_DEPRECATED OR ENABLE_GEOLOCATION)
+    list(APPEND glib_components gio-unix)
+endif ()
+find_package(GLIB 2.36 REQUIRED COMPONENTS ${glib_components})
+
+# Override the cached variables, gtk-doc and gobject-introspection do not really work when cross-building.
+if (CMAKE_CROSSCOMPILING)
+    set(ENABLE_GTKDOC OFF)
+    set(ENABLE_INTROSPECTION OFF)
+endif ()
+
+set(SHOULD_INSTALL_JS_SHELL ON)
+
+# CMake does not automatically add --whole-archive when building shared objects from
+# a list of convenience libraries. This can lead to missing symbols in the final output.
+# We add --whole-archive to all libraries manually to prevent the linker from trimming
+# symbols that we actually need later. (--whole-archive isn't an option on XCode's
+# linker, though.)
+macro(ADD_WHOLE_ARCHIVE_TO_LIBRARIES _list_name)
+    if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
+        foreach (library IN LISTS ${_list_name})
+          list(APPEND ${_list_name}_TMP -Wl,--whole-archive ${library} -Wl,--no-whole-archive)
+        endforeach ()
+        set(${_list_name} "${${_list_name}_TMP}")
+    endif ()
+endmacro()
+
+if (CMAKE_MAJOR_VERSION LESS 3)
+    # Before CMake 3 it was necessary to use a build script instead of using cmake --build directly
+    # to preserve colors and pretty-printing.
+
+    build_command(COMMAND_LINE_TO_BUILD)
+    # build_command unconditionally adds -i (ignore errors) for make, and there's
+    # no reasonable way to turn that off, so we just replace it with -k, which has
+    # the same effect, except that the return code will indicate that an error occurred.
+    # See: http://www.cmake.org/cmake/help/v3.0/command/build_command.html
+    string(REPLACE " -i" " -k" COMMAND_LINE_TO_BUILD ${COMMAND_LINE_TO_BUILD})
+    file(WRITE
+        ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/build.sh
+        "#!/bin/sh\n"
+        "${COMMAND_LINE_TO_BUILD} $@"
+    )
+    file(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/build.sh
+        DESTINATION ${CMAKE_BINARY_DIR}
+        FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
+    )
+endif ()
diff -Naur webkitgtk-2.10.7/Tools/MiniBrowser/gtk/CMakeLists.txt webkitgtk-2.10.7/Tools/MiniBrowser/gtk/CMakeLists.txt
--- webkitgtk-2.10.7/Tools/MiniBrowser/gtk/CMakeLists.txt	2016-01-28 14:25:09.000000000 +0530
+++ webkitgtk-2.10.7/Tools/MiniBrowser/gtk/CMakeLists.txt	2016-03-06 19:56:51.000000000 +0530
@@ -57,7 +57,7 @@
 include_directories(${MiniBrowser_INCLUDE_DIRECTORIES})
 include_directories(SYSTEM ${MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES})
 add_executable(MiniBrowser ${MiniBrowser_SOURCES})
-target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES})
+target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES} -pie)
{'fraction_non_alphanumeric': 0.13438513882109737, 'fraction_numerical': 0.06819030118579344, 'mean_word_length': 4.578968444658017, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 0, '>': 109, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 104, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2482363', 'n_tokens_mistral': 30230, 'n_tokens_neox': 26346, 'n_words': 3690}