diff options
author | Artur Signell <artur@vaadin.com> | 2015-06-17 20:24:02 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2015-06-17 20:25:14 +0300 |
commit | 1eaa302928c0a653885cfdaa552806f899f8ed60 (patch) | |
tree | e5a8b50ebff3cdb362563cad46ec31c6e6332fc1 /server | |
parent | 024a2ab52e1ab5ac039c78f86c9c6fbf3a70f131 (diff) | |
download | vaadin-framework-1eaa302928c0a653885cfdaa552806f899f8ed60.tar.gz vaadin-framework-1eaa302928c0a653885cfdaa552806f899f8ed60.zip |
Take Window special case into account for invalid layouts (#17598)
Change-Id: If736e0d35376f90dee33d93588351ef726a4635f
Diffstat (limited to 'server')
-rw-r--r-- | server/src/com/vaadin/server/ComponentSizeValidator.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/src/com/vaadin/server/ComponentSizeValidator.java b/server/src/com/vaadin/server/ComponentSizeValidator.java index 1fbd840932..71023782ef 100644 --- a/server/src/com/vaadin/server/ComponentSizeValidator.java +++ b/server/src/com/vaadin/server/ComponentSizeValidator.java @@ -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()); |