changeset 10777:2d23a39c6cdb

Merge
author kcr
date Tue, 09 Jan 2018 09:39:19 -0800
parents b43e44ecc365 4d7bd58ad518
children 75d99a065579
files
diffstat 6 files changed, 18 insertions(+), 184 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Jan 08 22:25:50 2018 -0800
+++ b/.hgtags	Tue Jan 09 09:39:19 2018 -0800
@@ -473,5 +473,6 @@
 3932162186a7b4c53945256818eb7723d1b6a71e jdk-10+34
 90773bfb2a58cce7c1aede30cc47f28cb9c53fe6 jdk-10+35
 674513271a88e51bcd2fb598634519d5f5f46270 jdk-10+36
+afed83541a56745884906842049658b84f1c2650 jdk-11+0
 afed83541a56745884906842049658b84f1c2650 jdk-10+37
 14621a723393fd1f6fc79f5445d8d6cdba8917c0 jdk-10+38
--- a/build.properties	Mon Jan 08 22:25:50 2018 -0800
+++ b/build.properties	Tue Jan 09 09:39:19 2018 -0800
@@ -39,7 +39,7 @@
 jfx.release.suffix=-ea
 
 # UPDATE THE FOLLOWING VALUES FOR A NEW RELEASE
-jfx.release.major.version=10
+jfx.release.major.version=11
 jfx.release.minor.version=0
 jfx.release.security.version=0
 jfx.release.patch.version=0
@@ -56,8 +56,8 @@
 
 javadoc.bottom=<small><a href="http://bugreport.java.com/bugreport/">Report a bug or suggest an enhancement</a><br> Copyright &copy; 2008, 2018, Oracle and/or its affiliates. All rights reserved.</small>
 
-javadoc.title=JavaFX 10
-javadoc.header=JavaFX&nbsp;10
+javadoc.title=JavaFX 11
+javadoc.header=JavaFX&nbsp;11
 
 ##############################################################################
 #
--- a/modules/javafx.base/src/test/java/test/com/sun/javafx/runtime/VersionInfoTest.java	Mon Jan 08 22:25:50 2018 -0800
+++ b/modules/javafx.base/src/test/java/test/com/sun/javafx/runtime/VersionInfoTest.java	Tue Jan 09 09:39:19 2018 -0800
@@ -89,7 +89,7 @@
         String version = VersionInfo.getVersion();
         // Need to update major version number when we develop the next
         // major release.
-        assertTrue(version.startsWith("10"));
+        assertTrue(version.startsWith("11"));
         String runtimeVersion = VersionInfo.getRuntimeVersion();
         assertTrue(runtimeVersion.startsWith(version));
     }
--- a/modules/javafx.web/src/main/java/javafx/scene/web/HTMLEditorSkin.java	Mon Jan 08 22:25:50 2018 -0800
+++ b/modules/javafx.web/src/main/java/javafx/scene/web/HTMLEditorSkin.java	Tue Jan 09 09:39:19 2018 -0800
@@ -1029,15 +1029,13 @@
         fgColorButton.setDisable(!isCommandEnabled(FOREGROUND_COLOR.getCommand()));
         String foregroundColorValue = getCommandValue(FOREGROUND_COLOR.getCommand());
         if (foregroundColorValue != null) {
-            Color c = Color.web(rgbToHex((String)foregroundColorValue));
-            fgColorButton.setValue(c);
+            fgColorButton.setValue(getColor(foregroundColorValue));
         }
 
         bgColorButton.setDisable(!isCommandEnabled(BACKGROUND_COLOR.getCommand()));
         String backgroundColorValue = getCommandValue(BACKGROUND_COLOR.getCommand());
         if (backgroundColorValue != null) {
-            Color c = Color.web(rgbToHex((String)backgroundColorValue));
-            bgColorButton.setValue(c);
+            bgColorButton.setValue(getColor(backgroundColorValue));
         }
 
         atomicityCount = atomicityCount == 0 ? 0 : --atomicityCount;
