--- old/modules/controls/src/main/java/javafx/scene/control/skin/VirtualFlow.java 2016-04-05 16:32:56.000000000 -0700 +++ new/modules/controls/src/main/java/javafx/scene/control/skin/VirtualFlow.java 2016-04-05 16:32:56.000000000 -0700 @@ -1825,9 +1825,9 @@ private void positionCell(T cell, double position) { if (isVertical()) { cell.setLayoutX(0); - cell.setLayoutY(snapSize(position)); + cell.setLayoutY(snapSizeY(position)); } else { - cell.setLayoutX(snapSize(position)); + cell.setLayoutX(snapSizeX(position)); cell.setLayoutY(0); } } @@ -2216,8 +2216,8 @@ private void updateViewportDimensions() { final boolean isVertical = isVertical(); - final double breadthBarLength = snapSize(isVertical ? hbar.prefHeight(-1) : vbar.prefWidth(-1)); - final double lengthBarBreadth = snapSize(isVertical ? vbar.prefWidth(-1) : hbar.prefHeight(-1)); + final double breadthBarLength = isVertical ? snapSizeY(hbar.prefHeight(-1)) : snapSizeX(vbar.prefWidth(-1)); + final double lengthBarBreadth = isVertical ? snapSizeX(vbar.prefWidth(-1)) : snapSizeY(hbar.prefHeight(-1)); setViewportBreadth((isVertical ? getWidth() : getHeight()) - (needLengthBar ? lengthBarBreadth : 0)); setViewportLength((isVertical ? getHeight() : getWidth()) - (needBreadthBar ? breadthBarLength : 0)); @@ -2408,8 +2408,8 @@ } } - clipView.resize(snapSize(isVertical ? viewportBreadth : viewportLength), - snapSize(isVertical ? viewportLength : viewportBreadth)); + clipView.resize(snapSizeX(isVertical ? viewportBreadth : viewportLength), + snapSizeY(isVertical ? viewportLength : viewportBreadth)); // If the viewportLength becomes large enough that all cells fit // within the viewport, then we want to update the value to match.