7042645: Numerous api/java_awt jck tests fail - AWT Assertion Failure on fastdebug ri bundles b138 win7 x86
Reviewed-by: serb, azvegint
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Button.cpp Mon Apr 06 10:35:59 2015 -0700
+++ b/jdk/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/jdk/src/java.desktop/windows/native/libawt/windows/awt_Checkbox.cpp Mon Apr 06 10:35:59 2015 -0700
+++ b/jdk/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/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp Mon Apr 06 10:35:59 2015 -0700
+++ b/jdk/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);