Merge
authorprr
Wed, 07 Jun 2017 06:45:09 -0700
changeset 45525 aaac0f8d1082
parent 45524 ba8c2add2e0b (diff)
parent 45519 9409e9e9ce09 (current diff)
child 45526 45a0ee4c1978
Merge
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m	Wed Jun 07 10:03:41 2017 +0800
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m	Wed Jun 07 06:45:09 2017 -0700
@@ -376,7 +376,7 @@
     static JNF_MEMBER_CACHE(jm_getMaxPage, sjc_CPrinterJob, "getMaxPageAttrib", "()I");
     static JNF_MEMBER_CACHE(jm_getSelectAttrib, sjc_CPrinterJob, "getSelectAttrib", "()I");
     static JNF_MEMBER_CACHE(jm_getNumberOfPages, jc_Pageable, "getNumberOfPages", "()I");
-    static JNF_MEMBER_CACHE(jm_getPageFormat, sjc_CPrinterJob, "getPageFormat", "(I)Ljava/awt/print/PageFormat;");
+    static JNF_MEMBER_CACHE(jm_getPageFormat, sjc_CPrinterJob, "getPageFormatFromAttributes", "()Ljava/awt/print/PageFormat;");
 
     NSMutableDictionary* printingDictionary = [dst dictionary];
 
@@ -412,7 +412,7 @@
     [printingDictionary setObject:[NSNumber numberWithInteger:fromPage] forKey:NSPrintFirstPage];
     [printingDictionary setObject:[NSNumber numberWithInteger:toPage] forKey:NSPrintLastPage];
 
-    jobject page = JNFCallObjectMethod(env, srcPrinterJob, jm_getPageFormat, (jint)0);
+    jobject page = JNFCallObjectMethod(env, srcPrinterJob, jm_getPageFormat); 
     if (page != NULL) {
         javaPageFormatToNSPrintInfo(env, NULL, page, dst);
     }
--- a/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java	Wed Jun 07 10:03:41 2017 +0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java	Wed Jun 07 06:45:09 2017 -0700
@@ -812,7 +812,7 @@
 
     /**
      * Scrolls the view to the given reference location
-     * (that is, the value returned by the <code>UL.getRef</code>
+     * (that is, the value returned by the <code>URL.getRef</code>
      * method for the URL being displayed).  By default, this
      * method only knows how to locate a reference in an
      * HTMLDocument.  The implementation calls the
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTabbedPane.java	Wed Jun 07 10:03:41 2017 +0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTabbedPane.java	Wed Jun 07 06:45:09 2017 -0700
@@ -1900,7 +1900,7 @@
          * Returns the accessible name of this object, or {@code null} if
          * there is no accessible name.
          *
-         * @return the accessible name of this object, nor {@code null}.
+         * @return the accessible name of this object, or {@code null}.
          * @since 1.6
          */
         public String getAccessibleName() {
--- a/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java	Wed Jun 07 10:03:41 2017 +0800
+++ b/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java	Wed Jun 07 06:45:09 2017 -0700
@@ -886,6 +886,14 @@
         }
    }
 
+   protected PageFormat getPageFormatFromAttributes() {
+       if (attributes == null || attributes.isEmpty()) {
+            return null;
+        }
+        return attributeToPageFormat(getPrintService(), this.attributes);
+   }
+
+
    /**
      * Presents the user a dialog for changing properties of the
      * print job interactively.
--- a/jdk/test/java/awt/List/ItemEventTest/ItemEventTest.java	Wed Jun 07 10:03:41 2017 +0800
+++ b/jdk/test/java/awt/List/ItemEventTest/ItemEventTest.java	Wed Jun 07 06:45:09 2017 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @key headful
- * @bug 8033936
+ * @bug 8033936 8172510
  * @summary Verify that correct ItemEvent is received while selection &
  *          deselection of multi select List items.
  */
@@ -109,14 +109,16 @@
         boolean isMac = osName.contains("Mac") || osName.contains("mac");
         if(isMac) {
             robot.keyPress(KeyEvent.VK_META);
+            robot.waitForIdle();
         }
 
         // First loop to select & Second loop to deselect the list items.
         for (int j = 0; j < 2; ++j) {
             for (int i = 0; i < list.getItemCount(); ++i) {
                 robot.mouseMove(loc.x, loc.y + i * dY);
+                robot.waitForIdle();
                 robot.mousePress(InputEvent.BUTTON1_MASK);
-                robot.delay(100);
+                robot.waitForIdle();
                 robot.mouseRelease(InputEvent.BUTTON1_MASK);
                 robot.waitForIdle();
             }
--- a/jdk/test/java/awt/print/PageFormat/WrongPaperPrintingTest.java	Wed Jun 07 10:03:41 2017 +0800
+++ b/jdk/test/java/awt/print/PageFormat/WrongPaperPrintingTest.java	Wed Jun 07 06:45:09 2017 -0700
@@ -24,6 +24,7 @@
 /* @test
    @bug 8167102
    @summary PrintRequestAttributeSet breaks page size set using PageFormat
+   @ignore Exclude the test until 8167102 is resolved by a new reassessed fix
    @run main/manual WrongPaperPrintingTest
  */