changeset 5173:d67eca687eef

Backed out changeset d61aca2e2f9b (Fix for RT-25059) as it introduced RT-33172: 8.0-controls-scrum-849: up to 40% performance regression in Controls.ListView and Controls.TreeView benchmarks
author jgiles
date Thu, 26 Sep 2013 10:58:41 +1200
parents 8a99b06d9c22
children acf01d7fdc73
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java modules/controls/src/test/java/javafx/scene/control/ListViewTest.java modules/controls/src/test/java/javafx/scene/control/TableViewTest.java modules/controls/src/test/java/javafx/scene/control/TreeTableViewTest.java modules/controls/src/test/java/javafx/scene/control/TreeViewTest.java
diffstat 5 files changed, 17 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java	Wed Sep 25 15:09:58 2013 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java	Thu Sep 26 10:58:41 2013 +1200
@@ -1467,9 +1467,7 @@
                 // only a single row and it is bigger than the viewport
                 lengthBar.setVisibleAmount(flowLength / sumCellLength);
             } else {
-                // Changed the calculation here due to RT-25059. This new approach
-                // ensures the thumb does not resize unexpectedly.
-                lengthBar.setVisibleAmount(cellCount / viewportLength);
+                lengthBar.setVisibleAmount(numCellsVisibleOnScreen / (float) cellCount);
             }
             
 
--- a/modules/controls/src/test/java/javafx/scene/control/ListViewTest.java	Wed Sep 25 15:09:58 2013 -0700
+++ b/modules/controls/src/test/java/javafx/scene/control/ListViewTest.java	Thu Sep 26 10:58:41 2013 +1200
@@ -570,6 +570,10 @@
         assertTrue(scrollBar.isVisible());
         assertTrue(scrollBar.getVisibleAmount() > 0.0);
         assertTrue(scrollBar.getVisibleAmount() < 1.0);
+
+        // this next test is likely to be brittle, but we'll see...If it is the
+        // cause of failure then it can be commented out
+        assertEquals(0.125, scrollBar.getVisibleAmount(), 0.0);
     }
 
     @Test public void test_rt30400() {
--- a/modules/controls/src/test/java/javafx/scene/control/TableViewTest.java	Wed Sep 25 15:09:58 2013 -0700
+++ b/modules/controls/src/test/java/javafx/scene/control/TableViewTest.java	Thu Sep 26 10:58:41 2013 +1200
@@ -1307,6 +1307,10 @@
         assertTrue(scrollBar.isVisible());
         assertTrue(scrollBar.getVisibleAmount() > 0.0);
         assertTrue(scrollBar.getVisibleAmount() < 1.0);
+        
+        // this next test is likely to be brittle, but we'll see...If it is the
+        // cause of failure then it can be commented out
+        assertEquals(0.0625, scrollBar.getVisibleAmount(), 0.0);
     }
 
     @Test public void test_rt30400() {
--- a/modules/controls/src/test/java/javafx/scene/control/TreeTableViewTest.java	Wed Sep 25 15:09:58 2013 -0700
+++ b/modules/controls/src/test/java/javafx/scene/control/TreeTableViewTest.java	Thu Sep 26 10:58:41 2013 +1200
@@ -1871,6 +1871,10 @@
         assertTrue(scrollBar.isVisible());
         assertTrue(scrollBar.getVisibleAmount() > 0.0);
         assertTrue(scrollBar.getVisibleAmount() < 1.0);
+        
+        // this next test is likely to be brittle, but we'll see...If it is the
+        // cause of failure then it can be commented out
+        assertEquals(0.0625, scrollBar.getVisibleAmount(), 0.0);
     }
     
     @Test public void test_rt29676_withText() {
--- a/modules/controls/src/test/java/javafx/scene/control/TreeViewTest.java	Wed Sep 25 15:09:58 2013 -0700
+++ b/modules/controls/src/test/java/javafx/scene/control/TreeViewTest.java	Thu Sep 26 10:58:41 2013 +1200
@@ -903,6 +903,10 @@
         assertTrue(scrollBar.isVisible());
         assertTrue(scrollBar.getVisibleAmount() > 0.0);
         assertTrue(scrollBar.getVisibleAmount() < 1.0);
+        
+        // this next test is likely to be brittle, but we'll see...If it is the
+        // cause of failure then it can be commented out
+        assertEquals(0.125, scrollBar.getVisibleAmount(), 0.0);
     }
     
     @Test public void test_rt27180_collapseBranch_childSelected_singleSelection() {