Skip to content
Permalink
Browse files
8240487: Cleanup whitespace in .cc, .hh, .m, and .mm files
Reviewed-by: yan
Backport-of: c32923e
  • Loading branch information
Vladimir Kempik committed Apr 7, 2021
1 parent 4d5f2ab commit 98baf882c422e30dc3785b2bcbd76903a1d5d0f6
Showing with 183 additions and 183 deletions.
  1. +2 −2 src/java.desktop/macosx/native/libawt_lwawt/awt/AWTSurfaceLayers.m
  2. +2 −2 src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m
  3. +24 −24 src/java.desktop/macosx/native/libawt_lwawt/awt/CClipboard.m
  4. +1 −1 src/java.desktop/macosx/native/libawt_lwawt/awt/CDropTarget.m
  5. +1 −1 src/java.desktop/macosx/native/libawt_lwawt/awt/CFRetainedResource.m
  6. +9 −9 src/java.desktop/macosx/native/libawt_lwawt/awt/CImage.m
  7. +32 −32 src/java.desktop/macosx/native/libawt_lwawt/awt/CMenuItem.m
  8. +4 −4 src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m
  9. +1 −1 src/java.desktop/macosx/native/libawt_lwawt/awt/CRobot.m
  10. +1 −1 src/java.desktop/macosx/native/libawt_lwawt/awt/CRobotKeyCode.m
  11. +7 −7 src/java.desktop/macosx/native/libawt_lwawt/awt/CTextPipe.m
  12. +8 −8 src/java.desktop/macosx/native/libawt_lwawt/awt/CWrapper.m
  13. +4 −4 src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m
  14. +4 −4 src/java.desktop/macosx/native/libawt_lwawt/awt/JavaTextAccessibility.m
  15. +5 −5 src/java.desktop/macosx/native/libawt_lwawt/awt/OSVersion.m
  16. +4 −4 src/java.desktop/macosx/native/libawt_lwawt/awt/PrinterView.m
  17. +11 −11 src/java.desktop/macosx/native/libawt_lwawt/awt/QuartzSurfaceData.m
  18. +7 −7 src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m
  19. +3 −3 src/java.desktop/macosx/native/libosxapp/ThreadUtilities.m
  20. +52 −52 src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc
  21. +1 −1 src/jdk.hotspot.agent/macosx/native/libsaproc/MacosxDebuggerLocal.m
@@ -108,7 +108,7 @@ - (void) setBounds:(CGRect)rect {
CALayer *windowLayer = jlong_to_ptr(windowLayerPtr);
surfaceLayers = [[AWTSurfaceLayers alloc] initWithWindowLayer: windowLayer];
}];

JNF_COCOA_EXIT(env);

