changeset 9037:6a9d8ce162e2 9-b64

Automated merge with http://hg.openjdk.java.net/openjfx/9/rt
author kcr
date Sat, 09 May 2015 07:09:46 -0700
parents b855f7e7700e 85836e2d6c58
children ebd74f586625 fc3a9a80b537
files
diffstat 10 files changed, 84 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- a/build.gradle	Thu May 07 00:26:06 2015 -0700
+++ b/build.gradle	Sat May 09 07:09:46 2015 -0700
@@ -3039,14 +3039,6 @@
                 }
                 if (IS_WINDOWS) {
                     from ("modules/graphics/build/libs/prismD3D/${t.name}/${library(targetProperties.prismD3D.lib)}");
-
-                    // Copy VS2013 runtime libs to sdk
-                    if ("${targetProperties.MSVCRTDIR}" != "") {
-                        from("${targetProperties.MSVCRTDIR}") {
-                            include "msvcr${WINDOWS_VS_VER}.dll",
-                                    "msvcp${WINDOWS_VS_VER}.dll"
-                        }
-                    }
                 }
                 if (IS_COMPILE_WEBKIT) {
                     from ("modules/web/build/libs/${t.name}/${library('jfxwebkit')}")
--- a/buildSrc/win.gradle	Thu May 07 00:26:06 2015 -0700
+++ b/buildSrc/win.gradle	Sat May 09 07:09:46 2015 -0700
@@ -149,11 +149,6 @@
 ext.MSVCR = cygpath("${WINDOWS_VS_MSVCDIR}/redist/${IS_64 ? 'x64' : 'x86'}/Microsoft.VC${WINDOWS_VS_VER}.CRT/msvcr${WINDOWS_VS_VER}.dll")
 ext.MSVCP = cygpath("${WINDOWS_VS_MSVCDIR}/redist/${IS_64 ? 'x64' : 'x86'}/Microsoft.VC${WINDOWS_VS_VER}.CRT/msvcp${WINDOWS_VS_VER}.dll")
 
-// Set up path to redistributable MS VC libraries if we are using a different
-// version of Visual Studio than the JDK
-def msvcrtDir = WINDOWS_VS_VER == "100" ? "" : cygpath("${WINDOWS_VS_MSVCDIR}/redist/${IS_64 ? 'x64' : 'x86'}/Microsoft.VC${WINDOWS_VS_VER}.CRT")
-WIN.MSVCRTDIR = msvcrtDir
-
 if (!file(RC).exists()) throw new GradleException("FAIL: cannot find RC: " + RC)
 if (!file(FXC).exists()) throw new GradleException("FAIL: cannot find FXC: " + FXC)
 
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/AbstractImageBundler.java	Thu May 07 00:26:06 2015 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/AbstractImageBundler.java	Sat May 09 07:09:46 2015 -0700
@@ -193,7 +193,12 @@
         out.println("[ArgOptions]");
         List<String> args = ARGUMENTS.fetchFrom(params);
         for (String arg : args) {
-            out.println(arg);
+            if (arg.endsWith("=") && (arg.indexOf("=") == arg.lastIndexOf("="))) {
+                out.print(arg.substring(0, arg.length() - 1));
+                out.println("\\=");
+            } else {
+                out.println(arg);
+            }
         }
 
         
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/StandardBundlerParam.java	Thu May 07 00:26:06 2015 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/StandardBundlerParam.java	Sat May 09 07:09:46 2015 -0700
@@ -241,7 +241,7 @@
                     "arguments",
                     (Class<List<String>>) (Object) List.class,
                     params -> Collections.emptyList(),
-                    (s, p) -> Arrays.asList(s.split("\\s+"))
+                    (s, p) -> splitStringWithEscapes(s)
             );
 
     @SuppressWarnings("unchecked")
@@ -740,4 +740,27 @@
             }
         }
     }
+
+
+    private static List<String> splitStringWithEscapes(String s) {
+        List<String> l = new ArrayList<>();
+        StringBuilder current = new StringBuilder();
+        boolean quoted = false;
+        boolean escaped = false;
+        for (char c : s.toCharArray()) {
+            if (escaped) {
+                current.append(c);
+            } else if ('"' == c) {
+                quoted = !quoted;
+            } else if (!quoted && Character.isWhitespace(c)) {
+                l.add(current.toString());
+                current = new StringBuilder();
+            } else {
+                current.append(c);
+            }
+        }
+        l.add(current.toString());
+        return l;
+    }
+
 }
--- a/modules/fxpackager/src/main/native/library/common/Helpers.cpp	Thu May 07 00:26:06 2015 -0700
+++ b/modules/fxpackager/src/main/native/library/common/Helpers.cpp	Sat May 09 07:09:46 2015 -0700
@@ -267,12 +267,15 @@
     std::list<TString> result;
     std::vector<TString> keys = Map.GetKeys();
 
-    for (size_t index = 0; index < keys.size(); index++) {
-        TString key = keys[index];
-        TString value;
-
-        if (Map.GetValue(key, value) == true) {
-            result.push_back(key + _T('=') + value);
+    for (OrderedMap<TString, TString>::const_iterator iterator = Map.begin(); iterator != Map.end(); iterator++) {
+       pair<TString, TString> *item = *iterator;
+       TString key = item->first;
+       TString value = item->second;
+       
+       if (value.length() == 0) {
+           result.push_back(key);
+       } else {
+           result.push_back(key + _T('=') + value);
         }
     }
 
--- a/modules/fxpackager/src/main/native/library/common/IniFile.cpp	Thu May 07 00:26:06 2015 -0700
+++ b/modules/fxpackager/src/main/native/library/common/IniFile.cpp	Sat May 09 07:09:46 2015 -0700
@@ -40,19 +40,9 @@
 }
 
 IniFile::~IniFile() {
-    std::vector<TString> keys = FMap.GetKeys();
-
-    for (size_t index = 0; index < keys.size(); index++) {
-        TString key = keys[index];
-
-        IniSectionData* item;
-
-        if (FMap.GetValue(key, item) == true) {
-            if (item != NULL) {
-                delete item;
-                item = NULL;
-            }
-        }
+    for (OrderedMap<TString, IniSectionData*>::iterator iterator = FMap.begin(); iterator != FMap.end(); iterator++) {
+        pair<TString, IniSectionData*> *item = *iterator;
+        delete item->second;
     }
 }
 
@@ -201,6 +191,7 @@
         if (FMap.GetValue(SectionName, section) == true && section != NULL) {
             OrderedMap<TString, TString> data = section->GetData();
             Data.Append(data);
+            result = true;
         }
     }
 
@@ -214,6 +205,7 @@
 //--------------------------------------------------------------------------------------------------
 
 IniSectionData::IniSectionData() {
+    FMap.SetAllowDuplicates(true);
 }
 
 IniSectionData::IniSectionData(OrderedMap<TString, TString> Values) {
--- a/modules/fxpackager/src/main/native/library/common/OrderedMap.h	Thu May 07 00:26:06 2015 -0700
+++ b/modules/fxpackager/src/main/native/library/common/OrderedMap.h	Sat May 09 07:09:46 2015 -0700
@@ -63,17 +63,16 @@
     typedef TKey key_type;
     typedef TValue mapped_type;
     typedef pair<key_type, mapped_type> container_type;
+    typedef typename std::vector<container_type*>::iterator iterator;
+    typedef typename std::vector<container_type*>::const_iterator const_iterator;
 
 private:
     typedef std::map<key_type, container_type*> map_type;
     typedef std::vector<container_type*> list_type;
 
-public:
-    typedef typename list_type::const_iterator const_iterator;
-
-private:
     map_type FMap;
     list_type FList;
+    bool FAllowDuplicates;
 
     typename list_type::iterator FindListItem(const key_type Key) {
         typename list_type::iterator result = FList.end();
@@ -92,6 +91,7 @@
 
 public:
     OrderedMap() {
+        FAllowDuplicates = false;
     }
 
     OrderedMap(const OrderedMap<key_type, mapped_type> &Value) {
@@ -102,6 +102,26 @@
         Clear();
     }
 
+    void SetAllowDuplicates(bool Value) {
+        FAllowDuplicates = Value;
+    }
+    
+    iterator begin() {
+        return FList.begin();
+    }
+    
+    const_iterator begin() const {
+        return FList.begin();
+    }
+    
+    iterator end() {
+        return FList.end();
+    }
+    
+    const_iterator end() const {
+        return FList.end();
+    }
+    
     void Clear() {
         for (typename list_type::iterator iterator = FList.begin(); iterator != FList.end(); iterator++) {
             container_type *item = *iterator;
@@ -184,7 +204,7 @@
     bool SetValue(key_type Key, mapped_type &Value) {
         bool result = false;
 
-        if (ContainsKey(Key) == true) {
+        if ((FAllowDuplicates == false) && (ContainsKey(Key) == true)) {
             container_type *item = FMap[Key];
 
             if (item != NULL) {
@@ -224,14 +244,6 @@
     size_t Count() {
         return FList.size();
     }
-
-    typename OrderedMap::const_iterator begin() {
-        return FList.begin();
-    }
-
-    typename OrderedMap::const_iterator end() {
-        return FList.end();
-    }
 };
 
 #endif //ORDEREDMAP_H
--- a/modules/fxpackager/src/test/java/hello/SimpleBundle.java	Thu May 07 00:26:06 2015 -0700
+++ b/modules/fxpackager/src/test/java/hello/SimpleBundle.java	Sat May 09 07:09:46 2015 -0700
@@ -85,7 +85,17 @@
                     // userJVM Args
                     params.put(StandardBundlerParam.USER_JVM_OPTIONS.getID(), "-Duser.arg.1\\==bundlerargs\n-Duser.arg.2=\\=bundlerargs\n-Dcollide=\\=userjvmoptions\n-Dcollide\\=jvmoptions=AWESOME");
                     // arguments
-                    params.put(StandardBundlerParam.ARGUMENTS.getID(), "argument1\nargument2");
+                    params.put(StandardBundlerParam.ARGUMENTS.getID(), "argument1\n" +
+                            "argument2\n" +
+                            "argument3=value\n" +
+                            "arg4=with=embedded\n" +
+                            "arg5=with=equals=at=end=\n" +
+                            "one_equal_at_end=\n" +
+                            "=\n" +
+                            "\"Prev Arg was just an equals\"\n" +
+                            "argument1\n" +
+                            "argument1\n" +
+                            "argument1");
                     break;
 
                 default:
--- a/modules/graphics/src/main/java/com/sun/javafx/iio/gif/GIFImageLoader2.java	Thu May 07 00:26:06 2015 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/iio/gif/GIFImageLoader2.java	Sat May 09 07:09:46 2015 -0700
@@ -107,7 +107,7 @@
                 byte subBlock[] = readBytes(new byte[subBlockSize]);
                 int subBlockId = subBlock[0];
                 if (subBlockSize == 3 && subBlockId == 1) { // loop count extension
-                    loopCount = subBlock[1] + (subBlock[2] << 8);
+                    loopCount = (subBlock[1] & 0xff) | ((subBlock[2] & 0xff) << 8);
                 }
             }
         } else {
--- a/modules/graphics/src/main/java/com/sun/prism/impl/PrismSettings.java	Thu May 07 00:26:06 2015 -0700
+++ b/modules/graphics/src/main/java/com/sun/prism/impl/PrismSettings.java	Sat May 09 07:09:46 2015 -0700
@@ -125,9 +125,10 @@
         // The maximum number of dirty regions to use. The absolute max that we can
         // support at present is 15.
         dirtyRegionCount = Utils.clamp(0, getInt(systemProperties, "prism.dirtyregioncount", 6, null), 15);
-        
+
         // Scrolling cache optimization
-        scrollCacheOpt = getBoolean(systemProperties, "prism.scrollcacheopt", true);
+        // Disabled as a workaround for RT-39755.
+        scrollCacheOpt = getBoolean(systemProperties, "prism.scrollcacheopt", false);
 
         /* Dirty region optimizations */
         threadCheck = getBoolean(systemProperties, "prism.threadcheck", false);