// inside marginals)
canvas.getStyle().setProperty("width", width);
- if (!rendering && BrowserInfo.get().isIE6()) {
- relayoutWrappersForIe6();
+ if (!rendering) {
+ if (BrowserInfo.get().isIE6()) {
+ relayoutWrappersForIe6();
+ }
+ relayoutRelativeChildren();
+ }
+ }
+
+ private void relayoutRelativeChildren() {
+ for (Widget widget : getChildren()) {
+ if (widget instanceof Paintable) {
+ Paintable new_name = (Paintable) widget;
+ client.handleComponentRelativeSize(widget);
+ }
}
}
// inside marginals)
canvas.getStyle().setProperty("height", height);
- if (!rendering && BrowserInfo.get().isIE6()) {
- relayoutWrappersForIe6();
+ if (!rendering) {
+ if (BrowserInfo.get().isIE6()) {
+ relayoutWrappersForIe6();
+ }
+ relayoutRelativeChildren();
}
}
if (getWidget() != paintable) {
setWidget((Widget) paintable);
}
- paintable.updateFromUIDL(componentUIDL.getChildUIDL(0), client);
+ UIDL childUIDL = componentUIDL.getChildUIDL(0);
+ paintable.updateFromUIDL(childUIDL, client);
+ if (childUIDL.hasAttribute("cached")) {
+ // child may need relative size adjustment if wrapper details
+ // have changed this could be optimized (check if wrapper size
+ // has changed)
+ client.handleComponentRelativeSize((Widget) paintable);
+ }
}
public void setPosition(String stringAttribute) {