return ptr_to_jlong(surfaceLayers);
@@ -125,7 +125,7 @@ - (void) setBounds:(CGRect)rect {
JNF_COCOA_ENTER(env);

AWTSurfaceLayers *surfaceLayers = OBJC(surfaceLayersPtr);

[ThreadUtilities performOnMainThreadWaiting:NO block:^(){

CGRect rect = CGRectMake(x, y, width, height);
@@ -548,11 +548,11 @@ -(BOOL) isCodePointInUnicodeBlockNeedingIMEvent: (unichar) codePoint {
if ((codePoint == 0x0024) || (codePoint == 0x00A3) ||
(codePoint == 0x00A5) ||
((codePoint >= 0x20A3) && (codePoint <= 0x20BF)) ||
((codePoint >= 0x3000) && (codePoint <= 0x303F)) ||
((codePoint >= 0x3000) && (codePoint <= 0x303F)) ||
((codePoint >= 0xFF00) && (codePoint <= 0xFFEF))) {
// Code point is in 'CJK Symbols and Punctuation' or
// 'Halfwidth and Fullwidth Forms' Unicode block or
// currency symbols unicode
// currency symbols unicode
return YES;
}
return NO;
@@ -25,7 +25,7 @@

#import "CDataTransferer.h"
#import "ThreadUtilities.h"
#import "jni_util.h"
#import "jni_util.h"
#import <Cocoa/Cocoa.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>

@@ -79,10 +79,10 @@ - (void)declareTypes:(NSArray*)types withOwner:(jobject)owner jniEnv:(JNIEnv*)en
- (void)checkPasteboard:(id)sender {

// This is called via NSApplicationDidBecomeActiveNotification.

// If the change count on the general pasteboard is different than when we set it
// someone else put data on the clipboard. That means the current owner lost ownership.

NSInteger newChangeCount = [[NSPasteboard generalPasteboard] changeCount];

if (self.changeCount != newChangeCount) {
@@ -109,11 +109,11 @@ - (void)checkPasteboard:(id)sender {

- (BOOL) checkPasteboardWithoutNotification:(id)application {
AWT_ASSERT_APPKIT_THREAD;

NSInteger newChangeCount = [[NSPasteboard generalPasteboard] changeCount];

if (self.changeCount != newChangeCount) {
self.changeCount = newChangeCount;
self.changeCount = newChangeCount;
return YES;
} else {
return NO;
@@ -189,7 +189,7 @@ - (BOOL) checkPasteboardWithoutNotification:(id)application {
dataTypes = [[[NSPasteboard generalPasteboard] types] retain];
}];
[dataTypes autorelease];

NSUInteger nFormats = [dataTypes count];
NSUInteger knownFormats = 0;
NSUInteger i;
@@ -250,7 +250,7 @@ - (BOOL) checkPasteboardWithoutNotification:(id)application {
[ThreadUtilities performOnMainThreadWaiting:YES block:^() {
clipData = [[[NSPasteboard generalPasteboard] dataForType:formatAsString] retain];
}];

if (clipData == NULL) {
[JNFException raise:env as:"java/io/IOException" reason:"Font transform has NaN position"];
return NULL;
@@ -273,20 +273,20 @@ - (BOOL) checkPasteboardWithoutNotification:(id)application {
return returnValue;
}

/*
* Class: sun_lwawt_macosx_CClipboard
* Method: checkPasteboard
* Signature: ()V
*/
/*
* Class: sun_lwawt_macosx_CClipboard
* Method: checkPasteboard
* Signature: ()V
*/
JNIEXPORT jboolean JNICALL Java_sun_lwawt_macosx_CClipboard_checkPasteboardWithoutNotification
(JNIEnv *env, jobject inObject)
{
__block BOOL ret = NO;
JNF_COCOA_ENTER(env);
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
ret = [[CClipboard sharedClipboard] checkPasteboardWithoutNotification:nil];
}];
JNF_COCOA_EXIT(env);
return ret;
}
(JNIEnv *env, jobject inObject)
{
__block BOOL ret = NO;
JNF_COCOA_ENTER(env);
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
ret = [[CClipboard sharedClipboard] checkPasteboardWithoutNotification:nil];
}];

JNF_COCOA_EXIT(env);
return ret;
}
@@ -611,7 +611,7 @@ - (void)draggingExited:(id<NSDraggingInfo>)sender
JNF_MEMBER_CACHE(handleExitMessageMethod, jc_CDropTargetContextPeer, "handleExitMessage", "(Ljava/awt/Component;J)V");
if (sDraggingError == FALSE) {
DLog3(@" - dragExit: loc native %f, %f\n", sDraggingLocation.x, sDraggingLocation.y);
// AWT_THREADING Safe (CToolkitThreadBlockedHandler)
// AWT_THREADING Safe (CToolkitThreadBlockedHandler)
JNFCallVoidMethod(env, fDropTargetContextPeer,
handleExitMessageMethod, fComponent, ptr_to_jlong(self));
}
@@ -39,7 +39,7 @@
{
if (releaseOnAppKitThread) {
// Releasing resources on the main AppKit message loop only
// Releasing resources on the nested loops may cause dangling
// Releasing resources on the nested loops may cause dangling
// pointers after the nested loop is exited
if ([NSApp respondsToSelector:@selector(postRunnableEvent:)]) {
[NSApp postRunnableEvent:^() {
@@ -112,7 +112,7 @@
jlong result = 0L;

JNF_COCOA_ENTER(env);

NSBitmapImageRep* imageRep = CImage_CreateImageRep(env, buffer, width, height);
if (imageRep) {
NSImage *nsImage = [[NSImage alloc] initWithSize:NSMakeSize(width, height)];
@@ -325,16 +325,16 @@
{
if (!image) return;
NSImage *i = (NSImage *)jlong_to_ptr(image);

JNF_COCOA_ENTER(env);

NSImageRep *imageRep = nil;
NSArray *imageRepresentations = [i representations];
NSEnumerator *imageEnumerator = [imageRepresentations objectEnumerator];
while ((imageRep = [imageEnumerator nextObject]) != nil) {
[imageRep setSize:NSMakeSize(w, h)];
}

JNF_COCOA_EXIT(env);
}

@@ -356,20 +356,20 @@ NSComparisonResult getOrder(BOOL order){
NSImage *img = (NSImage *)jlong_to_ptr(image);

JNF_COCOA_ENTER(env);

NSArray *imageRepresentations = [img representations];
if([imageRepresentations count] == 0){
return NULL;
}

NSArray *sortedImageRepresentations = [imageRepresentations
sortedArrayUsingComparator: ^(id obj1, id obj2) {

NSImageRep *imageRep1 = (NSImageRep *) obj1;
NSImageRep *imageRep2 = (NSImageRep *) obj2;
NSSize size1 = [imageRep1 size];
NSSize size2 = [imageRep2 size];

if (NSEqualSizes(size1, size2)) {
return getOrder([imageRep1 pixelsWide] <= [imageRep2 pixelsWide] &&
[imageRep1 pixelsHigh] <= [imageRep2 pixelsHigh]);
@@ -380,7 +380,7 @@ NSComparisonResult getOrder(BOOL order){

NSMutableArray *sortedPixelSizes = [[[NSMutableArray alloc] init] autorelease];
NSSize lastSize = [[sortedImageRepresentations lastObject] size];

NSUInteger i = [sortedImageRepresentations indexOfObjectPassingTest:
^BOOL(id obj, NSUInteger idx, BOOL *stop) {
NSSize imageRepSize = [obj size];

1 comment on commit 98baf88

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 98baf88 Apr 7, 2021

Please sign in to comment.