Adds an XPath generated header to the Android build to avoid a guard on an include in V8DocumentCustom.cpp

Adding generated headers to the build, even when for disabled features, is preferred to using guards around includes.
See https://bugs.webkit.org/show_bug.cgi?id=34812

Also cleans up some other Android-specific changes in WebCore/bindings/v8.

Change-Id: I37a174bfaef0d659fc3cef08d084af8861b65ac9
diff --git a/WebCore/Android.derived.v8bindings.mk b/WebCore/Android.derived.v8bindings.mk
index 8a24d27..062ef93 100644
--- a/WebCore/Android.derived.v8bindings.mk
+++ b/WebCore/Android.derived.v8bindings.mk
@@ -541,7 +541,8 @@
     $(intermediates)/bindings/V8XMLHttpRequestUpload.h \
     $(intermediates)/bindings/V8XMLSerializer.h \
     $(intermediates)/bindings/V8XPathException.h \
-    $(intermediates)/bindings/V8XPathNSResolver.h
+    $(intermediates)/bindings/V8XPathNSResolver.h \
+    $(intermediates)/bindings/V8XPathResult.h
 
 $(GEN): PRIVATE_PATH := $(LOCAL_PATH)
 $(GEN): PRIVATE_CUSTOM_TOOL = SOURCE_ROOT=$(PRIVATE_PATH) perl -I$(PRIVATE_PATH)/bindings/scripts $(PRIVATE_PATH)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_JAVASCRIPT" --generator V8 --include dom --include html --outputdir $(dir $@) $<
diff --git a/WebCore/bindings/v8/ChildThreadDOMData.h b/WebCore/bindings/v8/ChildThreadDOMData.h
index dfb85e8..5097c86 100644
--- a/WebCore/bindings/v8/ChildThreadDOMData.h
+++ b/WebCore/bindings/v8/ChildThreadDOMData.h
@@ -39,7 +39,6 @@
     class ChildThreadDOMData : public DOMData {
     public:
         ChildThreadDOMData();
-
         DOMDataStore& getStore();
 
     private:
diff --git a/WebCore/bindings/v8/NPV8Object.cpp b/WebCore/bindings/v8/NPV8Object.cpp
index 1fe10b2..0c3bca2 100644
--- a/WebCore/bindings/v8/NPV8Object.cpp
+++ b/WebCore/bindings/v8/NPV8Object.cpp
@@ -42,6 +42,11 @@
 #include "npruntime_impl.h"
 #include "npruntime_priv.h"
 
+// ANDROID: Upstream to webkit.org
+#if PLATFORM(CHROMIUM)
+#include "bindings/npruntime.h"
+#endif
+
 #include <stdio.h>
 #include <v8.h>
 #include <wtf/StringExtras.h>
diff --git a/WebCore/bindings/v8/V8Proxy.h b/WebCore/bindings/v8/V8Proxy.h
index 9aba723..27e33a6 100644
--- a/WebCore/bindings/v8/V8Proxy.h
+++ b/WebCore/bindings/v8/V8Proxy.h
@@ -31,6 +31,8 @@
 #ifndef V8Proxy_h
 #define V8Proxy_h
 
+// ANDROID: Upstream to webkit.org
+#include "PlatformBridge.h"
 #include "ScriptSourceCode.h" // for WebCore::ScriptSourceCode
 #include "SecurityOrigin.h" // for WebCore::SecurityOrigin
 #include "SharedPersistent.h"
@@ -43,8 +45,8 @@
 #include <wtf/PassRefPtr.h> // so generated bindings don't have to
 #include <wtf/Vector.h>
 
+// ANDROID: Upstream to webkit.org
 #if defined(ENABLE_DOM_STATS_COUNTERS) && PLATFORM(CHROMIUM)
-#include "ChromiumBridge.h"
 #define INC_STATS(name) ChromiumBridge::incrementStatsCounter(name)
 #else
 #define INC_STATS(name)
diff --git a/WebCore/bindings/v8/custom/V8DocumentCustom.cpp b/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
index 9d6296f..59ba330 100644
--- a/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
@@ -48,13 +48,8 @@
 #include "V8Proxy.h"
 #include "V8SVGDocument.h"
 #include "V8WebGLRenderingContext.h"
-
-// ANDROID
-// TODO: Upstream to webkit.org
-#if ENABLE(XPATH)
 #include "V8XPathNSResolver.h"
 #include "V8XPathResult.h"
-#endif
 
 #include <wtf/RefPtr.h>
 
diff --git a/WebCore/bindings/v8/custom/V8NavigatorCustom.cpp b/WebCore/bindings/v8/custom/V8NavigatorCustom.cpp
index 863ce0e..ae330fb 100644
--- a/WebCore/bindings/v8/custom/V8NavigatorCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8NavigatorCustom.cpp
@@ -31,12 +31,12 @@
 #include "config.h"
 #include "V8Navigator.h"
 
-#include "ExceptionCode.h"
 #include "RuntimeEnabledFeatures.h"
 #include "V8DOMWindow.h"
 #include "V8DOMWrapper.h"
 
 #if PLATFORM(ANDROID)
+#include "ExceptionCode.h"
 #include "V8CustomApplicationInstalledCallback.h"
 #include "V8Proxy.h"
 #endif