Fixes issue #2853, where leaf nodes were not lining up in IE.

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@3699 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/DefaultMuseum.java b/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/DefaultMuseum.java
index 0bd3fb9..229df66 100644
--- a/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/DefaultMuseum.java
+++ b/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/DefaultMuseum.java
@@ -40,6 +40,9 @@
     addIssue(new Issue1169());

     addIssue(new Issue2392());

     addIssue(new Issue2443());

+    addIssue(new Issue2553());

+    addIssue(new TreeVisuals());

     addIssue(new TestFireEvents());

+

   }

 }

diff --git a/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/Issue2553.java b/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/Issue2553.java
new file mode 100644
index 0000000..6595534
--- /dev/null
+++ b/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/Issue2553.java
@@ -0,0 +1,52 @@
+/*

+ * Copyright 2008 Google Inc.

+ * 

+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not

+ * use this file except in compliance with the License. You may obtain a copy of

+ * the License at

+ * 

+ * http://www.apache.org/licenses/LICENSE-2.0

+ * 

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT

+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the

+ * License for the specific language governing permissions and limitations under

+ * the License.

+ */

+

+package com.google.gwt.museum.client.defaultmuseum;

+

+import com.google.gwt.museum.client.common.AbstractIssue;

+import com.google.gwt.user.client.ui.Tree;

+import com.google.gwt.user.client.ui.Widget;

+

+/**

+ * Test for http://code.google.com/p/google-web-toolkit/issues/detail?id=2553

+ */

+public class Issue2553 extends AbstractIssue {

+

+  @Override

+  public Widget createIssue() {

+    Tree tree = new Tree();

+    tree.addItem("This is a long text displayed in a tree item");

+    tree.addItem("This is a long text displayed in a tree item and it's longer than the others");

+    tree.addItem("This is a long text displayed in a tree item");

+    return tree;

+  }

+

+  @Override

+  public String getInstructions() {

+    return "resize the browser to a smaller width than the tree's width";

+  }

+

+  @Override

+  public String getSummary() {

+    return "Word wrap of treeitem's text when browser width is too small";

+  }

+

+  @Override

+  public boolean hasCSS() {

+    return false;

+  }

+

+}

diff --git a/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/TreeVisuals.java b/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/TreeVisuals.java
new file mode 100644
index 0000000..aaa9f5c
--- /dev/null
+++ b/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/TreeVisuals.java
@@ -0,0 +1,69 @@
+/*

+ * Copyright 2008 Google Inc.

+ * 

+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not

+ * use this file except in compliance with the License. You may obtain a copy of

+ * the License at

+ * 

+ * http://www.apache.org/licenses/LICENSE-2.0

+ * 

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT

+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the

+ * License for the specific language governing permissions and limitations under

+ * the License.

+ */

+

+package com.google.gwt.museum.client.defaultmuseum;

+

+import com.google.gwt.museum.client.common.AbstractIssue;

+import com.google.gwt.user.client.ui.Tree;

+import com.google.gwt.user.client.ui.TreeItem;

+import com.google.gwt.user.client.ui.VerticalPanel;

+import com.google.gwt.user.client.ui.Widget;

+

+/**

+ * A simple tree used to quickly exercise tree behavior.

+ */

+public class TreeVisuals extends AbstractIssue {

+

+  @Override

+  public Widget createIssue() {

+    VerticalPanel p = new VerticalPanel();

+    Tree t = new Tree();

+    TreeItem a = new TreeItem("a");

+    TreeItem b = new TreeItem(

+        "b, though this is a very, very long text field in order to trigger text wrapping bugs, if there are any such bugs currently in the tree.");

+    TreeItem ba = new TreeItem("b.a");

+    TreeItem bb = new TreeItem("b.b");

+    TreeItem bba = new TreeItem("b.b.a");

+    TreeItem bc = new TreeItem("b.c");

+    TreeItem c = new TreeItem("c");

+    t.setSelectedItem(b);

+    t.addItem(a);

+    t.addItem(b);

+    t.addItem(c);

+    b.addItem(ba);

+    b.addItem(bb);

+    bb.addItem(bba);

+    b.addItem(bc);

+    p.add(t);

+    return p;

+  }

+

+  @Override

+  public String getInstructions() {

+    return "Open each node, make sure everything looks right";

+  }

+

+  @Override

+  public String getSummary() {

+    return "simple tree, used for generic tree tests";

+  }

+

+  @Override

+  public boolean hasCSS() {

+    return false;

+  }

+

+}

diff --git a/user/src/com/google/gwt/user/client/ui/TreeItem.java b/user/src/com/google/gwt/user/client/ui/TreeItem.java
index a26ce4a..8b6c66f 100644
--- a/user/src/com/google/gwt/user/client/ui/TreeItem.java
+++ b/user/src/com/google/gwt/user/client/ui/TreeItem.java
@@ -107,11 +107,6 @@
     void initializeClonableElements() {
       super.initializeClonableElements();
       if (GWT.isClient()) {
-        // Remove the padding from the cells and re-add it to the table element
-        DOM.setElementPropertyInt(BASE_INTERNAL_ELEM, "cellPadding", 0);
-        DOM.setElementPropertyInt(BASE_INTERNAL_ELEM, "cellSpacing", 0);
-        BASE_INTERNAL_ELEM.getStyle().setPropertyPx("paddingBottom", 3);
-
         // We can't use a 3px padding all around because IE will wrap the
         // childSpan to the next line, so we need to add a 3px margin on the top
         // and bottom instead. However, margins overlap, so we need a 6px bottom