aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/ui
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2008-12-17 13:52:59 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2008-12-17 13:52:59 +0000
commit45a80c0b64d3374e519a7b50325bd703f383107f (patch)
tree86ac4c00ccc67298b92aa525fad424516b4023db /src/com/itmill/toolkit/ui
parentd54e4916938ae5b2101ddcec3a871132352575cd (diff)
downloadvaadin-framework-45a80c0b64d3374e519a7b50325bd703f383107f.tar.gz
vaadin-framework-45a80c0b64d3374e519a7b50325bd703f383107f.zip
relative size handling changes towards #2319
svn changeset:6252/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/ui')
-rw-r--r--src/com/itmill/toolkit/ui/AbstractComponent.java19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/com/itmill/toolkit/ui/AbstractComponent.java b/src/com/itmill/toolkit/ui/AbstractComponent.java
index 5a692736e7..94e194d351 100644
--- a/src/com/itmill/toolkit/ui/AbstractComponent.java
+++ b/src/com/itmill/toolkit/ui/AbstractComponent.java
@@ -609,22 +609,15 @@ public abstract class AbstractComponent implements Component, MethodEventSource
// Only paint content of visible components.
if (isVisible()) {
- boolean validHeight = true;
- boolean validWidth = true;
-
- if (getApplication() != null && getApplication().isDebugMode()) {
- validHeight = DebugUtilities.checkHeights(this);
- validWidth = DebugUtilities.checkWidths(this);
- }
- if (!validHeight || !validWidth) {
- addStyleName("invalidlayout");
- }
-
- if (validHeight && getHeight() >= 0) {
+ if (getHeight() >= 0
+ && (getHeightUnits() != UNITS_PERCENTAGE || !DebugUtilities
+ .parentCannotDefineHeight(this))) {
target.addAttribute("height", "" + getCSSHeight());
}
- if (validWidth && getWidth() >= 0) {
+ if (getWidth() >= 0
+ && (getWidthUnits() != UNITS_PERCENTAGE || !DebugUtilities
+ .parentCannotDefineWidth(this))) {
target.addAttribute("width", "" + getCSSWidth());
}
if (styles != null && styles.size() > 0) {