From: Leif Åstrand Date: Tue, 14 Feb 2012 14:26:22 +0000 (+0200) Subject: Properly update height and width of tab content (#8313) X-Git-Tag: 7.0.0.alpha2~434^2~49 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=775dafb0bee2981b9ea1f9a2e9fd531c0687cdda;p=vaadin-framework.git Properly update height and width of tab content (#8313) --- diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java b/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java index c035855695..61fd389200 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java @@ -22,7 +22,6 @@ import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; -import com.vaadin.terminal.gwt.client.RenderSpace; import com.vaadin.terminal.gwt.client.TooltipInfo; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; @@ -865,10 +864,8 @@ public class VTabsheet extends VTabsheetBase { // Set proper values for content element DOM.setStyleAttribute(contentNode, "height", contentHeight + "px"); - renderSpace.setHeight(contentHeight); } else { DOM.setStyleAttribute(contentNode, "height", ""); - renderSpace.setHeight(0); } } @@ -892,10 +889,10 @@ public class VTabsheet extends VTabsheetBase { int minWidth = 0; if (!isDynamicHeight()) { - height = renderSpace.getHeight(); + height = contentNode.getOffsetHeight(); } if (!isDynamicWidth()) { - width = renderSpace.getWidth(); + width = contentNode.getOffsetWidth(); } else { /* * If the tabbar is wider than the content we need to use the tabbar @@ -1005,8 +1002,6 @@ public class VTabsheet extends VTabsheetBase { return borderW; } - private final RenderSpace renderSpace = new RenderSpace(0, 0, true); - @Override protected int getTabCount() { return tb.getTabCount();