Reviewers: jgw,
Please review this at http://gwt-code-reviews.appspot.com/1601804/
Affected files:
M user/src/com/google/gwt/layout/client/LayoutImplIE6.java
M user/src/com/google/gwt/user/client/ui/DeckLayoutPanel.java
Index: user/src/com/google/gwt/layout/client/LayoutImplIE6.java
diff --git a/user/src/com/google/gwt/layout/client/LayoutImplIE6.java
b/user/src/com/google/gwt/layout/client/LayoutImplIE6.java
index
8e7513cc4ba9c4fb2fcc9ba6a158cac05a759581..4b7f7020cc994c137796a43f76c63646a279d554
100644
--- a/user/src/com/google/gwt/layout/client/LayoutImplIE6.java
+++ b/user/src/com/google/gwt/layout/client/LayoutImplIE6.java
@@ -47,6 +47,9 @@ class LayoutImplIE6 extends LayoutImplIE8 {
styleRuler.getStyle().setPosition(Position.ABSOLUTE);
styleRuler.getStyle().setLeft(-10000, PX);
+ // NOTE: this line causes a leak. Not sure why? Maybe a parent having
+ // an expando property to a child is not a good idea? (E.g. it ends
+ // up that parent.__styleRuler = styleRuler &&
parent.appendChild(styleRule))
parent.appendChild(styleRuler);
styleRuler.appendChild(styleInner);
return styleRuler;
@@ -179,6 +182,8 @@ class LayoutImplIE6 extends LayoutImplIE8 {
removeLayerRefs(parent);
removeResizeHandler(parent);
removeUnitChangeHandler(relativeRuler);
+ // fixes leak
+ setPropertyElement(parent, "__styleRuler", null);
}
private native void fillParentImpl(Element elem) /*-{
Index: user/src/com/google/gwt/user/client/ui/DeckLayoutPanel.java
diff --git a/user/src/com/google/gwt/user/client/ui/DeckLayoutPanel.java
b/user/src/com/google/gwt/user/client/ui/DeckLayoutPanel.java
index
ed83651045d45cb2e766c8627ad41e76cdf167c5..1bc75ece232b6e1c0430039b449b21f21c9a78b3
100644
--- a/user/src/com/google/gwt/user/client/ui/DeckLayoutPanel.java
+++ b/user/src/com/google/gwt/user/client/ui/DeckLayoutPanel.java
@@ -294,6 +294,18 @@ public class DeckLayoutPanel extends ComplexPanel
implements AnimatedLayout,
animate((widget == null) ? 0 : animationDuration);
}
+ @Override
+ protected void onLoad() {
+ super.onLoad();
+ layout.onAttach();
+ }
+
+ @Override
+ protected void onUnload() {
+ layout.onDetach();
+ super.onUnload();
+ }
+
/**
* Assert that the specified widget is null or a child of this widget.
*
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors