diff -r e72d3aa3e2fb modules/javafx.web/src/main/native/Source/WebCore/CMakeLists.txt
--- a/modules/javafx.web/src/main/native/Source/WebCore/CMakeLists.txt	Thu Jul 13 15:34:09 2017 +0100
+++ b/modules/javafx.web/src/main/native/Source/WebCore/CMakeLists.txt	Fri Jul 14 07:51:22 2017 +0100
@@ -3817,7 +3817,10 @@
 endif ()
 
 if (PORT STREQUAL "Java")
-    list(APPEND WebCore_LIBRARIES PRIVATE WebCoreDerivedSources PRIVATE WebCoreTestSupport)
+    list(APPEND WebCore_LIBRARIES
+        PRIVATE WebCoreTestSupport
+        PRIVATE WebCoreDerivedSources
+    )
 endif ()
 
 WEBKIT_FRAMEWORK(WebCore)
diff -r e72d3aa3e2fb modules/javafx.web/src/main/native/Source/WebCore/DerivedSources.cpp
--- a/modules/javafx.web/src/main/native/Source/WebCore/DerivedSources.cpp	Thu Jul 13 15:34:09 2017 +0100
+++ b/modules/javafx.web/src/main/native/Source/WebCore/DerivedSources.cpp	Fri Jul 14 07:51:22 2017 +0100
@@ -601,11 +601,9 @@
 #include "JSVTTCue.cpp"
 #include "JSVideoTrack.cpp"
 #include "JSVideoTrackList.cpp"
-#if ENABLE(WEBVTT_REGIONS)
 #include "JSVTTRegion.cpp"
 #include "JSVTTRegionList.cpp"
 #endif
-#endif
 #include "JSTimeRanges.cpp"
 #include "JSTouch.cpp"
 #include "JSTouchEvent.cpp"
diff -r e72d3aa3e2fb modules/javafx.web/src/main/native/Source/WebCore/PlatformJava.cmake
--- a/modules/javafx.web/src/main/native/Source/WebCore/PlatformJava.cmake	Thu Jul 13 15:34:09 2017 +0100
+++ b/modules/javafx.web/src/main/native/Source/WebCore/PlatformJava.cmake	Fri Jul 14 07:51:22 2017 +0100
@@ -376,6 +376,20 @@
 
 list(APPEND WebCore_SOURCES ${JavaDOM3Bindings_SOURCES})
 
+if (ENABLE_ALLINONE_BUILD)
+    message(STATUS "All-in-One build is enabled for Java DOM bindings.")
+    PROCESS_ALLINONE_FILE("${WebCore_SOURCES}"
+        "bindings/java/dom3/JavaDOMBindingsAllInOne.cpp"
+        newSources
+        FALSE
+    )
+    set(WebCore_SOURCES
+        "bindings/java/dom3/JavaDOMBindingsAllInOne.cpp"
+        ${newSources}
+    )
+endif ()
+
+
 set(WebCore_FORWARDING_HEADERS_DIRECTORIES
     .
     accessibility
diff -r e72d3aa3e2fb modules/javafx.web/src/main/native/Source/WebCore/bindings/java/dom3/JavaDOMBindingsAllInOne.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/javafx.web/src/main/native/Source/WebCore/bindings/java/dom3/JavaDOMBindingsAllInOne.cpp	Fri Jul 14 07:51:22 2017 +0100
@@ -0,0 +1,248 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+*/
+
+// FIXME-java: #undef IMPL is added to avoid warnings
+#undef IMPL
+#include "JavaCounter.cpp"
+#undef IMPL
+#include "JavaCSSCharsetRule.cpp"
+#undef IMPL
+#include "JavaCSSFontFaceRule.cpp"
+#undef IMPL
+#include "JavaCSSImportRule.cpp"
+#undef IMPL
+#include "JavaCSSMediaRule.cpp"
+#undef IMPL
+#include "JavaCSSPageRule.cpp"
+#undef IMPL
+#include "JavaCSSPrimitiveValue.cpp"
+#undef IMPL
+#include "JavaCSSRule.cpp"
+#undef IMPL
+#include "JavaCSSRuleList.cpp"
+#undef IMPL
+#include "JavaCSSStyleDeclaration.cpp"
+#undef IMPL
+#include "JavaCSSStyleRule.cpp"
+#undef IMPL
+#include "JavaCSSStyleSheet.cpp"
+#undef IMPL
+#include "JavaCSSUnknownRule.cpp"
+#undef IMPL
+#include "JavaCSSValue.cpp"
+#undef IMPL
+#include "JavaCSSValueList.cpp"
+#undef IMPL
+#include "JavaMediaList.cpp"
+#undef IMPL
+#include "JavaRect.cpp"
+#undef IMPL
+#include "JavaRGBColor.cpp"
+#undef IMPL
+#include "JavaStyleSheet.cpp"
+#undef IMPL
+#include "JavaStyleSheetList.cpp"
+#undef IMPL
+#include "JavaAttr.cpp"
+#undef IMPL
+#include "JavaCDATASection.cpp"
+#undef IMPL
+#include "JavaCharacterData.cpp"
+#undef IMPL
+#include "JavaComment.cpp"
+#undef IMPL
+#include "JavaDocumentFragment.cpp"
+#undef IMPL
+#include "JavaDocument.cpp"
+#undef IMPL
+#include "JavaDocumentType.cpp"
+#undef IMPL
+#include "JavaDOMImplementation.cpp"
+#undef IMPL
+#include "JavaDOMStringList.cpp"
+#undef IMPL
+#include "JavaElement.cpp"
+#undef IMPL
+#include "JavaEntity.cpp"
+#undef IMPL
+#include "JavaEntityReference.cpp"
+#undef IMPL
+#include "JavaEvent.cpp"
+#undef IMPL
+#include "JavaEventTarget.cpp"
+#undef IMPL
+#include "JavaKeyboardEvent.cpp"
+#undef IMPL
+#include "JavaMouseEvent.cpp"
+#undef IMPL
+#include "JavaMutationEvent.cpp"
+#undef IMPL
+#include "JavaNamedNodeMap.cpp"
+#undef IMPL
+#include "JavaNode.cpp"
+#undef IMPL
+#include "JavaNodeFilter.cpp"
+#undef IMPL
+#include "JavaNodeIterator.cpp"
+#undef IMPL
+#include "JavaNodeList.cpp"
+#undef IMPL
+#include "JavaProcessingInstruction.cpp"
+#undef IMPL
+#include "JavaRange.cpp"
+#undef IMPL
+#include "JavaText.cpp"
+#undef IMPL
+#include "JavaTreeWalker.cpp"
+#undef IMPL
+#include "JavaUIEvent.cpp"
+#undef IMPL
+#include "JavaHTMLAnchorElement.cpp"
+#undef IMPL
+#include "JavaHTMLAppletElement.cpp"
+#undef IMPL
+#include "JavaHTMLAreaElement.cpp"
+#undef IMPL
+#include "JavaHTMLBaseElement.cpp"
+#undef IMPL
+#include "JavaHTMLBaseFontElement.cpp"
+#undef IMPL
+#include "JavaHTMLBodyElement.cpp"
+#undef IMPL
+#include "JavaHTMLBRElement.cpp"
+#undef IMPL
+#include "JavaHTMLButtonElement.cpp"
+#undef IMPL
+#include "JavaHTMLCollection.cpp"
+#undef IMPL
+#include "JavaHTMLDirectoryElement.cpp"
+#undef IMPL
+#include "JavaHTMLDivElement.cpp"
+#undef IMPL
+#include "JavaHTMLDListElement.cpp"
+#undef IMPL
+#include "JavaHTMLDocument.cpp"
+#undef IMPL
+#include "JavaHTMLElement.cpp"
+#undef IMPL
+#include "JavaHTMLFieldSetElement.cpp"
+#undef IMPL
+#include "JavaHTMLFontElement.cpp"
+#undef IMPL
+#include "JavaHTMLFormElement.cpp"
+#undef IMPL
+#include "JavaHTMLFrameElement.cpp"
+#undef IMPL
+#include "JavaHTMLFrameSetElement.cpp"
+#undef IMPL
+#include "JavaHTMLHeadElement.cpp"
+#undef IMPL
+#include "JavaHTMLHeadingElement.cpp"
+#undef IMPL
+#include "JavaHTMLHRElement.cpp"
+#undef IMPL
+#include "JavaHTMLHtmlElement.cpp"
+#undef IMPL
+#include "JavaHTMLIFrameElement.cpp"
+#undef IMPL
+#include "JavaHTMLImageElement.cpp"
+#undef IMPL
+#include "JavaHTMLInputElement.cpp"
+#undef IMPL
+#include "JavaHTMLLabelElement.cpp"
+#undef IMPL
+#include "JavaHTMLLegendElement.cpp"
+#undef IMPL
+#include "JavaHTMLLIElement.cpp"
+#undef IMPL
+#include "JavaHTMLLinkElement.cpp"
+#undef IMPL
+#include "JavaHTMLMapElement.cpp"
+#undef IMPL
+#include "JavaHTMLMenuElement.cpp"
+#undef IMPL
+#include "JavaHTMLMetaElement.cpp"
+#undef IMPL
+#include "JavaHTMLModElement.cpp"
+#undef IMPL
+#include "JavaHTMLObjectElement.cpp"
+#undef IMPL
+#include "JavaHTMLOListElement.cpp"
+#undef IMPL
+#include "JavaHTMLOptGroupElement.cpp"
+#undef IMPL
+#include "JavaHTMLOptionElement.cpp"
+#undef IMPL
+#include "JavaHTMLOptionsCollection.cpp"
+#undef IMPL
+#include "JavaHTMLParagraphElement.cpp"
+#undef IMPL
+#include "JavaHTMLParamElement.cpp"
+#undef IMPL
+#include "JavaHTMLPreElement.cpp"
+#undef IMPL
+#include "JavaHTMLQuoteElement.cpp"
+#undef IMPL
+#include "JavaHTMLScriptElement.cpp"
+#undef IMPL
+#include "JavaHTMLSelectElement.cpp"
+#undef IMPL
+#include "JavaHTMLStyleElement.cpp"
+#undef IMPL
+#include "JavaHTMLTableCaptionElement.cpp"
+#undef IMPL
+#include "JavaHTMLTableCellElement.cpp"
+#undef IMPL
+#include "JavaHTMLTableColElement.cpp"
+#undef IMPL
+#include "JavaHTMLTableElement.cpp"
+#undef IMPL
+#include "JavaHTMLTableRowElement.cpp"
+#undef IMPL
+#include "JavaHTMLTableSectionElement.cpp"
+#undef IMPL
+#include "JavaHTMLTextAreaElement.cpp"
+#undef IMPL
+#include "JavaHTMLTitleElement.cpp"
+#undef IMPL
+#include "JavaHTMLUListElement.cpp"
+#undef IMPL
+#include "JavaDOMWindow.cpp"
+#undef IMPL
+#include "JavaXPathExpression.cpp"
+#undef IMPL
+#include "JavaXPathNSResolver.cpp"
+#undef IMPL
+#include "JavaXPathResult.cpp"
+#undef IMPL
+
+// On MSVC, including StaticConstructors.h causes all global objects not to be
+// automatically initialized by the C runtime. This is useful in some specific
+// cases (e.g., the *Names.cpp files), but can be dangerous in others. We don't
+// want StaticConstructors.h to "pollute" all the source files we #include here
+// accidentally, so we'll throw an error whenever any file includes it.
+#ifdef StaticConstructors_h
+#error Do not include any file in DerivedSources.cpp that includes StaticConstructors.h
+#endif
diff -r e72d3aa3e2fb modules/javafx.web/src/main/native/Source/cmake/OptionsJava.cmake
--- a/modules/javafx.web/src/main/native/Source/cmake/OptionsJava.cmake	Thu Jul 13 15:34:09 2017 +0100
+++ b/modules/javafx.web/src/main/native/Source/cmake/OptionsJava.cmake	Fri Jul 14 07:51:22 2017 +0100
@@ -60,6 +60,7 @@
 else ()
     message(FATAL_ERROR "Configure libxml, libxslt, sqlite and icu library paths")
 endif ()
+
 set(ICU_LIBRARIES ${ICU_JAVA_COMMON_LIB} ${ICU_JAVA_DATA_LIB})
 
 find_package(JNI REQUIRED)
@@ -88,18 +89,46 @@
         /wd6031 /wd6211 /wd6246 /wd6255 /wd6387
     )
 
