Skip to content

Commit e21fd1f

Browse files
Merge
2 parents 443c845 + 3c55a7e commit e21fd1f

File tree

72 files changed

+216
-110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+216
-110
lines changed

buildSrc/android.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.controls/src/main/java/javafx/scene/control/skin/TabPaneSkin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.controls/src/test/java/test/javafx/scene/control/TabPaneTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/java/com/sun/glass/ui/android/DalvikInput.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/AndroidInputDeviceRegistry.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/AndroidPlatform.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/DispmanPlatform.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/HeadlessPlatform.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/LinuxPlatform.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/MX6Platform.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/MonocleApplication.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/NativePlatform.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/OMAPPlatform.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/X11Platform.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/java/com/sun/javafx/font/PrismFontFile.java

+18
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,15 @@ public void setPeer(Object peer) {
403403
this.peer = peer;
404404
}
405405

406+
int getTableLength(int tag) {
407+
int len = 0;
408+
DirectoryEntry tagDE = getDirectoryEntry(tag);
409+
if (tagDE != null) {
410+
len = tagDE.length;
411+
}
412+
return len;
413+
}
414+
406415
synchronized Buffer readTable(int tag) {
407416
Buffer buffer = null;
408417
boolean openedFile = false;
@@ -569,6 +578,15 @@ private void init(String name, int fIndex) throws Exception {
569578
// font. For some fonts advanceWidthMax is much larger then "M"
570579
// advanceWidthMax = (float)hhea.getChar(10);
571580
numHMetrics = hhea.getChar(34) & 0xffff;
581+
/* the hmtx table may have a trailing LSB array which we don't
582+
* use. But it means we must not assume these two values match.
583+
* We are only concerned here with not reading more data than
584+
* there is in the table.
585+
*/
586+
int hmtxEntries = getTableLength(hmtxTag) >> 2;
587+
if (numHMetrics > hmtxEntries) {
588+
numHMetrics = hmtxEntries;
589+
}
572590
}
573591

574592
// maxp table is before the OS/2 table. Read it now

modules/javafx.graphics/src/main/java/com/sun/prism/impl/GlyphCache.java

+9-2
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,12 @@ private GlyphData getCachedGlyph(int glyphCode, int subPixel) {
291291
}
292292
// If add fails,clear up the cache. Try add again.
293293
clearAll();
294-
packer.add(rect);
294+
if (!packer.add(rect)) {
295+
if (PrismSettings.verbose) {
296+
System.out.println(rect + " won't fit in GlyphCache");
297+
}
298+
return null;
299+
}
295300
}
296301

297302
// We always pass skipFlush=true to backingStore.update()
@@ -320,7 +325,9 @@ private GlyphData getCachedGlyph(int glyphCode, int subPixel) {
320325
0, 0, emw, emh, stride,
321326
skipFlush);
322327
} catch (Exception e) {
323-
e.printStackTrace();
328+
if (PrismSettings.verbose) {
329+
e.printStackTrace();
330+
}
324331
return null;
325332
}
326333
// Upload the glyph

modules/javafx.graphics/src/main/java/com/sun/scenario/animation/shared/ClipEnvelope.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -110,6 +110,10 @@ public void abortCurrentPulse() {
110110

111111
protected abstract double calculateCurrentRate();
112112

113+
protected void setInternalCurrentRate(double currentRate) {
114+
this.currentRate = currentRate;
115+
}
116+
113117
protected void setCurrentRate(double currentRate) {
114118
this.currentRate = currentRate;
115119
AnimationAccessor.getDefault().setCurrentRate(animation, currentRate);

modules/javafx.graphics/src/main/java/com/sun/scenario/animation/shared/FiniteClipEnvelope.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -82,9 +82,7 @@ public void setRate(double rate) {
8282
final long newTicks = toggled? totalTicks - ticks : ticks;
8383
final Status status = animation.getStatus();
8484
if (status != Status.STOPPED) {
85-
if (status == Status.RUNNING) {
86-
setCurrentRate((Math.abs(currentRate - this.rate) < EPSILON) ? rate : -rate);
87-
}
85+
setInternalCurrentRate((Math.abs(currentRate - this.rate) < EPSILON) ? rate : -rate);
8886
deltaTicks = newTicks - Math.round((ticks - deltaTicks) * Math.abs(rate / this.rate));
8987
abortCurrentPulse();
9088
}

modules/javafx.graphics/src/main/java/com/sun/scenario/animation/shared/InfiniteClipEnvelope.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -70,9 +70,7 @@ public ClipEnvelope setCycleCount(int cycleCount) {
7070
public void setRate(double rate) {
7171
final Status status = animation.getStatus();
7272
if (status != Status.STOPPED) {
73-
if (status == Status.RUNNING) {
74-
setCurrentRate((Math.abs(currentRate - this.rate) < EPSILON) ? rate : -rate);
75-
}
73+
setInternalCurrentRate((Math.abs(currentRate - this.rate) < EPSILON) ? rate : -rate);
7674
deltaTicks = ticks - Math.round((ticks - deltaTicks) * Math.abs(rate / this.rate));
7775
if (rate * this.rate < 0) {
7876
final long delta = 2 * cycleTicks - pos;

modules/javafx.graphics/src/main/java/com/sun/scenario/animation/shared/SingleLoopClipEnvelope.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -37,9 +37,7 @@ public class SingleLoopClipEnvelope extends ClipEnvelope {
3737
public void setRate(double rate) {
3838
final Status status = animation.getStatus();
3939
if (status != Status.STOPPED) {
40-
if (status == Status.RUNNING) {
41-
setCurrentRate((Math.abs(currentRate - this.rate) < EPSILON) ? rate : -rate);
42-
}
40+
setInternalCurrentRate((Math.abs(currentRate - this.rate) < EPSILON) ? rate : -rate);
4341
deltaTicks = ticks - Math.round((ticks - deltaTicks) * rate / this.rate);
4442
abortCurrentPulse();
4543
}

modules/javafx.graphics/src/main/java/javafx/animation/Animation.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/java/javafx/scene/Scene.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/java/javafx/scene/text/Text.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/native-glass/gtk/GlassApplication.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/native-glass/gtk/glass_dnd.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/native-glass/gtk/glass_dnd.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/native-glass/gtk/glass_general.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/native-glass/gtk/glass_window.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

0 commit comments

Comments
 (0)