changeset 7858:507a38bed103

RT-37698: Platform.isSupported(MEDIA|WEB) passes when it should not on embedded Reviewed-by: kselle, kcr
author ddhill
date Tue, 26 Aug 2014 11:57:05 -0400
parents 69f0c8731747
children 6a782ee05c58
files modules/graphics/src/main/java/com/sun/javafx/application/PlatformImpl.java
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/javafx/application/PlatformImpl.java	Tue Aug 26 16:50:02 2014 +0200
+++ b/modules/graphics/src/main/java/com/sun/javafx/application/PlatformImpl.java	Tue Aug 26 11:57:05 2014 -0400
@@ -731,11 +731,31 @@
                 if (isMediaSupported == null) {
                     isMediaSupported = checkForClass(
                             "javafx.scene.media.MediaView");
+                    if (isMediaSupported && PlatformUtil.isEmbedded()) {
+                        AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
+                            String s = System.getProperty(
+                                    "com.sun.javafx.experimental.embedded.media", 
+                                    "false");
+                            isMediaSupported = Boolean.valueOf(s);
+                            return null;
+
+                        });
+                    }
                 }
                 return isMediaSupported;
             case WEB:
                 if (isWebSupported == null) {
                     isWebSupported = checkForClass("javafx.scene.web.WebView");
+                    if (isWebSupported && PlatformUtil.isEmbedded()) {
+                        AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
+                            String s = System.getProperty(
+                                    "com.sun.javafx.experimental.embedded.web", 
+                                    "false");
+                            isWebSupported = Boolean.valueOf(s);
+                            return null;
+
+                        });
+                    }
                 }
                 return isWebSupported;
             case SWT: