changeset 11739:cad454f317b0

7042645: Numerous api/java_awt jck tests fail - AWT Assertion Failure on fastdebug ri bundles b138 win7 x86 Reviewed-by: serb, azvegint
author ssadetsky
date Tue, 07 Apr 2015 16:07:20 +0400
parents 7f272eeff5ab
children ac415abbdc07
files src/java.desktop/windows/native/libawt/windows/awt_Button.cpp src/java.desktop/windows/native/libawt/windows/awt_Checkbox.cpp src/java.desktop/windows/native/libawt/windows/awt_Component.cpp
diffstat 3 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/windows/native/libawt/windows/awt_Button.cpp	Mon Apr 06 10:35:59 2015 -0700
+++ b/src/java.desktop/windows/native/libawt/windows/awt_Button.cpp	Tue Apr 07 16:07:20 2015 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -242,7 +242,8 @@
         RECT focusRect;
         VERIFY(::CopyRect(&focusRect, &rect));
         VERIFY(::InflateRect(&focusRect,-inf,-inf));
-        VERIFY(::DrawFocusRect(hDC, &focusRect));
+        if(::DrawFocusRect(hDC, &focusRect) == 0)
+            VERIFY(::GetLastError() == 0);
     }
 
     /* Notify any subclasses */
--- a/src/java.desktop/windows/native/libawt/windows/awt_Checkbox.cpp	Mon Apr 06 10:35:59 2015 -0700
+++ b/src/java.desktop/windows/native/libawt/windows/awt_Checkbox.cpp	Tue Apr 07 16:07:20 2015 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -290,12 +290,14 @@
     if ((drawInfo.itemState & ODS_FOCUS) &&
         ((drawInfo.itemAction & ODA_FOCUS)||
          (drawInfo.itemAction &ODA_DRAWENTIRE))) {
-        VERIFY(::DrawFocusRect(hDC, &focusRect));
+        if(::DrawFocusRect(hDC, &focusRect) == 0)
+            VERIFY(::GetLastError() == 0);
     }
     /*  erase focus rect */
     else if (!(drawInfo.itemState & ODS_FOCUS) &&
              (drawInfo.itemAction & ODA_FOCUS)) {
-        VERIFY(::DrawFocusRect(hDC, &focusRect));
+        if(::DrawFocusRect(hDC, &focusRect) == 0)
+            VERIFY(::GetLastError() == 0);
     }
 
     /*  Notify any subclasses */
--- a/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp	Mon Apr 06 10:35:59 2015 -0700
+++ b/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp	Tue Apr 07 16:07:20 2015 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -4322,7 +4322,8 @@
     if ((drawInfo.itemState & ODS_FOCUS)  &&
         (drawInfo.itemAction & (ODA_FOCUS | ODA_DRAWENTIRE))) {
       if (!unfocusableChoice){
-          VERIFY(::DrawFocusRect(hDC, &rect));
+          if(::DrawFocusRect(hDC, &rect) == 0)
+              VERIFY(::GetLastError() == 0);
       }
     }
     env->DeleteLocalRef(target);