Reviewers: rchandia, Description: Fixing a bug in HTMLPanel#addAndReplaceElement() where widgets that are children of the element being replaced are never removed, which puts the widgets in an invalid state. We now handle three additional scenarios. If the element being replaced is the new widget, then its a no-op. If the element being replaced contains one or more widgets, those widgets are removed from the HTMLPanel before replacing the element. If the element being replaced is a widget (but not the new widget), then we insert the new widget first, and then remove the old widget.
Issue: 4642 Author: jlabanca, gfotos Please review this at http://gwt-code-reviews.appspot.com/1467807/ Affected files: M user/src/com/google/gwt/user/client/ui/HTMLPanel.java M user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors