# HG changeset patch # User prr # Date 1496843109 25200 # Node ID aaac0f8d1082d53550df0f59970d4096cf82cfc5 # Parent ba8c2add2e0bfa22de99f1fb4eba809b861a2df7# Parent 9409e9e9ce0952fc9581d6c2d87b0115ef025f2c Merge diff -r 9409e9e9ce09 -r aaac0f8d1082 jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m --- 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); } diff -r 9409e9e9ce09 -r aaac0f8d1082 jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java --- 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 UL.getRef + * (that is, the value returned by the URL.getRef * method for the URL being displayed). By default, this * method only knows how to locate a reference in an * HTMLDocument. The implementation calls the diff -r 9409e9e9ce09 -r aaac0f8d1082 jdk/src/java.desktop/share/classes/javax/swing/JTabbedPane.java --- 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() { diff -r 9409e9e9ce09 -r aaac0f8d1082 jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java --- 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. diff -r 9409e9e9ce09 -r aaac0f8d1082 jdk/test/java/awt/List/ItemEventTest/ItemEventTest.java --- 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(); } diff -r 9409e9e9ce09 -r aaac0f8d1082 jdk/test/java/awt/print/PageFormat/WrongPaperPrintingTest.java --- 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 */