Skip to content
Permalink
Browse files

8240499: Enforce whitespace checking for additional source files

Reviewed-by: jvos, arapte
  • Loading branch information
kevinrushforth committed Sep 15, 2020
1 parent d6dee34 commit 976a763852c423dd96a1ca954f11957fcceb800d
Showing with 132 additions and 148 deletions.
  1. +2 −2 .jcheck/conf
  2. +3 −3 build.gradle
  3. +1 −1 buildSrc/android.gradle
  4. +2 −2 buildSrc/win.gradle
  5. +1 −1 modules/javafx.graphics/src/jslc/antlr/com/sun/scenario/effect/compiler/JSL.g4
  6. +1 −1 ...s/javafx.graphics/src/jslc/resources/com/sun/scenario/effect/compiler/backend/prism/PrismGlue.stg
  7. +1 −1 ...s/javafx.graphics/src/jslc/resources/com/sun/scenario/effect/compiler/backend/sw/java/JSWGlue.stg
  8. +1 −1 .../javafx.graphics/src/jslc/resources/com/sun/scenario/effect/compiler/backend/sw/me/MEJavaGlue.stg
  9. +1 −1 ...avafx.graphics/src/jslc/resources/com/sun/scenario/effect/compiler/backend/sw/sse/SSEJavaGlue.stg
  10. +2 −2 modules/javafx.graphics/src/main/native-glass/mac/GlassViewDelegate.m
  11. +1 −1 modules/javafx.graphics/src/main/resources/com/sun/prism/es2/glsl/diffuse_texture.frag
  12. +8 −8 modules/javafx.graphics/src/main/resources/com/sun/prism/es2/glsl/main.vert
  13. +1 −1 modules/javafx.web/src/main/native/Source/JavaScriptCore/runtime/BundlePath.mm
  14. +1 −1 modules/javafx.web/src/main/native/Source/WTF/wtf/BlockObjCExceptions.mm
  15. +5 −5 modules/javafx.web/src/main/native/Source/WTF/wtf/cocoa/FileSystemCocoa.mm
  16. +3 −3 modules/javafx.web/src/main/native/Source/WTF/wtf/cocoa/MainThreadCocoa.mm
  17. +1 −1 modules/javafx.web/src/main/native/Source/WTF/wtf/cocoa/MemoryPressureHandlerCocoa.mm
  18. +36 −36 modules/javafx.web/src/main/native/Source/WTF/wtf/cocoa/NSURLExtras.mm
  19. +1 −1 modules/javafx.web/src/main/native/Source/WTF/wtf/cocoa/URLCocoa.mm
  20. +2 −2 modules/javafx.web/src/main/native/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css
  21. +5 −5 modules/javafx.web/src/main/native/Source/WebCore/Modules/mediacontrols/mediaControlsBase.css
  22. +1 −1 modules/javafx.web/src/main/native/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css
  23. +1 −1 .../main/native/Source/WebCore/Modules/modern-media-controls/controls/compact-activity-indicator.css
  24. +1 −1 .../src/main/native/Source/WebCore/Modules/modern-media-controls/controls/compact-media-controls.css
  25. +1 −1 ...vafx.web/src/main/native/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css
  26. +1 −1 modules/javafx.web/src/main/native/Source/WebCore/Modules/modern-media-controls/controls/slider.css
  27. +1 −1 modules/javafx.web/src/main/native/Source/WebCore/Modules/plugins/QuickTimePluginReplacement.css
  28. +6 −6 modules/javafx.web/src/main/native/Source/WebCore/Modules/plugins/QuickTimePluginReplacement.mm
  29. +1 −1 modules/javafx.web/src/main/native/Source/WebCore/css/html.css
  30. +1 −1 modules/javafx.web/src/main/native/Source/WebCore/css/mediaControls.css
  31. +1 −1 modules/javafx.web/src/main/native/Source/WebCore/css/mediaControlsiOS.css
  32. +4 −4 modules/javafx.web/src/main/native/Source/WebCore/css/svg.css
  33. +9 −9 modules/javafx.web/src/main/native/Source/WebCore/css/themeWin.css
  34. +3 −3 modules/javafx.web/src/main/native/Source/WebCore/css/themeWinQuirks.css
  35. +2 −2 modules/javafx.web/src/main/native/Source/WebCore/dom/DataTransferMac.mm
  36. +1 −1 modules/javafx.web/src/main/native/Source/WebCore/platform/graphics/cv/ImageTransferSessionVT.mm
  37. +2 −2 modules/javafx.web/src/main/native/Source/WebCore/platform/graphics/cv/TextureCacheCV.mm
  38. +5 −5 modules/javafx.web/src/main/native/Source/WebCore/rendering/RenderThemeIOS.mm
  39. +5 −5 modules/javafx.web/src/main/native/Source/WebCore/rendering/RenderThemeMac.mm
  40. +1 −1 modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/ProcessCheck.mm
  41. +6 −22 tools/scripts/checkWhiteSpace
@@ -1,5 +1,5 @@
;
; Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
; Copyright (c) 2019, 2020, 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
@@ -36,7 +36,7 @@ version=0
domain=openjdk.org

[checks "whitespace"]
files=.*\.java$|.*\.c$|.*\.h$|.*\.cpp$|.*\.hpp$
files=.*\.java$|.*\.c$|.*\.h$|.*\.cpp$|.*\.hpp$|.*\.cc$|.*\.jsl$|.*\.fxml$|.*\.css$|.*\.m$|.*\.mm$|.*\.frag$|.*\.vert$|.*\.hlsl$|.*\.metal$|.*\.gradle$|.*\.groovy$|.*\.g4$|.*\.stg$

[checks "reviewers"]
minimum=1
@@ -3793,7 +3793,7 @@ project(":systemTests") {
exclude("test/robot/**");
}
if (!IS_UNSTABLE_TEST) {
// JDK-8196607 Don't run monocle test cases
// JDK-8196607 Don't run monocle test cases
exclude("test/robot/com/sun/glass/ui/monocle/**");
}
if (!IS_AWT_TEST) {
@@ -4711,8 +4711,8 @@ compileTargets { t ->
def publicationDirName = "${platformPrefix}publications"
def publicationDir = "${rootProject.buildDir}/${publicationDirName}"

moduleProjList.each { project ->
// Create publications to be uploaded
moduleProjList.each { project ->
// Create publications to be uploaded

def moduleName = project.ext.moduleName
def buildDir = project.buildDir
@@ -382,7 +382,7 @@ if (compileNativeText) {
"-I$freetypeDir/include", "-I$freetypeDir/include/freetype2"].flatten()

ANDROID.fontNativeFreetype.linkFlags =
IS_STATIC_BUILD ? [linkFlags].flatten() :
IS_STATIC_BUILD ? [linkFlags].flatten() :
[linkFlags, "-llog",
"-L$freetypeDir/lib", "$freetypeDir/lib/libfreetype.a"].flatten()
}
@@ -214,9 +214,9 @@ if (file(vs2017DllPath).exists()) {
}
else {
ext.WIN.VS2017DLLNames = [
];
];
ext.WIN.VS2017DLLs = [
];
];
}

def WinSDKDLLsPath = cygpath("${winSdkDllDir}")
@@ -462,7 +462,7 @@ INTCONSTANT : ('0' | '1'..'9' DIGIT*) ;
FLOATCONSTANT
: DIGIT+ '.' DIGIT*
| '.' DIGIT+
;
;

fragment
DIGIT : '0'..'9' ;
@@ -58,7 +58,7 @@ public class PPS$peerName$Peer extends $superClass$$genericsDecl$ $interfaceDecl
}

$usercode$

@Override
protected boolean isSamplerLinear(int i) {
switch (i) {
@@ -87,7 +87,7 @@ public class JSW$peerName$Peer extends JSWEffectPeer$genericsDecl$ $interfaceDec
setDestNativeBounds(dst.getPhysicalWidth(), dst.getPhysicalHeight());
int dstscan = dst.getScanlineStride();
int[] dstPixels = dst.getPixelArray();

int dyi;
float color_x, color_y, color_z, color_w;

@@ -85,7 +85,7 @@ public class ME$peerName$Peer extends MEEffectPeer$genericsDecl$ $interfaceDecl$
setDestNativeBounds(dst.getWidth(), dst.getHeight());
int dstscan = dst.getWidth();
int[] dstPixels = ((DataBufferInt)dst.getRaster().getDataBuffer()).getData();

$constants$

filter(dstPixels, dstx, dsty, dstw, dsth, dstscan$params$);
@@ -85,7 +85,7 @@ public class SSE$peerName$Peer extends SSEEffectPeer$genericsDecl$ $interfaceDec
setDestNativeBounds(dst.getPhysicalWidth(), dst.getPhysicalHeight());
int dstscan = dst.getScanlineStride();
int[] dstPixels = dst.getPixelArray();

$constants$

filter(dstPixels, dstx, dsty, dstw, dsth, dstscan$params$);
@@ -471,7 +471,7 @@ - (void)sendJavaMouseEvent:(NSEvent *)theEvent
rotationX = (jdouble)[theEvent deltaX];
rotationY = (jdouble)[theEvent deltaY];
}

//XXX: check for equality for doubles???
if (rotationX == 0.0 && rotationY == 0.0)
{
@@ -1133,7 +1133,7 @@ - (void)notifyInputMethod:(id) aString attr:(int)attr length:(int)length cursor:
if ([NSThread isMainThread] == YES)
{
GET_MAIN_JENV;

jstring jStr = convertNSStringToJString(aString, length);
if (jStr != NULL) {
(*env)->CallVoidMethod(env, self->jView, jViewNotifyInputMethodMac, jStr, attr,
@@ -57,5 +57,5 @@ varying vec2 oTexCoords;

vec4 apply_diffuse() {
vec4 dTexColor = texture2D(diffuseTexture, oTexCoords);
return dTexColor * diffuseColor;
return dTexColor * diffuseColor;
}
@@ -50,13 +50,13 @@ vec3 getLocalVector(vec3 global, vec3 tangentFrame[3]) {

void main()
{
vec3 tangentFrame[3];
vec3 tangentFrame[3];

vec4 worldPos = worldMatrix * vec4(pos, 1.0);

// Note: The breaking of a vector and scale computation statement into
// 2 separate statements is intentional to workaround a shader
// compiler bug on the Freescale iMX6 platform. See RT-37789 for details.
// compiler bug on the Freescale iMX6 platform. See RT-37789 for details.
vec3 t1 = tangent.xyz * tangent.yzx;
t1 *= 2.0;
vec3 t2 = tangent.zxy * tangent.www;
@@ -72,20 +72,20 @@ void main()
tangentFrame[1] = vec3(r2.x, t4.z, r1.y);
tangentFrame[2] = vec3(r1.z, r2.y, t4.x);
tangentFrame[2] *= (tangent.w>=0.0) ? 1.0 : -1.0;
mat3 sWorldMatrix = mat3(worldMatrix[0].xyz,
worldMatrix[1].xyz,

mat3 sWorldMatrix = mat3(worldMatrix[0].xyz,
worldMatrix[1].xyz,
worldMatrix[2].xyz);

//Translate the tangent frame to world space.
tangentFrame[0] = sWorldMatrix * tangentFrame[0];
tangentFrame[1] = sWorldMatrix * tangentFrame[1];
tangentFrame[2] = sWorldMatrix * tangentFrame[2];

vec3 Eye = camPos - worldPos.xyz;

eyePos = getLocalVector(Eye, tangentFrame);

vec3 L = lights[0].pos.xyz - worldPos.xyz;
lightTangentSpacePositions[0] = vec4( getLocalVector(L,tangentFrame)*lights[0].pos.w, 1.0);

@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import "config.h"
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import "config.h"
@@ -65,26 +65,26 @@ - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSErro
String createTemporaryZipArchive(const String& path)
{
String temporaryFile;

RetainPtr<NSFileCoordinator> coordinator = adoptNS([[NSFileCoordinator alloc] initWithFilePresenter:nil]);
[coordinator coordinateReadingItemAtURL:[NSURL fileURLWithPath:path] options:NSFileCoordinatorReadingWithoutChanges error:nullptr byAccessor:[&](NSURL *newURL) mutable {
CString archivePath([NSTemporaryDirectory() stringByAppendingPathComponent:@"WebKitGeneratedFileXXXXXX"].fileSystemRepresentation);
if (mkstemp(archivePath.mutableData()) == -1)
return;

NSDictionary *options = @{
(__bridge id)kBOMCopierOptionCreatePKZipKey : @YES,
(__bridge id)kBOMCopierOptionSequesterResourcesKey : @YES,
(__bridge id)kBOMCopierOptionKeepParentKey : @YES,
(__bridge id)kBOMCopierOptionCopyResourcesKey : @YES,
};

BOMCopier copier = BOMCopierNew();
if (!BOMCopierCopyWithOptions(copier, newURL.path.fileSystemRepresentation, archivePath.data(), (__bridge CFDictionaryRef)options))
temporaryFile = String::fromUTF8(archivePath);
BOMCopierFree(copier);
}];

return temporaryFile;
}

@@ -199,7 +199,7 @@ void makeSafeToUseMemoryMapForPath(const String& path)
{
if (isSafeToUseMemoryMapForPath(path))
return;

NSError *error = nil;
BOOL success = [[NSFileManager defaultManager] setAttributes:@{ NSFileProtectionKey: NSFileProtectionCompleteUnlessOpen } ofItemAtPath:path error:&error];
ASSERT(!error);
@@ -6,13 +6,13 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -54,7 +54,7 @@

// Disable memory event reception for a minimum of s_minimumHoldOffTime
// seconds after receiving an event. Don't let events fire any sooner than
// s_holdOffMultiplier times the last cleanup processing time. Effectively
// s_holdOffMultiplier times the last cleanup processing time. Effectively
// this is 1 / s_holdOffMultiplier percent of the time.
// These value seems reasonable and testing verifies that it throttles frequent
// low memory events, greatly reducing CPU usage.

0 comments on commit 976a763

Please sign in to comment.
You can’t perform that action at this time.