Reviewers: jgw, Description: CellPanel#setCellHeight/Width(Widget, String) assumes that the widget is a child of the CellPanel, which results in a native NPE if it isn't because the parent TD element is null.
CellPanel#setCellHorizontal/VerticalAlignment(Widget) does a check to make sure the widget is a child of the Panel and that it has a parent element. The methods returns quietly if the null check is false. This patch fixes setCellHeight/Width to do the same thing. I added an AbstractCellPanelTest class to check for this error and made HorizontalPanelTest and VerticalPanelTest extend it. DockPanel is technically a CellPanel, but its sufficiently different that the tests aren't compatible. I verified that DockPanel already does null checks on the td element. Please review this at http://gwt-code-reviews.appspot.com/33816 Affected files: user/src/com/google/gwt/user/client/ui/CellPanel.java user/test/com/google/gwt/user/client/ui/AbstractCellPanelTest.java user/test/com/google/gwt/user/client/ui/HorizontalPanelTest.java user/test/com/google/gwt/user/client/ui/VerticalPanelTest.java --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
