changeset 10448:8afa09cbc10c

Merge
author kcr
date Tue, 18 Apr 2017 12:50:09 -0700
parents 2d8c86d0bd11 c1510d15b9a1
children 730e6fa7109b
files .hgtags
diffstat 22 files changed, 532 insertions(+), 125 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Apr 18 12:32:48 2017 -0700
+++ b/.hgtags	Tue Apr 18 12:50:09 2017 -0700
@@ -421,6 +421,7 @@
 6ad0ed6f061ef4d1097e3553dab0081908d38c6a jdk-9+158
 6b195a6a6b038622b2508e570d2e76026e88e8f1 jdk-9+159
 ba188ce090552f8c5042aa69873828ebd87231c6 jdk-9+160
+dd3f736d2b8e0defbf8844a7576af3dfcb132841 jdk-10+0
 ea2666fc4b4cbd4a2585b634d298f8e3a6c26e25 jdk-9+161
 c76d1ddec8f4b734f7b06262edd36c0790de1787 jdk-9+162
 eec7ea4e8513856952a9e76d71100db23e94a04f jdk-9+163
--- a/build.gradle	Tue Apr 18 12:32:48 2017 -0700
+++ b/build.gradle	Tue Apr 18 12:50:09 2017 -0700
@@ -263,6 +263,9 @@
 ext.TESTRUNARGSFILE = "testrun.args"
 ext.TESTJAVAPOLICYFILE = 'test.java.policy'
 
+// the file containing "extra" --add-exports
+ext.EXTRAADDEXPORTS = 'buildSrc/addExports'
+
 ext.MODULESOURCEPATH = "modulesourcepath.args"
 
 // These variables indicate what platform is running the build. Is
@@ -858,15 +861,53 @@
         addExportsFile.eachLine { line ->
             line = line.trim()
             if (!(line.startsWith("#") || line.equals(""))) {
-                // one line arguments are a bit easier to debug
-                //if (line.startsWith('--add-exports ')) {
-                //    line = line.replaceFirst('--add-exports ', '--add-exports=')
-                //}
-                line = line.replace('--add-exports *', '--add-exports=')
                 ae += line.split(' ')
             }
         }
-        p.ext.addExports  = ae.flatten()
+        p.ext.testAddExports  = ae.flatten()
+    }
+
+    // read in the temporary addExports file EXTRAADDEXPORTS)
+    //
+    // These extra --add-exports will be used in two places and so we
+    // create/modify two items:
+    // p.testAddExports - add the extra items so they are included in test builds
+    //
+    // p.extraAddExports - for use in any other place where we don't automatically update
+    //    for example any non modular, non 'test' compile, any compile that does not
+    //    use a module-source-path that includes the dependent modules
+    //
+    // Note that we don't modify the modular build (main, shims) because they use
+    // module-info directly, and we don't want to cover up any missing items there.
+    //
+    if (!rootProject.hasProperty("EXTRA_ADDEXPORTS_ARGS")) {
+        List<String> extraAddExportsList = []
+        String fullae = ""
+        File tmpaddExportsFile = new File(rootProject.projectDir, EXTRAADDEXPORTS)
+        if (tmpaddExportsFile.exists()) {
+            String nl = System.getProperty("line.separator")
+            tmpaddExportsFile.eachLine { line ->
+                line = line.trim()
+                fullae += line + nl
+                if (!(line.startsWith("#") || line.equals(""))) {
+                    extraAddExportsList += line.split(' ')
+                }
+            }
+        }
+        // This string is used in the creation of the build/*.args files
+        // so we preserve comments
+        if (!extraAddExportsList.isEmpty()) {
+            rootProject.ext.EXTRA_ADDEXPORTS_STRING = fullae
+        }
+        rootProject.ext.EXTRA_ADDEXPORTS_ARGS = extraAddExportsList
+    }
+
+    // use this variable, because it shows we have a non empty addition
+    if (rootProject.hasProperty("EXTRA_ADDEXPORTS_STRING")) {
+        p.ext.extraAddExports = EXTRA_ADDEXPORTS_ARGS.flatten()
+        if (p.hasProperty("testAddExports")) {
+            p.testAddExports += EXTRA_ADDEXPORTS_ARGS.flatten()
+        }
     }
 }
 
@@ -1995,19 +2036,12 @@
             "-DCSS_META_DATA_TEST_DIR=$cssDir"
     }
 
-    // TODO JDK-8174944 Css2Bin really should be moved out and put into buildSrc if it can be
-    // TODO could change script to dynamically locate all .css files and create bss for them, probably better
-    // TODO also not sure there is any benefit to having css files in the the runtime modules at all
     processResources << {
-        ["$moduleDir/com/sun/javafx/scene/control/skin/caspian/caspian.css",
-        "$moduleDir/com/sun/javafx/scene/control/skin/caspian/caspian-no-transparency.css",
-        "$moduleDir/com/sun/javafx/scene/control/skin/caspian/embedded-qvga.css",
-        "$moduleDir/com/sun/javafx/scene/control/skin/caspian/embedded.css",
-        "$moduleDir/com/sun/javafx/scene/control/skin/caspian/fxvk.css",
-        "$moduleDir/com/sun/javafx/scene/control/skin/caspian/highcontrast.css",
-        "$moduleDir/com/sun/javafx/scene/control/skin/modena/modena.css",
-        "$moduleDir/com/sun/javafx/scene/control/skin/modena/modena-no-transparency.css",
-        "$moduleDir/com/sun/javafx/scene/control/skin/modena/touch.css"].each { css ->
+        def cssFiles = fileTree(dir: "$moduleDir/com/sun/javafx/scene/control/skin")
+        cssFiles.include "**/*.css"
+        cssFiles.each { css ->
+            logger.info("converting CSS to BSS ${css}");
+
             javaexec {
                 executable = JAVA
                 workingDir = project.projectDir
@@ -2018,8 +2052,6 @@
         }
     }
 
-    // TODO - if the above TODO regarding Css2Bin is fixed, this should also
-    // be fixed.
     processShimsResources.dependsOn(project.task("copyShimBss", type: Copy) {
         from project.moduleDir
         into project.moduleShimsDir
@@ -3353,21 +3385,6 @@
 
         compile.options.compilerArgs += ["-XDignore.symbol.file", "-encoding", "UTF-8"]
 
-        // If I am a module....
-        if (project.hasProperty('moduleSourcePath') &&
-                (project.hasProperty('buildModule') && project.buildModule)) {
-            project.compileJava {
-                options.compilerArgs.addAll([
-                    '-implicit:none',
-                    '--module-source-path', project.moduleSourcePath
-                    ])
-            }
-            // no jars needed for modules
-            project.jar.enabled = false
-
-            // and redirect the resources into the module
-            project.processResources.destinationDir = project.moduleDir
-        }
         // we use a custom javadoc command
         project.javadoc.enabled = false
 
@@ -3379,6 +3396,22 @@
         }
     } // tasks with javaCompile
 
+    // If I am a module....
+    if (project.hasProperty('moduleSourcePath') &&
+            (project.hasProperty('buildModule') && project.buildModule)) {
+        project.compileJava {
+            options.compilerArgs.addAll([
+                '-implicit:none',
+                '--module-source-path', project.moduleSourcePath
+                ])
+        }
+        // no jars needed for modules
+        project.jar.enabled = false
+
+        // and redirect the resources into the module
+        project.processResources.destinationDir = project.moduleDir
+    }
+
     if (project.hasProperty('moduleSourcePathShim') &&
             project.sourceSets.hasProperty('shims')) {
 
@@ -3424,9 +3457,19 @@
         project.test.jvmArgs += testPatchModuleArgs
     }
 
-    if (project.hasProperty('addExports')) {
-        project.compileTestJava.options.compilerArgs.addAll(addExports);
-        project.test.jvmArgs += addExports
+    /* Note: we should not have to add extraAddExports to the normal
+     * modular compile, as it contains all of the module-info files.
+     * In fact doing so might cover up a module-info issue.
+     * so we don't do it, and I will leave this commented out
+     * block as a reminder of this fact.
+    if (project.hasProperty('extraAddExports')) {
+        project.compileJava.options.compilerArgs.addAll(extraAddExports);
+    }
+    */
+
+    if (project.hasProperty('testAddExports')) {
+        project.compileTestJava.options.compilerArgs.addAll(testAddExports);
+        project.test.jvmArgs += testAddExports
     }
 
     if (rootProject.hasProperty("EXTRA_TEST_ARGS") && project.hasProperty('test')) {
@@ -3921,6 +3964,7 @@
     def buildRunArgsTask = task("buildRunArgs$t.capital",
             group: "Build", dependsOn: buildModulesTask) {
         outputs.file(runArgsFile);
+        inputs.file(EXTRAADDEXPORTS);
         doLast() {
             List<String>libpath = []
             List<String>modpath = []
@@ -3933,6 +3977,11 @@
 
             writeRunArgsFile(runArgsFile, computeLibraryPath(true), modpath)
             writeRunArgsFile(compileArgsFile, null, modpath)
+
+            if (rootProject.hasProperty("EXTRA_ADDEXPORTS_STRING")) {
+                runArgsFile << EXTRA_ADDEXPORTS_STRING
+                compileArgsFile << EXTRA_ADDEXPORTS_STRING
+            }
         }
     }
     buildModules.dependsOn(buildRunArgsTask)
@@ -4272,6 +4321,7 @@
         outputs.file(testCompileArgsFile)
         outputs.file(testJavaPolicyFile)
         outputs.file(runJavaPolicyFile)
+        inputs.file(EXTRAADDEXPORTS);
 
         doLast() {
             rootProject.buildDir.mkdir()
@@ -4318,6 +4368,11 @@
 
             writeRunArgsFile(testCompileArgsFile, null, modpath)
             writeRunArgsFile(testRunArgsFile, computeLibraryPath(true), modpath)
+
+            if (rootProject.hasProperty("EXTRA_ADDEXPORTS_STRING")) {
+                testCompileArgsFile << EXTRA_ADDEXPORTS_STRING
+                testRunArgsFile << EXTRA_ADDEXPORTS_STRING
+            }
         }
     }
     sdk.dependsOn(testArgFiles)
--- a/build.properties	Tue Apr 18 12:32:48 2017 -0700
+++ b/build.properties	Tue Apr 18 12:50:09 2017 -0700
@@ -33,7 +33,7 @@
 # Note: The expected value for suffix is one of [-alpha, -beta, -ea] 
 # Note: For fcs builds the suffix should be blank
 jfx.release.suffix=-ea
-jfx.release.major.version=9
+jfx.release.major.version=10
 jfx.release.minor.version=0
 jfx.release.security.version=0
 jfx.release.patch.version=0
@@ -48,10 +48,10 @@
 #
 ##############################################################################
 
-javadoc.bottom=<font size="-1"><a href="http://bugreport.java.com/bugreport/" target="_blank">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://download.java.net/java/jdk9/docs/index.html" target="_blank">Java SE Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> <a href="http://download.java.net/java/jdk9/docs/legal/cpyr.html" target="_blank">Copyright</a> &copy; 2008, 2017, Oracle and/or its affiliates. All rights reserved.<br><b>DRAFT 9-ea</b></font>
+javadoc.bottom=<font size="-1"><a href="http://bugreport.java.com/bugreport/" target="_blank">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://download.java.net/java/jdk9/docs/index.html" target="_blank">Java SE Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> <a href="http://download.java.net/java/jdk9/docs/legal/cpyr.html" target="_blank">Copyright</a> &copy; 2008, 2017, Oracle and/or its affiliates. All rights reserved.<br><b>DRAFT 10-ea</b></font>
 
-javadoc.title=JavaFX 9
-javadoc.header=JavaFX&nbsp;9
+javadoc.title=JavaFX 10
+javadoc.header=JavaFX&nbsp;10
 
 ##############################################################################
 #
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildSrc/addExports	Tue Apr 18 12:50:09 2017 -0700
@@ -0,0 +1,2 @@
+# buildSrc/addExports: temporary --add-exports
+# end temporary --add-exports
--- a/modules/javafx.base/src/test/java/test/com/sun/javafx/runtime/VersionInfoTest.java	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.base/src/test/java/test/com/sun/javafx/runtime/VersionInfoTest.java	Tue Apr 18 12:50:09 2017 -0700
@@ -89,7 +89,7 @@
         String version = VersionInfo.getVersion();
         // Need to update major version number when we develop the next
         // major release.
-        assertTrue(version.startsWith("9"));
+        assertTrue(version.startsWith("10"));
         String runtimeVersion = VersionInfo.getRuntimeVersion();
         assertTrue(runtimeVersion.startsWith(version));
     }
--- a/modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/ReadOnlyUnbackedObservableList.java	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/ReadOnlyUnbackedObservableList.java	Tue Apr 18 12:50:09 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -30,6 +30,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.ListIterator;
+import java.util.NoSuchElementException;
 
 import javafx.beans.InvalidationListener;
 import com.sun.javafx.collections.ListListenerHelper;
@@ -288,6 +289,7 @@
         throw new UnsupportedOperationException("Not supported.");
     }
 
+    // Iterator to traverse the list of selected indices in both directions.
     private static class SelectionListIterator<E> implements ListIterator<E> {
         private int pos;
         private final ReadOnlyUnbackedObservableList<E> list;
@@ -306,6 +308,9 @@
         }
 
         @Override public E next() {
+            if (!hasNext()) {
+                throw new NoSuchElementException();
+            }
             return list.get(pos++);
         }
 
@@ -314,11 +319,14 @@
         }
 
         @Override public E previous() {
-            return list.get(pos--);
+            if (!hasPrevious()) {
+                throw new NoSuchElementException();
+            }
+            return list.get(--pos);
         }
 
         @Override public int nextIndex() {
-            return pos + 1;
+            return pos;
         }
 
         @Override public int previousIndex() {
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/ChoiceBox.java	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/ChoiceBox.java	Tue Apr 18 12:50:09 2017 -0700
@@ -225,11 +225,11 @@
     public final ReadOnlyBooleanProperty showingProperty() { return showing.getReadOnlyProperty(); }
     private void setShowing(boolean value) {
         // these events will not fire if the showing property is bound
-        Event.fireEvent(this, value ? new Event(ComboBoxBase.ON_SHOWING) :
-                new Event(ComboBoxBase.ON_HIDING));
+        Event.fireEvent(this, value ? new Event(ON_SHOWING) :
+                new Event(ON_HIDING));
         showing.set(value);
-        Event.fireEvent(this, value ? new Event(ComboBoxBase.ON_SHOWN) :
-                new Event(ComboBoxBase.ON_HIDDEN));
+        Event.fireEvent(this, value ? new Event(ON_SHOWN) :
+                new Event(ON_HIDDEN));
     }
 
     /**
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/MenuButton.java	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/MenuButton.java	Tue Apr 18 12:50:09 2017 -0700
@@ -214,11 +214,11 @@
     };
     private void setShowing(boolean value) {
         // these events will not fire if the showing property is bound
-        Event.fireEvent(this, value ? new Event(ComboBoxBase.ON_SHOWING) :
-                new Event(ComboBoxBase.ON_HIDING));
+        Event.fireEvent(this, value ? new Event(ON_SHOWING) :
+                new Event(ON_HIDING));
         showing.set(value);
-        Event.fireEvent(this, value ? new Event(ComboBoxBase.ON_SHOWN) :
-                new Event(ComboBoxBase.ON_HIDDEN));
+        Event.fireEvent(this, value ? new Event(ON_SHOWN) :
+                new Event(ON_HIDDEN));
     }
     public final boolean isShowing() { return showing.get(); }
     public final ReadOnlyBooleanProperty showingProperty() { return showing.getReadOnlyProperty(); }
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/ColorPalette.java	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/ColorPalette.java	Tue Apr 18 12:50:09 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -244,6 +244,7 @@
         }
         for (int i = 0; i < numEmpty; i++) {
             ColorSquare emptySquare = new ColorSquare();
+            emptySquare.setDisable(true);
             customColorGrid.add(emptySquare, customColumnIndex, customRowIndex);
             customColumnIndex++;
         }
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/LabeledSkinBase.java	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/LabeledSkinBase.java	Tue Apr 18 12:50:09 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -307,8 +307,11 @@
         final Font font = text.getFont();
         final String string = labeled.getText();
         boolean emptyText = string == null || string.isEmpty();
-        double widthPadding = leftInset + leftLabelPadding() +
-                rightInset + rightLabelPadding();
+        double widthPadding = leftInset + rightInset;
+
+        if (!isIgnoreText()) {
+            widthPadding += leftLabelPadding() + rightLabelPadding();
+        }
 
         double textWidth = emptyText ? 0 : Utils.computeTextWidth(font, string, 0);
 
@@ -335,8 +338,12 @@
         final Font font = text.getFont();
         final ContentDisplay contentDisplay = labeled.getContentDisplay();
         final double gap = labeled.getGraphicTextGap();
-        width -= leftInset + leftLabelPadding() +
-                rightInset + rightLabelPadding();
+
+        width -= leftInset + rightInset;
+
+        if (!isIgnoreText()) {
+            width -= leftLabelPadding() + rightLabelPadding();
+        }
 
         String str = labeled.getText();
         if (str != null && str.endsWith("\n")) {
@@ -366,7 +373,13 @@
             }
         }
 
-        return topInset + h + bottomInset + topLabelPadding() + bottomLabelPadding();
+        double padding = topInset + bottomInset;
+
+        if (!isIgnoreText()) {
+            padding += topLabelPadding() + bottomLabelPadding();
+        }
+
+        return  h + padding;
     }
 
     /** {@inheritDoc} */
@@ -394,7 +407,11 @@
             }
         }
 
-        return topInset + topLabelPadding() + h;
+        double offset = topInset + h;
+        if (!isIgnoreText()) {
+            offset += topLabelPadding();
+        }
+        return offset;
     }
 
     /**
@@ -461,10 +478,12 @@
         final boolean ignoreGraphic = isIgnoreGraphic();
         final boolean ignoreText = isIgnoreText();
 
-        x += leftLabelPadding();
-        y += topLabelPadding();
-        w -= leftLabelPadding() + rightLabelPadding();
-        h -= topLabelPadding() + bottomLabelPadding();
+        if (!ignoreText) {
+            x += leftLabelPadding();
+            y += topLabelPadding();
+            w -= leftLabelPadding() + rightLabelPadding();
+            h -= topLabelPadding() + bottomLabelPadding();
+        }
 
         // Compute some standard useful numbers for the graphic, text, and gap
         double graphicWidth;
@@ -784,8 +803,12 @@
             width = Math.max(minTextWidth, graphic.minWidth(-1));
         }
 
-        return width + leftInset + leftLabelPadding() +
-                rightInset + rightLabelPadding();
+        double padding = leftInset + rightInset;
+        if (!isIgnoreText()) {
+            padding += leftLabelPadding() + rightLabelPadding();
+        }
+
+        return width + padding;
     }
 
     private double computeMinLabeledPartHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
@@ -818,7 +841,11 @@
             }
         }
 
-        return topInset + h + bottomInset + topLabelPadding() - bottomLabelPadding();
+        double padding = topInset + bottomInset;
+        if (!isIgnoreText()) {
+            padding += topLabelPadding() - bottomLabelPadding();
+        }
+        return h + padding;
     }
 
     double topLabelPadding() {
@@ -1019,8 +1046,12 @@
                     (labeled.getContentDisplay() == ContentDisplay.LEFT ||
                     labeled.getContentDisplay() == ContentDisplay.RIGHT);
 
-            double availableWidth = labeled.getWidth() - snappedLeftInset() - leftLabelPadding() -
-                                    snappedRightInset() - rightLabelPadding();
+            double availableWidth = labeled.getWidth() -
+                    snappedLeftInset() - snappedRightInset();
+
+            if (!isIgnoreText()) {
+                availableWidth -= leftLabelPadding() + rightLabelPadding();
+            }
             availableWidth = Math.max(availableWidth, 0);
 
             if (w == -1) {
@@ -1038,8 +1069,12 @@
                     (labeled.getContentDisplay() == ContentDisplay.TOP ||
                     labeled.getContentDisplay() == ContentDisplay.BOTTOM);
 
-            double availableHeight = labeled.getHeight() - snappedTopInset() - topLabelPadding() -
-                                     snappedBottomInset() - bottomLabelPadding();
+            double availableHeight = labeled.getHeight() -
+                    snappedTopInset() - snappedBottomInset();
+
+            if (!isIgnoreText()) {
+                availableHeight -= topLabelPadding() + bottomLabelPadding();
+            }
             availableHeight = Math.max(availableHeight, 0);
 
             if (h == -1) {
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java	Tue Apr 18 12:50:09 2017 -0700
@@ -148,6 +148,7 @@
     private EventHandler<MouseEvent> mouseEventHandler;
     private ChangeListener<Boolean> menuBarFocusedPropertyListener;
     private ChangeListener<Scene> sceneChangeListener;
+    private ChangeListener<Boolean> menuVisibilityChangeListener;
 
     private boolean pendingDismiss = false;
 
@@ -347,15 +348,14 @@
             }
         });
 
+        menuVisibilityChangeListener = (ov, t, t1) -> {
+            rebuildUI();
+        };
+
         rebuildUI();
         control.getMenus().addListener((ListChangeListener<Menu>) c -> {
             rebuildUI();
         });
-        for (final Menu menu : getSkinnable().getMenus()) {
-            menu.visibleProperty().addListener((ov, t, t1) -> {
-                rebuildUI();
-            });
-        }
 
         if (Toolkit.getToolkit().getSystemMenu().isSupported()) {
             control.useSystemMenuBarProperty().addListener(valueModel -> {
@@ -820,6 +820,8 @@
         for (Menu m : getSkinnable().getMenus()) {
             // remove action listeners
             updateActionListeners(m, false);
+
+            m.visibleProperty().removeListener(menuVisibilityChangeListener);
         }
         for (Node n : container.getChildren()) {
             // Stop observing menu's showing & disable property for changes.
@@ -920,6 +922,9 @@
 
         getSkinnable().focusedProperty().addListener(menuBarFocusedPropertyListener);
         for (final Menu menu : getSkinnable().getMenus()) {
+
+            menu.visibleProperty().addListener(menuVisibilityChangeListener);
+
             if (!menu.isVisible()) continue;
             final MenuBarButton menuButton = new MenuBarButton(this, menu);
             menuButton.setFocusTraversable(false);
--- a/modules/javafx.controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/modena.css	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/modena.css	Tue Apr 18 12:50:09 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -1985,11 +1985,13 @@
 }
 /* the color over which the user is hovering */
 .color-palette-region > .color-square.hover-square {
-    -fx-background-color: -fx-faint-focus-color, -fx-focus-color;
+    -fx-background-color: -fx-faint-focus-color, white;
     -fx-background-insets: -3,-1;
     -fx-background-radius: 5,0;
     -fx-scale-x: 1.5;
     -fx-scale-y: 1.5;
+    -fx-border-color: -fx-focus-color;
+    -fx-border-insets: -1, -1;
 }
 /* ------- CUSTOM COLOR DIALOG ------- */
 .custom-color-dialog > .color-rect-pane {
--- a/modules/javafx.controls/src/test/java/test/javafx/scene/control/ChoiceBoxTest.java	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.controls/src/test/java/test/javafx/scene/control/ChoiceBoxTest.java	Tue Apr 18 12:50:09 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -56,6 +56,8 @@
 import javafx.scene.control.SingleSelectionModel;
 import javafx.scene.layout.StackPane;
 import javafx.stage.Stage;
+import javafx.event.Event;
+import javafx.event.EventHandler;
 
 import org.junit.Before;
 import org.junit.Ignore;
@@ -531,4 +533,42 @@
         assertEquals("selecting previous must move over separator", 1, sm.getSelectedIndex());
         assertEquals("oranges", sm.getSelectedItem());
     }
