]> source.dussan.org Git - vaadin-framework.git/commitdiff
Take Window special case into account for invalid layouts (#17598)
authorArtur Signell <artur@vaadin.com>
Wed, 17 Jun 2015 17:24:02 +0000 (20:24 +0300)
committerArtur Signell <artur@vaadin.com>
Wed, 17 Jun 2015 17:25:14 +0000 (20:25 +0300)
Change-Id: If736e0d35376f90dee33d93588351ef726a4635f

server/src/com/vaadin/server/ComponentSizeValidator.java

index 1fbd84093266d5287ea964b2a46a8f440739c4f3..71023782ef8bcab2a2ed930479c00ab56d5554b0 100644 (file)
@@ -598,6 +598,12 @@ public class ComponentSizeValidator implements Serializable {
         if (parent == null) {
             return false;
         } else if (parent.getWidth() < 0) {
+            if (parent instanceof Window) {
+                // Window has some weird haxxors to support 100% children when
+                // window is -1
+                return false;
+            }
+
             return true;
         } else if (parent.getWidthUnits() == Unit.PERCENTAGE) {
             return isEffectiveUndefinedWidth(parent.getParent());
@@ -615,6 +621,12 @@ public class ComponentSizeValidator implements Serializable {
         if (parent == null) {
             return false;
         } else if (parent.getHeight() < 0) {
+            if (parent instanceof Window) {
+                // Window has some weird haxxors to support 100% children when
+                // window is -1
+                return false;
+            }
+
             return true;
         } else if (parent.getHeightUnits() == Unit.PERCENTAGE) {
             return isEffectiveUndefinedHeight(parent.getParent());