@@ -1119,29 +1117,16 @@
         return webPage.queryCommandValue(command);
     }
 
-    private static String rgbToHex(String value) {
-        if (value.startsWith("rgba")) {
-            String[] components = value.substring(value.indexOf('(') + 1, value.lastIndexOf(')')).split(",");
-            value = String.format("#%02X%02X%02X%02X",
-                Integer.parseInt(components[0].trim()),
-                Integer.parseInt(components[1].trim()),
-                Integer.parseInt(components[2].trim()),
-                Integer.parseInt(components[3].trim()));
-            // The default background color for WebView, according to the HTML
-            // standard is rgba=#00000000 (black). The canvas background is expected
-            // to be white.
-            if ("#00000000".equals(value)) {
-                return "#FFFFFFFF";
-            }
-        } else if (value.startsWith("rgb")) {
-            String[] components = value.substring(value.indexOf('(') + 1, value.lastIndexOf(')')).split(",");
-            value = String.format("#%02X%02X%02X",
-                Integer.parseInt(components[0].trim()),
-                Integer.parseInt(components[1].trim()),
-                Integer.parseInt(components[2].trim()));
+    private Color getColor(String value) {
+        Color color = Color.web(value);
+        /* The default background color for WebView, according to the HTML
+         * standard is rgba=#00000000 (transparent). The canvas background is expected
+         * to be white.
+         */
+        if (color.equals(Color.TRANSPARENT)) {
+            color = Color.WHITE;
         }
-
-        return value;
+        return color;
     }
 
     private void applyTextFormatting() {
--- a/modules/javafx.web/src/test/java/test/com/sun/webkit/SharedBufferTest.java	Mon Jan 08 22:25:50 2018 -0800
+++ b/modules/javafx.web/src/test/java/test/com/sun/webkit/SharedBufferTest.java	Tue Jan 09 09:39:19 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -33,7 +33,6 @@
 import java.util.Random;
 import org.junit.After;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
@@ -124,14 +123,6 @@
                 getSomeData(SEGMENT_SIZE - 10, 10));
     }
 
-    @Test @Ignore
-    public void testGetSomeDataFirstSegmentLastTenBytesWithTruncation() {
-        append(SEGMENT_SIZE * 2.5);
-        assertArrayEquals(
-                g(SEGMENT_SIZE - 5, 5),
-                getSomeData(SEGMENT_SIZE - 5, 10));
-    }
-
     @Test
     public void testGetSomeDataInteriorSegmentFirstTenBytes() {
         append(SEGMENT_SIZE * 2.5);
@@ -154,14 +145,6 @@
                 getSomeData(SEGMENT_SIZE * 2 - 10, 10));
     }
 
-    @Test @Ignore
-    public void testGetSomeDataInteriorSegmentLastTenBytesWithTruncation() {
-        append(SEGMENT_SIZE * 2.5);
-        assertArrayEquals(
-                g(SEGMENT_SIZE * 2 - 5, 5),
-                getSomeData(SEGMENT_SIZE * 2 - 5, 10));
-    }
-
     @Test
     public void testGetSomeDataLastSegmentFirstTenBytes() {
         append(SEGMENT_SIZE * 2.5);
@@ -211,14 +194,6 @@
         assertArrayEquals(g(0, SEGMENT_SIZE), getSomeData(0, SEGMENT_SIZE));
     }
 
-    @Test @Ignore
-    public void testGetSomeDataFirstSegmentWithTruncation() {
-        append(SEGMENT_SIZE * 2.5);
-        assertArrayEquals(
-                g(SEGMENT_SIZE * 0.5, SEGMENT_SIZE - SEGMENT_SIZE * 0.5),
-                getSomeData(SEGMENT_SIZE * 0.5, SEGMENT_SIZE));
-    }
-
     @Test
     public void testGetSomeDataInteriorSegment() {
         append(SEGMENT_SIZE * 2.5);
@@ -227,14 +202,6 @@
                 getSomeData(SEGMENT_SIZE, SEGMENT_SIZE));
     }
 
-    @Test @Ignore
-    public void testGetSomeDataInteriorSegmentWithTruncation() {
-        append(SEGMENT_SIZE * 2.5);
-        assertArrayEquals(
-                g(SEGMENT_SIZE * 1.5, SEGMENT_SIZE - SEGMENT_SIZE * 0.5),
-                getSomeData(SEGMENT_SIZE * 1.5, SEGMENT_SIZE));
-    }
-
     @Test
     public void testGetSomeDataLastSegment() {
         append(SEGMENT_SIZE * 2.5);
@@ -389,41 +356,6 @@
         assertSharedBufferContains(g(0, SEGMENT_SIZE));
     }
 
-    @Test @Ignore
-    public void testAppendThreeSegments() {
-        append(g(0, SEGMENT_SIZE * 3));
-        assertSharedBufferContains(
-                g(0, SEGMENT_SIZE),
-                g(SEGMENT_SIZE, SEGMENT_SIZE),
-                g(SEGMENT_SIZE * 2, SEGMENT_SIZE));
-    }
-
-    @Test @Ignore
-    public void testAppendThreeSegmentsPlusSegmentPlusTenBytes() {
-        append(g(0, SEGMENT_SIZE * 3));
-        append(g(0, SEGMENT_SIZE));
-        append(g(0, 10));
-        assertSharedBufferContains(
-                g(0, SEGMENT_SIZE),
-                g(SEGMENT_SIZE, SEGMENT_SIZE),
-                g(SEGMENT_SIZE * 2, SEGMENT_SIZE),
-                g(0, SEGMENT_SIZE),
-                g(0, 10));
-    }
-
-    @Test @Ignore
-    public void testAppendTenBytesPlusSegmentPlusThreeSegments() {
-        append(g(0, 10));
-        append(g(0, SEGMENT_SIZE));
-        append(g(0, SEGMENT_SIZE * 3));
-        assertSharedBufferContains(
-                g(0, 10),
-                g(0, SEGMENT_SIZE),
-                g(0, SEGMENT_SIZE),
-                g(SEGMENT_SIZE, SEGMENT_SIZE),
-                g(SEGMENT_SIZE * 2, SEGMENT_SIZE));
-    }
-
     @Test
     public void testAppendZeroBytes() {
         append(new byte[0]);
--- a/modules/javafx.web/src/test/java/test/com/sun/webkit/SimpleSharedBufferInputStreamTest.java	Mon Jan 08 22:25:50 2018 -0800
+++ b/modules/javafx.web/src/test/java/test/com/sun/webkit/SimpleSharedBufferInputStreamTest.java	Tue Jan 09 09:39:19 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -33,7 +33,6 @@
 import java.util.Random;
 import org.junit.After;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
@@ -166,13 +165,6 @@
         assertArrayEquals(g(SEGMENT_SIZE - 10, 10), read(10));
     }
 
-    @Test @Ignore
-    public void testRead3FirstSegmentLastTenBytesWithTruncation() {
-        append(SEGMENT_SIZE * 2.5);
-        readOut(SEGMENT_SIZE - 5);
-        assertArrayEquals(g(SEGMENT_SIZE - 5, 5), read(10));
-    }
-
     @Test
     public void testRead3InteriorSegmentFirstTenBytes() {
         append(SEGMENT_SIZE * 2.5);
@@ -194,13 +186,6 @@
         assertArrayEquals(g(SEGMENT_SIZE * 2 - 10, 10), read(10));
     }
 
-    @Test @Ignore
-    public void testRead3InteriorSegmentLastTenBytesWithTruncation() {
-        append(SEGMENT_SIZE * 2.5);
-        readOut(SEGMENT_SIZE * 2 - 5);
-        assertArrayEquals(g(SEGMENT_SIZE * 2 - 5, 5), read(10));
-    }
-
     @Test
     public void testRead3LastSegmentFirstTenBytes() {
         append(SEGMENT_SIZE * 2.5);
@@ -247,15 +232,6 @@
         assertArrayEquals(g(0, SEGMENT_SIZE), read(SEGMENT_SIZE));
     }
 
-    @Test @Ignore
-    public void testRead3FirstSegmentWithTruncation() {
-        append(SEGMENT_SIZE * 2.5);
-        readOut(SEGMENT_SIZE * 0.5);
-        assertArrayEquals(
-                g(SEGMENT_SIZE * 0.5, SEGMENT_SIZE - SEGMENT_SIZE * 0.5),
-                read(SEGMENT_SIZE));
-    }
-
     @Test
     public void testRead3InteriorSegment() {
         append(SEGMENT_SIZE * 2.5);
@@ -263,15 +239,6 @@
         assertArrayEquals(g(SEGMENT_SIZE, SEGMENT_SIZE), read(SEGMENT_SIZE));
     }
 
-    @Test @Ignore
-    public void testRead3InteriorSegmentWithTruncation() {
-        append(SEGMENT_SIZE * 2.5);
-        readOut(SEGMENT_SIZE * 1.5);
-        assertArrayEquals(
-                g(SEGMENT_SIZE * 1.5, SEGMENT_SIZE - SEGMENT_SIZE * 0.5),
-                read(SEGMENT_SIZE));
-    }
-
     @Test
     public void testRead3LastSegment() {
         append(SEGMENT_SIZE * 2.5);
@@ -381,30 +348,6 @@
         } catch (IndexOutOfBoundsException expected) {}
     }
 
-    @Test @Ignore
-    public void testRead3StandardUse() {
-        int streamSize = 24700;
-        append(streamSize);
-        int numberOfReads = streamSize / SEGMENT_SIZE + 1;
-        for (int i = 0; i < numberOfReads; i++) {
-            byte[] buffer = new byte[8192];
-            int len = is.read(buffer, 0, buffer.length);
-            int expectedLen = i == numberOfReads - 1
-                    ? streamSize % SEGMENT_SIZE : SEGMENT_SIZE;
-            assertEquals(expectedLen, len);
-            byte[] expectedBuffer = new byte[8192];
-            System.arraycopy(g(SEGMENT_SIZE * i, SEGMENT_SIZE), 0,
-                             expectedBuffer, 0,
-                             len);
-            assertArrayEquals(expectedBuffer, buffer);
-        }
-
-        byte[] buffer = new byte[8192];
-        int len = is.read(buffer, 0, buffer.length);
-        assertEquals(-1, len);
-        assertArrayEquals(new byte[8192], buffer);
-    }
-
     private void testSkipSmallNumberOfBytes(long skip) {
         int streamSize = (int) (SEGMENT_SIZE * 2.5);
         int skipCount = streamSize / SEGMENT_SIZE + 1;
@@ -420,16 +363,6 @@
         }
     }
 
-    @Test @Ignore
-    public void testSkipOneByte() {
-        testSkipSmallNumberOfBytes(1);
-    }
-
-    @Test @Ignore
-    public void testSkipTenBytes() {
-        testSkipSmallNumberOfBytes(10);
-    }
-
     @Test
     public void testSkipZeroBytes() {
         testSkipSmallNumberOfBytes(0);
@@ -573,23 +506,6 @@
         assertArrayEquals(g(0, SEGMENT_SIZE), read(SEGMENT_SIZE));
     }
 
-    @Test @Ignore
-    public void testCloseBeforeSubsequentRead() throws IOException {
-        append(SEGMENT_SIZE * 2.5);
-        assertArrayEquals(g(0, 10), read(10));
-        is.close();
-        assertArrayEquals(g(10, SEGMENT_SIZE - 10), read(SEGMENT_SIZE));
-    }
-
-    @Test @Ignore
-    public void testDoubleClose() throws IOException {
-        append(SEGMENT_SIZE * 2.5);
-        assertArrayEquals(g(0, 10), read(10));
-        is.close();
-        is.close();
-        assertArrayEquals(g(10, SEGMENT_SIZE - 10), read(SEGMENT_SIZE));
-    }
-
     @Test
     public void testCloseEmptyBuffer() throws IOException {
         is.close();