+
+    boolean onShowingPass;
+    boolean onShownPass;
+    boolean onHidingPass;
+    boolean onHiddenPass;
+    @Test public void test_jdk_8175963_showHideEvents() {
+        ChoiceBox box = new ChoiceBox();
+        box.getItems().setAll("1");
+
+        box.setOnShowing(event -> {
+            assertEquals("event is not of type ChoiceBox.ON_SHOWING",
+                event.getEventType(), ChoiceBox.ON_SHOWING);
+            onShowingPass = true;
+        });
+        box.setOnShown(event -> {
+            assertEquals("event is not of type ChoiceBox.ON_SHOWN",
+                event.getEventType(), ChoiceBox.ON_SHOWN);
+            onShownPass = true;
+        });
+        box.setOnHiding(event -> {
+            assertEquals("event is not of type ChoiceBox.ON_HIDING",
+                event.getEventType(), ChoiceBox.ON_HIDING);
+            onHidingPass = true;
+        });
+        box.setOnHidden(event -> {
+            assertEquals("event is not of type ChoiceBox.ON_HIDDEN",
+                event.getEventType(), ChoiceBox.ON_HIDDEN);
+            onHiddenPass = true;
+        });
+
+        box.show();
+        box.hide();
+
+        assertTrue("OnShowing event not received", onShowingPass);
+        assertTrue("onShown event not received", onShownPass);
+        assertTrue("onHiding event not received", onHidingPass);
+        assertTrue("onHidden event not received", onHiddenPass);
+    }
 }
--- a/modules/javafx.controls/src/test/java/test/javafx/scene/control/ListViewTest.java	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.controls/src/test/java/test/javafx/scene/control/ListViewTest.java	Tue Apr 18 12:50:09 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -32,6 +32,8 @@
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
+import java.util.ListIterator;
+import java.util.NoSuchElementException;
 import javafx.application.Platform;
 import javafx.beans.binding.Bindings;
 import javafx.beans.property.ObjectProperty;
@@ -1830,4 +1832,90 @@
         model.clearAndSelect(0);
         model.clearAndSelect(2);
     }
+
+    @Test public void test_jdk_8145887_selectedIndices_ListIterator() {
+        int selectIndices[] = { 4, 7, 9 };
+        ListView<Integer> lv = new ListView<>();
+        for (int i = 0; i < 10; ++i) {
+            lv.getItems().add(i);
+        }
+
+        MultipleSelectionModel msm = lv.getSelectionModel();
+        msm.setSelectionMode(SelectionMode.MULTIPLE);
+        for (int i = 0 ; i < selectIndices.length; ++i) {
+            msm.select(selectIndices[i]);
+        }
+
+        ListIterator iter = lv.getSelectionModel().getSelectedIndices().listIterator();
+
+        // Step 1. Initial values
+        assertEquals(0, iter.nextIndex());
+        assertEquals(-1, iter.previousIndex());
+        assertEquals(true, iter.hasNext());
+        assertEquals(false, iter.hasPrevious());
+
+        // Step 2. Iterate forward.
+        assertEquals(4, iter.next());
+        assertEquals(1, iter.nextIndex());
+        assertEquals(0, iter.previousIndex());
+        assertEquals(true, iter.hasNext());
+        assertEquals(true, iter.hasPrevious());
+
+        // Step 3. Iterate forward.
+        // Values would be at similar state of Step 2.
+        assertEquals(7, iter.next());
+
+        // Step 4. Iterate forward to Last element.
+        assertEquals(9, iter.next());
+        assertEquals(3, iter.nextIndex());
+        assertEquals(2, iter.previousIndex());
+        assertEquals(false, iter.hasNext());
+        assertEquals(true, iter.hasPrevious());
+
+        // Step 5. Verify NoSuchElementException by next()
+        try {
+            iter.next();
+        } catch (Exception e) {
+            assert(e instanceof NoSuchElementException);
+        }
+
+        // Step 6. Iterate backward to Last element.
+        assertEquals(9, iter.previous());
+        assertEquals(2, iter.nextIndex());
+        assertEquals(1, iter.previousIndex());
+        assertEquals(true, iter.hasNext());
+        assertEquals(true, iter.hasPrevious());
+
+        // Step 7. Iterate forward to Last element.
+        assertEquals(9, iter.next());
+        assertEquals(3, iter.nextIndex());
+        assertEquals(2, iter.previousIndex());
+        assertEquals(false, iter.hasNext());
+        assertEquals(true, iter.hasPrevious());
+
+        // Step 8. Iterate forward to last element.
+        // Values would be at Same state of Step 2.
+        assertEquals(9, iter.previous());
+
+        // Step 9. Iterate backward.
+        assertEquals(7, iter.previous());
+        assertEquals(1, iter.nextIndex());
+        assertEquals(0, iter.previousIndex());
+        assertEquals(true, iter.hasNext());
+        assertEquals(true, iter.hasPrevious());
+
+        // Step 10. Iterate back to first element.
+        assertEquals(4, iter.previous());
+        assertEquals(0, iter.nextIndex());
+        assertEquals(-1, iter.previousIndex());
+        assertEquals(true, iter.hasNext());
+        assertEquals(false, iter.hasPrevious());
+
+        // Step 11. Verify NoSuchElementException by previous()
+        try {
+            iter.previous();
+        } catch (Exception e) {
+            assert(e instanceof NoSuchElementException);
+        }
+    }
 }
--- a/modules/javafx.controls/src/test/java/test/javafx/scene/control/MenuBarTest.java	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.controls/src/test/java/test/javafx/scene/control/MenuBarTest.java	Tue Apr 18 12:50:09 2017 -0700
@@ -552,6 +552,49 @@
         assertEquals(menu.showingProperty().get(), false);
     }
 
+    @Test public void testMenuBarUpdateOnMenuVisibilityChange() {
+        VBox root = new VBox();
+        Menu menu1 = new Menu("Menu1");
+        Menu menu2 = new Menu("Menu2");
+
+        menuBar.getMenus().addAll(menu1, menu2);
+
+        root.getChildren().addAll(menuBar);
+        startApp(root);
+        tk.firePulse();
+
+        MenuBarSkin skin = (MenuBarSkin)menuBar.getSkin();
+        assertTrue(skin != null);
+
+        // Test menuBar height to be non-zero as both menus are
+        // visible by default
+        int x = Double.compare(menuBar.getHeight(), 0.0);
+        assertTrue(x > 0);
+
+        // Test menubar height to be zero in case all of its
+        // children are invisible
+        menu1.setVisible(false);
+        menu2.setVisible(false);
+        tk.firePulse();
+
+        assertEquals(menuBar.getHeight(), 0.0, 0.0001);
+
+        // Test menuBar height to be non-zero if another menu is added
+        Menu menu3 = new Menu("Menu3");
+        menuBar.getMenus().add(menu3);
+        tk.firePulse();
+
+        x = Double.compare(menuBar.getHeight(), 0.0);
+        assertTrue(x > 0);
+
+        // Test menuBar height to be zero in case all of its
+        // children are invisible
+        menu3.setVisible(false);
+        tk.firePulse();
+
+        assertEquals(menuBar.getHeight(), 0.0, 0.0001);
+    }
+
     @Test public void testRemovingMenuItemFromMenuNotInScene() {
         VBox root = new VBox();
         Menu menu = new Menu("Menu");
--- a/modules/javafx.controls/src/test/java/test/javafx/scene/control/MenuButtonTest.java	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.controls/src/test/java/test/javafx/scene/control/MenuButtonTest.java	Tue Apr 18 12:50:09 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -30,12 +30,16 @@
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.geometry.Side;
 import javafx.scene.Scene;
+import javafx.scene.Group;
+import javafx.scene.control.ContentDisplay;
 import javafx.scene.control.Button;
 import javafx.scene.control.MenuButton;
 import javafx.scene.control.MenuItem;
 import javafx.scene.layout.VBox;
 import javafx.scene.shape.Rectangle;
 import javafx.stage.Stage;
+import javafx.event.Event;
+import javafx.event.EventHandler;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -260,4 +264,64 @@
         assertEquals(.5, mb.getOpacity(), 0.00001);
 
     }
+
+    @Test public void testSetContentDisplayGraphicOnly() {
+        Button btn = new Button("1234");
+
+        MenuButton mb1 = new MenuButton("Sample Text", btn);
+        mb1.setStyle("-fx-label-padding:0;");
+        mb1.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
+
+        MenuButton mb2 = new MenuButton("Sample Text", btn);
+        mb2.setStyle("-fx-label-padding:100;");
+        mb2.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
+
+        Scene scene = new Scene(new Group(mb1, mb2), 400, 400);
+        Stage stage = new Stage();
+        stage.setScene(scene);
+        stage.show();
+        Toolkit.getToolkit().firePulse();
+
+        // label-padding should not affect GRAPHIC_ONLY MenuButton size
+        assertEquals(mb1.getWidth(), mb2.getWidth(), 0.00001);
+        assertEquals(mb1.getHeight(), mb2.getHeight(), 0.00001);
+    }
+
+    boolean onShowingPass;
+    boolean onShownPass;
+    boolean onHidingPass;
+    boolean onHiddenPass;
+    @Test public void test_jdk_8175963_showHideEvents() {
+        MenuItem it1 = new MenuItem("1");
+        MenuButton mbtn = new MenuButton("MenuButton", null, it1);
+
+        mbtn.addEventHandler(MenuButton.ON_SHOWING, event -> {
+            assertEquals("event is not of type MenuButton.ON_SHOWING",
+                event.getEventType(), MenuButton.ON_SHOWING);
+            onShowingPass = true;
+        });
+        mbtn.addEventHandler(MenuButton.ON_SHOWN, event -> {
+            assertEquals("event is not of type MenuButton.ON_SHOWN",
+                event.getEventType(), MenuButton.ON_SHOWN);
+            onShownPass = true;
+        });
+        mbtn.addEventHandler(MenuButton.ON_HIDING, event -> {
+            assertEquals("event is not of type MenuButton.ON_HIDING",
+                event.getEventType(), MenuButton.ON_HIDING);
+            onHidingPass = true;
+        });
+        mbtn.addEventHandler(MenuButton.ON_HIDDEN, event -> {
+            assertEquals("event is not of type  MenuButton.ON_HIDDEN",
+                event.getEventType(), MenuButton.ON_HIDDEN);
+            onHiddenPass = true;
+        });
+
+        mbtn.show();
+        mbtn.hide();
+
+        assertTrue("OnShowing event not received", onShowingPass);
+        assertTrue("onShown event not received", onShownPass);
+        assertTrue("onHiding event not received", onHidingPass);
+        assertTrue("onHidden event not received", onHiddenPass);
+    }
 }
--- a/modules/javafx.graphics/src/main/java/com/sun/prism/impl/PrismSettings.java	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.graphics/src/main/java/com/sun/prism/impl/PrismSettings.java	Tue Apr 18 12:50:09 2017 -0700
@@ -54,9 +54,7 @@
     public static final boolean useNewImageLoader;
     public static final List<String> tryOrder;
     public static final int prismStatFrequency;
-    public static final boolean doNativePisces;
-    public static final boolean useMarlinRasterizer;
-    public static final boolean useMarlinRasterizerDP;
+    public static final RasterizerType rasterizerSpec;
     public static final String refType;
     public static final boolean forceRepaint;
     public static final boolean noFallback;
@@ -90,6 +88,20 @@
     public static final boolean forceAlphaTestShader;
     public static final boolean forceNonAntialiasedShape;
 
+    public static enum RasterizerType {
+        JavaPisces("Java-based Pisces Rasterizer"),
+        NativePisces("Native-based Pisces Rasterizer"),
+        FloatMarlin("Float Precision Marlin Rasterizer"),
+        DoubleMarlin("Double Precision Marlin Rasterizer");
+
+        private String publicName;
+        private RasterizerType(String publicname) {
+            this.publicName = publicname;
+        }
+        public String toString() {
+            return publicName;
+        }
+    }
 
     private PrismSettings() {
     }
@@ -216,18 +228,57 @@
 
         tryOrder = Collections.unmodifiableList(Arrays.asList(tryOrderArr));
 
-        useMarlinRasterizer   = getBoolean(systemProperties, "prism.marlinrasterizer", false);
-        useMarlinRasterizerDP = getBoolean(systemProperties, "prism.marlin.double", true);
-        if (useMarlinRasterizer) {
-            doNativePisces = false;
-        } else {
-            String npprop = systemProperties.getProperty("prism.nativepisces");
-            if (npprop == null) {
-                doNativePisces = PlatformUtil.isEmbedded() || !PlatformUtil.isLinux();
-            } else {
-                doNativePisces = Boolean.parseBoolean(npprop);
+        RasterizerType rSpec = null;
+        String rOrder = systemProperties.getProperty("prism.rasterizerorder");
+        if (rOrder != null) {
+            for (String s : split(rOrder.toLowerCase(), ",")) {
+                switch (s) {
+                    case "pisces":
+                        rSpec = PlatformUtil.isEmbedded() || !PlatformUtil.isLinux()
+                                ? RasterizerType.NativePisces
+                                : RasterizerType.JavaPisces;
+                        break;
+                    case "nativepisces":
+                        rSpec = RasterizerType.NativePisces;
+                        break;
+                    case "javapisces":
+                        rSpec = RasterizerType.JavaPisces;
+                        break;
+                    case "marlin":
+                    case "doublemarlin":
+                        rSpec = RasterizerType.DoubleMarlin;
+                        break;
+                    case "floatmarlin":
+                        rSpec = RasterizerType.FloatMarlin;
+                        break;
+                    default:
+                        continue;
+                }
+                break;
             }
         }
+        if (rSpec == null) {
+            boolean useMarlinRasterizer, useMarlinRasterizerDP;
+            useMarlinRasterizer   = getBoolean(systemProperties, "prism.marlinrasterizer", true);
+            useMarlinRasterizerDP = getBoolean(systemProperties, "prism.marlin.double", true);
+            if (useMarlinRasterizer) {
+                rSpec = useMarlinRasterizerDP
+                        ? RasterizerType.DoubleMarlin
+                        : RasterizerType.FloatMarlin;
+            } else {
+                boolean doNativePisces;
+                String npprop = systemProperties.getProperty("prism.nativepisces");
+                if (npprop == null) {
+                    doNativePisces = PlatformUtil.isEmbedded() || !PlatformUtil.isLinux();
+                } else {
+                    doNativePisces = Boolean.parseBoolean(npprop);
+                }
+                rSpec = doNativePisces
+                        ? RasterizerType.NativePisces
+                        : RasterizerType.JavaPisces;
+            }
+        }
+        rasterizerSpec = rSpec;
 
         String primtex = systemProperties.getProperty("prism.primtextures");
         if (primtex == null) {
@@ -263,13 +314,10 @@
                 System.out.print(s+" ");
             }
             System.out.println("");
-            if (useMarlinRasterizer) {
-                String prectype = (useMarlinRasterizerDP ? "double" : "float");
-                System.out.println("Using Marlin rasterizer (" + prectype +')');
-            } else {
-                String piscestype = (doNativePisces ? "native" : "java");
-                System.out.println("Using " + piscestype + "-based Pisces rasterizer");
+            if (rOrder != null) {
+                System.out.println("Requested rasterizer preference order: "+rOrder);
             }
+            System.out.println("Using "+rSpec);
             printBooleanOption(dirtyOptsEnabled, "Using dirty region optimizations");
             if (primTextureSize == 0) {
                 System.out.println("Not using texture mask for primitives");
--- a/modules/javafx.graphics/src/main/java/com/sun/prism/impl/shape/ShapeUtil.java	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.graphics/src/main/java/com/sun/prism/impl/shape/ShapeUtil.java	Tue Apr 18 12:50:09 2017 -0700
@@ -35,16 +35,20 @@
 
     private static final ShapeRasterizer shapeRasterizer;
     static {
-        if (PrismSettings.useMarlinRasterizer) {
-            if (PrismSettings.useMarlinRasterizerDP) {
+        switch (PrismSettings.rasterizerSpec) {
+            case JavaPisces:
+                shapeRasterizer = new OpenPiscesRasterizer();
+                break;
+            case NativePisces:
+                shapeRasterizer = new NativePiscesRasterizer();
+                break;
+            case FloatMarlin:
+                shapeRasterizer = new MarlinRasterizer();
+                break;
+            default:
+            case DoubleMarlin:
                 shapeRasterizer = new DMarlinRasterizer();
-            } else {
-                shapeRasterizer = new MarlinRasterizer();
-            }
-        } else if (PrismSettings.doNativePisces) {
-            shapeRasterizer = new NativePiscesRasterizer();
-        } else {
-            shapeRasterizer = new OpenPiscesRasterizer();
+                break;
         }
     }
 
--- a/modules/javafx.graphics/src/main/java/com/sun/prism/sw/SWContext.java	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.graphics/src/main/java/com/sun/prism/sw/SWContext.java	Tue Apr 18 12:50:09 2017 -0700
@@ -327,16 +327,20 @@
 
     SWContext(ResourceFactory factory) {
         this.factory = factory;
-        if (PrismSettings.useMarlinRasterizer) {
-            if (PrismSettings.useMarlinRasterizerDP) {
+        switch (PrismSettings.rasterizerSpec) {
+            case JavaPisces:
+                this.shapeRenderer = new JavaShapeRenderer();
+                break;
+            case NativePisces:
+                this.shapeRenderer = new NativeShapeRenderer();
+                break;
+            case FloatMarlin:
+                this.shapeRenderer = new MarlinShapeRenderer();
+                break;
+            default:
+            case DoubleMarlin:
                 this.shapeRenderer = new DMarlinShapeRenderer();
-            } else {
-                this.shapeRenderer = new MarlinShapeRenderer();
-            }
-        } else if (PrismSettings.doNativePisces) {
-            this.shapeRenderer = new NativeShapeRenderer();
-        } else {
-            this.shapeRenderer = new JavaShapeRenderer();
+                break;
         }
     }
 
--- a/modules/javafx.graphics/src/main/native-glass/gtk/glass_general.cpp	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.graphics/src/main/native-glass/gtk/glass_general.cpp	Tue Apr 18 12:50:09 2017 -0700
@@ -524,7 +524,10 @@
 
 gboolean
 glass_gdk_mouse_devices_grab(GdkWindow *gdkWindow) {
-#ifdef GLASS_GTK3
+#ifdef GLASS_GTK3_DISABLED
+//this GTK 3 approach has synchronization issues covered in JDK-8176844
+// As the approach is also deprecated in GTK 3.20+, revert back to using GTK 2 mechanism
+
         if (disableGrab) {
             return TRUE;
         }
@@ -537,6 +540,7 @@
         context.window = gdkWindow;
         context.grabbed = FALSE;
         g_list_foreach(devices, (GFunc) grab_mouse_device, &context);
+        g_list_free(devices);
 
         return context.grabbed;
 #else
@@ -565,12 +569,15 @@
 
 void
 glass_gdk_mouse_devices_ungrab() {
-#ifdef GLASS_GTK3
+#ifdef GLASS_GTK3_DISABLED
+//this GTK 3 approach has synchronization issues covered in JDK-8176844
+// As the approach is also deprecated in GTK 3.20+, revert back to using GTK 2 mechanism
         GList *devices = gdk_device_manager_list_devices(
                              gdk_display_get_device_manager(
                                  gdk_display_get_default()),
                                  GDK_DEVICE_TYPE_MASTER);
         g_list_foreach(devices, (GFunc) ungrab_mouse_device, NULL);
+        g_list_free(devices);
 #else
         gdk_pointer_ungrab(GDK_CURRENT_TIME);
 #endif
--- a/modules/javafx.web/src/main/java/com/sun/javafx/webkit/theme/PopupMenuImpl.java	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/javafx.web/src/main/java/com/sun/javafx/webkit/theme/PopupMenuImpl.java	Tue Apr 18 12:50:09 2017 -0700
@@ -103,6 +103,8 @@
             item.setDisable(!isEnabled);
             // TODO: set the rest of properties
         }
+
+        item.setMnemonicParsing(false);
         popupMenu.getItems().add(item);
     }
 
--- a/modules/jdk.packager.services/src/main/java/module-info.java	Tue Apr 18 12:32:48 2017 -0700
+++ b/modules/jdk.packager.services/src/main/java/module-info.java	Tue Apr 18 12:50:09 2017 -0700
@@ -37,6 +37,4 @@
     uses jdk.packager.services.UserJvmOptionsService;
 
     provides jdk.packager.services.UserJvmOptionsService with jdk.packager.services.userjvmoptions.LauncherUserJvmOptions;
-// service loaders are not preserving order, so delete this and provide only one
-//    provides jdk.packager.services.UserJvmOptionsService with jdk.packager.services.userjvmoptions.PreferencesUserJvmOptions;
-}
+}
\ No newline at end of file