From 914eafd5fe7d43290abe0b6b07678df0a8f45ee0 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Sun, 7 Jun 2015 23:06:45 +0300 Subject: [PATCH] Ensure GridLayout rounds available space down instead of up (#15451) Store measured widths and heights as doubles to be able to round later Change-Id: Id0e91702dd62ba362f53317e8520f85b46f19769 --- .../src/com/vaadin/client/LayoutManager.java | 156 +++++++++++++++--- .../src/com/vaadin/client/MeasuredSize.java | 34 ++-- client/src/com/vaadin/client/WidgetUtil.java | 68 +++++++- .../src/com/vaadin/client/ui/VGridLayout.java | 12 +- .../GridLayoutFractionalSizeAndAlignment.java | 66 ++++++++ ...dLayoutFractionalSizeAndAlignmentTest.java | 31 ++++ .../client/ScrollableGridLayoutConnector.java | 36 ++++ .../server/ScrollableGridLayout.java | 34 ++++ 8 files changed, 388 insertions(+), 49 deletions(-) create mode 100644 uitest/src/com/vaadin/tests/components/gridlayout/GridLayoutFractionalSizeAndAlignment.java create mode 100644 uitest/src/com/vaadin/tests/components/gridlayout/GridLayoutFractionalSizeAndAlignmentTest.java create mode 100644 uitest/src/com/vaadin/tests/widgetset/client/ScrollableGridLayoutConnector.java create mode 100644 uitest/src/com/vaadin/tests/widgetset/server/ScrollableGridLayout.java diff --git a/client/src/com/vaadin/client/LayoutManager.java b/client/src/com/vaadin/client/LayoutManager.java index 3f189bcea8..102e618f5e 100644 --- a/client/src/com/vaadin/client/LayoutManager.java +++ b/client/src/com/vaadin/client/LayoutManager.java @@ -946,7 +946,7 @@ public class LayoutManager { * given element, provided that it has been measured. These elements are * guaranteed to be measured: *