-    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /OPT:ICF /OPT:REF")
-    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /OPT:ICF /OPT:REF")
+    # Create pdb files for debugging purposes, also for Release builds
+    # add_compile_options(/Zi /GS)
+
+    # set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /OPT:ICF /OPT:REF")
+    # set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /OPT:ICF /OPT:REF")
 
     # We do not use exceptions
     add_definitions(-D_HAS_EXCEPTIONS=0)
+    add_compile_options(/EHa- /EHc- /EHs- /fp:except-)
+
+    # We have some very large object files that have to be linked
+    add_compile_options(/analyze- /bigobj)
+
+    # Use CRT security features
+    add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1)
+
+    # Turn off certain link features
+    add_compile_options(/Gy- /openmp- /GF-)
+
+    if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+        set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /OPT:NOREF /OPT:NOICF")
+        set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /OPT:NOREF /OPT:NOICF")
+
+        # To debug linking time issues, uncomment the following three lines:
+        #add_compile_options(/Bv)
+        #set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /VERBOSE /VERBOSE:INCR /TIME")
+        #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /VERBOSE /VERBOSE:INCR /TIME")
+    elseif (${CMAKE_BUILD_TYPE} MATCHES "Release")
+        add_compile_options(/Oy-)
+    endif ()
 
     if (NOT ${CMAKE_GENERATOR} MATCHES "Ninja")
+        link_directories("${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}")
         add_definitions(/MP)
     endif ()
     if (NOT ${CMAKE_CXX_FLAGS} STREQUAL "")
-        string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable C++ exceptions
-        string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable RTTI
+        string(REGEX REPLACE "(/EH[a-z]+) " "\\1- " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable C++ exceptions
+        string(REGEX REPLACE "/EHsc$" "/EHs- /EHc- " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable C++ exceptions
+        string(REGEX REPLACE "/GR " "/GR- " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable RTTI
+        string(REGEX REPLACE "/W3" "/W4" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Warnings are important
     endif ()
 
 elseif(APPLE)
@@ -109,6 +138,14 @@
 
 WEBKIT_OPTION_BEGIN()
 
+# Enable AllInOne build only on Windows, rest of the platform compilers
+# are fast enough.
+if (WIN32)
+    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ALLINONE_BUILD PUBLIC ON)
+else ()
+    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ALLINONE_BUILD PUBLIC OFF)
+endif ()
+
 # WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CREDENTIAL_STORAGE PUBLIC ON)
 # WEBKIT_OPTION_DEFAULT_PORT_VALUE(WEBKIT_OPTION_DEFAULT_PORT_VALUE OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_COMPOSITING PRIVATE ON)
@@ -234,4 +271,3 @@
     "${THIRDPARTY_DIR}/icu/source/i18n"
 )
 
-
diff -r e72d3aa3e2fb modules/javafx.web/src/main/native/Tools/Scripts/webkitperl/FeatureList.pm
--- a/modules/javafx.web/src/main/native/Tools/Scripts/webkitperl/FeatureList.pm	Thu Jul 13 15:34:09 2017 +0100
+++ b/modules/javafx.web/src/main/native/Tools/Scripts/webkitperl/FeatureList.pm	Fri Jul 14 07:51:22 2017 +0100
@@ -156,7 +156,7 @@
       define => "ENABLE_ACCELERATED_2D_CANVAS", default => 0, value => \$accelerated2DCanvasSupport },
 
     { option => "allinone-build", desc => "Toggle all-in-one build",
-      define => "ENABLE_ALLINONE_BUILD", default => isWindows(), value => \$allInOneBuild },
+      define => "ENABLE_ALLINONE_BUILD", default => (isWindows() || (isAnyWindows() && isJava())), value => \$allInOneBuild },
 
     { option => "attachment-element", desc => "Toggle Attachment Element support",
       define => "ENABLE_ATTACHMENT_ELEMENT", default => 0, value => \$attachmentElementSupport },
