summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2013-03-13 11:23:32 +0200
committerVaadin Code Review <review@vaadin.com>2013-04-23 11:36:50 +0000
commit2c29e7b1d28f67642d4c1d9d8e8201a141dbe80a (patch)
tree0a6250e1c110c1a692331e2084ebb2c45f6ff183 /client
parentfeb9a8c3510afc76c079fafcd9e507205bde139c (diff)
downloadvaadin-framework-2c29e7b1d28f67642d4c1d9d8e8201a141dbe80a.tar.gz
vaadin-framework-2c29e7b1d28f67642d4c1d9d8e8201a141dbe80a.zip
Fixed broken Gridlayout cell position calculation in IE10 #11644 (backported from #11303)
Change-Id: I9003feeb3ee22f29975a3e8557cd8775e838c57f Merge: no
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/VGridLayout.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/client/src/com/vaadin/client/ui/VGridLayout.java b/client/src/com/vaadin/client/ui/VGridLayout.java
index d024c1caae..46051655b8 100644
--- a/client/src/com/vaadin/client/ui/VGridLayout.java
+++ b/client/src/com/vaadin/client/ui/VGridLayout.java
@@ -219,24 +219,28 @@ public class VGridLayout extends ComplexPanel {
Element element = getElement();
int paddingTop = layoutManager.getPaddingTop(element);
int paddingBottom = layoutManager.getPaddingBottom(element);
+
int y = paddingTop;
+ for (int column = 0; column < cells.length; column++) {
+ y = paddingTop + 1 - 1; // Ensure IE10 does not optimize this out by
+ // adding something to evaluate on the RHS
+ // #11303
- for (int i = 0; i < cells.length; i++) {
- y = paddingTop;
- for (int j = 0; j < cells[i].length; j++) {
- Cell cell = cells[i][j];
+ for (int row = 0; row < cells[column].length; row++) {
+ Cell cell = cells[column][row];
if (cell != null) {
int reservedMargin;
- if (cell.rowspan + j >= cells[i].length) {
+ if (cell.rowspan + row >= cells[column].length) {
// Make room for layout padding for cells reaching the
// bottom of the layout
reservedMargin = paddingBottom;
} else {
reservedMargin = 0;
}
+
cell.layoutVertically(y, reservedMargin);
}
- y += rowHeights[j] + verticalSpacing;
+ y += rowHeights[row] + verticalSpacing;
}
}
@@ -245,6 +249,7 @@ public class VGridLayout extends ComplexPanel {
+ layoutManager.getPaddingBottom(element)
+ layoutManager.getBorderHeight(element);
element.getStyle().setHeight(outerHeight, Unit.PX);
+
getConnector().getLayoutManager().reportOuterHeight(getConnector(),
outerHeight);
}