Преглед на файлове

Take Window special case into account for invalid layouts (#17598)

Change-Id: If736e0d35376f90dee33d93588351ef726a4635f
tags/7.6.0.alpha2
Artur Signell преди 9 години
родител
ревизия
1eaa302928
променени са 1 файла, в които са добавени 12 реда и са изтрити 0 реда
  1. 12
    0
      server/src/com/vaadin/server/ComponentSizeValidator.java

+ 12
- 0
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());

Loading…
Отказ
Запис