Merging releases/1.6@4459:4490

svn merge --accept=postpone -r4459:4490 https://google-web-toolkit.googlecode.com/svn/releases/1.6 .

Also:
- Added a checkstyle for OOPHM.
- Resolved Pruner merge issue with TODOs for spoon



git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@4491 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/build.xml b/dev/core/build.xml
index 2ca8b9a..b13b66d 100755
--- a/dev/core/build.xml
+++ b/dev/core/build.xml
@@ -45,6 +45,7 @@
       <zipfileset src="${gwt.tools.lib}/tomcat/naming-factory-1.0.jar" />
       <zipfileset src="${gwt.tools.lib}/tomcat/naming-java-1.0.jar" />
       <zipfileset src="${gwt.tools.lib}/tomcat/naming-resources-1.0.jar" />
+      <zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" />
       <zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.4.jar" />
       <zipfileset src="${gwt.tools.lib}/tomcat/servlets-common-1.0.jar" />
       <zipfileset src="${gwt.tools.lib}/tomcat/servlets-default-1.0.jar" />
diff --git a/dev/core/src-dummy/com/google/gwt/dev/BootStrapPlatform.java b/dev/core/src-dummy/com/google/gwt/dev/BootStrapPlatform.java
index 9730d1e..3d2fc28 100644
--- a/dev/core/src-dummy/com/google/gwt/dev/BootStrapPlatform.java
+++ b/dev/core/src-dummy/com/google/gwt/dev/BootStrapPlatform.java
@@ -16,9 +16,8 @@
 package com.google.gwt.dev;
 
 /**
- * This is a dummy version of the class.  It only exists so that dev/core can
- * be compiled indepedently.  This class is replaced by a platform-specific
- * version.
+ * This is a dummy version of the class. It only exists so that dev/core can be
+ * compiled indepedently. This class is replaced by a platform-specific version.
  */
 public class BootStrapPlatform {
 
diff --git a/dev/core/src/com/google/gwt/dev/GWTShell.java b/dev/core/src/com/google/gwt/dev/GWTShell.java
index c9955de..d623526 100644
--- a/dev/core/src/com/google/gwt/dev/GWTShell.java
+++ b/dev/core/src/com/google/gwt/dev/GWTShell.java
@@ -36,7 +36,7 @@
  * @deprecated use {@link HostedMode} instead
  */
 @Deprecated
-public class GWTShell extends HostedModeBase {
+public class GWTShell extends SwtHostedModeBase {
 
   /**
    * Handles the list of startup urls that can be passed at the end of the
diff --git a/dev/core/src/com/google/gwt/dev/HostedMode.java b/dev/core/src/com/google/gwt/dev/HostedMode.java
index 90a4920..1d47fc3 100644
--- a/dev/core/src/com/google/gwt/dev/HostedMode.java
+++ b/dev/core/src/com/google/gwt/dev/HostedMode.java
@@ -45,7 +45,7 @@
  * this class is to be determined. Consider this class as having <b>no</b>
  * public API other than {@link #main(String[])}.
  */
-public class HostedMode extends HostedModeBase {
+public class HostedMode extends SwtHostedModeBase {
 
   /**
    * Handles the -server command line flag.
@@ -421,8 +421,8 @@
    * 
    * @param logger the logger to use
    * @param module the module to link
-   * @param includePublicFiles if <code>true</code>, include public files in
-   *          the link, otherwise do not include them
+   * @param includePublicFiles if <code>true</code>, include public files in the
+   *          link, otherwise do not include them
    * @throws UnableToCompleteException
    */
   private void link(TreeLogger logger, ModuleDef module)
diff --git a/dev/core/src/com/google/gwt/dev/HostedModeBase.java b/dev/core/src/com/google/gwt/dev/HostedModeBase.java
index 92e8b13..28741a0e 100644
--- a/dev/core/src/com/google/gwt/dev/HostedModeBase.java
+++ b/dev/core/src/com/google/gwt/dev/HostedModeBase.java
@@ -28,8 +28,6 @@
 import com.google.gwt.dev.shell.BrowserWidgetHostChecker;
 import com.google.gwt.dev.shell.BrowserWindowController;
 import com.google.gwt.dev.shell.ModuleSpaceHost;
-import com.google.gwt.dev.shell.PlatformSpecific;
-import com.google.gwt.dev.shell.ShellMainWindow;
 import com.google.gwt.dev.shell.ShellModuleSpaceHost;
 import com.google.gwt.dev.util.Util;
 import com.google.gwt.dev.util.arg.ArgHandlerDisableAggressiveOptimization;
@@ -39,20 +37,11 @@
 import com.google.gwt.dev.util.arg.ArgHandlerScriptStyle;
 import com.google.gwt.dev.util.arg.OptionGenDir;
 import com.google.gwt.dev.util.arg.OptionLogLevel;
-import com.google.gwt.dev.util.log.AbstractTreeLogger;
 import com.google.gwt.util.tools.ArgHandlerFlag;
 import com.google.gwt.util.tools.ArgHandlerString;
 import com.google.gwt.util.tools.ToolBase;
 
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.internal.Library;
-import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -62,7 +51,11 @@
 import java.util.Set;
 
 /**
- * The main executable class for the hosted mode shell.
+ * The main executable class for the hosted mode shell. This class must not have
+ * any GUI dependencies.
+ * 
+ * TODO: remove BrowserWidget references (which reference SWT via inheritance,
+ * though it doesn't appear to cause any harm currently.
  */
 abstract class HostedModeBase implements BrowserWindowController {
 
@@ -190,6 +183,52 @@
     }
   }
 
+  protected abstract class BrowserWidgetHostImpl implements BrowserWidgetHost {
+
+    public void compile() throws UnableToCompleteException {
+      if (isLegacyMode()) {
+        throw new UnsupportedOperationException();
+      }
+      HostedModeBase.this.compile(getLogger());
+    }
+
+    public void compile(String[] moduleNames) throws UnableToCompleteException {
+      if (!isLegacyMode()) {
+        throw new UnsupportedOperationException();
+      }
+      for (int i = 0; i < moduleNames.length; i++) {
+        String moduleName = moduleNames[i];
+        ModuleDef moduleDef = loadModule(getLogger(), moduleName, true);
+        HostedModeBase.this.compile(getLogger(), moduleDef);
+      }
+    }
+
+    public abstract ModuleSpaceHost createModuleSpaceHost(BrowserWidget widget,
+        final String moduleName) throws UnableToCompleteException;
+
+    public TreeLogger getLogger() {
+      return getTopLogger();
+    }
+
+    public boolean initModule(String moduleName) {
+      return HostedModeBase.this.initModule(moduleName);
+    }
+
+    @Deprecated
+    public boolean isLegacyMode() {
+      return HostedModeBase.this instanceof GWTShell;
+    }
+
+    public String normalizeURL(String whatTheUserTyped) {
+      return HostedModeBase.this.normalizeURL(whatTheUserTyped);
+    }
+
+    public BrowserWidget openNewBrowserWindow()
+        throws UnableToCompleteException {
+      return HostedModeBase.this.openNewBrowserWindow();
+    }
+  }
+
   protected interface HostedModeBaseOptions extends JJSOptions, OptionLogLevel,
       OptionGenDir, OptionNoServer, OptionPort, OptionStartupURLs {
 
@@ -283,75 +322,6 @@
     }
   }
 
-  private class BrowserWidgetHostImpl implements BrowserWidgetHost {
-
-    public void compile() throws UnableToCompleteException {
-      if (isLegacyMode()) {
-        throw new UnsupportedOperationException();
-      }
-      HostedModeBase.this.compile(getLogger());
-    }
-
-    public void compile(String[] moduleNames) throws UnableToCompleteException {
-      if (!isLegacyMode()) {
-        throw new UnsupportedOperationException();
-      }
-      for (int i = 0; i < moduleNames.length; i++) {
-        String moduleName = moduleNames[i];
-        ModuleDef moduleDef = loadModule(getLogger(), moduleName, true);
-        HostedModeBase.this.compile(getLogger(), moduleDef);
-      }
-    }
-
-    public ModuleSpaceHost createModuleSpaceHost(BrowserWidget widget,
-        final String moduleName) throws UnableToCompleteException {
-      TreeLogger logger = getLogger();
-
-      // Switch to a wait cursor.
-      //
-      Shell widgetShell = widget.getShell();
-      try {
-        Cursor waitCursor = display.getSystemCursor(SWT.CURSOR_WAIT);
-        widgetShell.setCursor(waitCursor);
-
-        // Try to find an existing loaded version of the module def.
-        //
-        ModuleDef moduleDef = loadModule(logger, moduleName, true);
-        assert (moduleDef != null);
-
-        TypeOracle typeOracle = moduleDef.getTypeOracle(logger);
-        ShellModuleSpaceHost host = doCreateShellModuleSpaceHost(logger,
-            typeOracle, moduleDef);
-        return host;
-      } finally {
-        Cursor normalCursor = display.getSystemCursor(SWT.CURSOR_ARROW);
-        widgetShell.setCursor(normalCursor);
-      }
-    }
-
-    public TreeLogger getLogger() {
-      return getTopLogger();
-    }
-
-    public boolean initModule(String moduleName) {
-      return HostedModeBase.this.initModule(moduleName);
-    }
-
-    @Deprecated
-    public boolean isLegacyMode() {
-      return HostedModeBase.this instanceof GWTShell;
-    }
-
-    public String normalizeURL(String whatTheUserTyped) {
-      return HostedModeBase.this.normalizeURL(whatTheUserTyped);
-    }
-
-    public BrowserWidget openNewBrowserWindow()
-        throws UnableToCompleteException {
-      return HostedModeBase.this.openNewBrowserWindow();
-    }
-  }
-
   static {
     // Force ToolBase to clinit, which causes SWT stuff to happen.
     new ToolBase() {
@@ -370,20 +340,8 @@
    */
   private Set<String> alreadySeenModules = new HashSet<String>();
 
-  private BrowserWidgetHostImpl browserHost = new BrowserWidgetHostImpl();
-
-  private final List<Shell> browserShells = new ArrayList<Shell>();
-
-  /**
-   * Use the default display; constructing a new one would make instantiating
-   * multiple GWTShells fail with a mysterious exception.
-   */
-  private final Display display = Display.getDefault();
-
   private boolean headlessMode = false;
 
-  private ShellMainWindow mainWnd;
-
   private boolean started;
 
   public HostedModeBase() {
@@ -397,46 +355,20 @@
     options.addStartupURL(url);
   }
 
-  public final void closeAllBrowserWindows() {
-    while (!browserShells.isEmpty()) {
-      browserShells.get(0).dispose();
-    }
-  }
+  public abstract void closeAllBrowserWindows();
 
   public final int getPort() {
     return options.getPort();
   }
 
-  public TreeLogger getTopLogger() {
-    return mainWnd.getLogger();
-  }
+  public abstract TreeLogger getTopLogger();
 
-  public final boolean hasBrowserWindowsOpen() {
-    if (browserShells.isEmpty()) {
-      return false;
-    } else {
-      return true;
-    }
-  }
+  public abstract boolean hasBrowserWindowsOpen();
 
   /**
    * Launch the arguments as Urls in separate windows.
    */
-  public void launchStartupUrls(final TreeLogger logger) {
-    // Launch a browser window for each startup url.
-    String startupURL = "";
-    try {
-      for (String prenormalized : options.getStartupURLs()) {
-        startupURL = normalizeURL(prenormalized);
-        logger.log(TreeLogger.TRACE, "Starting URL: " + startupURL, null);
-        BrowserWidget bw = openNewBrowserWindow();
-        bw.go(startupURL);
-      }
-    } catch (UnableToCompleteException e) {
-      logger.log(TreeLogger.ERROR,
-          "Unable to open new window for startup URL: " + startupURL, null);
-    }
-  }
+  public abstract void launchStartupUrls(final TreeLogger logger);
 
   public final String normalizeURL(String unknownUrlText) {
     if (unknownUrlText.indexOf(":") != -1) {
@@ -462,39 +394,6 @@
   }
 
   /**
-   * Called directly by ShellMainWindow and indirectly via BrowserWidgetHost.
-   */
-  public final BrowserWidget openNewBrowserWindow()
-      throws UnableToCompleteException {
-    boolean succeeded = false;
-    Shell s = createTrackedBrowserShell();
-    try {
-      BrowserWidget bw = PlatformSpecific.createBrowserWidget(getTopLogger(),
-          s, browserHost);
-
-      if (mainWnd != null) {
-        Rectangle r = mainWnd.getShell().getBounds();
-        int n = browserShells.size() + 1;
-        s.setBounds(r.x + n * 50, r.y + n * 50, 800, 600);
-      } else {
-        s.setSize(800, 600);
-      }
-
-      if (!isHeadless()) {
-        s.open();
-      }
-
-      bw.onFirstShown();
-      succeeded = true;
-      return bw;
-    } finally {
-      if (!succeeded) {
-        s.dispose();
-      }
-    }
-  }
-
-  /**
    * Sets up all the major aspects of running the shell graphically, including
    * creating the main window and optionally starting the embedded Tomcat
    * server.
@@ -585,18 +484,11 @@
 
   protected abstract int doStartUpServer();
 
-  protected final BrowserWidgetHost getBrowserHost() {
-    return browserHost;
-  }
-
   protected String getHost() {
     return "localhost";
   }
 
-  protected void initializeLogger() {
-    final AbstractTreeLogger logger = mainWnd.getLogger();
-    logger.setMaxDetail(options.getLogLevel());
-  }
+  protected abstract void initializeLogger();
 
   /**
    * Called from a selection script as it begins to load in hosted mode. This
@@ -638,36 +530,13 @@
     return moduleDef;
   }
 
-  protected boolean notDone() {
-    if (!mainWnd.isDisposed()) {
-      return true;
-    }
-    if (!browserShells.isEmpty()) {
-      return true;
-    }
-    return false;
-  }
+  protected abstract void loadRequiredNativeLibs();
 
-  protected void openAppWindow() {
-    final Shell shell = new Shell(display);
+  protected abstract boolean notDone();
 
-    FillLayout fillLayout = new FillLayout();
-    fillLayout.marginWidth = 0;
-    fillLayout.marginHeight = 0;
-    shell.setLayout(fillLayout);
+  protected abstract void openAppWindow();
 
-    shell.setImages(ShellMainWindow.getIcons());
-
-    boolean checkForUpdates = doShouldCheckForUpdates();
-
-    mainWnd = new ShellMainWindow(this, shell, options.isNoServer() ? 0
-        : getPort(), checkForUpdates);
-
-    shell.setSize(700, 600);
-    if (!isHeadless()) {
-      shell.open();
-    }
-  }
+  protected abstract void processEvents() throws Exception;
 
   protected final void pumpEventLoop() {
     TreeLogger logger = getTopLogger();
@@ -676,9 +545,7 @@
     //
     while (notDone()) {
       try {
-        if (!display.readAndDispatch()) {
-          sleep();
-        }
+        processEvents();
       } catch (Throwable e) {
         String msg = e.getMessage();
         msg = (msg != null ? msg : e.getClass().getName());
@@ -698,10 +565,6 @@
     doShutDownServer();
   }
 
-  protected void sleep() {
-    display.sleep();
-  }
-
   protected final boolean startUp() {
     if (started) {
       throw new IllegalStateException("Startup code has already been run");
@@ -713,8 +576,6 @@
       return false;
     }
 
-    startupHook();
-
     if (!options.isNoServer()) {
       int resultPort = doStartUpServer();
       if (resultPort < 0) {
@@ -725,45 +586,4 @@
 
     return true;
   }
-
-  /**
-   * Hook for subclasses to initialize things after the window and logger are
-   * initialized but before the embedded server is started.
-   */
-  protected void startupHook() {
-  }
-
-  private Shell createTrackedBrowserShell() {
-    final Shell shell = new Shell(display);
-    FillLayout fillLayout = new FillLayout();
-    fillLayout.marginWidth = 0;
-    fillLayout.marginHeight = 0;
-    shell.setLayout(fillLayout);
-    browserShells.add(shell);
-    shell.addDisposeListener(new DisposeListener() {
-      public void widgetDisposed(DisposeEvent e) {
-        if (e.widget == shell) {
-          browserShells.remove(shell);
-        }
-      }
-    });
-
-    shell.setImages(ShellMainWindow.getIcons());
-
-    return shell;
-  }
-
-  private void loadRequiredNativeLibs() {
-    String libName = null;
-    try {
-      libName = "swt";
-      Library.loadLibrary(libName);
-    } catch (UnsatisfiedLinkError e) {
-      StringBuffer sb = new StringBuffer();
-      sb.append("Unable to load required native library '" + libName + "'");
-      sb.append("\n\tPlease specify the JVM startup argument ");
-      sb.append("\"-Djava.library.path\"");
-      throw new RuntimeException(sb.toString(), e);
-    }
-  }
 }
diff --git a/dev/core/src/com/google/gwt/dev/SwtHostedModeBase.java b/dev/core/src/com/google/gwt/dev/SwtHostedModeBase.java
new file mode 100644
index 0000000..bda5243
--- /dev/null
+++ b/dev/core/src/com/google/gwt/dev/SwtHostedModeBase.java
@@ -0,0 +1,265 @@
+/*
+ * 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.dev;
+
+import com.google.gwt.core.ext.TreeLogger;
+import com.google.gwt.core.ext.UnableToCompleteException;
+import com.google.gwt.core.ext.typeinfo.TypeOracle;
+import com.google.gwt.dev.cfg.ModuleDef;
+import com.google.gwt.dev.shell.BrowserWidget;
+import com.google.gwt.dev.shell.BrowserWidgetHost;
+import com.google.gwt.dev.shell.ModuleSpaceHost;
+import com.google.gwt.dev.shell.PlatformSpecific;
+import com.google.gwt.dev.shell.ShellMainWindow;
+import com.google.gwt.dev.shell.ShellModuleSpaceHost;
+import com.google.gwt.dev.util.log.AbstractTreeLogger;
+import com.google.gwt.util.tools.ToolBase;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.internal.Library;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * The main executable class for hosted mode shells based on SWT.
+ */
+abstract class SwtHostedModeBase extends HostedModeBase {
+
+  private class SwtBrowserWidgetHostImpl extends BrowserWidgetHostImpl {
+
+    @Override
+    public ModuleSpaceHost createModuleSpaceHost(BrowserWidget widget,
+        final String moduleName) throws UnableToCompleteException {
+      TreeLogger logger = getLogger();
+
+      // Switch to a wait cursor.
+      //
+      Shell widgetShell = widget.getShell();
+      try {
+        Cursor waitCursor = display.getSystemCursor(SWT.CURSOR_WAIT);
+        widgetShell.setCursor(waitCursor);
+
+        // Try to find an existing loaded version of the module def.
+        //
+        ModuleDef moduleDef = loadModule(logger, moduleName, true);
+        assert (moduleDef != null);
+
+        TypeOracle typeOracle = moduleDef.getTypeOracle(logger);
+        ShellModuleSpaceHost host = doCreateShellModuleSpaceHost(logger,
+            typeOracle, moduleDef);
+        return host;
+      } finally {
+        Cursor normalCursor = display.getSystemCursor(SWT.CURSOR_ARROW);
+        widgetShell.setCursor(normalCursor);
+      }
+    }
+  }
+
+  static {
+    // Force ToolBase to clinit, which causes SWT stuff to happen.
+    new ToolBase() {
+    };
+    // Correct menu on Mac OS X
+    Display.setAppName("GWT");
+  }
+
+  private BrowserWidgetHostImpl browserHost = new SwtBrowserWidgetHostImpl();
+
+  private final List<Shell> browserShells = new ArrayList<Shell>();
+
+  /**
+   * Use the default display; constructing a new one would make instantiating
+   * multiple GWTShells fail with a mysterious exception.
+   */
+  private final Display display = Display.getDefault();
+
+  private ShellMainWindow mainWnd;
+
+  public SwtHostedModeBase() {
+    super();
+  }
+
+  @Override
+  public final void closeAllBrowserWindows() {
+    while (!browserShells.isEmpty()) {
+      browserShells.get(0).dispose();
+    }
+  }
+
+  @Override
+  public TreeLogger getTopLogger() {
+    return mainWnd.getLogger();
+  }
+
+  @Override
+  public final boolean hasBrowserWindowsOpen() {
+    if (browserShells.isEmpty()) {
+      return false;
+    } else {
+      return true;
+    }
+  }
+
+  /**
+   * Launch the arguments as Urls in separate windows.
+   */
+  @Override
+  public void launchStartupUrls(final TreeLogger logger) {
+    // Launch a browser window for each startup url.
+    String startupURL = "";
+    try {
+      for (String prenormalized : options.getStartupURLs()) {
+        startupURL = normalizeURL(prenormalized);
+        logger.log(TreeLogger.TRACE, "Starting URL: " + startupURL, null);
+        BrowserWidget bw = openNewBrowserWindow();
+        bw.go(startupURL);
+      }
+    } catch (UnableToCompleteException e) {
+      logger.log(TreeLogger.ERROR,
+          "Unable to open new window for startup URL: " + startupURL, null);
+    }
+  }
+
+  /**
+   * Called directly by ShellMainWindow and indirectly via BrowserWidgetHost.
+   */
+  public final BrowserWidget openNewBrowserWindow()
+      throws UnableToCompleteException {
+    boolean succeeded = false;
+    Shell s = createTrackedBrowserShell();
+    try {
+      BrowserWidget bw = PlatformSpecific.createBrowserWidget(getTopLogger(),
+          s, browserHost);
+
+      if (mainWnd != null) {
+        Rectangle r = mainWnd.getShell().getBounds();
+        int n = browserShells.size() + 1;
+        s.setBounds(r.x + n * 50, r.y + n * 50, 800, 600);
+      } else {
+        s.setSize(800, 600);
+      }
+
+      if (!isHeadless()) {
+        s.open();
+      }
+
+      bw.onFirstShown();
+      succeeded = true;
+      return bw;
+    } finally {
+      if (!succeeded) {
+        s.dispose();
+      }
+    }
+  }
+
+  protected final BrowserWidgetHost getBrowserHost() {
+    return browserHost;
+  }
+
+  @Override
+  protected void initializeLogger() {
+    final AbstractTreeLogger logger = mainWnd.getLogger();
+    logger.setMaxDetail(options.getLogLevel());
+  }
+
+  @Override
+  protected void loadRequiredNativeLibs() {
+    String libName = null;
+    try {
+      libName = "swt";
+      Library.loadLibrary(libName);
+    } catch (UnsatisfiedLinkError e) {
+      StringBuffer sb = new StringBuffer();
+      sb.append("Unable to load required native library '" + libName + "'");
+      sb.append("\n\tPlease specify the JVM startup argument ");
+      sb.append("\"-Djava.library.path\"");
+      throw new RuntimeException(sb.toString(), e);
+    }
+  }
+
+  @Override
+  protected boolean notDone() {
+    if (!mainWnd.isDisposed()) {
+      return true;
+    }
+    if (!browserShells.isEmpty()) {
+      return true;
+    }
+    return false;
+  }
+
+  @Override
+  protected void openAppWindow() {
+    final Shell shell = new Shell(display);
+
+    FillLayout fillLayout = new FillLayout();
+    fillLayout.marginWidth = 0;
+    fillLayout.marginHeight = 0;
+    shell.setLayout(fillLayout);
+
+    shell.setImages(ShellMainWindow.getIcons());
+
+    boolean checkForUpdates = doShouldCheckForUpdates();
+
+    mainWnd = new ShellMainWindow(this, shell, options.isNoServer() ? 0
+        : getPort(), checkForUpdates);
+
+    shell.setSize(700, 600);
+    if (!isHeadless()) {
+      shell.open();
+    }
+  }
+
+  @Override
+  protected void processEvents() throws Exception {
+    if (!display.readAndDispatch()) {
+      sleep();
+    }
+  }
+
+  protected void sleep() {
+    display.sleep();
+  }
+
+  private Shell createTrackedBrowserShell() {
+    final Shell shell = new Shell(display);
+    FillLayout fillLayout = new FillLayout();
+    fillLayout.marginWidth = 0;
+    fillLayout.marginHeight = 0;
+    shell.setLayout(fillLayout);
+    browserShells.add(shell);
+    shell.addDisposeListener(new DisposeListener() {
+      public void widgetDisposed(DisposeEvent e) {
+        if (e.widget == shell) {
+          browserShells.remove(shell);
+        }
+      }
+    });
+
+    shell.setImages(ShellMainWindow.getIcons());
+
+    return shell;
+  }
+}
diff --git a/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java b/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java
index f5a77bd..e2653a1 100644
--- a/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java
+++ b/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java
@@ -48,7 +48,7 @@
 
   static class AnonymousClassVisitor extends EmptyVisitor {
     /*
-     * array of classNames of inner clases that aren't synthetic.
+     * array of classNames of inner clases that aren't synthetic classes.
      */
     List<String> classNames = new ArrayList<String>();
 
diff --git a/dev/core/src/com/google/gwt/dev/javac/GeneratedClassnameComparator.java b/dev/core/src/com/google/gwt/dev/javac/GeneratedClassnameComparator.java
index e7280b2..bdd642f 100644
--- a/dev/core/src/com/google/gwt/dev/javac/GeneratedClassnameComparator.java
+++ b/dev/core/src/com/google/gwt/dev/javac/GeneratedClassnameComparator.java
@@ -17,6 +17,16 @@
 
 import java.util.Comparator;
 
+/**
+ * Comparator to sort the compiler-generated classNames so that they can be
+ * correlated. Examples of sorting orders by the comparator:
+ * 
+ * <pre>
+ * <ul>
+ * <li> Foo$1 < Foo$2 < Foo$3 < ... < Foo$10
+ * <li> Foo$1 < Foo$2 < Foo$1$1 < Foo$1$2 < Foo$2$1 < Foo$2$2 < Foo$2$Baz
+ * </pre>
+ */
 class GeneratedClassnameComparator implements Comparator<String> {
 
   public int compare(String arg0, String arg1) {
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java b/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java
index d401d5e..5f85a48 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java
@@ -170,6 +170,9 @@
        * would pull in the clinit of that class, which has initializers for all
        * the class literals, which in turn have all of the strings of all of the
        * class names.
+       * 
+       * TODO: Model ClassLiteral access a different way to avoid special magic.
+       * See Pruner.transformToNullFieldRef()/transformToNullMethodCall().
        */
       JField field = x.getField();
       rescue(field);
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java b/dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java
index a948c56..44b85f4 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java
@@ -34,9 +34,11 @@
 import com.google.gwt.dev.jjs.ast.JModVisitor;
 import com.google.gwt.dev.jjs.ast.JNode;
 import com.google.gwt.dev.jjs.ast.JParameter;
+import com.google.gwt.dev.jjs.ast.JPrimitiveType;
 import com.google.gwt.dev.jjs.ast.JProgram;
 import com.google.gwt.dev.jjs.ast.JReferenceType;
 import com.google.gwt.dev.jjs.ast.JType;
+import com.google.gwt.dev.jjs.ast.JVariable;
 import com.google.gwt.dev.jjs.ast.JVariableRef;
 import com.google.gwt.dev.jjs.ast.js.JMultiExpression;
 import com.google.gwt.dev.jjs.ast.js.JsniFieldRef;
@@ -47,8 +49,10 @@
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.Stack;
 
 /**
  * Remove globally unreferenced classes, interfaces, methods, parameters, and
@@ -71,12 +75,19 @@
 public class Pruner {
 
   /**
-   * Remove assignments to pruned fields, locals and params. Also nullify the
-   * return type of methods declared to return a globally uninstantiable type.
+   * Remove assignments to pruned fields, locals and params. Nullify the return
+   * type of methods declared to return a globally uninstantiable type. Replace
+   * references to pruned variables and methods by references to the null field
+   * and null method, and drop assignments to pruned variables.
    */
   private class CleanupRefsVisitor extends JModVisitor {
+    private Stack<JExpression> lValues = new Stack<JExpression>();
     private final Map<JMethod, ArrayList<JParameter>> methodToOriginalParamsMap;
     private final Set<? extends JNode> referencedNonTypes;
+    {
+      // Initialize a sentinel value to avoid having to check for empty stack.
+      lValues.push(null);
+    }
 
     public CleanupRefsVisitor(Set<? extends JNode> referencedNodes,
         Map<JMethod, ArrayList<JParameter>> methodToOriginalParamsMap) {
@@ -88,10 +99,11 @@
     public void endVisit(JBinaryOperation x, Context ctx) {
       // The LHS of assignments may have been pruned.
       if (x.getOp() == JBinaryOperator.ASG) {
+        lValues.pop();
         JExpression lhs = x.getLhs();
         if (lhs instanceof JVariableRef) {
           JVariableRef variableRef = (JVariableRef) lhs;
-          if (!referencedNonTypes.contains(variableRef.getTarget())) {
+          if (isVariablePruned(variableRef.getTarget())) {
             // TODO: better null tracking; we might be missing some NPEs here.
             JExpression replacement = makeReplacementForAssignment(
                 x.getSourceInfo(), variableRef, x.getRhs());
@@ -103,8 +115,9 @@
 
     @Override
     public void endVisit(JDeclarationStatement x, Context ctx) {
+      lValues.pop();
       // The variable may have been pruned.
-      if (!referencedNonTypes.contains(x.getVariableRef().getTarget())) {
+      if (isVariablePruned(x.getVariableRef().getTarget())) {
         JExpression replacement = makeReplacementForAssignment(
             x.getSourceInfo(), x.getVariableRef(), x.getInitializer());
         ctx.replaceMe(replacement.makeStatement());
@@ -112,6 +125,20 @@
     }
 
     @Override
+    public void endVisit(JFieldRef x, Context ctx) {
+      // Handle l-values at a higher level.
+      if (lValues.peek() == x) {
+        return;
+      }
+
+      if (isPruned(x.getField())) {
+        // The field is gone; replace x by a null field reference.
+        JFieldRef fieldRef = transformToNullFieldRef(x, program);
+        ctx.replaceMe(fieldRef);
+      }
+    }
+
+    @Override
     public void endVisit(JMethod x, Context ctx) {
       JType type = x.getType();
       if (type instanceof JReferenceType) {
@@ -125,6 +152,16 @@
     public void endVisit(JMethodCall x, Context ctx) {
       JMethod method = x.getTarget();
 
+      // Is the method pruned entirely?
+      if (isPruned(method)) {
+        /*
+         * We assert that method must be non-static, otherwise it would have
+         * been rescued.
+         */
+        ctx.replaceMe(transformToNullMethodCall(x, program));
+        return;
+      }
+
       // Did we prune the parameters of the method we're calling?
       if (methodToOriginalParamsMap.containsKey(method)) {
         // This must be a static method
@@ -176,7 +213,7 @@
 
     @Override
     public void endVisit(JsniFieldRef x, Context ctx) {
-      if (isUninstantiable(x.getField())) {
+      if (isPruned(x.getField())) {
         String ident = x.getIdent();
         JField nullField = program.getNullField();
         program.jsniMap.put(ident, nullField);
@@ -190,7 +227,7 @@
     @Override
     public void endVisit(JsniMethodRef x, Context ctx) {
       // Redirect JSNI refs to uninstantiable types to the null method.
-      if (isUninstantiable(x.getTarget())) {
+      if (isPruned(x.getTarget())) {
         String ident = x.getIdent();
         JMethod nullMethod = program.getNullMethod();
         program.jsniMap.put(ident, nullMethod);
@@ -200,13 +237,36 @@
       }
     }
 
-    private <T extends HasEnclosingType & CanBeStatic> boolean isUninstantiable(
-        T node) {
+    @Override
+    public boolean visit(JBinaryOperation x, Context ctx) {
+      if (x.getOp() == JBinaryOperator.ASG) {
+        lValues.push(x.getLhs());
+      }
+      return true;
+    }
+
+    @Override
+    public boolean visit(JDeclarationStatement x, Context ctx) {
+      lValues.push(x.getVariableRef());
+      return true;
+    }
+
+    private <T extends HasEnclosingType & CanBeStatic> boolean isPruned(T node) {
+      if (!referencedNonTypes.contains(node)) {
+        return true;
+      }
       JReferenceType enclosingType = node.getEnclosingType();
       return !node.isStatic() && enclosingType != null
           && !program.typeOracle.isInstantiatedType(enclosingType);
     }
 
+    private boolean isVariablePruned(JVariable variable) {
+      if (variable instanceof JField) {
+        return isPruned((JField) variable);
+      }
+      return !referencedNonTypes.contains(variable);
+    }
+
     private JExpression makeReplacementForAssignment(SourceInfo info,
         JVariableRef variableRef, JExpression rhs) {
       // Replace with a multi, which may wind up empty.
@@ -221,7 +281,7 @@
         }
       }
 
-      // If there is an initializer, evaluate it second.
+      // If there is an rhs, evaluate it second.
       if (rhs != null) {
         multi.exprs.add(rhs);
       }
@@ -439,6 +499,96 @@
     return new Pruner(program, noSpecialTypes).execImpl();
   }
 
+  /**
+   * Transform a reference to a pruned instance field into a reference to the
+   * null field, which will be used to replace <code>x</code>.
+   */
+  public static JFieldRef transformToNullFieldRef(JFieldRef x, JProgram program) {
+    JExpression instance = x.getInstance();
+
+    /*
+     * We assert that field must be non-static if it's an rvalue, otherwise it
+     * would have been rescued.
+     */
+    // assert !x.getField().isStatic();
+    /*
+     * HACK HACK HACK: ControlFlowAnalyzer has special hacks for dealing with
+     * ClassLiterals, which causes the body of ClassLiteralHolder's clinit to
+     * never be rescured. This in turn causes invalid references to static
+     * methods, which violates otherwise good assumptions about compiler
+     * operation.
+     * 
+     * TODO: Remove this when ControlFlowAnalyzer doesn't special-case
+     * CLH.clinit().
+     */
+    if (x.getField().isStatic() && instance == null) {
+      instance = program.getLiteralNull();
+    }
+
+    assert instance != null;
+    if (!instance.hasSideEffects()) {
+      instance = program.getLiteralNull();
+    }
+
+    JFieldRef fieldRef = new JFieldRef(program, x.getSourceInfo(), instance,
+        program.getNullField(), x.getEnclosingType(), primitiveTypeOrNullType(
+            program, x.getType()));
+    return fieldRef;
+  }
+
+  /**
+   * Transform a call to a pruned instance method (or static impl) into a call
+   * to the null method, which will be used to replace <code>x</code>.
+   */
+  public static JMethodCall transformToNullMethodCall(JMethodCall x,
+      JProgram program) {
+    JExpression instance = x.getInstance();
+    List<JExpression> args = x.getArgs();
+    if (program.isStaticImpl(x.getTarget())) {
+      instance = args.get(0);
+      args = args.subList(1, args.size());
+    } else {
+      /*
+       * We assert that method must be non-static, otherwise it would have been
+       * rescued.
+       */
+      // assert !x.getTarget().isStatic();
+      /*
+       * HACK HACK HACK: ControlFlowAnalyzer has special hacks for dealing with
+       * ClassLiterals, which causes the body of ClassLiteralHolder's clinit to
+       * never be rescured. This in turn causes invalid references to static
+       * methods, which violates otherwise good assumptions about compiler
+       * operation.
+       * 
+       * TODO: Remove this when ControlFlowAnalyzer doesn't special-case
+       * CLH.clinit().
+       */
+      if (x.getTarget().isStatic() && instance == null) {
+        instance = program.getLiteralNull();
+      }
+    }
+    assert (instance != null);
+    if (!instance.hasSideEffects()) {
+      instance = program.getLiteralNull();
+    }
+
+    JMethodCall newCall = new JMethodCall(program, x.getSourceInfo(), instance,
+        program.getNullMethod(), primitiveTypeOrNullType(program, x.getType()));
+    // Retain the original arguments, they will be evaluated for side effects.
+    newCall.getArgs().addAll(args);
+    return newCall;
+  }
+
+  /**
+   * Return the smallest type that is is a subtype of the argument.
+   */
+  static JType primitiveTypeOrNullType(JProgram program, JType type) {
+    if (type instanceof JPrimitiveType) {
+      return type;
+    }
+    return program.getTypeNull();
+  }
+
   private final JProgram program;
   private final boolean saveCodeGenTypes;
 
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java b/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java
index 749bd5a..ac9815c 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java
@@ -38,7 +38,6 @@
 import com.google.gwt.dev.jjs.ast.JNullType;
 import com.google.gwt.dev.jjs.ast.JParameter;
 import com.google.gwt.dev.jjs.ast.JParameterRef;
-import com.google.gwt.dev.jjs.ast.JPrimitiveType;
 import com.google.gwt.dev.jjs.ast.JProgram;
 import com.google.gwt.dev.jjs.ast.JReferenceType;
 import com.google.gwt.dev.jjs.ast.JReturnStatement;
@@ -110,14 +109,13 @@
               x.getField(), x.getEnclosingType());
           ctx.replaceMe(fieldRef);
         }
-      } else if (!isStatic && instance.getType() == typeNull) {
+      } else if (!isStatic && instance.getType() == typeNull
+          && x.getField() != program.getNullField()) {
+        // Change any dereference of null to use the null field
         if (!instance.hasSideEffects()) {
           instance = program.getLiteralNull();
         }
-        JFieldRef fieldRef = new JFieldRef(program, x.getSourceInfo(),
-            instance, program.getNullField(), null,
-            primitiveTypeOrNullType(x.getType()));
-        ctx.replaceMe(fieldRef);
+        ctx.replaceMe(Pruner.transformToNullFieldRef(x, program));
       }
     }
 
@@ -137,38 +135,14 @@
           ctx.replaceMe(newCall);
         }
       } else if (!isStatic && instance.getType() == typeNull) {
-        // bind null instance calls to the null method
-        if (!instance.hasSideEffects()) {
-          instance = program.getLiteralNull();
-        }
-        JMethodCall newCall = new JMethodCall(program, x.getSourceInfo(),
-            instance, program.getNullMethod(),
-            primitiveTypeOrNullType(x.getType()));
-        ctx.replaceMe(newCall);
+        ctx.replaceMe(Pruner.transformToNullMethodCall(x, program));
       } else if (isStaticImpl && method.params.size() > 0
           && method.params.get(0).isThis() && x.getArgs().size() > 0
           && x.getArgs().get(0).getType() == typeNull) {
         // bind null instance calls to the null method for static impls
-        instance = x.getArgs().get(0);
-        if (!instance.hasSideEffects()) {
-          instance = program.getLiteralNull();
-        }
-        JMethodCall newCall = new JMethodCall(program, x.getSourceInfo(),
-            instance, program.getNullMethod(),
-            primitiveTypeOrNullType(x.getType()));
-        ctx.replaceMe(newCall);
+        ctx.replaceMe(Pruner.transformToNullMethodCall(x, program));
       }
     }
-
-    /**
-     * Return the smallest type that is is a subtype of the argument.
-     */
-    private JType primitiveTypeOrNullType(JType type) {
-      if (type instanceof JPrimitiveType) {
-        return type;
-      }
-      return program.getTypeNull();
-    }
   }
 
   /**
diff --git a/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java b/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
index 6097117..f963fb0 100644
--- a/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
+++ b/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
@@ -255,7 +255,6 @@
    * Rescans the associated paths to recompute the available resources.
    * 
    * @param logger status and error details are written here
-   * @throws UnableToCompleteException
    */
   public void refresh(TreeLogger logger) {
     TreeLogger refreshBranch = Messages.REFRESHING_RESOURCES.branch(logger,
@@ -263,7 +262,8 @@
 
     /*
      * Allocate fresh data structures in anticipation of needing to honor the
-     * "new identity for the collections if anything changes" guarantee.
+     * "new identity for the collections if anything changes" guarantee. Use a
+     * LinkedHashMap because we do not want the order to change.
      */
     final Map<String, AbstractResource> newInternalMap = new LinkedHashMap<String, AbstractResource>();
 
diff --git a/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java b/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
index d5c86f2..90e5ebe 100644
--- a/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
+++ b/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
@@ -791,7 +791,7 @@
        * find it on disk. Typically this is a synthetic class added by the
        * compiler.
        */
-      if (shouldLoadClassFromDisk(className)) {
+      if (typeHasCompilationUnit(className) && isClassnameGenerated(className)) {
         /*
          * modification time = 0 ensures that whatever is on the disk is always
          * loaded.
@@ -825,9 +825,8 @@
   }
 
   /**
-   * Returns the compilationUnit corresponding to the className.
-   * <p>
-   * Not considering classnames where a $ sign appears.
+   * Returns the compilationUnit corresponding to the className. For nested
+   * classes, the unit corresponding to the top level type is returned.
    */
   private CompilationUnit getUnitForClassName(String className) {
     String mainTypeName = className;
@@ -848,14 +847,10 @@
     shellJavaScriptHost.createNativeMethods(logger, unit.getJsniMethods(), this);
   }
 
-  private boolean isBaseClassInGwt(String className) {
+  private boolean typeHasCompilationUnit(String className) {
     return getUnitForClassName(className) != null;
   }
 
-  private boolean shouldLoadClassFromDisk(String className) {
-    return isBaseClassInGwt(className) && isClassnameGenerated(className);
-  }
-
   /**
    * Tricky one, this. Reaches over into this modules's JavaScriptHost class and
    * sets its static 'host' field to our module space.
diff --git a/dev/core/test/com/google/gwt/dev/resource/impl/AbstractResourceOrientedTestBase.java b/dev/core/test/com/google/gwt/dev/resource/impl/AbstractResourceOrientedTestBase.java
index 5871c12..489e571 100644
--- a/dev/core/test/com/google/gwt/dev/resource/impl/AbstractResourceOrientedTestBase.java
+++ b/dev/core/test/com/google/gwt/dev/resource/impl/AbstractResourceOrientedTestBase.java
@@ -132,12 +132,14 @@
   }
 
   protected void assertPathIncluded(Set<AbstractResource> resources, String path) {
-    assertNotNull(findResourceWithPath(resources, path));
+    assertNotNull("path = " + path + " should have been found in resources = "
+        + resources, findResourceWithPath(resources, path));
   }
 
   protected void assertPathNotIncluded(Set<AbstractResource> resources,
       String path) {
-    assertNull(findResourceWithPath(resources, path));
+    assertNull("path = " + path + " should not have been found in resources = "
+        + resources, findResourceWithPath(resources, path));
   }
 
   protected File findJarDirectory(String name) throws URISyntaxException {
diff --git a/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplTest.java b/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplTest.java
index c6fe7e0..46e166d 100644
--- a/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplTest.java
+++ b/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplTest.java
@@ -25,6 +25,7 @@
 import java.io.InputStreamReader;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -59,9 +60,9 @@
   }
 
   private static class ResourceOracleSnapshot {
-    private final Set<Resource> resources;
-    private final Map<String, Resource> resourceMap;
     private final Set<String> pathNames;
+    private final Map<String, Resource> resourceMap;
+    private final Set<Resource> resources;
 
     public ResourceOracleSnapshot(ResourceOracleImpl oracle) {
       resources = oracle.getResources();
@@ -127,6 +128,34 @@
     }
   }
 
+  /**
+   * Test that ResourceOracleImpl preserves the order in which the same logical
+   * resource is occurs in multiple ClassPathEntries.
+   * 
+   * @throws URISyntaxException
+   * @throws IOException
+   */
+  public void testClassPathOrderIsHonored() throws IOException,
+      URISyntaxException {
+    TreeLogger logger = createTestTreeLogger();
+    ClassPathEntry cpe1jar = getClassPathEntry1AsJar();
+    ClassPathEntry cpe2jar = getClassPathEntry2AsJar();
+
+    ClassPathEntry[] cp12 = new ClassPathEntry[] {cpe1jar, cpe2jar};
+    ClassPathEntry[] cp21 = new ClassPathEntry[] {cpe2jar, cpe1jar};
+    String resKeyNormal = "org/example/bar/client/BarClient2.txt";
+    String resKeyReroot = "/BarClient2.txt";
+    PathPrefix pathPrefixNormal = new PathPrefix("org/example/bar/client",
+        null, false);
+    PathPrefix pathPrefixReroot = new PathPrefix("org/example/bar/client",
+        null, true);
+
+    testClassPathOrderIsHonored(logger, resKeyNormal, cp12, pathPrefixNormal);
+    testClassPathOrderIsHonored(logger, resKeyReroot, cp12, pathPrefixReroot);
+    testClassPathOrderIsHonored(logger, resKeyNormal, cp21, pathPrefixNormal);
+    testClassPathOrderIsHonored(logger, resKeyReroot, cp21, pathPrefixReroot);
+  }
+
   public void testNoClassPathEntries() {
     TreeLogger logger = createTestTreeLogger();
     ResourceOracleImpl oracle = createResourceOracle(new MOCK_CPE0());
@@ -139,7 +168,6 @@
    * 
    * @throws URISyntaxException
    * @throws IOException
-   * @throws UnableToCompleteException
    */
   public void testReadingResource() throws IOException, URISyntaxException {
     ClassPathEntry cpe1jar = getClassPathEntry1AsJar();
@@ -229,9 +257,6 @@
   /**
    * Creates an array of class path entries, setting up each one with a
    * well-known set of client prefixes.
-   * 
-   * @param entries
-   * @return
    */
   private ResourceOracleImpl createResourceOracle(ClassPathEntry... entries) {
     PathPrefixSet pps = new PathPrefixSet();
@@ -255,14 +280,22 @@
     return new ResourceOracleSnapshot(oracle);
   }
 
+  private void testClassPathOrderIsHonored(TreeLogger logger,
+      String resourceKey, ClassPathEntry[] classPath, PathPrefix pathPrefix) {
+    PathPrefixSet pps = new PathPrefixSet();
+    pps.add(pathPrefix);
+    ResourceOracleImpl oracle = new ResourceOracleImpl(Arrays.asList(classPath));
+    oracle.setPathPrefixes(pps);
+    ResourceOracleSnapshot s = refreshAndSnapshot(logger, oracle);
+    s.assertPathIncluded(resourceKey, classPath[0]);
+  }
+
   private void testReadingResource(ClassPathEntry cpe1, ClassPathEntry cpe2)
       throws IOException {
     TreeLogger logger = createTestTreeLogger();
 
     ResourceOracleImpl oracle = createResourceOracle(cpe1, cpe2);
-
-    oracle.refresh(logger);
-    ResourceOracleSnapshot s = new ResourceOracleSnapshot(oracle);
+    ResourceOracleSnapshot s = refreshAndSnapshot(logger, oracle);
     s.assertCollectionsConsistent(9);
     s.assertPathIncluded("com/google/gwt/user/client/Command.java", cpe1);
     s.assertPathIncluded("com/google/gwt/i18n/client/Messages.java", cpe2);
@@ -440,8 +473,7 @@
       /*
        * Baseline assumptions about the set of resources present by default.
        */
-      oracle.refresh(logger);
-      ResourceOracleSnapshot s = new ResourceOracleSnapshot(oracle);
+      ResourceOracleSnapshot s = refreshAndSnapshot(logger, oracle);
       s.assertPathIncluded("com/google/gwt/user/client/Command.java", cpe1);
       s.assertPathIncluded("com/google/gwt/user/client/Timer.java", cpe1);
     }
@@ -454,8 +486,7 @@
       /*
        * Ensure that the dups have the effect we expect.
        */
-      oracle.refresh(logger);
-      ResourceOracleSnapshot s = new ResourceOracleSnapshot(oracle);
+      ResourceOracleSnapshot s = refreshAndSnapshot(logger, oracle);
       s.assertPathIncluded("com/google/gwt/user/client/Command.java", cpe0);
       s.assertPathIncluded("com/google/gwt/user/client/Timer.java", cpe1);
     }
diff --git a/dev/oophm/overlay/com/google/gwt/dev/GWTShell.java b/dev/oophm/overlay/com/google/gwt/dev/GWTShell.java
index 9bd08a6..aed5b6c 100644
--- a/dev/oophm/overlay/com/google/gwt/dev/GWTShell.java
+++ b/dev/oophm/overlay/com/google/gwt/dev/GWTShell.java
@@ -42,30 +42,39 @@
 import com.google.gwt.util.tools.ArgHandlerString;
 
 import java.awt.Cursor;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
 import java.io.File;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.net.URL;
-import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.IdentityHashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
 import javax.swing.ImageIcon;
 import javax.swing.JFrame;
 import javax.swing.JTabbedPane;
+import javax.swing.WindowConstants;
 
 /**
  * The main executable class for the hosted mode shell.
  */
+@SuppressWarnings("deprecation")
+@Deprecated
 public class GWTShell extends HostedModeBase {
 
   /**
    * Handles the -portHosted command line flag.
    */
-  protected class ArgHandlerPortHosted extends ArgHandlerString {
+  protected static class ArgHandlerPortHosted extends ArgHandlerString {
+
+    private final OptionPortHosted options;
+
+    public ArgHandlerPortHosted(OptionPortHosted options) {
+      this.options = options;
+    }
 
     @Override
     public String[] getDefaultArgs() {
@@ -90,13 +99,12 @@
     @Override
     public boolean setString(String value) {
       if (value.equals("auto")) {
-        portHosted = 0;
+        options.setPortHosted(0);
       } else {
         try {
-          portHosted = Integer.parseInt(value);
+          options.setPortHosted(Integer.parseInt(value));
         } catch (NumberFormatException e) {
-          String msg = "A port must be an integer or \"auto\"";
-          getTopLogger().log(TreeLogger.ERROR, msg, null);
+          System.err.println("A port must be an integer or \"auto\"");
           return false;
         }
       }
@@ -144,6 +152,7 @@
         registerHandler(new ArgHandlerStartupURLsExtra(options));
       }
       registerHandler(new ArgHandlerOutDir(options));
+      registerHandler(new ArgHandlerPortHosted(options));
     }
 
     @Override
@@ -152,13 +161,20 @@
     }
   }
 
+  interface OptionPortHosted {
+    int getPortHosted();
+
+    void setPortHosted(int portHosted);
+  }
+
   /**
    * Concrete class to implement all shell options.
    */
   static class ShellOptionsImpl extends HostedModeBaseOptionsImpl implements
-      HostedModeBaseOptions, WorkDirs, LegacyCompilerOptions {
+      HostedModeBaseOptions, WorkDirs, LegacyCompilerOptions, OptionPortHosted {
     private int localWorkers;
     private File outDir;
+    private int portHosted;
 
     public File getCompilerOutputDir(ModuleDef moduleDef) {
       return new File(getOutDir(), moduleDef.getName());
@@ -172,6 +188,10 @@
       return outDir;
     }
 
+    public int getPortHosted() {
+      return portHosted;
+    }
+
     public File getShellPublicGenDir(ModuleDef moduleDef) {
       return new File(getShellBaseWorkDir(moduleDef), "public");
     }
@@ -188,9 +208,14 @@
     public void setOutDir(File outDir) {
       this.outDir = outDir;
     }
+
+    public void setPortHosted(int port) {
+      portHosted = port;
+    }
   }
 
   private class BrowserWidgetHostImpl implements BrowserWidgetHost {
+    private TreeLogger logger;
     private Map<ModuleSpaceHost, ModulePanel> moduleTabs = new IdentityHashMap<ModuleSpaceHost, ModulePanel>();
 
     public BrowserWidgetHostImpl() {
@@ -217,14 +242,14 @@
     public ModuleSpaceHost createModuleSpaceHost(TreeLogger mainLogger,
         String moduleName, String userAgent, String remoteSocket)
         throws UnableToCompleteException {
+      logger = mainLogger;
       TreeLogger.Type maxLevel = TreeLogger.INFO;
       if (mainLogger instanceof AbstractTreeLogger) {
         maxLevel = ((AbstractTreeLogger) mainLogger).getMaxDetail();
       }
 
-      TreeLogger logger;
       ModulePanel tab;
-      if (!headlessMode) {
+      if (!isHeadless()) {
         tab = new ModulePanel(maxLevel, moduleName, userAgent, remoteSocket,
             tabs);
         logger = tab.getLogger();
@@ -233,7 +258,6 @@
         frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
       } else {
         tab = null;
-        logger = mainLogger;
       }
 
       try {
@@ -252,16 +276,18 @@
           moduleTabs.put(host, tab);
         }
         return host;
-
+      } catch (RuntimeException e) {
+        logger.log(TreeLogger.ERROR, "Exception initializing module", e);
+        throw e;
       } finally {
-        if (!headlessMode) {
+        if (!isHeadless()) {
           frame.setCursor(Cursor.getDefaultCursor());
         }
       }
     }
 
     public TreeLogger getLogger() {
-      return getTopLogger();
+      return logger;
     }
 
     public String normalizeURL(String whatTheUserTyped) {
@@ -370,8 +396,6 @@
 
   protected BrowserListener listener;
 
-  protected File outDir;
-
   /**
    * Hiding super field because it's actually the same object, just with a
    * stronger type.
@@ -379,6 +403,8 @@
   @SuppressWarnings("hiding")
   protected final ShellOptionsImpl options = (ShellOptionsImpl) super.options;
 
+  protected File outDir;
+
   /**
    * Cheat on the first load's refresh by assuming the module loaded by
    * {@link com.google.gwt.dev.shell.GWTShellServlet} is still fresh. This
@@ -391,57 +417,46 @@
 
   private JFrame frame;
 
-  private File genDir;
-
-  private boolean headlessMode = false;
+  private volatile boolean mainWindowClosed;
 
   private ShellMainWindow mainWnd;
 
-  private int portHosted;
-
-  private boolean runTomcat = true;
-
-  private final List<String> startupUrls = new ArrayList<String>();
-
   private JTabbedPane tabs;
 
   private AbstractTreeLogger topLogger;
 
   private WebServerPanel webServerLog;
 
-  public File getGenDir() {
-    return genDir;
+  @Override
+  public void closeAllBrowserWindows() {
   }
 
-  public Type getLogLevel() {
-    return options.getLogLevel();
-  }
-
-  public File getOutDir() {
-    return outDir;
-  }
-
+  @Override
   public TreeLogger getTopLogger() {
     return topLogger;
   }
 
+  @Override
+  public boolean hasBrowserWindowsOpen() {
+    return false;
+  }
+
   /**
    * Launch the arguments as Urls in separate windows.
    */
+  @Override
   public void launchStartupUrls(final TreeLogger logger) {
-    if (startupUrls != null) {
-      // Launch a browser window for each startup url.
-      String startupURL = "";
-      try {
-        for (String prenormalized : startupUrls) {
-          startupURL = normalizeURL(prenormalized);
-          logger.log(TreeLogger.INFO, "Starting URL: " + startupURL, null);
-          launchURL(startupURL);
-        }
-      } catch (UnableToCompleteException e) {
-        logger.log(TreeLogger.ERROR,
-            "Unable to open new window for startup URL: " + startupURL, null);
+    ensureOophmListener();
+    String startupURL = "";
+    try {
+      for (String prenormalized : options.getStartupURLs()) {
+        startupURL = normalizeURL(prenormalized);
+        logger.log(TreeLogger.INFO, "Starting URL: " + startupURL, null);
+        launchURL(startupURL);
       }
+    } catch (UnableToCompleteException e) {
+      logger.log(TreeLogger.ERROR,
+          "Unable to open new window for startup URL: " + startupURL, null);
     }
   }
 
@@ -472,20 +487,8 @@
     }
   }
 
-  public void setCompilerOptions(CompilerOptions options) {
-    this.options.copyFrom(options);
-  }
-
-  public void setGenDir(File genDir) {
-    this.genDir = genDir;
-  }
-
-  public void setLogLevel(Type level) {
-    options.setLogLevel(level);
-  }
-
-  public void setOutDir(File outDir) {
-    this.outDir = outDir;
+  public BrowserWidget openNewBrowserWindow() throws UnableToCompleteException {
+    throw new UnableToCompleteException();
   }
 
   @Override
@@ -498,12 +501,13 @@
    * def programmatically in some cases (this is needed for JUnit support, for
    * example).
    */
-  @SuppressWarnings("deprecation")
+  @Override
   protected void compile(TreeLogger logger, ModuleDef moduleDef)
       throws UnableToCompleteException {
     LegacyCompilerOptions newOptions = new GWTCompilerOptionsImpl(options);
-    newOptions.addModuleName(moduleDef.getName());
-    new GWTCompiler(newOptions).run(logger);
+    if (!new GWTCompiler(newOptions).run(logger, moduleDef)) {
+      // TODO(jat): error dialog?
+    }
   }
 
   @Override
@@ -511,6 +515,7 @@
     return new ShellOptionsImpl();
   }
 
+  @Override
   protected ArtifactAcceptor doCreateArtifactAcceptor(final ModuleDef module) {
     return new ArtifactAcceptor() {
       public void accept(TreeLogger logger, ArtifactSet artifacts)
@@ -542,6 +547,7 @@
   /**
    * Derived classes can override to prevent automatic update checking.
    */
+  @Override
   protected boolean doShouldCheckForUpdates() {
     return true;
   }
@@ -554,10 +560,20 @@
   }
 
   @Override
+  protected boolean doStartup() {
+    if (super.doStartup()) {
+      // Accept connections from OOPHM clients
+      ensureOophmListener();
+      return true;
+    }
+    return false;
+  }
+
+  @Override
   protected int doStartUpServer() {
     // TODO(bruce): make tomcat work in terms of the modular launcher
-    String whyFailed = EmbeddedTomcatServer.start(getTopLogger(), getPort(),
-        options);
+    String whyFailed = EmbeddedTomcatServer.start(isHeadless() ? getTopLogger()
+        : webServerLog.getLogger(), getPort(), options);
 
     // TODO(bruce): test that we can remove this old approach in favor of
     // a better, logger-based error reporting
@@ -568,13 +584,7 @@
     return EmbeddedTomcatServer.getPort();
   }
 
-  /**
-   * Derived classes can override to set a default port.
-   */
-  protected ArgHandlerPortHosted getArgHandlerPortHosted() {
-    return new ArgHandlerPortHosted();
-  }
-
+  @Override
   protected void initializeLogger() {
     if (mainWnd != null) {
       topLogger = mainWnd.getLogger();
@@ -595,6 +605,17 @@
     return false;
   }
 
+  @Override
+  protected void loadRequiredNativeLibs() {
+    // no native libraries are needed with OOPHM
+  }
+
+  @Override
+  protected synchronized boolean notDone() {
+    return !mainWindowClosed;
+  }
+
+  @Override
   protected void openAppWindow() {
     ImageIcon gwtIcon = loadImageIcon("icon24.png");
     frame = new JFrame("GWT Hosted Mode");
@@ -602,68 +623,38 @@
     boolean checkForUpdates = doShouldCheckForUpdates();
     mainWnd = new ShellMainWindow(this, checkForUpdates, options.getLogLevel());
     tabs.addTab("Hosted Mode", gwtIcon, mainWnd, "GWT Hosted-mode");
-    if (runTomcat) {
+    if (!options.isNoServer()) {
       ImageIcon tomcatIcon = loadImageIcon("tomcat24.png");
       webServerLog = new WebServerPanel(getPort(), options.getLogLevel());
       tabs.addTab("Tomcat", tomcatIcon, webServerLog);
     }
     frame.getContentPane().add(tabs);
     frame.setSize(950, 700);
-    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+    frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+    frame.addWindowListener(new WindowAdapter() {
+      @Override
+      public void windowClosed(WindowEvent e) {
+        setMainWindowClosed();
+      }
+    });
     frame.setIconImage(loadImageIcon("icon16.png").getImage());
     frame.setVisible(true);
   }
 
-  protected void startUpHook() {
-    // Accept connections from OOPHM clients
-    startOophmListener();
+  @Override
+  protected void processEvents() throws Exception {
+    Thread.sleep(10);
   }
 
-  @SuppressWarnings("unused")
-  // TODO(jat): implement and hook into UI, this is just copied from trunk
-  private void compile() {
-    // // first, compile
-    // Set<String> keySet = new HashSet<String>();
-    // for (Map.Entry<?, ModuleSpace> entry : loadedModules.entrySet()) {
-    // ModuleSpace module = entry.getValue();
-    // keySet.add(module.getModuleName());
-    // }
-    // String[] moduleNames = Util.toStringArray(keySet);
-    // if (moduleNames.length == 0) {
-    // // A latent problem with a module.
-    // //
-    // openWebModeButton.setEnabled(false);
-    // return;
-    // }
-    // try {
-    // Cursor waitCursor = getDisplay().getSystemCursor(SWT.CURSOR_WAIT);
-    // getShell().setCursor(waitCursor);
-    // getHost().compile(moduleNames);
-    // } catch (UnableToCompleteException e) {
-    // // Already logged by callee.
-    // //
-    // MessageBox msgBox = new MessageBox(getShell(), SWT.OK
-    // | SWT.ICON_ERROR);
-    // msgBox.setText("Compilation Failed");
-    // msgBox.setMessage("Compilation failed. Please see the log in the
-    // development shell for details.");
-    // msgBox.open();
-    // return;
-    // } finally {
-    // // Restore the cursor.
-    // //
-    // Cursor normalCursor = getDisplay().getSystemCursor(SWT.CURSOR_ARROW);
-    // getShell().setCursor(normalCursor);
-    // }
-    //
-    // String locationText = location.getText();
-    //
-    // launchExternalBrowser(logger, locationText);
+  private void ensureOophmListener() {
+    if (listener == null) {
+      listener = new BrowserListener(getTopLogger(), options.getPortHosted(),
+          new OophmSessionHandler(browserHost));
+      listener.start();
+    }
   }
 
-  private void startOophmListener() {
-    listener = new BrowserListener(getTopLogger(), portHosted,
-        new OophmSessionHandler(browserHost));
-    listener.start();
+  private synchronized void setMainWindowClosed() {
+    mainWindowClosed = true;
   }
 }
diff --git a/dev/oophm/overlay/com/google/gwt/dev/shell/ShellMainWindow.java b/dev/oophm/overlay/com/google/gwt/dev/shell/ShellMainWindow.java
index 8ad16e3..e150a1f 100644
--- a/dev/oophm/overlay/com/google/gwt/dev/shell/ShellMainWindow.java
+++ b/dev/oophm/overlay/com/google/gwt/dev/shell/ShellMainWindow.java
@@ -29,6 +29,7 @@
 
 /**
  */
+@SuppressWarnings("deprecation")
 public class ShellMainWindow extends JPanel {
 
   private SwingLoggerPanel logWindow;
diff --git a/dev/oophm/src/com/google/gwt/dev/ModulePanel.java b/dev/oophm/src/com/google/gwt/dev/ModulePanel.java
index 0104690..3fd457c 100644
--- a/dev/oophm/src/com/google/gwt/dev/ModulePanel.java
+++ b/dev/oophm/src/com/google/gwt/dev/ModulePanel.java
@@ -113,8 +113,10 @@
       tabs.addTab(shortModuleName, browserIcon, this, moduleName + " from "
           + remoteSocket + " on " + userAgent);
     }
-    logger.log(TreeLogger.INFO, "Request for module " + moduleName
-        + " by user agent '" + userAgent + "' from " + remoteSocket);
+    TreeLogger branch = logger.branch(TreeLogger.INFO, "Request for module "
+        + moduleName);
+    branch.log(TreeLogger.INFO, "User agent: " + userAgent);
+    branch.log(TreeLogger.INFO, "Remote host: " + remoteSocket);
   }
 
   public void disconnect() {
diff --git a/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannelServer.java b/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannelServer.java
index c6bc775..13fc1ac 100644
--- a/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannelServer.java
+++ b/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannelServer.java
@@ -144,7 +144,7 @@
       moduleName = message.getModuleName();
       userAgent = message.getUserAgent();
       Thread.currentThread().setName(
-          "Hosting " + moduleName + " for" + userAgent);
+          "Hosting " + moduleName + " for " + userAgent);
       logger = handler.loadModule(logger, this, moduleName, userAgent);
       try {
         // send LoadModule response
diff --git a/dev/oophm/src/com/google/gwt/dev/shell/OophmSessionHandler.java b/dev/oophm/src/com/google/gwt/dev/shell/OophmSessionHandler.java
index 4753048..2c1896b 100644
--- a/dev/oophm/src/com/google/gwt/dev/shell/OophmSessionHandler.java
+++ b/dev/oophm/src/com/google/gwt/dev/shell/OophmSessionHandler.java
@@ -172,7 +172,7 @@
       // that can go wrong trying to load a module, including Error-derived
       // things like NoClassDefFoundError.
       // 
-      logger.log(TreeLogger.ERROR, "Failure to load module '" + moduleName
+      logger.log(TreeLogger.ERROR, "Failed to load module '" + moduleName
           + "' from user agent '" + userAgent + "' at "
           + channel.getRemoteEndpoint(), e);
     }
diff --git a/distro-source/linux/src/applicationCreator b/distro-source/linux/src/webAppCreator
similarity index 68%
rename from distro-source/linux/src/applicationCreator
rename to distro-source/linux/src/webAppCreator
index f60fa07..91c4613 100755
--- a/distro-source/linux/src/applicationCreator
+++ b/distro-source/linux/src/webAppCreator
@@ -1,3 +1,3 @@
 #!/bin/sh
 HOMEDIR=`dirname $0`;
-java -cp $HOMEDIR/gwt-user.jar:$HOMEDIR/gwt-dev-linux.jar com.google.gwt.user.tools.ApplicationCreator "$@";
+java -cp $HOMEDIR/gwt-user.jar:$HOMEDIR/gwt-dev-linux.jar com.google.gwt.user.tools.WebAppCreator "$@";
diff --git a/distro-source/mac/src/applicationCreator b/distro-source/mac/src/webAppCreator
similarity index 69%
rename from distro-source/mac/src/applicationCreator
rename to distro-source/mac/src/webAppCreator
index 20802f2..c7fee75 100644
--- a/distro-source/mac/src/applicationCreator
+++ b/distro-source/mac/src/webAppCreator
@@ -1,3 +1,3 @@
 #!/bin/sh
 HOMEDIR=`dirname $0`;
-java -cp $HOMEDIR/gwt-user.jar:$HOMEDIR/gwt-dev-mac.jar com.google.gwt.user.tools.ApplicationCreator "$@";
+java -cp $HOMEDIR/gwt-user.jar:$HOMEDIR/gwt-dev-mac.jar com.google.gwt.user.tools.WebAppCreator "$@";
diff --git a/distro-source/windows/src/applicationCreator.cmd b/distro-source/windows/src/webAppCreator.cmd
similarity index 61%
rename from distro-source/windows/src/applicationCreator.cmd
rename to distro-source/windows/src/webAppCreator.cmd
index 94cb899..b16d7a8 100755
--- a/distro-source/windows/src/applicationCreator.cmd
+++ b/distro-source/windows/src/webAppCreator.cmd
@@ -1 +1 @@
-@java -cp "%~dp0\gwt-user.jar;%~dp0\gwt-dev-windows.jar" com.google.gwt.user.tools.ApplicationCreator %*
+@java -cp "%~dp0\gwt-user.jar;%~dp0\gwt-dev-windows.jar" com.google.gwt.user.tools.WebAppCreator %*
diff --git a/eclipse/dev/linux/.classpath b/eclipse/dev/linux/.classpath
index 4b09998..c1f7556 100644
--- a/eclipse/dev/linux/.classpath
+++ b/eclipse/dev/linux/.classpath
@@ -29,6 +29,7 @@
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/naming-factory-1.0.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/naming-java-1.0.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/naming-resources-1.0.jar"/>
+	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/servlet-api-2.5.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/servlet-api-2.4.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/servlets-common-1.0.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/servlets-default-1.0.jar"/>
diff --git a/eclipse/dev/mac/.classpath b/eclipse/dev/mac/.classpath
index 3832d9a..2cdc104 100644
--- a/eclipse/dev/mac/.classpath
+++ b/eclipse/dev/mac/.classpath
@@ -29,6 +29,7 @@
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/naming-factory-1.0.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/naming-java-1.0.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/naming-resources-1.0.jar"/>
+	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/servlet-api-2.5.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/servlet-api-2.4.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/servlets-common-1.0.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/servlets-default-1.0.jar"/>
diff --git a/eclipse/samples/DynaTable2/.checkstyle b/eclipse/dev/oophm/.checkstyle
similarity index 80%
rename from eclipse/samples/DynaTable2/.checkstyle
rename to eclipse/dev/oophm/.checkstyle
index 0f1cbd9..51cfb6f 100644
--- a/eclipse/samples/DynaTable2/.checkstyle
+++ b/eclipse/dev/oophm/.checkstyle
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<fileset-config file-format-version="1.2.0" simple-config="true">
+<fileset-config file-format-version="1.2.0" simple-config="false">
     <fileset name="all" enabled="true" check-config-name="GWT Checks" local="false">
         <file-match-pattern match-pattern="." include-pattern="true"/>
     </fileset>
diff --git a/eclipse/dev/windows/.classpath b/eclipse/dev/windows/.classpath
index 70fc175..13b6e3f 100644
--- a/eclipse/dev/windows/.classpath
+++ b/eclipse/dev/windows/.classpath
@@ -29,6 +29,7 @@
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/naming-factory-1.0.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/naming-java-1.0.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/naming-resources-1.0.jar"/>
+	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/servlet-api-2.5.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/servlet-api-2.4.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/servlets-common-1.0.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/servlets-default-1.0.jar"/>
diff --git a/eclipse/samples/DynaTable2/.classpath b/eclipse/samples/DynaTable2/.classpath
deleted file mode 100644
index 85b7671..0000000
--- a/eclipse/samples/DynaTable2/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="core/src"/>
-	<classpathentry kind="src" output="war" path="core/src.war"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/gwt-user"/>
-	<classpathentry kind="output" path="war/WEB-INF/classes"/>
-</classpath>
diff --git a/eclipse/samples/DynaTable2/.project b/eclipse/samples/DynaTable2/.project
deleted file mode 100644
index e8b7c7e..0000000
--- a/eclipse/samples/DynaTable2/.project
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>DynaTable2</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
-	</natures>
-	<linkedResources>
-		<link>
-			<name>core</name>
-			<type>2</type>
-			<locationURI>GWT_ROOT/samples/dynatable2</locationURI>
-		</link>
-	</linkedResources>
-</projectDescription>
diff --git a/eclipse/samples/DynaTable2/DynaTable2 compile.launch b/eclipse/samples/DynaTable2/DynaTable2 compile.launch
deleted file mode 100644
index 7313ae5..0000000
--- a/eclipse/samples/DynaTable2/DynaTable2 compile.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/gwt-dev-windows/core/src/com/google/gwt/dev/Compiler.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; javaProject=&quot;DynaTable2&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/DynaTable2/core/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/gwt-user/core/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/gwt-user/core/super&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/gwt-dev-windows/core/super&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.jdt.launching.classpathentry.defaultClasspath&quot;&gt;&#13;&#10;&lt;memento exportedEntriesOnly=&quot;false&quot; project=&quot;DynaTable2&quot;/&gt;&#13;&#10;&lt;/runtimeClasspathEntry&gt;&#13;&#10;"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.Compiler"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-style PRETTY&#13;&#10;com.google.gwt.sample.dynatable2.DynaTable2"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DynaTable2"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea&#13;&#10;-Xmx256M&#13;&#10;-Dgwt.devjar=${gwt_devjar}"/>
-</launchConfiguration>
diff --git a/eclipse/samples/DynaTable2/DynaTable2 hosted.launch b/eclipse/samples/DynaTable2/DynaTable2 hosted.launch
deleted file mode 100644
index 21d67c1..0000000
--- a/eclipse/samples/DynaTable2/DynaTable2 hosted.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/DynaTable2"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; javaProject=&quot;DynaTable2&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/DynaTable2/core/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/gwt-user/core/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/gwt-user/core/super&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/gwt-dev-windows/core/super&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.jdt.launching.classpathentry.defaultClasspath&quot;&gt;&#13;&#10;&lt;memento exportedEntriesOnly=&quot;false&quot; project=&quot;DynaTable2&quot;/&gt;&#13;&#10;&lt;/runtimeClasspathEntry&gt;&#13;&#10;"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.HostedMode"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-style PRETTY&#13;&#10;-startupUrl DynaTable2.html&#13;&#10;com.google.gwt.sample.dynatable2.DynaTable2"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DynaTable2"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea&#13;&#10;-Xmx256M&#13;&#10;-Dgwt.devjar=${gwt_devjar}"/>
-</launchConfiguration>
diff --git a/eclipse/samples/DynaTable2/DynaTable2 server.launch b/eclipse/samples/DynaTable2/DynaTable2 server.launch
deleted file mode 100644
index c2f361d..0000000
--- a/eclipse/samples/DynaTable2/DynaTable2 server.launch
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/DynaTable2"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; javaProject=&quot;DynaTable2&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GWT_TOOLS/lib/jetty/jetty-6.1.11.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#13;&#10;"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.mortbay.jetty.Main"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="8888 -webapp war"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DynaTable2"/>
-</launchConfiguration>
diff --git a/eclipse/samples/DynaTable2/build.xml b/eclipse/samples/DynaTable2/build.xml
deleted file mode 100644
index b49d710..0000000
--- a/eclipse/samples/DynaTable2/build.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-<project name="dynatable2" default="build" basedir=".">
-  <property name="gwt.install" location="../../../build/lib" />
-  <property name="outdir" location="war" />
-  <property name="extradir" location="extra" />
-
-  <target name="javac" description="Compile project to WEB-INF/classes">
-    <mkdir dir="${outdir}/WEB-INF/classes" />
-    <javac srcdir="../../../samples/dynatable/src"
-        destdir="${outdir}/WEB-INF/classes"
-        debug="true"
-        debuglevel="lines,vars,source"
-        source="1.5"
-        target="1.5"
-        nowarn="true"
-        encoding="utf-8">
-      <classpath>
-        <pathelement location="${gwt.install}/gwt-user.jar" />
-        <pathelement location="${gwt.install}/gwt-dev-windows.jar" />
-      </classpath>
-    </javac>
-  </target>
-
-  <target name="deploy" depends="gwtc" description="Copy output to the war folder">
-    <mkdir dir="${outdir}/WEB-INF/lib" />
-    <copy todir="${outdir}/WEB-INF/lib" file="${gwt.install}/gwt-servlet.jar" />
-  </target>
-
-  <target name="gwtc" depends="javac" description="Compile to JavaScript">
-    <java classname="com.google.gwt.dev.GWTCompiler" fork="yes" failonerror="true">
-      <jvmarg value="-Xmx256M"/>
-      <arg value="-out" />
-      <arg file="${outdir}" />
-      <arg value="-extra" />
-      <arg file="${extradir}" />
-      <arg value="com.google.gwt.sample.dynatable.DynaTable2" />
-      <classpath>
-        <pathelement location="../../../samples/dynatable/src" />
-        <pathelement location="${outdir}/WEB-INF/classes" />
-        <pathelement location="${gwt.install}/gwt-user.jar" />
-        <pathelement location="${gwt.install}/gwt-dev-windows.jar" />
-      </classpath>
-    </java>
-  </target>
-
-  <target name="server" depends="deploy" description="Run the deployed app in a Jetty server">
-    <echo message="PLEASE BROWSE TO: http://localhost:8888/DynaTable2.html"/>
-    <java classname="org.mortbay.jetty.Main" fork="yes">
-      <arg value="8888" />
-      <arg value="-webapp" />
-      <arg file="${outdir}" />
-      <classpath>
-        <pathelement location="${gwt.install}/gwt-dev-windows.jar" />
-      </classpath>
-    </java>
-  </target>
-
-  <target name="shell" depends="javac" description="Run the deployed app in GWT hosted mode">
-    <java classname="com.google.gwt.dev.GWTHosted" fork="yes" failonerror="true">
-      <jvmarg value="-Xmx256M"/>
-      <jvmarg value="-Dgwt.devjar=C:\gwt\releases\1.6\build\staging\gwt-windows-0.0.0\gwt-dev-windows.jar"/>
-      <arg value="-out" />
-      <arg file="${outdir}" />
-      <arg value="-extra" />
-      <arg file="${extradir}" />
-      <arg value="-startupUrl" />
-      <arg value="DynaTable2.html" />
-      <arg value="com.google.gwt.sample.dynatable.DynaTable2" />
-      <classpath>
-        <pathelement location="../../../samples/dynatable/src" />
-        <pathelement location="${outdir}/WEB-INF/classes" />
-        <pathelement location="${gwt.install}/gwt-user.jar" />
-        <pathelement location="${gwt.install}/gwt-dev-windows.jar" />
-      </classpath>
-    </java>
-  </target>
-
-  <target name="build" depends="javac, gwtc, deploy" description="Build this project" />
-
-  <target name="clean" description="Cleans this project's intermediate and output files">
-    <delete dir="${outdir}/WEB-INF/classes" failonerror="false" />
-    <delete dir="${outdir}/gwtc" failonerror="false" />
-    <delete dir="${extradir}" failonerror="false" />
-  </target>
-</project>
diff --git a/eclipse/samples/DynaTable2/war/DynaTable2.css b/eclipse/samples/DynaTable2/war/DynaTable2.css
deleted file mode 100644
index ab81abf..0000000
--- a/eclipse/samples/DynaTable2/war/DynaTable2.css
+++ /dev/null
@@ -1,85 +0,0 @@
-
-body {
-  background-color: white;
-  color: black;
-  font-family: Arial, sans-serif;
-  font-size: small;
-  margin: 8px;
-  margin-top: 3px;
-}
-
-.DynaTable-DynaTableWidget {
-	width: 100%;
-	border: 1px solid #ACA899;
-}
-
-
-.DynaTable-DynaTableWidget .navbar {
-	width: 100%;
-	background-color: #ECE9D8;
-	vertical-align: middle;
-	border-bottom: 1px solid #ACA899;
-}
-
-.DynaTable-DynaTableWidget .navbar button {
-	width: 3em;
-	text-align: center;
-	vertical-align: middle;
-}
-
-.DynaTable-DynaTableWidget .navbar .status {
-	vertical-align: middle;
-	padding-right: 10px;
-}
-
-.DynaTable-DynaTableWidget .table {
-	margin: 10px;
-}
-
-.DynaTable-DynaTableWidget .table td.header {
-	text-align: left;
-	font-weight: bold;
-	text-decoration: underline;
-}
-
-.DynaTable-DynaTableWidget .table td.name {
-	width: 10em;
-}
-
-.DynaTable-DynaTableWidget .table td.desc {
-	width: 20em;
-}
-
-.DynaTable-DynaTableWidget .table td.sched {
-	width: 20em;
-}
-
-.DynaTable-DynaTableWidget .table td {
-	vertical-align: top;
-}
-
-.DynaTable-DayFilterWidget {
-	margin: 3em 1em 1em 0;
-	width: 10em;
-	padding: 0px 8px 0px 8px;
-	border: 1px solid #ACA899;
-}
-
-.DynaTable-DayFilterWidget button {
-	width: 4em;
-	margin: 8px 4px 8px 4px;
-}
-
-.DynaTable-ErrorDialog {
-  border: 2px outset;
-  background-color: white;
-  width: 50%;
-}
-
-.DynaTable-ErrorDialog .Caption {
-  background-color: #C3D9FF;
-  padding: 3px;
-  margin: 2px;
-  font-weight: bold;
-  cursor: default;
-}
diff --git a/eclipse/samples/DynaTable2/war/DynaTable2.html b/eclipse/samples/DynaTable2/war/DynaTable2.html
deleted file mode 100644
index 8f29e24..0000000
--- a/eclipse/samples/DynaTable2/war/DynaTable2.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--                                                                        -->
-<!-- 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   -->
-<!-- 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. License for the specific language governing permissions and   -->
-<!-- limitations under the License.                                         -->
- 
-<html>
-  <head>
-    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-    <link type="text/css" rel="stylesheet" href="DynaTable2.css">
-    <title></title>
-  </head>
-  <body>
-  <iframe src="javascript:''" id='__gwt_historyFrame' tabIndex='-1' style='width:0;height:0;border:0'></iframe>
-	<script type="text/javascript" language='javascript' src='gwtc/dynatable.nocache.js'></script>
-    <h1>School Schedule for Professors and Students</h1>
-    <table width="100%" border="0" summary="School Schedule for Professors and Students">
-      <tr valign="top">
-        <td id="calendar" align="center" width="90%">
-        </td>
-        <td id="days" align="center" width="10%">
-        </td>
-      </tr>
-    </table>
-  </body>
-</html>
diff --git a/eclipse/samples/DynaTable2/war/WEB-INF/web.xml b/eclipse/samples/DynaTable2/war/WEB-INF/web.xml
deleted file mode 100644
index 1880c9e..0000000
--- a/eclipse/samples/DynaTable2/war/WEB-INF/web.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app>
-
-	<servlet>
-		<servlet-name>calendar</servlet-name>
-		<servlet-class>com.google.gwt.sample.dynatable.server.SchoolCalendarServiceImpl</servlet-class>
-	</servlet>
-	
-	<servlet-mapping>
-		<servlet-name>calendar</servlet-name>
-		<url-pattern>/gwtc/calendar</url-pattern>
-	</servlet-mapping>
-
-</web-app>
diff --git a/eclipse/user/.classpath b/eclipse/user/.classpath
index 8e4fa1b..60629c2 100644
--- a/eclipse/user/.classpath
+++ b/eclipse/user/.classpath
@@ -6,7 +6,7 @@
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry exported="true" kind="var" path="GWT_TOOLS/lib/apache/tapestry-util-text-4.0.2.jar" sourcepath="/GWT_TOOLS/lib/apache/tapestry-util-text-4.0.2-src.zip"/>
 	<classpathentry exported="true" kind="var" path="GWT_TOOLS/lib/junit/junit-3.8.1.jar" sourcepath="/GWT_TOOLS/lib/junit/junit-3.8.1-src.zip"/>
-	<classpathentry exported="true" kind="var" path="GWT_TOOLS/lib/tomcat/servlet-api-2.4.jar" sourcepath="/GWT_TOOLS/lib/tomcat/jakarta-tomcat-5.0.28-src.zip"/>
+	<classpathentry exported="true" kind="var" path="GWT_TOOLS/lib/tomcat/servlet-api-2.5.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/selenium/selenium-java-client-driver.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/gwt-dev-windows"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/reference/code-museum/src/com/google/gwt/museum/client/common/ControlInputPanel.java b/reference/code-museum/src/com/google/gwt/museum/client/common/ControlInputPanel.java
new file mode 100644
index 0000000..d537fb2
--- /dev/null
+++ b/reference/code-museum/src/com/google/gwt/museum/client/common/ControlInputPanel.java
@@ -0,0 +1,100 @@
+/*

+ * Copyright 2009 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.common;

+

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

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

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

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

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

+

+/**

+ * Helper class to get/set default values for visual tests.

+ */

+public class ControlInputPanel extends Composite {

+  /**

+   * Input

+   * 

+   * @param <V>

+   * @param <W>

+   */

+  public abstract static class Input<V, W extends Widget> {

+    protected String name;

+    protected V value;

+    protected W widget;

+

+    protected Input(String name, V defaultValue) {

+      this.name = name;

+      this.value = defaultValue;

+      this.widget = createInputWidget();

+    }

+

+    /**

+     * Gets the name of the input

+     * 

+     * @return the name of the input

+     */

+    public String getName() {

+      return name;

+    }

+

+    /**

+     * Gets the value of this input.

+     */

+    public abstract V getValue();

+

+    @SuppressWarnings("unchecked")

+    protected W createInputWidget() {

+      return (W) new TextBox();

+    }

+

+    protected void setValue(V value) {

+      ((HasText) widget).setText(value.toString());

+    }

+  }

+

+  /**

+   * Set/get integer value.

+   */

+

+  public static class IntegerInput extends Input<Integer, TextBox> {

+    public IntegerInput(String name, int defaultValue, ControlInputPanel p) {

+      super(name, defaultValue);

+      p.add(this);

+      widget.setText(String.valueOf(defaultValue));

+    }

+

+    @Override

+    public Integer getValue() {

+      return Integer.valueOf(widget.getText());

+    }

+  }

+

+  final FlexTable layout = new FlexTable();

+

+  private int numInputs;

+

+  public ControlInputPanel() {

+    layout.setWidth("100%");

+    initWidget(layout);

+  }

+

+  private void add(Input input) {

+    layout.setText(0, numInputs, input.getName());

+    layout.setWidget(1, numInputs, input.widget);

+  }

+}

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

+ * Copyright 2009 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.core.client.Duration;

+import com.google.gwt.event.dom.client.ClickEvent;

+import com.google.gwt.event.dom.client.ClickHandler;

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

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

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

+import com.google.gwt.museum.client.common.ControlInputPanel.IntegerInput;

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

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

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

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

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

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

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

+

+import java.util.ArrayList;

+import java.util.List;

+

+/*

+ * Originally, on IE, about three seconds to distroy

+ */

+/**

+ * Tests bad behavior for clear.

+ * 

+ * <pre>

+ * ff -- 1000 flow panels, aprox 500  millis

+ * ie -- 1000 flow panels, aprox 3000 millis

+ * 

+ * in new version

+ * ie -- 1000 flow panels, aprox 30-80 millis

+ * ff -- 1000 flow panels, aprox 13-50 millis

+ * </pre>

+ * <p>

+ * <img class='gallery' src='FlowPanel.png'/>

+ * </p>

+ */

+public class SpeedForClear extends AbstractIssue {

+  private Panel target;

+  private List<Widget> children = new ArrayList<Widget>();

+  private SimpleLogger log = new SimpleLogger();

+

+  @Override

+  public Widget createIssue() {

+    VerticalPanel v = new VerticalPanel();

+    ControlInputPanel p = new ControlInputPanel();

+    v.add(p);

+    v.add(log);

+    final IntegerInput size = new IntegerInput("flowpanel", 10, p);

+    Button create = new Button("create widget", new ClickHandler() {

+

+      public void onClick(ClickEvent event) {

+        createLargeFlowPanel(size.getValue());

+      }

+    });

+

+    Button distroy = new Button("time the removal", new ClickHandler() {

+      public void onClick(ClickEvent event) {

+        Duration d = new Duration();

+        target.clear();

+

+        log.report("Took " + d.elapsedMillis() + " milliseconds to clear "

+            + size.getValue() + " widgets from a flow panel");

+        for (Widget child : children) {

+          if (child.getElement().getPropertyString("__listener") != null) {

+            throw new IllegalStateException(

+                "each child should no longer have a listener");

+          }

+        }

+      }

+    });

+    v.add(create);

+    v.add(distroy);

+    return v;

+  }

+

+  @Override

+  public String getInstructions() {

+    return "check the speed of clear methods";

+  }

+

+  @Override

+  public String getSummary() {

+    return "clear() speed check";

+  }

+

+  @Override

+  public boolean hasCSS() {

+    return false;

+  }

+

+  private void createLargeFlowPanel(int size) {

+

+    if (target != null) {

+      target.removeFromParent();

+    }

+    target = new FlowPanel();

+

+    for (int i = 0; i < size; i++) {

+      Widget w = new Label("widget-" + i);

+      target.add(w);

+      children.add(w);

+    }

+

+    RootPanel.get().add(target);

+    for (Widget child : target) {

+      if (child.getElement().getPropertyString("__listener") == null) {

+        throw new IllegalStateException("each child should now have a listener");

+      }

+    }

+  }

+

+}

diff --git a/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/VisualsForSuggestBox.java b/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/VisualsForSuggestBox.java
index b0964e3..b7d0f78 100644
--- a/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/VisualsForSuggestBox.java
+++ b/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/VisualsForSuggestBox.java
@@ -119,7 +119,7 @@
 

   private SuggestBox suggestBoxWithDefault() {

     final SuggestBox b = new SuggestBox(girlsNamesWithDefault);

-    b.setSelectsFirstItem(false);

+    b.setAutoSelectEnabled(false);

     b.getTextBox().addMouseDownHandler(new MouseDownHandler() {

 

       public void onMouseDown(MouseDownEvent event) {

diff --git a/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/VisualsForSuggestBoxEvents.java b/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/VisualsForSuggestBoxEvents.java
index 9d1dbb6..70ab7ad 100644
--- a/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/VisualsForSuggestBoxEvents.java
+++ b/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/VisualsForSuggestBoxEvents.java
@@ -84,10 +84,10 @@
     final CheckBox selectsFirst = new CheckBox("Selects first suggestion");
     selectsFirst.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
       public void onValueChange(ValueChangeEvent<Boolean> event) {
-        b.setSelectsFirstItem(event.getValue());
+        b.setAutoSelectEnabled(event.getValue());
       }
     });
-    selectsFirst.setChecked(b.getSelectsFirstItem());
+    selectsFirst.setChecked(b.isAutoSelectEnabled());
     p.add(selectsFirst);
     final EventReporter<String, SuggestBox> handler = new EventReporter<String, SuggestBox>(
         report);
diff --git a/samples/dynatable2/build.xml b/samples/dynatable2/build.xml
deleted file mode 100644
index 00c96d6..0000000
--- a/samples/dynatable2/build.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<project name="dynatable" default="build" basedir=".">
-  <property name="sample.root" value="dynatable" />
-  <property name="sample.module" value="DynaTable" />
-  <import file="../common.ant.xml" />
-</project>
diff --git a/samples/dynatable2/src.war/DynaTable2.css b/samples/dynatable2/src.war/DynaTable2.css
deleted file mode 100644
index ab81abf..0000000
--- a/samples/dynatable2/src.war/DynaTable2.css
+++ /dev/null
@@ -1,85 +0,0 @@
-
-body {
-  background-color: white;
-  color: black;
-  font-family: Arial, sans-serif;
-  font-size: small;
-  margin: 8px;
-  margin-top: 3px;
-}
-
-.DynaTable-DynaTableWidget {
-	width: 100%;
-	border: 1px solid #ACA899;
-}
-
-
-.DynaTable-DynaTableWidget .navbar {
-	width: 100%;
-	background-color: #ECE9D8;
-	vertical-align: middle;
-	border-bottom: 1px solid #ACA899;
-}
-
-.DynaTable-DynaTableWidget .navbar button {
-	width: 3em;
-	text-align: center;
-	vertical-align: middle;
-}
-
-.DynaTable-DynaTableWidget .navbar .status {
-	vertical-align: middle;
-	padding-right: 10px;
-}
-
-.DynaTable-DynaTableWidget .table {
-	margin: 10px;
-}
-
-.DynaTable-DynaTableWidget .table td.header {
-	text-align: left;
-	font-weight: bold;
-	text-decoration: underline;
-}
-
-.DynaTable-DynaTableWidget .table td.name {
-	width: 10em;
-}
-
-.DynaTable-DynaTableWidget .table td.desc {
-	width: 20em;
-}
-
-.DynaTable-DynaTableWidget .table td.sched {
-	width: 20em;
-}
-
-.DynaTable-DynaTableWidget .table td {
-	vertical-align: top;
-}
-
-.DynaTable-DayFilterWidget {
-	margin: 3em 1em 1em 0;
-	width: 10em;
-	padding: 0px 8px 0px 8px;
-	border: 1px solid #ACA899;
-}
-
-.DynaTable-DayFilterWidget button {
-	width: 4em;
-	margin: 8px 4px 8px 4px;
-}
-
-.DynaTable-ErrorDialog {
-  border: 2px outset;
-  background-color: white;
-  width: 50%;
-}
-
-.DynaTable-ErrorDialog .Caption {
-  background-color: #C3D9FF;
-  padding: 3px;
-  margin: 2px;
-  font-weight: bold;
-  cursor: default;
-}
diff --git a/samples/dynatable2/src.war/DynaTable2.html b/samples/dynatable2/src.war/DynaTable2.html
deleted file mode 100644
index d4b8b2e..0000000
--- a/samples/dynatable2/src.war/DynaTable2.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--                                                                        -->
-<!-- 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   -->
-<!-- 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. License for the specific language governing permissions and   -->
-<!-- limitations under the License.                                         -->
- 
-<html>
-  <head>
-    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-    <link type="text/css" rel="stylesheet" href="DynaTable2.css">
-    <title></title>
-  </head>
-  <body>
-  <iframe src="javascript:''" id='__gwt_historyFrame' tabIndex='-1' style='width:0;height:0;border:0'></iframe>
-	<script type="text/javascript" language='javascript' src='dynatable2/dynatable2.nocache.js'></script>
-    <h1>School Schedule for Professors and Students</h1>
-    <table width="100%" border="0" summary="School Schedule for Professors and Students">
-      <tr valign="top">
-        <td id="calendar" align="center" width="90%">
-        </td>
-        <td id="days" align="center" width="10%">
-        </td>
-      </tr>
-    </table>
-  </body>
-</html>
diff --git a/samples/dynatable2/src.war/WEB-INF/classes/marker b/samples/dynatable2/src.war/WEB-INF/classes/marker
deleted file mode 100644
index e69de29..0000000
--- a/samples/dynatable2/src.war/WEB-INF/classes/marker
+++ /dev/null
diff --git a/samples/dynatable2/src.war/WEB-INF/web.xml b/samples/dynatable2/src.war/WEB-INF/web.xml
deleted file mode 100644
index 1feeb14..0000000
--- a/samples/dynatable2/src.war/WEB-INF/web.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app>
-
-	<servlet>
-		<servlet-name>calendar</servlet-name>
-		<servlet-class>
-			com.google.gwt.sample.dynatable2.server.SchoolCalendarServiceImpl
-		</servlet-class>
-	</servlet>
-	<servlet-mapping>
-		<servlet-name>calendar</servlet-name>
-		<url-pattern>/dynatable2/calendar</url-pattern>
-	</servlet-mapping>
-
-</web-app>
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/COPYING b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/COPYING
deleted file mode 100644
index d9a10c0..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/COPYING
+++ /dev/null
@@ -1,176 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/DynaTable2.gwt.xml b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/DynaTable2.gwt.xml
deleted file mode 100644
index 7781947..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/DynaTable2.gwt.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<!--                                                                        -->
-<!-- Copyright 2007 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   -->
-<!-- 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. License for the specific language governing permissions and   -->
-<!-- limitations under the License.                                         -->
-
-<module rename-to="dynatable2">
-	<inherits name='com.google.gwt.user.User'/>
-	<entry-point class='com.google.gwt.sample.dynatable2.client.DynaTable'/>
-	<servlet path='/calendar' class='com.google.gwt.sample.dynatable2.server.SchoolCalendarServiceImpl'/>
-</module>
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/DynaTable2Legacy.gwt.xml b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/DynaTable2Legacy.gwt.xml
deleted file mode 100644
index 85f806e..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/DynaTable2Legacy.gwt.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<!--                                                                        -->
-<!-- Copyright 2007 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   -->
-<!-- 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. License for the specific language governing permissions and   -->
-<!-- limitations under the License.                                         -->
-
-<module>
-	<inherits name='com.google.gwt.user.User'/>
-	<entry-point class='com.google.gwt.sample.dynatable2.client.DynaTable'/>
-	<servlet path='/calendar' class='com.google.gwt.sample.dynatable2.server.SchoolCalendarServiceImpl'/>
-	<public path='legacyPublic'/>
-</module>
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DayFilterWidget.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DayFilterWidget.java
deleted file mode 100644
index 7be4cd8..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DayFilterWidget.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2007 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.sample.dynatable2.client;
-
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.CheckBox;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.HasAlignment;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.Widget;
-
-/**
- * A UI Widget that allows a user to filter the days being displayed in the
- * dynamic table.
- */
-public class DayFilterWidget extends Composite {
-
-  private class DayCheckBox extends CheckBox {
-    public final int day;
-
-    public DayCheckBox(String caption, int day) {
-      super(caption);
-
-      // Remember custom data for this widget.
-      this.day = day;
-
-      // Use a shared handler to save memory.
-      addClickHandler(dayCheckBoxHandler);
-
-      // Initialize based on the calendar's current value.
-      setChecked(calendar.getDayIncluded(day));
-    }
-  }
-
-  private class DayCheckBoxHandler implements ClickHandler {
-    public void onClick(ClickEvent event) {
-      onClick((DayCheckBox) event.getSource());
-    }
-    
-    public void onClick(DayCheckBox dayCheckBox) {
-      calendar.setDayIncluded(dayCheckBox.day, dayCheckBox.isChecked());
-    }
-  }
-
-  private final SchoolCalendarWidget calendar;
-
-  private final VerticalPanel outer = new VerticalPanel();
-
-  private final DayCheckBoxHandler dayCheckBoxHandler = new DayCheckBoxHandler();
-
-  public DayFilterWidget(SchoolCalendarWidget calendar) {
-    this.calendar = calendar;
-    initWidget(outer);
-    setStyleName("DynaTable-DayFilterWidget");
-    outer.add(new DayCheckBox("Sunday", 0));
-    outer.add(new DayCheckBox("Monday", 1));
-    outer.add(new DayCheckBox("Tuesday", 2));
-    outer.add(new DayCheckBox("Wednesday", 3));
-    outer.add(new DayCheckBox("Thursday", 4));
-    outer.add(new DayCheckBox("Friday", 5));
-    outer.add(new DayCheckBox("Saturday", 6));
-
-    Button buttonAll = new Button("All", new ClickHandler() {
-      public void onClick(ClickEvent event) {
-        setAllCheckBoxes(true);
-      }
-    });
-
-    Button buttonNone = new Button("None", new ClickHandler() {
-      public void onClick(ClickEvent event) {
-        setAllCheckBoxes(false);
-      }
-    });
-
-    HorizontalPanel hp = new HorizontalPanel();
-    hp.setHorizontalAlignment(HasAlignment.ALIGN_CENTER);
-    hp.add(buttonAll);
-    hp.add(buttonNone);
-
-    outer.add(hp);
-    outer.setCellVerticalAlignment(hp, HasAlignment.ALIGN_BOTTOM);
-    outer.setCellHorizontalAlignment(hp, HasAlignment.ALIGN_CENTER);
-  }
-
-  private void setAllCheckBoxes(boolean checked) {
-    for (int i = 0, n = outer.getWidgetCount(); i < n; ++i) {
-      Widget w = outer.getWidget(i);
-      if (w instanceof DayCheckBox) {
-        ((DayCheckBox) w).setChecked(checked);
-        dayCheckBoxHandler.onClick((DayCheckBox) w);
-      }
-    }
-  }
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTable.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTable.java
deleted file mode 100644
index 41e208b..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTable.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2007 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.sample.dynatable2.client;
-
-import com.google.gwt.core.client.EntryPoint;
-import com.google.gwt.user.client.ui.RootPanel;
-
-/**
- * The entry point class which performs the initial loading of the DynaTable
- * application.
- */
-public class DynaTable implements EntryPoint {
-
-  public void onModuleLoad() {
-    // Find the slot for the calendar widget.
-    //
-    RootPanel slot = RootPanel.get("calendar");
-    if (slot != null) {
-      SchoolCalendarWidget calendar = new SchoolCalendarWidget(15);
-      slot.add(calendar);
-
-      // Find the slot for the days filter widget.
-      //
-      slot = RootPanel.get("days");
-      if (slot != null) {
-        DayFilterWidget filter = new DayFilterWidget(calendar);
-        slot.add(filter);
-      }
-    }
-  }
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTableDataProvider.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTableDataProvider.java
deleted file mode 100644
index 6875d63..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTableDataProvider.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2007 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.sample.dynatable2.client;
-
-/**
- * An interface for providing row-level updates of data, intended here to used
- * to update a DynaTableWidget.
- */
-public interface DynaTableDataProvider {
-
-  /**
-   * An interface allow a widget to accept or report failure when a row data
-   * is issued for update.
-   */
-  interface RowDataAcceptor {
-    void accept(int startRow, String[][] rows);
-    void failed(Throwable caught);
-  }
-
-  void updateRowData(int startRow, int maxRows, RowDataAcceptor acceptor);
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTableWidget.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTableWidget.java
deleted file mode 100644
index fb96245..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTableWidget.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * Copyright 2007 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.sample.dynatable2.client;
-
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.sample.dynatable2.client.DynaTableDataProvider.RowDataAcceptor;
-import com.google.gwt.user.client.rpc.InvocationException;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.DialogBox;
-import com.google.gwt.user.client.ui.DockPanel;
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.HasAlignment;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.VerticalPanel;
-
-/**
- * A composite Widget that implements the main interface for the dynamic table,
- * including the data table, status indicators, and paging buttons.
- */
-public class DynaTableWidget extends Composite {
-
-  /**
-   * A dialog box for displaying an error.
-   */
-  private static class ErrorDialog extends DialogBox implements ClickHandler {
-    private HTML body = new HTML("");
-
-    public ErrorDialog() {
-      setStylePrimaryName("DynaTable-ErrorDialog");
-      Button closeButton = new Button("Close", this);
-      VerticalPanel panel = new VerticalPanel();
-      panel.setSpacing(4);
-      panel.add(body);
-      panel.add(closeButton);
-      panel.setCellHorizontalAlignment(closeButton, VerticalPanel.ALIGN_RIGHT);
-      setWidget(panel);
-    }
-
-    public String getBody() {
-      return body.getHTML();
-    }
-
-    public void onClick(ClickEvent event) {
-      hide();
-    }
-
-    public void setBody(String html) {
-      body.setHTML(html);
-    }
-  }
-
-  private class NavBar extends Composite implements ClickHandler {
-
-    public final DockPanel bar = new DockPanel();
-    public final Button gotoFirst = new Button("&lt;&lt;", this);
-    public final Button gotoNext = new Button("&gt;", this);
-    public final Button gotoPrev = new Button("&lt;", this);
-    public final HTML status = new HTML();
-
-    public NavBar() {
-      initWidget(bar);
-      bar.setStyleName("navbar");
-      status.setStyleName("status");
-
-      HorizontalPanel buttons = new HorizontalPanel();
-      buttons.add(gotoFirst);
-      buttons.add(gotoPrev);
-      buttons.add(gotoNext);
-      bar.add(buttons, DockPanel.EAST);
-      bar.setCellHorizontalAlignment(buttons, DockPanel.ALIGN_RIGHT);
-      bar.add(status, DockPanel.CENTER);
-      bar.setVerticalAlignment(DockPanel.ALIGN_MIDDLE);
-      bar.setCellHorizontalAlignment(status, HasAlignment.ALIGN_RIGHT);
-      bar.setCellVerticalAlignment(status, HasAlignment.ALIGN_MIDDLE);
-      bar.setCellWidth(status, "100%");
-
-      // Initialize prev & first button to disabled.
-      //
-      gotoPrev.setEnabled(false);
-      gotoFirst.setEnabled(false);
-    }
-
-    public void onClick(ClickEvent event) {
-      Object source = event.getSource();
-      if (source == gotoNext) {
-        startRow += getDataRowCount();
-        refresh();
-      } else if (source == gotoPrev) {
-        startRow -= getDataRowCount();
-        if (startRow < 0) {
-          startRow = 0;
-        }
-        refresh();
-      } else if (source == gotoFirst) {
-        startRow = 0;
-        refresh();
-      }
-    }
-  }
-
-  private class RowDataAcceptorImpl implements RowDataAcceptor {
-    public void accept(int startRow, String[][] data) {
-
-      int destRowCount = getDataRowCount();
-      int destColCount = grid.getCellCount(0);
-      assert (data.length <= destRowCount) : "Too many rows";
-
-      int srcRowIndex = 0;
-      int srcRowCount = data.length;
-      int destRowIndex = 1; // skip navbar row
-      for (; srcRowIndex < srcRowCount; ++srcRowIndex, ++destRowIndex) {
-        String[] srcRowData = data[srcRowIndex];
-        assert (srcRowData.length == destColCount) : " Column count mismatch";
-        for (int srcColIndex = 0; srcColIndex < destColCount; ++srcColIndex) {
-          String cellHTML = srcRowData[srcColIndex];
-          grid.setText(destRowIndex, srcColIndex, cellHTML);
-        }
-      }
-
-      // Clear remaining table rows.
-      //
-      boolean isLastPage = false;
-      for (; destRowIndex < destRowCount + 1; ++destRowIndex) {
-        isLastPage = true;
-        for (int destColIndex = 0; destColIndex < destColCount; ++destColIndex) {
-          grid.clearCell(destRowIndex, destColIndex);
-        }
-      }
-
-      // Synchronize the nav buttons.
-      navbar.gotoNext.setEnabled(!isLastPage);
-      navbar.gotoFirst.setEnabled(startRow > 0);
-      navbar.gotoPrev.setEnabled(startRow > 0);
-
-      // Update the status message.
-      //
-      setStatusText((startRow + 1) + " - " + (startRow + srcRowCount));
-    }
-
-    public void failed(Throwable caught) {
-      setStatusText("Error");
-      if (errorDialog == null) {
-        errorDialog = new ErrorDialog();
-      }
-      if (caught instanceof InvocationException) {
-        errorDialog.setText("An RPC server could not be reached");
-        errorDialog.setBody(NO_CONNECTION_MESSAGE);
-      } else {
-        errorDialog.setText("Unexcepted Error processing remote call");
-        errorDialog.setBody(caught.getMessage());
-      }
-      errorDialog.center();
-    }
-  }
-
-  private static final String NO_CONNECTION_MESSAGE = "<p>The DynaTable example uses a <a href=\"http://code.google.com/"
-      + "webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide."
-      + "RemoteProcedureCalls.html\" target=\"_blank\">Remote Procedure Call</a> "
-      + "(RPC) to request data from the server.  In order for the RPC to "
-      + "successfully return data, the server component must be available.</p>"
-      + "<p>If you are running this demo from compiled code, the server "
-      + "component may not be available to respond to the RPC requests from "
-      + "DynaTable.  Try running DynaTable in hosted mode to see the demo "
-      + "in action.</p> "
-      + "<p>Click on the Remote Procedure Call link above for more information "
-      + "on GWT's RPC infrastructure.";
-
-  private final RowDataAcceptor acceptor = new RowDataAcceptorImpl();
-
-  private final Grid grid = new Grid();
-
-  private final NavBar navbar = new NavBar();
-
-  private ErrorDialog errorDialog = null;
-
-  private final DockPanel outer = new DockPanel();
-
-  private final DynaTableDataProvider provider;
-
-  private int startRow = 0;
-
-  public DynaTableWidget(DynaTableDataProvider provider, String[] columns,
-      String[] columnStyles, int rowCount) {
-
-    if (columns.length == 0) {
-      throw new IllegalArgumentException(
-          "expecting a positive number of columns");
-    }
-
-    if (columnStyles != null && columns.length != columnStyles.length) {
-      throw new IllegalArgumentException("expecting as many styles as columns");
-    }
-
-    this.provider = provider;
-    initWidget(outer);
-    grid.setStyleName("table");
-    outer.add(navbar, DockPanel.NORTH);
-    outer.add(grid, DockPanel.CENTER);
-    initTable(columns, columnStyles, rowCount);
-    setStyleName("DynaTable-DynaTableWidget");
-  }
-
-  public void clearStatusText() {
-    navbar.status.setHTML("&nbsp;");
-  }
-
-  public void refresh() {
-    // Disable buttons temporarily to stop the user from running off the end.
-    //
-    navbar.gotoFirst.setEnabled(false);
-    navbar.gotoPrev.setEnabled(false);
-    navbar.gotoNext.setEnabled(false);
-
-    setStatusText("Please wait...");
-    provider.updateRowData(startRow, grid.getRowCount() - 1, acceptor);
-  }
-
-  public void setRowCount(int rows) {
-    grid.resizeRows(rows);
-  }
-
-  public void setStatusText(String text) {
-    navbar.status.setText(text);
-  }
-
-  private int getDataRowCount() {
-    return grid.getRowCount() - 1;
-  }
-
-  private void initTable(String[] columns, String[] columnStyles, int rowCount) {
-    // Set up the header row. It's one greater than the number of visible rows.
-    //
-    grid.resize(rowCount + 1, columns.length);
-    for (int i = 0, n = columns.length; i < n; i++) {
-      grid.setText(0, i, columns[i]);
-      if (columnStyles != null) {
-        grid.getCellFormatter().setStyleName(0, i, columnStyles[i] + " header");
-      }
-    }
-  }
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Person.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Person.java
deleted file mode 100644
index d73702f..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Person.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2007 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.sample.dynatable2.client;
-
-import com.google.gwt.user.client.rpc.IsSerializable;
-
-/**
- * Hold relevant data for Person. This class is meant to be serialized in RPC
- * calls.
- */
-public abstract class Person implements IsSerializable {
-
-  private String description = "DESC";
-
-  private String name;
-
-  public Person() {
-  }
-
-  public String getDescription() {
-    return description;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public abstract String getSchedule(boolean[] daysFilter);
-
-  public void setDescription(String description) {
-    this.description = description;
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Professor.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Professor.java
deleted file mode 100644
index 932d188..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Professor.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2007 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.sample.dynatable2.client;
-
-/**
- * Holds relevant data for a Professor type Person. This class is intended to be
- * serialized in RPC calls.
- */
-public class Professor extends Person {
-
-  private Schedule teachingSchedule = new Schedule();
-
-  public Professor() {
-  }
-
-  @Override
-  public String getSchedule(boolean[] daysFilter) {
-    return teachingSchedule.getDescription(daysFilter);
-  }
-
-  public Schedule getTeachingSchedule() {
-    return teachingSchedule;
-  }
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Schedule.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Schedule.java
deleted file mode 100644
index ac0b40e..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Schedule.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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.sample.dynatable2.client;
-
-import com.google.gwt.user.client.rpc.IsSerializable;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Hold the relevant data for a Schedule. This class is meant to be serialized
- * in RPC calls.
- */
-public class Schedule implements IsSerializable {
-
-  private List<TimeSlot> timeSlots = new ArrayList<TimeSlot>();
-
-  public Schedule() {
-  }
-
-  public void addTimeSlot(TimeSlot timeSlot) {
-    timeSlots.add(timeSlot);
-  }
-
-  public String getDescription(boolean[] daysFilter) {
-    String s = null;
-    for (TimeSlot timeSlot : timeSlots) {
-      if (daysFilter[timeSlot.getDayOfWeek()]) {
-        if (s == null) {
-          s = timeSlot.getDescription();
-        } else {
-          s += ", " + timeSlot.getDescription();
-        }
-      }
-    }
-
-    if (s != null) {
-      return s;
-    } else {
-      return "";
-    }
-  }
-
-  @Override
-  public String toString() {
-    return getDescription(null);
-  }
-
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarService.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarService.java
deleted file mode 100644
index fee68f6..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2007 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.sample.dynatable2.client;
-
-import com.google.gwt.user.client.rpc.RemoteService;
-
-/**
- * The interface for the RPC server endpoint to get school calendar
- * information.
- */
-public interface SchoolCalendarService extends RemoteService {
-  
-  Person[] getPeople(int startIndex, int maxCount);
-  
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarServiceAsync.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarServiceAsync.java
deleted file mode 100644
index 3aa3757..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarServiceAsync.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2007 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.sample.dynatable2.client;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-/**
- * The interface for the RPC server endpoint that provides school calendar
- * information for clients that will be calling asynchronously. 
- */
-public interface SchoolCalendarServiceAsync {
-
-  void getPeople(int startIndex, int maxCount, AsyncCallback<Person[]> callback);
-
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarWidget.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarWidget.java
deleted file mode 100644
index 65e4fd2..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarWidget.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright 2007 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.sample.dynatable2.client;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.DeferredCommand;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
-import com.google.gwt.user.client.ui.Composite;
-
-/**
- * A Composite widget that abstracts a DynaTableWidget and a data provider tied
- * to the <@link SchoolCalendarService> RPC endpoint.
- */
-public class SchoolCalendarWidget extends Composite {
-
-  /**
-   * A data provider that bridges the provides row level updates from the data
-   * available through a <@link SchoolCalendarService>.
-   */
-  public class CalendarProvider implements DynaTableDataProvider {
-
-    private final SchoolCalendarServiceAsync calService;
-
-    private int lastMaxRows = -1;
-
-    private Person[] lastPeople;
-
-    private int lastStartRow = -1;
-
-    public CalendarProvider() {
-      // Initialize the service.
-      //
-      calService = (SchoolCalendarServiceAsync) GWT.create(SchoolCalendarService.class);
-
-      // By default, we assume we'll make RPCs to a servlet, but see
-      // updateRowData(). There is special support for canned RPC responses.
-      // (Which is a totally demo hack, by the way :-)
-      // 
-      ServiceDefTarget target = (ServiceDefTarget) calService;
-
-      // Use a module-relative URLs to ensure that this client code can find
-      // its way home, even when the URL changes (as might happen when you
-      // deploy this as a webapp under an external servlet container).
-      String moduleRelativeURL = GWT.getModuleBaseURL() + "calendar";
-      target.setServiceEntryPoint(moduleRelativeURL);
-    }
-
-    public void updateRowData(final int startRow, final int maxRows,
-        final RowDataAcceptor acceptor) {
-      // Check the simple cache first.
-      //
-      if (startRow == lastStartRow) {
-        if (maxRows == lastMaxRows) {
-          // Use the cached batch.
-          //
-          pushResults(acceptor, startRow, lastPeople);
-          return;
-        }
-      }
-
-      // Fetch the data remotely.
-      //
-      calService.getPeople(startRow, maxRows, new AsyncCallback<Person[]>() {
-        public void onFailure(Throwable caught) {
-          acceptor.failed(caught);
-        }
-
-        public void onSuccess(Person[] result) {
-          lastStartRow = startRow;
-          lastMaxRows = maxRows;
-          lastPeople = result;
-          pushResults(acceptor, startRow, result);
-        }
-
-      });
-    }
-
-    private void pushResults(RowDataAcceptor acceptor, int startRow,
-        Person[] people) {
-      String[][] rows = new String[people.length][];
-      for (int i = 0, n = rows.length; i < n; i++) {
-        Person person = people[i];
-        rows[i] = new String[3];
-        rows[i][0] = person.getName();
-        rows[i][1] = person.getDescription();
-        rows[i][2] = person.getSchedule(daysFilter);
-      }
-      acceptor.accept(startRow, rows);
-    }
-  }
-
-  private final CalendarProvider calProvider = new CalendarProvider();
-
-  private final boolean[] daysFilter = new boolean[] {
-      true, true, true, true, true, true, true};
-
-  private final DynaTableWidget dynaTable;
-
-  private Command pendingRefresh;
-
-  public SchoolCalendarWidget(int visibleRows) {
-    String[] columns = new String[] {"Name", "Description", "Schedule"};
-    String[] styles = new String[] {"name", "desc", "sched"};
-    dynaTable = new DynaTableWidget(calProvider, columns, styles, visibleRows);
-    initWidget(dynaTable);
-  }
-
-  protected boolean getDayIncluded(int day) {
-    return daysFilter[day];
-  }
-
-  @Override
-  protected void onLoad() {
-    dynaTable.refresh();
-  }
-
-  protected void setDayIncluded(int day, boolean included) {
-    if (daysFilter[day] == included) {
-      // No change.
-      //
-      return;
-    }
-
-    daysFilter[day] = included;
-    if (pendingRefresh == null) {
-      pendingRefresh = new Command() {
-        public void execute() {
-          pendingRefresh = null;
-          dynaTable.refresh();
-        }
-      };
-      DeferredCommand.addCommand(pendingRefresh);
-    }
-  }
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Student.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Student.java
deleted file mode 100644
index ff8d068..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Student.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2007 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.sample.dynatable2.client;
-
-/**
- * Holds relevant data for a Student type Person. This class is intended to be
- * serialized in RPC calls.
- */
-public class Student extends Person {
-
-  private Schedule classSchedule = new Schedule();
-
-  public Schedule getClassSchedule() {
-    return classSchedule;
-  }
-
-  @Override
-  public String getSchedule(boolean[] daysFilter) {
-    return classSchedule.getDescription(daysFilter);
-  }
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/TimeSlot.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/TimeSlot.java
deleted file mode 100644
index 1a0f130..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/TimeSlot.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright 2007 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.sample.dynatable2.client;
-
-import com.google.gwt.user.client.rpc.IsSerializable;
-
-/**
- * Hold relevant data for a time slot. This class is intended to be serialized
- * as part of RPC calls.
- */
-public class TimeSlot implements IsSerializable, Comparable<TimeSlot> {
-
-  private static final transient String[] DAYS = new String[] {
-      "Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"};
-
-  private int endMinutes;
-
-  private int startMinutes;
-
-  private int zeroBasedDayOfWeek;
-
-  public TimeSlot() {
-  }
-
-  public TimeSlot(int zeroBasedDayOfWeek, int startMinutes, int endMinutes) {
-    this.zeroBasedDayOfWeek = zeroBasedDayOfWeek;
-    this.startMinutes = startMinutes;
-    this.endMinutes = endMinutes;
-  }
-
-  public int compareTo(TimeSlot o) {
-    if (zeroBasedDayOfWeek < o.zeroBasedDayOfWeek) {
-      return -1;
-    } else if (zeroBasedDayOfWeek > o.zeroBasedDayOfWeek) {
-      return 1;
-    } else {
-      if (startMinutes < o.startMinutes) {
-        return -1;
-      } else if (startMinutes > o.startMinutes) {
-        return 1;
-      }
-    }
-
-    return 0;
-  }
-
-  public int getDayOfWeek() {
-    return zeroBasedDayOfWeek;
-  }
-
-  public String getDescription() {
-    return DAYS[zeroBasedDayOfWeek] + " " + getHrsMins(startMinutes) + "-"
-        + getHrsMins(endMinutes);
-  }
-
-  public int getEndMinutes() {
-    return endMinutes;
-  }
-
-  public int getStartMinutes() {
-    return startMinutes;
-  }
-
-  public void setDayOfWeek(int zeroBasedDayOfWeek) {
-    if (0 <= zeroBasedDayOfWeek && zeroBasedDayOfWeek < 7) {
-      this.zeroBasedDayOfWeek = zeroBasedDayOfWeek;
-    } else {
-      throw new IllegalArgumentException("day must be in the range 0-6");
-    }
-  }
-
-  public void setEndMinutes(int endMinutes) {
-    this.endMinutes = endMinutes;
-  }
-
-  public void setStartMinutes(int startMinutes) {
-    this.startMinutes = startMinutes;
-  }
-
-  private String getHrsMins(int mins) {
-    int hrs = mins / 60;
-    if (hrs > 12) {
-      hrs -= 12;
-    }
-
-    int remainder = mins % 60;
-
-    return hrs + ":"
-        + (remainder < 10 ? "0" + remainder : String.valueOf(remainder));
-  }
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/legacyPublic/DynaTable2Legacy.css b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/legacyPublic/DynaTable2Legacy.css
deleted file mode 100644
index ab81abf..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/legacyPublic/DynaTable2Legacy.css
+++ /dev/null
@@ -1,85 +0,0 @@
-
-body {
-  background-color: white;
-  color: black;
-  font-family: Arial, sans-serif;
-  font-size: small;
-  margin: 8px;
-  margin-top: 3px;
-}
-
-.DynaTable-DynaTableWidget {
-	width: 100%;
-	border: 1px solid #ACA899;
-}
-
-
-.DynaTable-DynaTableWidget .navbar {
-	width: 100%;
-	background-color: #ECE9D8;
-	vertical-align: middle;
-	border-bottom: 1px solid #ACA899;
-}
-
-.DynaTable-DynaTableWidget .navbar button {
-	width: 3em;
-	text-align: center;
-	vertical-align: middle;
-}
-
-.DynaTable-DynaTableWidget .navbar .status {
-	vertical-align: middle;
-	padding-right: 10px;
-}
-
-.DynaTable-DynaTableWidget .table {
-	margin: 10px;
-}
-
-.DynaTable-DynaTableWidget .table td.header {
-	text-align: left;
-	font-weight: bold;
-	text-decoration: underline;
-}
-
-.DynaTable-DynaTableWidget .table td.name {
-	width: 10em;
-}
-
-.DynaTable-DynaTableWidget .table td.desc {
-	width: 20em;
-}
-
-.DynaTable-DynaTableWidget .table td.sched {
-	width: 20em;
-}
-
-.DynaTable-DynaTableWidget .table td {
-	vertical-align: top;
-}
-
-.DynaTable-DayFilterWidget {
-	margin: 3em 1em 1em 0;
-	width: 10em;
-	padding: 0px 8px 0px 8px;
-	border: 1px solid #ACA899;
-}
-
-.DynaTable-DayFilterWidget button {
-	width: 4em;
-	margin: 8px 4px 8px 4px;
-}
-
-.DynaTable-ErrorDialog {
-  border: 2px outset;
-  background-color: white;
-  width: 50%;
-}
-
-.DynaTable-ErrorDialog .Caption {
-  background-color: #C3D9FF;
-  padding: 3px;
-  margin: 2px;
-  font-weight: bold;
-  cursor: default;
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/legacyPublic/DynaTable2Legacy.html b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/legacyPublic/DynaTable2Legacy.html
deleted file mode 100644
index 3c5887a..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/legacyPublic/DynaTable2Legacy.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--                                                                        -->
-<!-- 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   -->
-<!-- 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. License for the specific language governing permissions and   -->
-<!-- limitations under the License.                                         -->
- 
-<html>
-  <head>
-    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-    <link type="text/css" rel="stylesheet" href="DynaTable2Legacy.css">
-    <title></title>
-  </head>
-  <body>
-  <iframe src="javascript:''" id='__gwt_historyFrame' tabIndex='-1' style='width:0;height:0;border:0'></iframe>
-	<script type="text/javascript" language='javascript' src='com.google.gwt.sample.dynatable2.DynaTable2Legacy.nocache.js'></script>
-    <h1>School Schedule for Professors and Students</h1>
-    <table width="100%" border="0" summary="School Schedule for Professors and Students">
-      <tr valign="top">
-        <td id="calendar" align="center" width="90%">
-        </td>
-        <td id="days" align="center" width="10%">
-        </td>
-      </tr>
-    </table>
-  </body>
-</html>
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/server/SchoolCalendarServiceImpl.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/server/SchoolCalendarServiceImpl.java
deleted file mode 100644
index 2705edb..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/server/SchoolCalendarServiceImpl.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Copyright 2007 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.sample.dynatable2.server;
-
-import com.google.gwt.sample.dynatable2.client.Person;
-import com.google.gwt.sample.dynatable2.client.Professor;
-import com.google.gwt.sample.dynatable2.client.Schedule;
-import com.google.gwt.sample.dynatable2.client.SchoolCalendarService;
-import com.google.gwt.sample.dynatable2.client.Student;
-import com.google.gwt.sample.dynatable2.client.TimeSlot;
-import com.google.gwt.user.server.rpc.RemoteServiceServlet;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Random;
-
-/**
- * The implementation of the RPC service which runs on the server.
- */
-public class SchoolCalendarServiceImpl extends RemoteServiceServlet implements
-    SchoolCalendarService {
-
-  private static final String[] FIRST_NAMES = new String[] {
-      "Inman", "Sally", "Omar", "Teddy", "Jimmy", "Cathy", "Barney", "Fred",
-      "Eddie", "Carlos"};
-
-  private static final String[] LAST_NAMES = new String[] {
-      "Smith", "Jones", "Epps", "Gibbs", "Webber", "Blum", "Mendez",
-      "Crutcher", "Needler", "Wilson", "Chase", "Edelstein"};
-
-  private static final String[] SUBJECTS = new String[] {
-      "Chemistry", "Phrenology", "Geometry", "Underwater Basket Weaving",
-      "Basketball", "Computer Science", "Statistics", "Materials Engineering",
-      "English Literature", "Geology"};
-
-  private static final Person[] NO_PEOPLE = new Person[0];
-
-  private static final int CLASS_LENGTH_MINS = 50;
-
-  private static final int MAX_SCHED_ENTRIES = 5;
-
-  private static final int MIN_SCHED_ENTRIES = 1;
-
-  private static final int MAX_PEOPLE = 100;
-
-  private static final int STUDENTS_PER_PROF = 5;
-
-  private final List<Person> people = new ArrayList<Person>();
-
-  private final Random rnd = new Random(3);
-
-  public SchoolCalendarServiceImpl() {
-    generateRandomPeople();
-  }
-
-  public Person[] getPeople(int startIndex, int maxCount) {
-    int peopleCount = people.size();
-
-    int start = startIndex;
-    if (start >= peopleCount) {
-      return NO_PEOPLE;
-    }
-
-    int end = Math.min(startIndex + maxCount, peopleCount);
-    if (start == end) {
-      return NO_PEOPLE;
-    }
-
-    int resultCount = end - start;
-    Person[] results = new Person[resultCount];
-    for (int from = start, to = 0; to < resultCount; ++from, ++to) {
-      results[to] = people.get(from);
-    }
-
-    return results;
-  }
-
-  /**
-   * Write the serialized response out to stdout. This is a very unusual thing
-   * to do, but it allows us to create a static file version of the response
-   * without deploying a servlet.
-   */
-  @Override
-  protected void onAfterResponseSerialized(String serializedResponse) {
-    System.out.println(serializedResponse);
-  }
-
-  private void generateRandomPeople() {
-    for (int i = 0; i < MAX_PEOPLE; ++i) {
-      Person person = generateRandomPerson();
-      people.add(person);
-    }
-  }
-
-  private Person generateRandomPerson() {
-    // 1 out of every so many people is a prof.
-    //
-    if (rnd.nextInt(STUDENTS_PER_PROF) == 1) {
-      return generateRandomProfessor();
-    } else {
-      return generateRandomStudent();
-    }
-  }
-
-  private Person generateRandomProfessor() {
-    Professor prof = new Professor();
-
-    String firstName = pickRandomString(FIRST_NAMES);
-    String lastName = pickRandomString(LAST_NAMES);
-    prof.setName("Dr. " + firstName + " " + lastName);
-
-    String subject = pickRandomString(SUBJECTS);
-    prof.setDescription("Professor of " + subject);
-
-    generateRandomSchedule(prof.getTeachingSchedule());
-
-    return prof;
-  }
-
-  private void generateRandomSchedule(Schedule sched) {
-    int range = MAX_SCHED_ENTRIES - MIN_SCHED_ENTRIES + 1;
-    int howMany = MIN_SCHED_ENTRIES + rnd.nextInt(range);
-
-    TimeSlot[] timeSlots = new TimeSlot[howMany];
-
-    for (int i = 0; i < howMany; ++i) {
-      int startHrs = 8 + rnd.nextInt(9); // 8 am - 5 pm
-      int startMins = 15 * rnd.nextInt(4); // on the hour or some quarter
-      int dayOfWeek = 1 + rnd.nextInt(5); // Mon - Fri
-
-      int absStartMins = 60 * startHrs + startMins; // convert to minutes
-      int absStopMins = absStartMins + CLASS_LENGTH_MINS;
-
-      timeSlots[i] = new TimeSlot(dayOfWeek, absStartMins, absStopMins);
-    }
-
-    Arrays.sort(timeSlots);
-
-    for (int i = 0; i < howMany; ++i) {
-      sched.addTimeSlot(timeSlots[i]);
-    }
-  }
-
-  private Person generateRandomStudent() {
-    Student student = new Student();
-
-    String firstName = pickRandomString(FIRST_NAMES);
-    String lastName = pickRandomString(LAST_NAMES);
-    student.setName(firstName + " " + lastName);
-
-    String subject = pickRandomString(SUBJECTS);
-    student.setDescription("Majoring in " + subject);
-
-    generateRandomSchedule(student.getClassSchedule());
-
-    return student;
-  }
-
-  private String pickRandomString(String[] a) {
-    int i = rnd.nextInt(a.length);
-    return a[i];
-  }
-}
diff --git a/tools/api-checker/test/com/google/gwt/tools/apichecker/ApiContainerTest.java b/tools/api-checker/test/com/google/gwt/tools/apichecker/ApiContainerTest.java
index 8bba24c..90deed9 100644
--- a/tools/api-checker/test/com/google/gwt/tools/apichecker/ApiContainerTest.java
+++ b/tools/api-checker/test/com/google/gwt/tools/apichecker/ApiContainerTest.java
@@ -91,18 +91,6 @@
     return sb.toString();
   }
 
-  private static String getSourceForNewObject() {
-    StringBuffer sb = new StringBuffer();
-    sb.append("package java.lang;\n");
-    sb.append("public class Object {\n");
-    sb.append("\tpublic static class Foo extends Object{\n");
-    sb.append("\t}\n");
-    sb.append("}\n");
-    sb.append("class Temp {\n");
-    sb.append("}");
-    return sb.toString();
-  }
-
   private static String getSourceForNonApiClass() {
     StringBuffer sb = new StringBuffer();
     sb.append("package test.apicontainer;\n");
@@ -163,7 +151,7 @@
   }
 
   ApiContainer apiCheck = null;
-  ApiContainer apiCheckLoop = null;
+  AbstractTreeLogger logger = new PrintWriterTreeLogger();
 
   /**
    * Class hierarchy. public java.lang.Object -- test.apicontainer.NonApiClass
@@ -172,24 +160,43 @@
    */
   @Override
   public void setUp() throws UnableToCompleteException {
-    AbstractTreeLogger logger = new PrintWriterTreeLogger();
     logger.setMaxDetail(com.google.gwt.core.ext.TreeLogger.ERROR);
-    apiCheckLoop = new ApiContainer(
-        "ApiClassTest",
-        new HashSet<CompilationUnit>(
-            Arrays.asList(new StaticCompilationUnit[] {new StaticCompilationUnit(
-                "java.lang.Object", getSourceForNewObject()),})),
-        new HashSet<String>(), logger);
+
     apiCheck = new ApiContainer("ApiContainerTest",
         new HashSet<CompilationUnit>(Arrays.asList(getScuArray())),
         new HashSet<String>(), logger);
   }
 
+  /*
+   * Test if ApiContainer correctly creates an ApiContainer (for example, avoids
+   * an infinite loop) when a nested class extends an outer class.
+   */
+  public void testApiContainerLoop() throws UnableToCompleteException {
+    StringBuffer sb = new StringBuffer();
+    sb.append("package java.lang;\n");
+    sb.append("public class Object {\n");
+    sb.append("\tpublic static class Foo extends Object{\n");
+    sb.append("\t}\n");
+    sb.append("}\n");
+    sb.append("class Temp {\n");
+    sb.append("}");
+
+    ApiContainer apiCheckLoop = new ApiContainer(
+        "ApiClassTest",
+        new HashSet<CompilationUnit>(
+            Arrays.asList(new StaticCompilationUnit[] {new StaticCompilationUnit(
+                "java.lang.Object", sb.toString())})), new HashSet<String>(),
+        logger);
+    ApiPackage javaLangPackage = apiCheckLoop.getApiPackage("java.lang");
+    assertNotNull(javaLangPackage);
+    assertNotNull(javaLangPackage.getApiClass("java.lang.Object"));
+    assertEquals(2, javaLangPackage.getApiClassNames().size());
+  }
+
   public void testEverything() {
     checkApiClass();
     checkApiMembers();
     checkApiPackages();
-    checkInfiniteLoopInApiClass();
   }
 
   /**
@@ -271,11 +278,4 @@
     assertNotNull(apiCheck.getApiPackage("test.apicontainer"));
     assertEquals(3, apiCheck.getApiPackageNames().size());
   }
-
-  void checkInfiniteLoopInApiClass() {
-    ApiPackage tempPackage = apiCheckLoop.getApiPackage("java.lang");
-    assertNotNull(tempPackage);
-    assertNotNull(tempPackage.getApiClass("java.lang.Object"));
-    assertEquals(2, tempPackage.getApiClassNames().size());
-  }
 }
diff --git a/user/build.xml b/user/build.xml
index a17f78a..e096007 100755
--- a/user/build.xml
+++ b/user/build.xml
@@ -25,7 +25,7 @@
     <mkdir dir="${javac.out}" />
     <gwt.javac>
       <classpath>
-        <pathelement location="${gwt.tools.lib}/tomcat/servlet-api-2.4.jar" />
+        <pathelement location="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" />
         <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
         <pathelement location="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" />
         <pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" />
@@ -52,7 +52,7 @@
       <classpath>
         <pathelement location="${javac.out}" />
         <pathelement location="${gwt.build}/out/dev/core/bin-test" />
-        <pathelement location="${gwt.tools.lib}/tomcat/servlet-api-2.4.jar" />
+        <pathelement location="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" />
         <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
         <pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" />
         <pathelement location="${gwt.dev.jar}" />
@@ -66,7 +66,7 @@
       <fileset dir="src" excludes="**/package.html" />
       <fileset dir="super" excludes="**/package.html" />
       <fileset dir="${javac.out}" />
-      <zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.4.jar" />
+      <zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" />
     </gwt.jar>
   </target>
 
diff --git a/user/src/com/google/gwt/event/logical/shared/BeforeSelectionEvent.java b/user/src/com/google/gwt/event/logical/shared/BeforeSelectionEvent.java
index 7ff45c6..62066a2 100644
--- a/user/src/com/google/gwt/event/logical/shared/BeforeSelectionEvent.java
+++ b/user/src/com/google/gwt/event/logical/shared/BeforeSelectionEvent.java
@@ -91,7 +91,7 @@
   // field itself does not, so we have to do an unsafe cast here.
   @SuppressWarnings("unchecked")
   @Override
-  public Type<BeforeSelectionHandler<I>> getAssociatedType() {
+  public final Type<BeforeSelectionHandler<I>> getAssociatedType() {
     return (Type) TYPE;
   }
 
diff --git a/user/src/com/google/gwt/event/logical/shared/ResizeEvent.java b/user/src/com/google/gwt/event/logical/shared/ResizeEvent.java
index f3b1393..a931456 100644
--- a/user/src/com/google/gwt/event/logical/shared/ResizeEvent.java
+++ b/user/src/com/google/gwt/event/logical/shared/ResizeEvent.java
@@ -76,7 +76,7 @@
   }
 
   @Override
-  public Type<ResizeHandler> getAssociatedType() {
+  public final Type<ResizeHandler> getAssociatedType() {
     return TYPE;
   }
 
diff --git a/user/src/com/google/gwt/event/logical/shared/SelectionEvent.java b/user/src/com/google/gwt/event/logical/shared/SelectionEvent.java
index 342b179..967b557 100644
--- a/user/src/com/google/gwt/event/logical/shared/SelectionEvent.java
+++ b/user/src/com/google/gwt/event/logical/shared/SelectionEvent.java
@@ -76,7 +76,7 @@
   // field itself does not, so we have to do an unsafe cast here.

   @SuppressWarnings("unchecked")

   @Override

-  public Type<SelectionHandler<I>> getAssociatedType() {

+  public final Type<SelectionHandler<I>> getAssociatedType() {

     return (Type) TYPE;

   }

 

diff --git a/user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java b/user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java
index 5dfe97f..ab32e66 100644
--- a/user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java
+++ b/user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java
@@ -54,7 +54,6 @@
    * safe handling of null.

    * 

    * @param <I> the old value type

-   * @param <S> The event source

    * @param source the source of the handlers

    * @param oldValue the oldValue, may be null

    * @param newValue the newValue, may be null

@@ -110,7 +109,7 @@
   // field itself does not, so we have to do an unsafe cast here.

   @SuppressWarnings("unchecked")

   @Override

-  public Type<ValueChangeHandler<I>> getAssociatedType() {

+  public final Type<ValueChangeHandler<I>> getAssociatedType() {

     return (Type) TYPE;

   }

 

diff --git a/user/src/com/google/gwt/event/shared/GwtEvent.java b/user/src/com/google/gwt/event/shared/GwtEvent.java
index c3a38d8..ef74c39 100644
--- a/user/src/com/google/gwt/event/shared/GwtEvent.java
+++ b/user/src/com/google/gwt/event/shared/GwtEvent.java
@@ -35,13 +35,14 @@
    * @param <H> handler type
    */
   public static class Type<H> {
+    private static int nextHashCode;
     private final int index;
 
     /**
      * Constructor.
      */
     public Type() {
-      index = HandlerManager.createTypeHashCode();
+      index = ++nextHashCode;
     }
 
     // We override hash code to make it as efficient as possible.
diff --git a/user/src/com/google/gwt/event/shared/HandlerManager.java b/user/src/com/google/gwt/event/shared/HandlerManager.java
index ca4138e..fc1a0a3 100644
--- a/user/src/com/google/gwt/event/shared/HandlerManager.java
+++ b/user/src/com/google/gwt/event/shared/HandlerManager.java
@@ -15,14 +15,14 @@
  */
 package com.google.gwt.event.shared;
 
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.core.client.JavaScriptObject;
 import com.google.gwt.event.shared.GwtEvent.Type;
 import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.ui.RootPanel;
 
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * Manager responsible for adding handlers to event sources and firing those
@@ -30,38 +30,9 @@
  */
 public class HandlerManager {
   /**
-   * Deferred binding used to allow users to optionally chose to use the
-   * JavaScript handler registry.
+   * Inner class used to actually contain the handlers.
    */
-  static class WhichRegistry {
-    public boolean useJSRegistry() {
-      return false;
-    }
-  }
-
-  /**
-   * Allows users to use the JavaScript handler registry. Cut/Copy lines below
-   * to use.
-   * 
-   * <pre>
-      <replace-with
-           class="com.google.gwt.event.shared.HandlerManager.UseJsRegistry">
-         <when-type-is
-      class="com.google.gwt.event.shared.HandlerManager.WhichRegistry" />
-       </replace-with>
-     </pre>
-   */
-  static class UseJsRegistry extends WhichRegistry {
-    @Override
-    public boolean useJSRegistry() {
-      return true;
-    }
-  }
-
-  /**
-   * The default handler registry.
-   */
-  private static class JavaHandlerRegistry {
+  private static class HandlerRegistry {
     private final HashMap<GwtEvent.Type<?>, ArrayList<?>> map = new HashMap<GwtEvent.Type<?>, ArrayList<?>>();
 
     private <H extends EventHandler> void addHandler(Type<H> type, H handler) {
@@ -73,12 +44,20 @@
       l.add(handler);
     }
 
-    private <H extends EventHandler> void fireEvent(GwtEvent<H> event) {
+    private <H extends EventHandler> void fireEvent(GwtEvent<H> event,
+        boolean isReverseOrder) {
       Type<H> type = event.getAssociatedType();
       int count = getHandlerCount(type);
-      for (int i = 0; i < count; i++) {
-        H handler = this.<H> getHandler(type, i);
-        event.dispatch(handler);
+      if (isReverseOrder) {
+        for (int i = count - 1; i >= 0; i--) {
+          H handler = this.<H> getHandler(type, i);
+          event.dispatch(handler);
+        }
+      } else {
+        for (int i = 0; i < count; i++) {
+          H handler = this.<H> getHandler(type, i);
+          event.dispatch(handler);
+        }
       }
     }
 
@@ -107,203 +86,11 @@
     }
   }
 
-  /**
-   * Optional JavaScript handler registry.
-   * 
-   * This is in the shared class but should never be called outside of a GWT
-   * runtime environment.
-   * 
-   * The JsHandlerRegistry makes use of the fact that in the large majority of
-   * cases, only one or two handlers are added for each event type. Therefore,
-   * rather than storing handlers in a list of lists, we store then in a single
-   * flattened array with an escape clause to handle the rare case where we have
-   * more handlers then expected.
-   */
-  private static class JsHandlerRegistry extends JavaScriptObject {
-
-    // Used to optimize the JavaScript handler container structure.
-    private static int EXPECTED_HANDLERS = 5;
-
-    private static int createIndex() {
-      // Need to leave space for the size and the unflattened list if we end up
-      // needing it.
-      index += EXPECTED_HANDLERS + 2;
-      return index;
-    }
-
-    /**
-     * Required constructor.
-     */
-    protected JsHandlerRegistry() {
-    }
-
-    private <H extends EventHandler> void addHandler(Type<H> type, H myHandler) {
-
-      // The base is the equivalent to a c pointer into the flattened handler
-      // data structure.
-      int base = type.hashCode();
-      int count = getCount(base);
-      boolean flattened = isFlattened(base);
-      H handler = myHandler;
-      // If we already have the maximum number of handlers we can store in the
-      // flattened data structure, store the handlers in an external list
-      // instead.
-      if ((count == EXPECTED_HANDLERS) & flattened) {
-        unflatten(base);
-        flattened = false;
-      }
-      if (flattened) {
-        setFlatHandler(base, count, handler);
-      } else {
-        setHandler(base, count, handler);
-      }
-      setCount(base, count + 1);
-    }
-
-    private <H extends EventHandler> void fireEvent(GwtEvent<H> event) {
-      Type<H> type = event.getAssociatedType();
-      int base = type.hashCode();
-      int count = getCount(base);
-      boolean isFlattened = isFlattened(base);
-      if (isFlattened) {
-        for (int i = 0; i < count; i++) {
-          // Gets the given handler to fire. JavaScript array has no intrinsic
-          // typing information, so cast is inherently necessary.
-          H handler = this.<H> getFlatHandler(base, i);
-          // Fires the handler.
-          event.dispatch(handler);
-        }
-      } else {
-        JavaScriptObject handlers = getHandlers(base);
-        for (int i = 0; i < count; i++) {
-          // Gets the given handler to fire. JavaScript array has no intrinsic
-          // typing information, so cast is inherently necessary.
-          H handler = this.<H> getHandler(handlers, i);
-          // Fires the handler.
-          event.dispatch(handler);
-        }
-      }
-    }
-
-    private native int getCount(int index) /*-{
-      var count = this[index];
-      return count == null? 0:count;
-    }-*/;
-
-    private native <H extends EventHandler> H getFlatHandler(int base, int index) /*-{
-      return this[base + 2 + index];
-    }-*/;
-
-    private <H extends EventHandler> H getHandler(GwtEvent.Type<H> type,
-        int index) {
-      int base = type.hashCode();
-      return this.<H> getHandler(base, index, isFlattened(base));
-    }
-
-    private native <H extends EventHandler> H getHandler(int base, int index,
-        boolean flattened) /*-{
-      return flattened? this[base + 2 + index]: this[base + 1][index];
-    }-*/;
-
-    private native <H extends EventHandler> H getHandler(
-        JavaScriptObject handlers, int index) /*-{
-      return handlers[index];
-    }-*/;
-
-    private int getHandlerCount(GwtEvent.Type<?> eventKey) {
-      return getCount(eventKey.hashCode());
-    }
-
-    private native JavaScriptObject getHandlers(int base) /*-{
-      return this[base + 1];
-    }-*/;
-
-    private native boolean isFlattened(int base) /*-{
-      return this[base + 1] == null;
-    }-*/;
-
-    private <H> void removeHandler(GwtEvent.Type<H> eventKey,
-        EventHandler handler) {
-      int base = eventKey.hashCode();
-
-      // Removing a handler is unusual, so smaller code is preferable to
-      // handling both flat and dangling list of pointers.
-      if (isFlattened(base)) {
-        unflatten(base);
-      }
-      boolean result = removeHelper(base, handler);
-      // Hiding this behind an assertion as we'd rather not force the compiler
-      // to have to include all handler.toString() instances.
-      assert result : handler + " did not exist";
-    }
-
-    private native boolean removeHelper(int base, EventHandler handler) /*-{
-      // Find the handler.
-      var count = this[base];
-      var handlerList = this[base + 1];
-      var handlerIndex = -1;
-      for(var index = 0;  index < count; index++){
-        if(handlerList[index] == handler){
-          handlerIndex = index;
-          break;
-        }
-      }
-      if(handlerIndex == -1) {
-        return false;
-      }
-
-      // Remove the handler.
-      var last = count -1;
-      for(; handlerIndex < last; handlerIndex++){
-        handlerList[handlerIndex] = handlerList[handlerIndex+1]
-      }
-      handlerList[last] = null;
-      this[base] = this[base]-1;
-      return true;
-    }-*/;
-
-    private native void setCount(int index, int count) /*-{
-      this[index] = count;
-    }-*/;
-
-    private native void setFlatHandler(int base, int index, EventHandler handler) /*-{
-      this[base + 2 + index] = handler;
-    }-*/;
-
-    private native void setHandler(int base, int index, EventHandler handler) /*-{
-      this[base + 1][index] = handler;
-    }-*/;
-
-    private native void unflatten(int base) /*-{
-      var handlerList = {};
-      var count = this[base];
-      var start = base + 2;
-       for(var i = 0; i < count; i++){
-         handlerList[i] = this[start + i];
-         this[start + i] = null;
-        }
-       this[base + 1] = handlerList;
-    }-*/;
-  }
-
-  private static final boolean useJsRegistry = GWT.isClient()
-      && ((WhichRegistry) GWT.create(WhichRegistry.class)).useJSRegistry();
-  private static int index = 0;
-
-  // Used to assign hash codes to gwt event types so they are easy to store in a
-  // js structure.
-  static int createTypeHashCode() {
-    if (useJsRegistry) {
-      return JsHandlerRegistry.createIndex();
-    } else {
-      return ++index;
-    }
-  }
-
   private int firingDepth = 0;
-  // Only one of JsHandlerRegistry and JavaHandlerRegistry are live at once.
-  private JsHandlerRegistry javaScriptRegistry;
-  private JavaHandlerRegistry javaRegistry;
+  private boolean isReverseOrder;
+
+  // map storing the actual handlers
+  private HandlerRegistry registry;
 
   // source of the event.
   private final Object source;
@@ -312,17 +99,26 @@
   private List<Command> deferredDeltas;
 
   /**
-   * Creates a handler manager with the given source.
+   * Creates a handler manager with the given source. Handlers will be fired in
+   * the order that they are added.
    * 
    * @param source the event source
    */
   public HandlerManager(Object source) {
-    if (useJsRegistry) {
-      javaScriptRegistry = JavaScriptObject.createObject().cast();
-    } else {
-      javaRegistry = new JavaHandlerRegistry();
-    }
+    this(source, false);
+  }
+
+  /**
+   * Creates a handler manager with the given source, specifying the order in
+   * which handlers are fired.
+   * 
+   * @param source the event source
+   * @param fireInReverseOrder true to fire handlers in reverse order
+   */
+  public HandlerManager(Object source, boolean fireInReverseOrder) {
+    registry = new HandlerRegistry();
     this.source = source;
+    this.isReverseOrder = fireInReverseOrder;
   }
 
   /**
@@ -332,7 +128,7 @@
    * @param type the event type associated with this handler
    * @param handler the handler
    * @return the handler registration, can be stored in order to remove the
-   * handler later
+   *         handler later
    */
   public <H extends EventHandler> HandlerRegistration addHandler(
       GwtEvent.Type<H> type, final H handler) {
@@ -365,11 +161,9 @@
     event.setSource(source);
     try {
       firingDepth++;
-      if (useJsRegistry) {
-        javaScriptRegistry.fireEvent(event);
-      } else {
-        javaRegistry.fireEvent(event);
-      }
+
+      registry.fireEvent(event, isReverseOrder);
+
     } finally {
       firingDepth--;
       if (firingDepth == 0) {
@@ -397,11 +191,7 @@
     assert index < getHandlerCount(type) : "handlers for " + type.getClass()
         + " have size: " + getHandlerCount(type)
         + " so do not have a handler at index: " + index;
-    if (useJsRegistry) {
-      return javaScriptRegistry.getHandler(type, index);
-    } else {
-      return javaRegistry.getHandler(type, index);
-    }
+    return registry.getHandler(type, index);
   }
 
   /**
@@ -411,11 +201,7 @@
    * @return the number of registered handlers
    */
   public int getHandlerCount(Type<?> type) {
-    if (useJsRegistry) {
-      return javaScriptRegistry.getHandlerCount(type);
-    } else {
-      return javaRegistry.getHandlerCount(type);
-    }
+    return registry.getHandlerCount(type);
   }
 
   /**
@@ -438,10 +224,10 @@
    * @param type the event type
    * @param handler the handler
    * @deprecated We currently believe this method will not be needed after
-   * listeners are removed in GWT 2.0. If you have a use case for it after that
-   * time, please add your comments to issue
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=3102
+   *             listeners are removed in GWT 2.0. If you have a use case for it
+   *             after that time, please add your comments to gwt issue 3102
    */
+  @Deprecated
   public <H extends EventHandler> void removeHandler(GwtEvent.Type<H> type,
       final H handler) {
     if (firingDepth > 0) {
@@ -451,6 +237,17 @@
     }
   }
 
+  /**
+   * Not part of the public API, available only to allow visualization tools to
+   * be developed in gwt-incubator.
+   * 
+   * @return a map of all handlers in this handler manager
+   */
+  Map<GwtEvent.Type<?>, ArrayList<?>> createHandlerInfo() {
+    HandlerManager manager = RootPanel.get().getHandlers();
+    return manager.registry.map;
+  }
+
   private void defer(Command command) {
     if (deferredDeltas == null) {
       deferredDeltas = new ArrayList<Command>();
@@ -460,20 +257,12 @@
 
   private <H extends EventHandler> void doAdd(GwtEvent.Type<H> type,
       final H handler) {
-    if (useJsRegistry) {
-      javaScriptRegistry.addHandler(type, handler);
-    } else {
-      javaRegistry.addHandler(type, handler);
-    }
+    registry.addHandler(type, handler);
   }
 
   private <H extends EventHandler> void doRemove(GwtEvent.Type<H> type,
       final H handler) {
-    if (useJsRegistry) {
-      javaScriptRegistry.removeHandler(type, handler);
-    } else {
-      javaRegistry.removeHandler(type, handler);
-    }
+    registry.removeHandler(type, handler);
   }
 
   private <H extends EventHandler> void enqueueAdd(final GwtEvent.Type<H> type,
diff --git a/user/src/com/google/gwt/user/client/DOM.java b/user/src/com/google/gwt/user/client/DOM.java
index 082a87e..a51597c 100644
--- a/user/src/com/google/gwt/user/client/DOM.java
+++ b/user/src/com/google/gwt/user/client/DOM.java
@@ -23,8 +23,6 @@
 import com.google.gwt.dom.client.SelectElement;
 import com.google.gwt.user.client.impl.DOMImpl;
 
-import java.util.ArrayList;
-
 /**
  * This class provides a set of static methods that allow you to manipulate the
  * browser's Document Object Model (DOM). It contains methods for manipulating
@@ -32,16 +30,11 @@
  * {@link com.google.gwt.user.client.Event events}.
  */
 public class DOM {
-
   // The current event being fired
   private static Event currentEvent = null;
   private static final DOMImpl impl = GWT.create(DOMImpl.class);
   private static Element sCaptureElem;
 
-  // <BrowserEventPreview>
-  @SuppressWarnings("deprecation")
-  private static ArrayList<EventPreview> sEventPreviewStack;
-
   /**
    * Adds an event preview to the preview stack. As long as this preview remains
    * on the top of the stack, it will receive all events before they are fired
@@ -55,14 +48,7 @@
    */
   @Deprecated
   public static void addEventPreview(EventPreview preview) {
-    impl.maybeInitializeEventSystem();
-
-    // Add the event preview to the stack. It will automatically
-    // begin receiving events.
-    if (sEventPreviewStack == null) {
-      sEventPreviewStack = new ArrayList<EventPreview>();
-    }
-    sEventPreviewStack.add(preview);
+    ListenerWrapper.NativePreview.add(preview);
   }
 
   /**
@@ -532,7 +518,7 @@
   }
 
   /**
-   * Gets the key-repeat state of this event.  Only IE supports this attribute.
+   * Gets the key-repeat state of this event. Only IE supports this attribute.
    * 
    * @param evt the event to be tested
    * @return <code>true</code> if this key event was an auto-repeat
@@ -909,8 +895,8 @@
    * 
    * @param parent the parent element
    * @param child the child element to add to <code>parent</code>
-   * @param before an existing child element of <code>parent</code> before
-   *          which <code>child</code> will be inserted
+   * @param before an existing child element of <code>parent</code> before which
+   *          <code>child</code> will be inserted
    */
   public static void insertBefore(Element parent, Element child, Element before) {
     parent.insertBefore(child, before);
@@ -930,10 +916,10 @@
   }
 
   /**
-   * Creates an <code>&lt;option&gt;</code> element and inserts it as a child
-   * of the specified <code>&lt;select&gt;</code> element. If the index is
-   * less than zero, or greater than or equal to the length of the list, then
-   * the option element will be appended to the end of the list.
+   * Creates an <code>&lt;option&gt;</code> element and inserts it as a child of
+   * the specified <code>&lt;select&gt;</code> element. If the index is less
+   * than zero, or greater than or equal to the length of the list, then the
+   * option element will be appended to the end of the list.
    * 
    * @param selectElem the <code>&lt;select&gt;</code> element
    * @param item the text of the new item; cannot be <code>null</code>
@@ -1012,12 +998,7 @@
    */
   @Deprecated
   public static void removeEventPreview(EventPreview preview) {
-    // Remove the event preview from the stack. If it was on top,
-    // any preview underneath it will automatically begin to
-    // receive events.
-    if (sEventPreviewStack != null) {
-      sEventPreviewStack.remove(preview);
-    }
+    ListenerWrapper.NativePreview.remove(preview);
   }
 
   /**
@@ -1270,6 +1251,13 @@
   }
 
   /**
+   * Initialize the event system if it has not already been initialized.
+   */
+  static void maybeInitializeEventSystem() {
+    impl.maybeInitializeEventSystem();
+  }
+
+  /**
    * This method is called directly by native code when event preview is being
    * used.
    * 
@@ -1281,12 +1269,6 @@
     // Fire a NativePreviewEvent to NativePreviewHandlers
     boolean ret = Event.fireNativePreviewEvent(evt);
 
-    // If event previews are present, redirect events to the topmost of them.
-    if (sEventPreviewStack != null && sEventPreviewStack.size() > 0) {
-      EventPreview preview = sEventPreviewStack.get(sEventPreviewStack.size() - 1);
-      ret = preview.onEventPreview(evt) && ret;
-    }
-
     // If the preview cancels the event, stop it from bubbling and performing
     // its default action. Check for a null evt to allow unit tests to run.
     if (!ret && evt != null) {
diff --git a/user/src/com/google/gwt/user/client/Event.java b/user/src/com/google/gwt/user/client/Event.java
index ff156f1..2a72281 100644
--- a/user/src/com/google/gwt/user/client/Event.java
+++ b/user/src/com/google/gwt/user/client/Event.java
@@ -20,19 +20,17 @@
 import com.google.gwt.event.dom.client.HasNativeEvent;
 import com.google.gwt.event.shared.EventHandler;
 import com.google.gwt.event.shared.GwtEvent;
+import com.google.gwt.event.shared.HandlerManager;
 import com.google.gwt.event.shared.HandlerRegistration;
 
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * <p>
  * An opaque handle to a native DOM Event. An <code>Event</code> cannot be
  * created directly. Instead, use the <code>Event</code> type when returning a
  * native DOM event from JSNI methods. An <code>Event</code> passed back into
- * JSNI becomes the original DOM event the <code>Event</code> was created
- * from, and can be accessed in JavaScript code as expected. This is typically
- * done by calling methods in the {@link com.google.gwt.user.client.DOM} class.
+ * JSNI becomes the original DOM event the <code>Event</code> was created from,
+ * and can be accessed in JavaScript code as expected. This is typically done by
+ * calling methods in the {@link com.google.gwt.user.client.DOM} class.
  * </p>
  */
 public class Event extends JavaScriptObject {
@@ -67,28 +65,18 @@
     /**
      * Fire a {@link NativePreviewEvent} for the native event.
      * 
-     * @param handlers the list of {@link NativePreviewHandler}
+     * @param handlers the {@link HandlerManager}
      * @param nativeEvent the native event
      * @return true to fire the event normally, false to cancel the event
      */
-    static boolean fire(List<NativePreviewHandler> handlers, Event nativeEvent) {
+    private static boolean fire(HandlerManager handlers, Event nativeEvent) {
       if (TYPE != null && handlers != null) {
         // Revive the event
-        if (singleton == null) {
-          singleton = new NativePreviewEvent();
-        } else {
-          singleton.revive();
-        }
+        singleton.revive();
         singleton.setNativeEvent(nativeEvent);
 
-        // Fire the event to all handlers
-        int numHandlers = handlers.size();
-        for (int i = numHandlers - 1; i >= 0; i--) {
-          handlers.get(i).onPreviewNativeEvent(singleton);
-        }
-
-        // Kill the event and return
-        singleton.kill();
+        // Fire the event
+        handlers.fireEvent(singleton);
         return !(singleton.isCanceled() && !singleton.isConsumed());
       }
       return true;
@@ -106,6 +94,12 @@
     private boolean isConsumed = false;
 
     /**
+     * A boolean indicating that the current handler is at the top of the event
+     * preview stack.
+     */
+    private boolean isFirstHandler = false;
+
+    /**
      * The event being previewed.
      */
     private Event nativeEvent;
@@ -132,7 +126,7 @@
     }
 
     @Override
-    public Type<NativePreviewHandler> getAssociatedType() {
+    public final Type<NativePreviewHandler> getAssociatedType() {
       return TYPE;
     }
 
@@ -162,9 +156,19 @@
       return isConsumed;
     }
 
+    /**
+     * Is the current handler the first to preview this event?
+     * 
+     * @return true if the current handler is the first to preview the event
+     */
+    public boolean isFirstHandler() {
+      return isFirstHandler;
+    }
+
     @Override
     protected void dispatch(NativePreviewHandler handler) {
       handler.onPreviewNativeEvent(this);
+      singleton.isFirstHandler = false;
     }
 
     @Override
@@ -172,6 +176,7 @@
       super.revive();
       isCanceled = false;
       isConsumed = false;
+      isFirstHandler = true;
       nativeEvent = null;
     }
 
@@ -304,7 +309,8 @@
   public static final int ONSCROLL = 0x04000;
 
   /**
-   * Fired when the user requests an element's context menu (usually by right-clicking).
+   * Fired when the user requests an element's context menu (usually by
+   * right-clicking).
    * 
    * Note that not all browsers will fire this event (notably Opera, as of 9.5).
    */
@@ -328,7 +334,7 @@
       | ONMOUSEOVER | ONMOUSEOUT;
 
   /**
-   * Value returned by accessors when the actual integer value is undefined.  In
+   * Value returned by accessors when the actual integer value is undefined. In
    * hosted mode, most accessors assert that the requested attribute is reliable
    * across all supported browsers.
    * 
@@ -338,12 +344,11 @@
   public static final int UNDEFINED = 0;
 
   /**
-   * The list of {@link NativePreviewHandler}.  We use a list instead of a
+   * The list of {@link NativePreviewHandler}. We use a list instead of a
    * handler manager for efficiency and because we want to fire the handlers in
-   * reverse order.  When the last handler is removed, handlers is reset to
-   * null.
+   * reverse order. When the last handler is removed, handlers is reset to null.
    */
-  private static ArrayList<NativePreviewHandler> handlers;
+  static HandlerManager handlers;
 
   /**
    * Adds an event preview to the preview stack. As long as this preview remains
@@ -381,23 +386,15 @@
   public static HandlerRegistration addNativePreviewHandler(
       final NativePreviewHandler handler) {
     assert handler != null : "Cannot add a null handler";
+    DOM.maybeInitializeEventSystem();
+
     // Initialize the type
     NativePreviewEvent.getType();
     if (handlers == null) {
-      handlers = new ArrayList<NativePreviewHandler>();
+      handlers = new HandlerManager(null, true);
+      NativePreviewEvent.singleton = new NativePreviewEvent();
     }
-    handlers.add(handler);    
-    return new HandlerRegistration() {
-      public void removeHandler() {
-        if (handlers != null) {
-          handlers.remove(handler);
-          if (handlers.size() == 0) {
-            // Set handlers to null so we can optimize fireNativePreviewEvent
-            handlers = null;
-          }
-        }
-      }
-    };
+    return handlers.addHandler(NativePreviewEvent.TYPE, handler);
   }
 
   /**
@@ -430,7 +427,7 @@
    * @see #setCapture(Element)
    */
   public static void releaseCapture(Element elem) {
-    DOM.releaseCapture(elem.<com.google.gwt.user.client.Element>cast());
+    DOM.releaseCapture(elem.<com.google.gwt.user.client.Element> cast());
   }
 
   /**
@@ -453,7 +450,7 @@
    * @param elem the element on which to set mouse capture
    */
   public static void setCapture(Element elem) {
-    DOM.setCapture(elem.<com.google.gwt.user.client.Element>cast());
+    DOM.setCapture(elem.<com.google.gwt.user.client.Element> cast());
   }
 
   /**
diff --git a/user/src/com/google/gwt/user/client/ListenerWrapper.java b/user/src/com/google/gwt/user/client/ListenerWrapper.java
index bcd0115..77f51ad 100644
--- a/user/src/com/google/gwt/user/client/ListenerWrapper.java
+++ b/user/src/com/google/gwt/user/client/ListenerWrapper.java
@@ -25,21 +25,19 @@
 import com.google.gwt.event.shared.EventHandler;
 import com.google.gwt.event.shared.HandlerManager;
 import com.google.gwt.event.shared.GwtEvent.Type;
-
-import java.util.EventListener;
+import com.google.gwt.user.client.Event.NativePreviewEvent;
 
 /**
- * Legacy listener support hierarchy for <code>com.google.gwt.user.client</code>.
- * Gathers the bulk of the legacy glue code in one place, for easy deletion when
- * Listener methods are deleted. 
+ * Legacy listener support for <code>com.google.gwt.user.client</code>. Gathers
+ * the bulk of the legacy glue code in one place, for easy deletion when
+ * Listener methods are deleted.
  * 
- * @see com.google.gwt.user.ListenerWrapper
  * @param <T> listener type
  */
 @Deprecated
 abstract class ListenerWrapper<T> implements EventHandler {
-  public static class HistoryChange extends ListenerWrapper<HistoryListener> implements
-      ValueChangeHandler<String> {
+  public static class HistoryChange extends ListenerWrapper<HistoryListener>
+      implements ValueChangeHandler<String> {
     @Deprecated
     public static void add(HistoryListener listener) {
       History.addValueChangeHandler(new HistoryChange(listener));
@@ -58,8 +56,34 @@
     }
   }
 
-  public static class WindowClose extends ListenerWrapper<WindowCloseListener> implements
-      Window.ClosingHandler, CloseHandler<Window> {
+  public static class NativePreview extends ListenerWrapper<EventPreview>
+      implements Event.NativePreviewHandler {
+    @Deprecated
+    public static void add(EventPreview listener) {
+      Event.addNativePreviewHandler(new NativePreview(listener));
+    }
+
+    public static void remove(EventPreview listener) {
+      baseRemove(Event.handlers, listener, NativePreviewEvent.getType());
+    }
+
+    private NativePreview(EventPreview listener) {
+      super(listener);
+    }
+
+    public void onPreviewNativeEvent(NativePreviewEvent event) {
+      // The legacy EventHandler should only fire if it is on the top of the
+      // stack (ie. the last one added).
+      if (event.isFirstHandler()) {
+        if (!listener.onEventPreview(event.getNativeEvent())) {
+          event.cancel();
+        }
+      }
+    }
+  }
+
+  public static class WindowClose extends ListenerWrapper<WindowCloseListener>
+      implements Window.ClosingHandler, CloseHandler<Window> {
     @Deprecated
     public static void add(WindowCloseListener listener) {
       WindowClose handler = new WindowClose(listener);
@@ -89,8 +113,8 @@
     }
   }
 
-  public static class WindowResize extends ListenerWrapper<WindowResizeListener> implements
-      ResizeHandler {
+  public static class WindowResize extends
+      ListenerWrapper<WindowResizeListener> implements ResizeHandler {
     @Deprecated
     public static void add(WindowResizeListener listener) {
       Window.addResizeHandler(new WindowResize(listener));
@@ -110,8 +134,8 @@
     }
   }
 
-  public static class WindowScroll extends ListenerWrapper<WindowScrollListener> implements
-      Window.ScrollHandler {
+  public static class WindowScroll extends
+      ListenerWrapper<WindowScrollListener> implements Window.ScrollHandler {
     @Deprecated
     public static void add(WindowScrollListener listener) {
       Window.addWindowScrollHandler(new WindowScroll(listener));
@@ -131,14 +155,13 @@
     }
   }
 
-
   // This is an internal helper method with the current formulation, we have
   // lost the info needed to make it safe by this point.
   @SuppressWarnings("unchecked")
   // This is a direct copy of the baseRemove from
   // com.google.gwt.user.client.ui.ListenerWrapper. Change in parallel.
   static <H extends EventHandler> void baseRemove(HandlerManager manager,
-      EventListener listener, Type... keys) {
+      Object listener, Type... keys) {
     if (manager != null) {
       for (Type<H> key : keys) {
         int handlerCount = manager.getHandlerCount(key);
@@ -153,7 +176,7 @@
       }
     }
   }
-  
+
   /**
    * Listener being wrapped.
    */
diff --git a/user/src/com/google/gwt/user/client/Window.java b/user/src/com/google/gwt/user/client/Window.java
index 58ab514..8f966f5 100644
--- a/user/src/com/google/gwt/user/client/Window.java
+++ b/user/src/com/google/gwt/user/client/Window.java
@@ -64,7 +64,7 @@
     private String message = null;
 
     @Override
-    public Type<ClosingHandler> getAssociatedType() {
+    public final Type<ClosingHandler> getAssociatedType() {
       return TYPE;
     }
 
@@ -332,7 +332,7 @@
     }
 
     @Override
-    public Type<ScrollHandler> getAssociatedType() {
+    public final Type<ScrollHandler> getAssociatedType() {
       return TYPE;
     }
 
diff --git a/user/src/com/google/gwt/user/client/impl/DOMImpl.java b/user/src/com/google/gwt/user/client/impl/DOMImpl.java
index 30da21c..09ffb25 100644
--- a/user/src/com/google/gwt/user/client/impl/DOMImpl.java
+++ b/user/src/com/google/gwt/user/client/impl/DOMImpl.java
@@ -157,9 +157,6 @@
 
   public abstract void insertChild(Element parent, Element child, int index);
 
-  /**
-   * Initialize the event system if it has not already been initialized.
-   */
   public void maybeInitializeEventSystem() {
     if (!eventSystemIsInitialized) {
       initEventSystem();
diff --git a/user/src/com/google/gwt/user/datepicker/client/ElementMapper.java b/user/src/com/google/gwt/user/client/impl/ElementMapperImpl.java
similarity index 80%
rename from user/src/com/google/gwt/user/datepicker/client/ElementMapper.java
rename to user/src/com/google/gwt/user/client/impl/ElementMapperImpl.java
index a495ee1..f595008 100644
--- a/user/src/com/google/gwt/user/datepicker/client/ElementMapper.java
+++ b/user/src/com/google/gwt/user/client/impl/ElementMapperImpl.java
@@ -14,25 +14,26 @@
  * the License.

  */

 

-package com.google.gwt.user.datepicker.client;

+package com.google.gwt.user.client.impl;

 

 import com.google.gwt.user.client.Element;

 import com.google.gwt.user.client.ui.UIObject;

 

 import java.util.ArrayList;

+import java.util.Iterator;

 

 /**

  * Creates a mapping from elements to their associated ui objects.

  * 

  * @param <T> the type that the element is mapped to

  */

-class ElementMapper<T extends UIObject> {

+public class ElementMapperImpl<T extends UIObject> {

 

   private static class FreeNode {

     int index;

-    ElementMapper.FreeNode next;

+    ElementMapperImpl.FreeNode next;

 

-    public FreeNode(int index, ElementMapper.FreeNode next) {

+    public FreeNode(int index, ElementMapperImpl.FreeNode next) {

       this.index = index;

       this.next = next;

     }

@@ -51,7 +52,7 @@
     elem["__uiObjectID"] = index;

   }-*/;

 

-  private ElementMapper.FreeNode freeList = null;

+  private ElementMapperImpl.FreeNode freeList = null;

 

   private final ArrayList<T> uiObjectList = new ArrayList<T>();

 

@@ -69,6 +70,19 @@
     return uiObjectList.get(index);

   }

 

+  public ArrayList<T> getObjectList() {

+    return uiObjectList;

+  }

+

+  /**

+   * Creates an iterator from the ui objects stored within

+   * 

+   * @return an iterator of the ui objects indexed by this element mapper.

+   */

+  public Iterator<T> iterator() {

+    return uiObjectList.iterator();

+  }

+

   /**

    * Adds the MappedType.

    * 

diff --git a/user/src/com/google/gwt/user/client/ui/CheckBox.java b/user/src/com/google/gwt/user/client/ui/CheckBox.java
index e2f96cf..7aad9ba 100644
--- a/user/src/com/google/gwt/user/client/ui/CheckBox.java
+++ b/user/src/com/google/gwt/user/client/ui/CheckBox.java
@@ -15,6 +15,9 @@
  */
 package com.google.gwt.user.client.ui;
 
+import com.google.gwt.dom.client.Document;
+import com.google.gwt.dom.client.InputElement;
+import com.google.gwt.dom.client.LabelElement;
 import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.event.dom.client.ClickHandler;
 import com.google.gwt.event.logical.shared.ValueChangeEvent;
@@ -22,6 +25,8 @@
 import com.google.gwt.event.shared.HandlerRegistration;
 import com.google.gwt.user.client.DOM;
 import com.google.gwt.user.client.Element;
+import com.google.gwt.user.client.Event;
+import com.google.gwt.user.client.EventListener;
 
 /**
  * A standard check box widget.
@@ -47,7 +52,8 @@
  * </p>
  */
 public class CheckBox extends ButtonBase implements HasName, HasValue<Boolean> {
-  private Element inputElem, labelElem;
+  private InputElement inputElem;
+  private LabelElement labelElem;
   private boolean valueChangeHandlerInitialized;
 
   /**
@@ -85,15 +91,15 @@
 
   protected CheckBox(Element elem) {
     super(DOM.createSpan());
-    inputElem = elem;
-    labelElem = DOM.createLabel();
+    inputElem = InputElement.as(elem);
+    labelElem = Document.get().createLabelElement();
 
-    DOM.appendChild(getElement(), inputElem);
-    DOM.appendChild(getElement(), labelElem);
+    getElement().appendChild(inputElem);
+    getElement().appendChild(labelElem);
 
     String uid = DOM.createUniqueId();
-    DOM.setElementProperty(inputElem, "id", uid);
-    DOM.setElementProperty(labelElem, "htmlFor", uid);
+    inputElem.setPropertyString("id", uid);
+    labelElem.setHtmlFor(uid);
 
     // Accessibility: setting tab index to be 0 by default, ensuring element
     // appears in tab sequence. FocusWidget's setElement method already
@@ -113,59 +119,85 @@
         public void onClick(ClickEvent event) {
           // No need to compare old value and new value--click handler
           // only fires on real click, and value always toggles
-          ValueChangeEvent.fire(CheckBox.this, isChecked());
+          ValueChangeEvent.fire(CheckBox.this, getValue());
         }
       });
     }
     return addHandler(handler, ValueChangeEvent.getType());
   }
 
+  /**
+   * Returns the value property of the input element that backs this widget.
+   * This is the value that will be associated with the CheckBox name and
+   * submitted to the server if a {@link FormPanel} that holds it is submitted
+   * and the box is checked.
+   * <p>
+   * Don't confuse this with {@link #getValue}, which returns true or false if
+   * the widget is checked.
+   * 
+   * @return
+   */
+  public String getFormValue() {
+    return inputElem.getValue();
+  }
+
   @Override
   public String getHTML() {
-    return DOM.getInnerHTML(labelElem);
+    return labelElem.getInnerHTML();
   }
 
   public String getName() {
-    return DOM.getElementProperty(inputElem, "name");
+    return inputElem.getName();
   }
 
   @Override
   public int getTabIndex() {
-    return getFocusImpl().getTabIndex(inputElem);
+    return inputElem.getTabIndex();
   }
 
   @Override
   public String getText() {
-    return DOM.getInnerText(labelElem);
+    return labelElem.getInnerText();
   }
 
   /**
-   * Determines whether this check box is currently checked.
+   * Determines whether this check box is currently checked. 
+   * <p>
+   * Note that this <em>is not</em> return the value property of the checkbox
+   * input element wrapped by this widget. For access to that property, see
+   * {@link #getFormValue()}
    * 
-   * @return <code>true</code> if the check box is checked
+   * @return <code>true</code> if the check box is checked, false otherwise.
+   * Will not return null
    */
   public Boolean getValue() {
-    return isChecked();
+    if (isAttached()) {
+      return inputElem.isChecked();
+    } else {
+      return inputElem.isDefaultChecked();
+    }
   }
 
   /**
    * Determines whether this check box is currently checked.
    * 
    * @return <code>true</code> if the check box is checked
+   * @deprecated use {@link #getValue} instead
    */
+  @Deprecated
   public boolean isChecked() {
-    String propName = isAttached() ? "checked" : "defaultChecked";
-    return DOM.getElementPropertyBoolean(inputElem, propName);
+    // Funny comparison b/c getValue could in theory return null
+    return getValue() == true; 
   }
 
   @Override
   public boolean isEnabled() {
-    return !DOM.getElementPropertyBoolean(inputElem, "disabled");
+    return !inputElem.isDisabled();
   }
 
   @Override
   public void setAccessKey(char key) {
-    DOM.setElementProperty(inputElem, "accessKey", "" + key);
+    inputElem.setAccessKey("" + key);
   }
 
   /**
@@ -173,15 +205,16 @@
    * (If you want the event to fire, use {@link #setValue(Boolean, boolean)})
    * 
    * @param checked <code>true</code> to check the check box.
+   * @deprecated Use {@link #setValue(Boolean)} instead
    */
+  @Deprecated
   public void setChecked(boolean checked) {
-    DOM.setElementPropertyBoolean(inputElem, "checked", checked);
-    DOM.setElementPropertyBoolean(inputElem, "defaultChecked", checked);
+    setValue(checked);
   }
 
   @Override
   public void setEnabled(boolean enabled) {
-    DOM.setElementPropertyBoolean(inputElem, "disabled", !enabled);
+    inputElem.setDisabled(!enabled);
     if (enabled) {
       removeStyleDependentName("disabled");
     } else {
@@ -192,19 +225,34 @@
   @Override
   public void setFocus(boolean focused) {
     if (focused) {
-      getFocusImpl().focus(inputElem);
+      inputElem.focus();
     } else {
-      getFocusImpl().blur(inputElem);
+      inputElem.blur();
     }
   }
 
+  /**
+   * Set the value property on the input element that backs this widget. This is
+   * the value that will be associated with the CheckBox's name and submitted to
+   * the server if a {@link FormPanel} that holds it is submitted and the box is
+   * checked.
+   * <p>
+   * Don't confuse this with {@link #setValue}, which actually checks and
+   * unchecks the box.
+   * 
+   * @param value
+   */
+  public void setFormValue(String value) {
+    inputElem.setAttribute("value", value);
+  }
+
   @Override
   public void setHTML(String html) {
-    DOM.setInnerHTML(labelElem, html);
+    labelElem.setInnerHTML(html);
   }
 
   public void setName(String name) {
-    DOM.setElementProperty(inputElem, "name", name);
+    inputElem.setName(name);
   }
 
   @Override
@@ -214,17 +262,21 @@
     // CheckBox) setElement method calls setTabIndex before inputElem is
     // initialized. See CheckBox's protected constructor for more information.
     if (inputElem != null) {
-      getFocusImpl().setTabIndex(inputElem, index);
+      inputElem.setTabIndex(index);
     }
   }
 
   @Override
   public void setText(String text) {
-    DOM.setInnerText(labelElem, text);
+    labelElem.setInnerText(text);
   }
 
   /**
    * Checks or unchecks the text box.
+   * <p>
+   * Note that this <em>does not</em> set the value property of the checkbox
+   * input element wrapped by this widget. For access to that property, see
+   * {@link #setFormValue(String)}
    * 
    * @param value true to check, false to uncheck. Must not be null.
    * @thows IllegalArgumentException if value is null
@@ -236,7 +288,11 @@
   /**
    * Checks or unchecks the text box, firing {@link ValueChangeEvent} if
    * appropriate.
-   * 
+   * <p>
+   * Note that this <em>does not</em> set the value property of the checkbox
+   * input element wrapped by this widget. For access to that property, see
+   * {@link #setFormValue(String)}
+   *
    * @param value true to check, false to uncheck. Must not be null.
    * @param fireEvents If true, and value has changed, fire a
    *          {@link ValueChangeEvent}
@@ -247,10 +303,11 @@
       throw new IllegalArgumentException("value must not be null");
     }
 
-    if (isChecked() == value) {
+    if (value.equals(getValue())) {
       return;
     }
-    setChecked(value);
+    inputElem.setChecked(value);
+    inputElem.setDefaultChecked(value);
     if (fireEvents) {
       ValueChangeEvent.fire(this, value);
     }
@@ -261,7 +318,8 @@
   @Override
   public void sinkEvents(int eventBitsToAdd) {
     if (isOrWasAttached()) {
-      DOM.sinkEvents(inputElem, eventBitsToAdd | DOM.getEventsSunk(inputElem));
+      Event.sinkEvents(inputElem, 
+          eventBitsToAdd | Event.getEventsSunk(inputElem));
     } else {
       super.sinkEvents(eventBitsToAdd);
     }
@@ -280,7 +338,7 @@
     super.onEnsureDebugId(baseID);
     ensureDebugId(labelElem, baseID, "label");
     ensureDebugId(inputElem, baseID, "input");
-    DOM.setElementProperty(labelElem, "htmlFor", inputElem.getId());
+    labelElem.setHtmlFor(inputElem.getId());
   }
 
   /**
@@ -290,9 +348,7 @@
    */
   @Override
   protected void onLoad() {
-    // Sets the event listener on the inputElem, as in this case that's the
-    // element we want so input on.
-    DOM.setEventListener(inputElem, this);
+    setEventListener(inputElem, this);
   }
 
   /**
@@ -304,49 +360,64 @@
   protected void onUnload() {
     // Clear out the inputElem's event listener (breaking the circular
     // reference between it and the widget).
-    DOM.setEventListener(inputElem, null);
-    setChecked(isChecked());
+    setEventListener(asOld(inputElem), null);
+    setValue(getValue());
   }
 
   /**
-   * Replace the current input element with a new one.
+   * Replace the current input element with a new one. Preserves
+   * all state except for the name property, for nasty reasons
+   * related to radio button grouping. (See implementation of 
+   * {@link RadioButton#setName}.)
    * 
    * @param elem the new input element
    */
   protected void replaceInputElement(Element elem) {
+    InputElement newInputElem = InputElement.as(elem);
     // Collect information we need to set
     int tabIndex = getTabIndex();
-    boolean checked = isChecked();
+    boolean checked = getValue();
     boolean enabled = isEnabled();
-    String uid = DOM.getElementProperty(inputElem, "id");
-    String accessKey = DOM.getElementProperty(inputElem, "accessKey");
-    int sunkEvents = DOM.getEventsSunk(inputElem);
+    String formValue = getFormValue();
+    String uid = inputElem.getId();
+    String accessKey = inputElem.getAccessKey();
+    int sunkEvents = Event.getEventsSunk(inputElem);   
 
     // Clear out the old input element
-    DOM.setEventListener(inputElem, null);
-    DOM.setEventListener(inputElem, null);
+    setEventListener(asOld(inputElem), null);
 
-    DOM.removeChild(getElement(), inputElem);
-    DOM.insertChild(getElement(), elem, 0);
+    getElement().removeChild(inputElem);
+    getElement().insertBefore(newInputElem, null);
 
     // Sink events on the new element
-    DOM.sinkEvents(elem, DOM.getEventsSunk(inputElem));
-    DOM.sinkEvents(inputElem, 0);
-    inputElem = elem;
+    Event.sinkEvents(elem, Event.getEventsSunk(inputElem));
+    Event.sinkEvents(inputElem, 0);
+    inputElem = newInputElem;
 
     // Setup the new element
-    DOM.sinkEvents(inputElem, sunkEvents);
-    DOM.setElementProperty(inputElem, "id", uid);
+    Event.sinkEvents(inputElem, sunkEvents);
+    inputElem.setId(uid);
     if (!accessKey.equals("")) {
-      DOM.setElementProperty(inputElem, "accessKey", accessKey);
+      inputElem.setAccessKey(accessKey);
     }
     setTabIndex(tabIndex);
-    setChecked(checked);
+    setValue(checked);
     setEnabled(enabled);
+    setFormValue(formValue);
 
     // Set the event listener
     if (isAttached()) {
-      DOM.setEventListener(inputElem, this);
+      setEventListener(asOld(inputElem), this);
     }
   }
+
+  private Element asOld(com.google.gwt.dom.client.Element elem) {
+    Element oldSchool = elem.cast();
+    return oldSchool;
+  }
+
+  private void setEventListener(com.google.gwt.dom.client.Element e,
+      EventListener listener) {
+    DOM.setEventListener(asOld(e), listener);
+  }
 }
diff --git a/user/src/com/google/gwt/user/client/ui/ComplexPanel.java b/user/src/com/google/gwt/user/client/ui/ComplexPanel.java
index aa26def..b7b1d52 100644
--- a/user/src/com/google/gwt/user/client/ui/ComplexPanel.java
+++ b/user/src/com/google/gwt/user/client/ui/ComplexPanel.java
@@ -111,8 +111,8 @@
   }
 
   /**
-   * Checks that <code>index</code> is in the range [0, getWidgetCount()),
-   * which is the valid range on accessible indexes.
+   * Checks that <code>index</code> is in the range [0, getWidgetCount()), which
+   * is the valid range on accessible indexes.
    * 
    * @param index the index being accessed
    */
@@ -123,8 +123,8 @@
   }
 
   /**
-   * Checks that <code>index</code> is in the range [0, getWidgetCount()],
-   * which is the valid range for indexes on an insertion.
+   * Checks that <code>index</code> is in the range [0, getWidgetCount()], which
+   * is the valid range for indexes on an insertion.
    * 
    * @param index the index where insertion will occur
    */
@@ -197,4 +197,12 @@
     // Adopt.
     adopt(child);
   }
+
+  void doLogicalClear() {
+    int size = children.size();
+    for (int i = 0; i < size; i++) {
+      orphan(children.get(i));
+    }
+    children = new WidgetCollection(this);
+  }
 }
diff --git a/user/src/com/google/gwt/user/client/ui/FlowPanel.java b/user/src/com/google/gwt/user/client/ui/FlowPanel.java
index 601bac7..44f2153 100644
--- a/user/src/com/google/gwt/user/client/ui/FlowPanel.java
+++ b/user/src/com/google/gwt/user/client/ui/FlowPanel.java
@@ -44,6 +44,12 @@
     add(w, getElement());
   }
 
+  @Override
+  public void clear() {
+    super.doLogicalClear();
+    this.getElement().setInnerHTML("");
+  }
+
   /**
    * Inserts a widget before the specified index.
    * 
diff --git a/user/src/com/google/gwt/user/client/ui/FormPanel.java b/user/src/com/google/gwt/user/client/ui/FormPanel.java
index 4aa7b90..d810ef8 100644
--- a/user/src/com/google/gwt/user/client/ui/FormPanel.java
+++ b/user/src/com/google/gwt/user/client/ui/FormPanel.java
@@ -87,7 +87,7 @@
     private String resultHtml;
 
     /**
-     * Create a submit complete event
+     * Create a submit complete event.
      * 
      * @param resultsHtml the results from submitting the form
      */
@@ -96,7 +96,7 @@
     }
 
     @Override
-    public Type<SubmitCompleteHandler> getAssociatedType() {
+    public final Type<SubmitCompleteHandler> getAssociatedType() {
       return TYPE;
     }
 
@@ -162,7 +162,7 @@
     }
 
     @Override
-    public Type<FormPanel.SubmitHandler> getAssociatedType() {
+    public final Type<FormPanel.SubmitHandler> getAssociatedType() {
       return TYPE;
     }
 
diff --git a/user/src/com/google/gwt/user/client/ui/HTMLTable.java b/user/src/com/google/gwt/user/client/ui/HTMLTable.java
index ee099c1..be27082 100644
--- a/user/src/com/google/gwt/user/client/ui/HTMLTable.java
+++ b/user/src/com/google/gwt/user/client/ui/HTMLTable.java
@@ -22,6 +22,7 @@
 import com.google.gwt.user.client.DOM;
 import com.google.gwt.user.client.Element;
 import com.google.gwt.user.client.Event;
+import com.google.gwt.user.client.impl.ElementMapperImpl;
 import com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant;
 import com.google.gwt.user.client.ui.HasVerticalAlignment.VerticalAlignmentConstant;
 
@@ -40,16 +41,17 @@
 @SuppressWarnings("deprecation")
 public abstract class HTMLTable extends Panel implements SourcesTableEvents,
     HasClickHandlers {
-  
+
   /**
    * Return value for {@link HTMLTable#getCellForEvent}.
    */
   public class Cell {
     private final int rowIndex;
     private final int cellIndex;
-    
+
     /**
      * Creates a cell.
+     * 
      * @param rowIndex the cell's row
      * @param cellIndex the cell's index
      */
@@ -57,24 +59,28 @@
       this.cellIndex = cellIndex;
       this.rowIndex = rowIndex;
     }
-     
+
     /**
      * Gets the cell index.
+     * 
      * @return the cell index
      */
     public int getCellIndex() {
       return cellIndex;
     }
+
     /**
      * Gets the cell's element.
+     * 
      * @return the cell's element.
      */
     public Element getElement() {
       return getCellFormatter().getElement(cellIndex, rowIndex);
     }
-    
+
     /**
      * Get row index.
+     * 
      * @return the row index
      */
     public int getRowIndex() {
@@ -357,8 +363,8 @@
 
     /**
      * Gets the TD element representing the specified cell unsafely (meaning
-     * that it doesn't ensure that <code>row</code> and <code>column</code>
-     * are valid).
+     * that it doesn't ensure that <code>row</code> and <code>column</code> are
+     * valid).
      * 
      * @param row the row of the cell to be retrieved
      * @param column the column of the cell to be retrieved
@@ -648,135 +654,6 @@
   }
 
   /**
-   * Creates a mapping from elements to their associated widgets.
-   */
-  private static class WidgetMapper {
-
-    private static class FreeNode {
-      int index;
-      FreeNode next;
-
-      public FreeNode(int index, FreeNode next) {
-        this.index = index;
-        this.next = next;
-      }
-    }
-
-    private static native void clearWidgetIndex(Element elem) /*-{
-      elem["__widgetID"] = null;
-    }-*/;
-
-    private static native int getWidgetIndex(Element elem) /*-{
-      var index = elem["__widgetID"];
-      return (index == null) ? -1 : index;
-    }-*/;
-
-    private static native void setWidgetIndex(Element elem, int index) /*-{
-      elem["__widgetID"] = index;
-    }-*/;
-
-    private FreeNode freeList = null;
-
-    private final ArrayList<Widget> widgetList = new ArrayList<Widget>();
-
-    /**
-     * Returns the widget associated with the given element.
-     * 
-     * @param elem widget's element
-     * @return the widget
-     */
-    public Widget getWidget(Element elem) {
-      int index = getWidgetIndex(elem);
-      if (index < 0) {
-        return null;
-      }
-      return widgetList.get(index);
-    }
-
-    /**
-     * Adds the Widget.
-     * 
-     * @param widget widget to add
-     */
-    public void putWidget(Widget widget) {
-      int index;
-      if (freeList == null) {
-        index = widgetList.size();
-        widgetList.add(widget);
-      } else {
-        index = freeList.index;
-        widgetList.set(index, widget);
-        freeList = freeList.next;
-      }
-      setWidgetIndex(widget.getElement(), index);
-    }
-
-    /**
-     * Remove the widget associated with the given element.
-     * 
-     * @param elem the widget's element
-     */
-    public void removeWidgetByElement(Element elem) {
-      int index = getWidgetIndex(elem);
-      removeImpl(elem, index);
-    }
-
-    /**
-     * Creates an iterator of widgets.
-     * 
-     * @return the iterator
-     */
-    public Iterator<Widget> widgetIterator() {
-      // TODO: look at using the WidgetIterators class!
-      return new Iterator<Widget>() {
-        int lastIndex = -1;
-        int nextIndex = -1;
-        {
-          findNext();
-        }
-
-        public boolean hasNext() {
-          return nextIndex < widgetList.size();
-        }
-
-        public Widget next() {
-          if (!hasNext()) {
-            throw new NoSuchElementException();
-          }
-          Widget result = widgetList.get(nextIndex);
-          lastIndex = nextIndex;
-          findNext();
-          return result;
-        }
-
-        public void remove() {
-          if (lastIndex < 0) {
-            throw new IllegalStateException();
-          }
-          Widget w = widgetList.get(lastIndex);
-          assert (w.getParent() instanceof HTMLTable);
-          w.removeFromParent();
-          lastIndex = -1;
-        }
-
-        private void findNext() {
-          while (++nextIndex < widgetList.size()) {
-            if (widgetList.get(nextIndex) != null) {
-              return;
-            }
-          }
-        }
-      };
-    }
-
-    private void removeImpl(Element elem, int index) {
-      clearWidgetIndex(elem);
-      widgetList.set(index, null);
-      freeList = new FreeNode(index, freeList);
-    }
-  }
-
-  /**
    * Table's body.
    */
   private final Element bodyElem;
@@ -801,7 +678,7 @@
    */
   private final Element tableElem;
 
-  private WidgetMapper widgetMap = new WidgetMapper();
+  private ElementMapperImpl<Widget> widgetMap = new ElementMapperImpl<Widget>();
 
   /**
    * Create a new empty HTML Table.
@@ -821,7 +698,9 @@
    * Adds a listener to the current table.
    * 
    * @param listener listener to add
-   * @deprecated add a click handler instead and use {@link HTMLTable#getCellForEvent(ClickEvent)} to get the cell information
+   * @deprecated add a click handler instead and use
+   *             {@link HTMLTable#getCellForEvent(ClickEvent)} to get the cell
+   *             information
    */
   @Deprecated
   public void addTableListener(TableListener listener) {
@@ -868,8 +747,9 @@
   public abstract int getCellCount(int row);
 
   /**
-   * Given a click event, return the Cell that was clicked, or null if 
-   * the event did not hit this table.
+   * Given a click event, return the Cell that was clicked, or null if the event
+   * did not hit this table.
+   * 
    * @param event A click event of indeterminate origin
    * @return The appropriate cell, or null
    */
@@ -1004,7 +884,46 @@
    * @return the iterator
    */
   public Iterator<Widget> iterator() {
-    return widgetMap.widgetIterator();
+    return new Iterator<Widget>() {
+      final ArrayList<Widget> widgetList = widgetMap.getObjectList();
+      int lastIndex = -1;
+      int nextIndex = -1;
+      {
+        findNext();
+      }
+
+      public boolean hasNext() {
+        return nextIndex < widgetList.size();
+      }
+
+      public Widget next() {
+        if (!hasNext()) {
+          throw new NoSuchElementException();
+        }
+        Widget result = widgetList.get(nextIndex);
+        lastIndex = nextIndex;
+        findNext();
+        return result;
+      }
+
+      public void remove() {
+        if (lastIndex < 0) {
+          throw new IllegalStateException();
+        }
+        Widget w = widgetList.get(lastIndex);
+        assert (w.getParent() instanceof HTMLTable);
+        w.removeFromParent();
+        lastIndex = -1;
+      }
+
+      private void findNext() {
+        while (++nextIndex < widgetList.size()) {
+          if (widgetList.get(nextIndex) != null) {
+            return;
+          }
+        }
+      }
+    };
   }
 
   /**
@@ -1028,7 +947,7 @@
     DOM.removeChild(DOM.getParent(elem), elem);
 
     // Logical detach.
-    widgetMap.removeWidgetByElement(elem);
+    widgetMap.removeByElement(elem);
     return true;
   }
 
@@ -1129,7 +1048,7 @@
       Element td = cleanCell(row, column, true);
 
       // Logical attach.
-      widgetMap.putWidget(widget);
+      widgetMap.put(widget);
 
       // Physical attach.
       DOM.appendChild(td, widget.getElement());
@@ -1312,7 +1231,7 @@
     Element maybeChild = DOM.getFirstChild(td);
     Widget widget = null;
     if (maybeChild != null) {
-      widget = widgetMap.getWidget(maybeChild);
+      widget = widgetMap.get(maybeChild);
     }
     if (widget != null) {
       // If there is a widget, remove it.
@@ -1462,7 +1381,7 @@
     if (child == null) {
       return null;
     } else {
-      return widgetMap.getWidget(child);
+      return widgetMap.get(child);
     }
   }
 }
diff --git a/user/src/com/google/gwt/user/client/ui/MenuBar.java b/user/src/com/google/gwt/user/client/ui/MenuBar.java
index a8b00b6..0bf2173 100644
--- a/user/src/com/google/gwt/user/client/ui/MenuBar.java
+++ b/user/src/com/google/gwt/user/client/ui/MenuBar.java
@@ -42,33 +42,59 @@
  * <img class='gallery' src='MenuBar.png'/>
  * </p>
  * 
- * <h3>CSS Style Rules</h3> <ul class='css'>
- * <li>.gwt-MenuBar { the menu bar itself }</li>
- * <li>.gwt-MenuBar-horizontal { dependent style applied to horizontal menu bars }</li>
- * <li>.gwt-MenuBar-vertical { dependent style applied to vertical menu bars }</li>
- * <li>.gwt-MenuBar .gwt-MenuItem { menu items }</li>
- * <li>.gwt-MenuBar .gwt-MenuItem-selected { selected menu items }</li>
- * <li>.gwt-MenuBar .gwt-MenuItemSeparator { section breaks between menu items } </li>
- * <li>.gwt-MenuBar .gwt-MenuItemSeparator .menuSeparatorInner { inner component of section separators }</li>
- * <li>.gwt-MenuBarPopup .menuPopupTopLeft { the top left cell }</li>
- * <li>.gwt-MenuBarPopup .menuPopupTopLeftInner { the inner element of the cell }</li>
- * <li>.gwt-MenuBarPopup .menuPopupTopCenter { the top center cell }</li>
- * <li>.gwt-MenuBarPopup .menuPopupTopCenterInner { the inner element of the cell }</li>
- * <li>.gwt-MenuBarPopup .menuPopupTopRight { the top right cell }</li>
- * <li>.gwt-MenuBarPopup .menuPopupTopRightInner { the inner element of the cell }</li>
- * <li>.gwt-MenuBarPopup .menuPopupMiddleLeft { the middle left cell }</li>
- * <li>.gwt-MenuBarPopup .menuPopupMiddleLeftInner { the inner element of the cell }</li>
- * <li>.gwt-MenuBarPopup .menuPopupMiddleCenter { the middle center cell }</li>
- * <li>.gwt-MenuBarPopup .menuPopupMiddleCenterInner { the inner element of the cell }</li>
- * <li>.gwt-MenuBarPopup .menuPopupMiddleRight { the middle right cell }</li>
- * <li>.gwt-MenuBarPopup .menuPopupMiddleRightInner { the inner element of the cell }</li>
- * <li>.gwt-MenuBarPopup .menuPopupBottomLeft { the bottom left cell }</li> 
- * <li>.gwt-MenuBarPopup .menuPopupBottomLeftInner { the inner element of the cell }</li>
- * <li>.gwt-MenuBarPopup .menuPopupBottomCenter { the bottom center cell }</li>
- * <li>.gwt-MenuBarPopup .menuPopupBottomCenterInner { the inner element of the cell }</li>
- * <li>.gwt-MenuBarPopup .menuPopupBottomRight { the bottom right cell }</li>
- * <li>.gwt-MenuBarPopup .menuPopupBottomRightInner { the inner element of the cell }</li>
- * </ul>
+ * <h3>CSS Style Rules</h3>
+ * <dl>
+ * <dd>.gwt-MenuBar</dd>
+ * <dt>the menu bar itself</dt>
+ * <dd>.gwt-MenuBar-horizontal</dd>
+ * <dt>dependent style applied to horizontal menu bars</dt>
+ * <dd>.gwt-MenuBar-vertical</dd>
+ * <dt>dependent style applied to vertical menu bars</dt>
+ * <dd>.gwt-MenuBar .gwt-MenuItem</dd>
+ * <dt>menu items</dt>
+ * <dd>.gwt-MenuBar .gwt-MenuItem-selected</dd>
+ * <dt>selected menu items</dt>
+ * <dd>.gwt-MenuBar .gwt-MenuItemSeparator</dd>
+ * <dt>section breaks between menu items</dt>
+ * <dd>.gwt-MenuBar .gwt-MenuItemSeparator .menuSeparatorInner</dd>
+ * <dt>inner component of section separators</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupTopLeft</dd>
+ * <dt>the top left cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupTopLeftInner</dd>
+ * <dt>the inner element of the cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupTopCenter</dd>
+ * <dt>the top center cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupTopCenterInner</dd>
+ * <dt>the inner element of the cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupTopRight</dd>
+ * <dt>the top right cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupTopRightInner</dd>
+ * <dt>the inner element of the cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupMiddleLeft</dd>
+ * <dt>the middle left cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupMiddleLeftInner</dd>
+ * <dt>the inner element of the cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupMiddleCenter</dd>
+ * <dt>the middle center cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupMiddleCenterInner</dd>
+ * <dt>the inner element of the cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupMiddleRight</dd>
+ * <dt>the middle right cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupMiddleRightInner</dd>
+ * <dt>the inner element of the cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupBottomLeft</dd>
+ * <dt>the bottom left cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupBottomLeftInner</dd>
+ * <dt>the inner element of the cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupBottomCenter</dd>
+ * <dt>the bottom center cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupBottomCenterInner</dd>
+ * <dt>the inner element of the cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupBottomRight</dd>
+ * <dt>the bottom right cell</dt>
+ * <dd>.gwt-MenuBarPopup .menuPopupBottomRightInner</dd>
+ * <dt>the inner element of the cell</dt>
+ * </dl>
  * 
  * <p>
  * <h3>Example</h3>
@@ -429,7 +455,7 @@
       case Event.ONKEYDOWN: {
         int keyCode = DOM.eventGetKeyCode(event);
         switch (keyCode) {
-          case  KeyCodes.KEY_LEFT:
+          case KeyCodes.KEY_LEFT:
             if (LocaleInfo.getCurrentLocale().isRTL()) {
               moveToNextItem();
             } else {
@@ -489,6 +515,9 @@
     CloseEvent.fire(MenuBar.this, sender);
     shownChildMenu = null;
     popup = null;
+    if (parentMenu != null && parentMenu.popup != null) {
+      parentMenu.popup.setPreviewingAllNativeEvents(true);
+    }
   }
 
   /**
@@ -953,6 +982,11 @@
 
   @SuppressWarnings("deprecation")
   private void openPopup(final MenuItem item) {
+    // Only the last popup to be opened should preview all event
+    if (parentMenu != null && parentMenu.popup != null) {
+      parentMenu.popup.setPreviewingAllNativeEvents(false);
+    }
+
     // Create a new popup for this item, and position it next to
     // the item (below if this is a horizontal menu bar, to the
     // right if it's a vertical bar).
diff --git a/user/src/com/google/gwt/user/client/ui/PopupPanel.java b/user/src/com/google/gwt/user/client/ui/PopupPanel.java
index 707fc0b..981d9cb 100644
--- a/user/src/com/google/gwt/user/client/ui/PopupPanel.java
+++ b/user/src/com/google/gwt/user/client/ui/PopupPanel.java
@@ -829,7 +829,7 @@
   @SuppressWarnings("deprecation")
   protected void onPreviewNativeEvent(NativePreviewEvent event) {
     // Cancel the event based on the deprecated onEventPreview() method
-    if (!event.isCanceled() && !onEventPreview(event.getNativeEvent())) {
+    if (event.isFirstHandler() && !onEventPreview(event.getNativeEvent())) {
       event.cancel();
     }
   }
diff --git a/user/src/com/google/gwt/user/client/ui/RadioButton.java b/user/src/com/google/gwt/user/client/ui/RadioButton.java
index 18a68ca..a51ccb9c 100644
--- a/user/src/com/google/gwt/user/client/ui/RadioButton.java
+++ b/user/src/com/google/gwt/user/client/ui/RadioButton.java
@@ -106,6 +106,9 @@
    */
   @Override
   public void setName(String name) {
+    // Just changing the radio button name tends to break groupiness, 
+    // so we have to replace it. Note that replaceInputElement is careful
+    // not to propagate name when it propagates everything else
     super.replaceInputElement(DOM.createInputRadio(name));
   }
 }
diff --git a/user/src/com/google/gwt/user/client/ui/SuggestBox.java b/user/src/com/google/gwt/user/client/ui/SuggestBox.java
index 02bede2..90a464e 100644
--- a/user/src/com/google/gwt/user/client/ui/SuggestBox.java
+++ b/user/src/com/google/gwt/user/client/ui/SuggestBox.java
@@ -388,16 +388,6 @@
   }
 
   /**
-   * Returns whether or not the first suggestion will be automatically selected.
-   * This behavior is off by default.
-   * 
-   * @return true if the first suggestion will be automatically selected
-   */
-  public boolean getSelectsFirstItem() {
-    return selectsFirstItem;
-  }
-
-  /**
    * Gets the suggest box's {@link com.google.gwt.user.client.ui.SuggestOracle}.
    * 
    * @return the {@link SuggestOracle}
@@ -439,6 +429,16 @@
   }
 
   /**
+   * Returns whether or not the first suggestion will be automatically selected.
+   * This behavior is on by default.
+   * 
+   * @return true if the first suggestion will be automatically selected
+   */
+  public boolean isAutoSelectEnabled() {
+    return selectsFirstItem;
+  }
+
+  /**
    * @return true if the list of suggestions is currently showing, false if not
    */
   public boolean isSuggestionListShowing() {
@@ -478,6 +478,17 @@
     suggestionPopup.setAnimationEnabled(enable);
   }
 
+  /**
+   * Turns on or off the behavior that automatically selects the first suggested
+   * item. This behavior is on by default.
+   * 
+   * @param selectsFirstItem Whether or not to automatically select the first
+   *          suggestion
+   */
+  public void setAutoSelectEnabled(boolean selectsFirstItem) {
+    this.selectsFirstItem = selectsFirstItem;
+  }
+
   public void setFocus(boolean focused) {
     box.setFocus(focused);
   }
@@ -502,17 +513,6 @@
     suggestionPopup.setStyleName(style);
   }
 
-  /**
-   * Turns on or off the behavior that automatically selects the first suggested
-   * item. It defaults to off.
-   * 
-   * @param selectsFirstItem Whether or not to automatically select the first
-   *          suggested
-   */
-  public void setSelectsFirstItem(boolean selectsFirstItem) {
-    this.selectsFirstItem = selectsFirstItem;
-  }
-
   public void setTabIndex(int index) {
     box.setTabIndex(index);
   }
diff --git a/user/src/com/google/gwt/user/datepicker/client/CellGridImpl.java b/user/src/com/google/gwt/user/datepicker/client/CellGridImpl.java
index 7530165..68c54e1 100644
--- a/user/src/com/google/gwt/user/datepicker/client/CellGridImpl.java
+++ b/user/src/com/google/gwt/user/datepicker/client/CellGridImpl.java
@@ -21,6 +21,7 @@
 import com.google.gwt.event.dom.client.KeyCodes;

 import com.google.gwt.user.client.DOM;

 import com.google.gwt.user.client.Event;

+import com.google.gwt.user.client.impl.ElementMapperImpl;

 import com.google.gwt.user.client.ui.Grid;

 import com.google.gwt.user.client.ui.UIObject;

 

@@ -39,7 +40,7 @@
   /**

    * Cell type.

    */

-  abstract class Cell extends UIObject {

+  public abstract class Cell extends UIObject {

     private boolean enabled = true;

     private V value;

     private int index;

@@ -136,7 +137,7 @@
   private Cell highlightedCell;

 

   private Cell selectedCell;

-  private ElementMapper<Cell> elementToCell = new ElementMapper<Cell>();

+  private ElementMapperImpl<Cell> elementToCell = new ElementMapperImpl<Cell>();

   private ArrayList<Cell> cellList = new ArrayList<Cell>();

 

   protected CellGridImpl() {

diff --git a/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome.css b/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome.css
index f71a4a9..91decf2 100644
--- a/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome.css
+++ b/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome.css
@@ -3,15 +3,13 @@
  *
  * In order to maintain cross-browser compatibility, the following syntax is
  * used to create IE6 specific style rules:
- *    html>body .gwt-Widget {
- *      Rule applies to all browsers (including IE7), except IE6
+ *    .gwt-Widget {
+ *      property: rule applies to all browsers
+ *      -property: rule applies only to IE6 (overrides previous rule)
  *    }
  *    * html .gwt-Widget {
- *      Rule applied to IE6 only (not to IE7)
+ *      property: rule applies to all versions of IE
  *    }
- * 
- * Specifically, IE6 does not support images with multiple transparent colors,
- * so we need to use the AlphaImageLoader in IE6 only.
  */
 
 body, table td, select {
@@ -94,46 +92,29 @@
   height: 5px;
   zoom: 1;
 }
-html>body .gwt-DecoratorPanel .topLeft {
+.gwt-DecoratorPanel .topLeft {
   background: url(images/corner.png) no-repeat 0px 0px;
+  -background: url(images/corner_ie6.png) no-repeat 0px 0px;
 }
-html>body .gwt-DecoratorPanel .topRight {
+.gwt-DecoratorPanel .topRight {
   background: url(images/corner.png) no-repeat -5px 0px;
+  -background: url(images/corner_ie6.png) no-repeat -5px 0px;
 }
-html>body .gwt-DecoratorPanel .bottomLeft {
+.gwt-DecoratorPanel .bottomLeft {
   background: url(images/corner.png) no-repeat 0px -5px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -5px;
 }
-html>body .gwt-DecoratorPanel .bottomRight {
+.gwt-DecoratorPanel .bottomRight {
   background: url(images/corner.png) no-repeat -5px -5px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -5px;
 }
-* html .gwt-DecoratorPanel .topLeftInner {
-  width: 5px;
-  height: 5px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
-}
-* html .gwt-DecoratorPanel .topRightInner {
-  width: 10px;
-  height: 5px;
-  margin-left: -5px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
-}
-* html .gwt-DecoratorPanel .bottomLeftInner {
-  width: 5px;
-  height: 10px;
-  margin-left: 0px;
-  margin-top: -5px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
-}
+* html .gwt-DecoratorPanel .topLeftInner,
+* html .gwt-DecoratorPanel .topRightInner,
+* html .gwt-DecoratorPanel .bottomLeftInner,
 * html .gwt-DecoratorPanel .bottomRightInner {
-  width: 10px;
-  height: 10px;
-  margin-left: -5px;
-  margin-top: -5px;
+  width: 5px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-DialogBox .Caption {
@@ -149,20 +130,16 @@
   padding: 3px;
   background: white;
 }
-html>body .gwt-DialogBox .dialogBottomCenter {
+.gwt-DialogBox .dialogBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-DialogBox .dialogBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-DialogBox .dialogMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-DialogBox .dialogMiddleRight {
+.gwt-DialogBox .dialogMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-DialogBox .dialogMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-DialogBox .dialogTopLeftInner {
   width: 5px;
@@ -182,42 +159,39 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-DialogBox .dialogTopLeft {
+.gwt-DialogBox .dialogTopLeft {
   background: url(images/corner.png) no-repeat -13px 0px;
+  -background: url(images/corner_ie6.png) no-repeat -13px 0px;
 }
-html>body .gwt-DialogBox .dialogTopRight {
+.gwt-DialogBox .dialogTopRight {
   background: url(images/corner.png) no-repeat -18px 0px;
+  -background: url(images/corner_ie6.png) no-repeat -18px 0px;
 }
-html>body .gwt-DialogBox .dialogBottomLeft {
+.gwt-DialogBox .dialogBottomLeft {
   background: url(images/corner.png) no-repeat 0px -15px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -15px;
 }
-html>body .gwt-DialogBox .dialogBottomRight {
+.gwt-DialogBox .dialogBottomRight {
   background: url(images/corner.png) no-repeat -5px -15px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -15px;
 }
-* html .gwt-DialogBox .dialogTopLeft {
+* html .gwt-DialogBox .dialogTopLeftInner {
   width: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/corner_dialog_topleft.png',sizingMethod='crop');
 }
-* html .gwt-DialogBox .dialogTopRight {
+* html .gwt-DialogBox .dialogTopRightInner {
   width: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/corner_dialog_topright.png',sizingMethod='crop');
 }
 * html .gwt-DialogBox .dialogBottomLeftInner {
   width: 5px;
-  height: 23px;
-  margin-top: -15px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DialogBox .dialogBottomRightInner {
-  width: 13px;
-  height: 23px;
-  margin-left: -5px;
-  margin-top: -15px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-DisclosurePanel {
@@ -346,20 +320,17 @@
 .gwt-MenuBarPopup .menuPopupTopCenter {
   background: url(images/hborder.png) 0px -12px repeat-x;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomCenter {
+.gwt-MenuBarPopup .menuPopupBottomCenter {
   background: url(images/hborder.png) 0px -13px repeat-x;
-}
-* html .gwt-MenuBarPopup .menuPopupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/hborder_gray_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) 0px -13px repeat-x;
 }
 .gwt-MenuBarPopup .menuPopupMiddleLeft {
   background: url(images/vborder.png) -12px 0px repeat-y;
+  -background: url(images/vborder_ie6.png) -12px 0px repeat-y;
 }
-html>body .gwt-MenuBarPopup .menuPopupMiddleRight {
+.gwt-MenuBarPopup .menuPopupMiddleRight {
   background: url(images/vborder.png) -13px 0px repeat-y;
-}
-* html .gwt-MenuBarPopup .menuPopupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/vborder_gray_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) -13px 0px repeat-y;
 }
 .gwt-MenuBarPopup .menuPopupTopLeftInner {
   width: 5px;
@@ -381,47 +352,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-MenuBarPopup .menuPopupTopLeft {
+.gwt-MenuBarPopup .menuPopupTopLeft {
   background: url(images/corner.png) no-repeat 0px -36px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -36px;
 }
-html>body .gwt-MenuBarPopup .menuPopupTopRight {
+.gwt-MenuBarPopup .menuPopupTopRight {
   background: url(images/corner.png) no-repeat -5px -36px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -36px;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomLeft {
+.gwt-MenuBarPopup .menuPopupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -41px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -41px;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomRight {
+.gwt-MenuBarPopup .menuPopupBottomRight {
   background: url(images/corner.png) no-repeat -5px -41px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -41px;
 }
 * html .gwt-MenuBarPopup .menuPopupTopLeftInner {
   width: 5px;
-  height: 41px;
-  margin-top: -36px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupTopRightInner {
-  width: 13px;
-  height: 41px;
-  margin-left: -5px;
-  margin-top: -36px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupBottomLeftInner {
   width: 5px;
-  height: 49px;
-  margin-top: -41px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupBottomRightInner {
-  width: 13px;
-  height: 49px;
-  margin-left: -5px;
-  margin-top: -41px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-PasswordTextBox {
@@ -446,20 +411,16 @@
 .gwt-DecoratedPopupPanel .popupTopCenter {
   background: url(images/hborder.png) repeat-x;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomCenter {
+.gwt-DecoratedPopupPanel .popupBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-DecoratedPopupPanel .popupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-DecoratedPopupPanel .popupMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-DecoratedPopupPanel .popupMiddleRight {
+.gwt-DecoratedPopupPanel .popupMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-DecoratedPopupPanel .popupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-DecoratedPopupPanel .popupTopLeftInner {
   width: 5px;
@@ -481,47 +442,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-DecoratedPopupPanel .popupTopLeft {
+.gwt-DecoratedPopupPanel .popupTopLeft {
   background: url(images/corner.png) no-repeat 0px -10px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -10px;
 }
-html>body .gwt-DecoratedPopupPanel .popupTopRight {
+.gwt-DecoratedPopupPanel .popupTopRight {
   background: url(images/corner.png) no-repeat -5px -10px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -10px;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomLeft {
+.gwt-DecoratedPopupPanel .popupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -15px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -15px;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomRight {
+.gwt-DecoratedPopupPanel .popupBottomRight {
   background: url(images/corner.png) no-repeat -5px -15px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -15px;
 }
 * html .gwt-DecoratedPopupPanel .popupTopLeftInner {
   width: 5px;
-  height: 15px;
-  margin-top: -10px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupTopRightInner {
-  width: 13px;
-  height: 15px;
-  margin-left: -5px;
-  margin-top: -10px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupBottomLeftInner {
   width: 5px;
-  height: 23px;
-  margin-top: -15px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupBottomRightInner {
-  width: 13px;
-  height: 23px;
-  margin-left: -5px;
-  margin-top: -15px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-PushButton-up,
@@ -686,37 +641,26 @@
   width: 6px;
   zoom: 1;
 }
-html>body .gwt-DecoratedStackPanel .stackItemTopLeft {
-  background: #e4e4e4 url(images/corner.png) no-repeat 0px -49px;
+.gwt-DecoratedStackPanel .stackItemTopLeft {
   border-left: 1px solid #bbbbbb;
+  background: #e4e4e4 url(images/corner.png) no-repeat 0px -49px;
+  -background: #e4e4e4 url(images/corner_ie6.png) no-repeat 0px -49px;
 }
-html>body .gwt-DecoratedStackPanel .stackItemTopRight {
-  background: #e4e4e4 url(images/corner.png) no-repeat -6px -49px;
+.gwt-DecoratedStackPanel .stackItemTopRight {
   border-right: 1px solid #bbbbbb;
+  background: #e4e4e4 url(images/corner.png) no-repeat -6px -49px;
+  -background: #e4e4e4 url(images/corner_ie6.png) no-repeat -6px -49px;
 }
 .gwt-DecoratedStackPanel .stackItemTopLeftInner,
 .gwt-DecoratedStackPanel .stackItemTopRightInner {
   width: 1px;
   height: 1px;
 }
-* html .gwt-DecoratedStackPanel .stackItemTopLeftInner {
-  width: 6px;
-  height: 55px;
-  margin-top: -49px;
-  overflow: hidden;
-  border-left: 1px solid #bbbbbb;
-  background-color: #d3def6;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
-}
+* html .gwt-DecoratedStackPanel .stackItemTopLeftInner,
 * html .gwt-DecoratedStackPanel .stackItemTopRightInner {
-  width: 12px;
-  height: 55px;
-  margin-top: -49px;
-  margin-left: -6px;
+  width: 6px;
+  height: 6px;
   overflow: hidden;
-  border-right: 1px solid #bbbbbb;
-  background-color: #d3def6;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 .gwt-DecoratedStackPanel .stackItemTopCenter {
   background: url(images/hborder.png) 0px -21px repeat-x;
@@ -739,25 +683,13 @@
   font-size: 1.3em;
   background: #d3def6 url(images/hborder.png) repeat-x 0px -989px;
 }
-html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRight,
-html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeft {
+.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRight,
+.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeft {
   border: 0px;
   background-color: white;
 }
-html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeft,
-html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRight {
-  background-color: white;
-}
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeftInner,
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRightInner {
-  border: 0px;
-  background-color: white;
-}
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeftInner {
-  padding-left: 1px;
-}
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeftInner,
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRightInner {
+.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeft,
+.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRight {
   background-color: white;
 }
 
@@ -781,20 +713,16 @@
 .gwt-SuggestBoxPopup .suggestPopupTopCenter {
   background: url(images/hborder.png) repeat-x;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomCenter {
+.gwt-SuggestBoxPopup .suggestPopupBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-SuggestBoxPopup .suggestPopupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-SuggestBoxPopup .suggestPopupMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupMiddleRight {
+.gwt-SuggestBoxPopup .suggestPopupMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-SuggestBoxPopup .suggestPopupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-SuggestBoxPopup .suggestPopupTopLeftInner {
   width: 5px;
@@ -816,47 +744,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupTopLeft {
+.gwt-SuggestBoxPopup .suggestPopupTopLeft {
   background: url(images/corner.png) no-repeat 0px -23px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -23px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupTopRight {
+.gwt-SuggestBoxPopup .suggestPopupTopRight {
   background: url(images/corner.png) no-repeat -5px -23px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -23px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomLeft {
+.gwt-SuggestBoxPopup .suggestPopupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -28px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -28px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomRight {
+.gwt-SuggestBoxPopup .suggestPopupBottomRight {
   background: url(images/corner.png) no-repeat -5px -28px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -28px;
 }
 * html .gwt-SuggestBoxPopup .suggestPopupTopLeftInner {
   width: 5px;
-  height: 28px;
-  margin-top: -23px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupTopRightInner {
-  width: 13px;
-  height: 28px;
-  margin-left: -5px;
-  margin-top: -23px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupBottomLeftInner {
   width: 5px;
-  height: 36px;
-  margin-top: -28px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupBottomRightInner {
-  width: 13px;
-  height: 36px;
-  margin-left: -5px;
-  margin-top: -28px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-TabBar {
@@ -919,26 +841,19 @@
   width: 6px;
   height: 6px;
 }
-html>body .gwt-DecoratedTabBar .tabTopLeft {
+.gwt-DecoratedTabBar .tabTopLeft {
   background: url(images/corner.png) no-repeat 0px -55px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -55px;
 }
-html>body .gwt-DecoratedTabBar .tabTopRight {
+.gwt-DecoratedTabBar .tabTopRight {
   background: url(images/corner.png) no-repeat -6px -55px;
+  -background: url(images/corner_ie6.png) no-repeat -6px -55px;
 }
-* html .gwt-DecoratedTabBar .tabTopLeftInner {
-  width: 5px;
-  height: 61px;
-  margin-top: -55px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
-}
+* html .gwt-DecoratedTabBar .tabTopLeftInner,
 * html .gwt-DecoratedTabBar .tabTopRightInner {
-  width: 12px;
-  height: 61px;
-  margin-top: -55px;
-  margin-left: -6px;
+  width: 6px;
+  height: 6px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 .gwt-DecoratedTabBar .tabMiddleLeft,
 .gwt-DecoratedTabBar .tabMiddleRight {
@@ -963,27 +878,12 @@
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopCenter {
   background: #747474;
 }
-html>body .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft {
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft {
   background-position: 0px -61px;
 }
-html>body .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight {
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight {
   background-position: -6px -61px;
 }
-* html .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeftInner {
-  width: 5px;
-  height: 67px;
-  margin-top: -61px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
-}
-* html .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRightInner {
-  width: 12px;
-  height: 67px;
-  margin-top: -61px;
-  margin-left: -6px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
-}
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleLeft,
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleRight {
   background: #bcbcbc url(images/hborder.png) repeat-x 0px -2511px;
diff --git a/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome_rtl.css b/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome_rtl.css
index 6d8a276..8fae597 100644
--- a/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome_rtl.css
+++ b/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome_rtl.css
@@ -3,15 +3,13 @@
  *
  * In order to maintain cross-browser compatibility, the following syntax is
  * used to create IE6 specific style rules:
- *    html>body .gwt-Widget {
- *      Rule applies to all browsers (including IE7), except IE6
+ *    .gwt-Widget {
+ *      property: rule applies to all browsers
+ *      -property: rule applies only to IE6 (overrides previous rule)
  *    }
  *    * html .gwt-Widget {
- *      Rule applied to IE6 only (not to IE7)
+ *      property: rule applies to all versions of IE
  *    }
- * 
- * Specifically, IE6 does not support images with multiple transparent colors,
- * so we need to use the AlphaImageLoader in IE6 only.
  */
 
 body, table td, select {
@@ -94,46 +92,29 @@
   height: 5px;
   zoom: 1;
 }
-html>body .gwt-DecoratorPanel .topLeft {
+.gwt-DecoratorPanel .topLeft {
   background: url(images/corner.png) no-repeat 0px 0px;
+  -background: url(images/corner_ie6.png) no-repeat 0px 0px;
 }
-html>body .gwt-DecoratorPanel .topRight {
+.gwt-DecoratorPanel .topRight {
   background: url(images/corner.png) no-repeat -5px 0px;
+  -background: url(images/corner_ie6.png) no-repeat -5px 0px;
 }
-html>body .gwt-DecoratorPanel .bottomLeft {
+.gwt-DecoratorPanel .bottomLeft {
   background: url(images/corner.png) no-repeat 0px -5px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -5px;
 }
-html>body .gwt-DecoratorPanel .bottomRight {
+.gwt-DecoratorPanel .bottomRight {
   background: url(images/corner.png) no-repeat -5px -5px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -5px;
 }
-* html .gwt-DecoratorPanel .topLeftInner {
-  width: 5px;
-  height: 5px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
-}
-* html .gwt-DecoratorPanel .topRightInner {
-  width: 10px;
-  height: 5px;
-  margin-left: -5px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
-}
-* html .gwt-DecoratorPanel .bottomLeftInner {
-  width: 5px;
-  height: 10px;
-  margin-left: 0px;
-  margin-top: -5px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
-}
+* html .gwt-DecoratorPanel .topLeftInner,
+* html .gwt-DecoratorPanel .topRightInner,
+* html .gwt-DecoratorPanel .bottomLeftInner,
 * html .gwt-DecoratorPanel .bottomRightInner {
-  width: 10px;
-  height: 10px;
-  margin-left: -5px;
-  margin-top: -5px;
+  width: 5px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-DialogBox .Caption {
@@ -149,20 +130,16 @@
   padding: 3px;
   background: white;
 }
-html>body .gwt-DialogBox .dialogBottomCenter {
+.gwt-DialogBox .dialogBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-DialogBox .dialogBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-DialogBox .dialogMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-DialogBox .dialogMiddleRight {
+.gwt-DialogBox .dialogMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-DialogBox .dialogMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-DialogBox .dialogTopLeftInner {
   width: 5px;
@@ -182,42 +159,39 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-DialogBox .dialogTopLeft {
+.gwt-DialogBox .dialogTopLeft {
   background: url(images/corner.png) no-repeat -13px 0px;
+  -background: url(images/corner_ie6.png) no-repeat -13px 0px;
 }
-html>body .gwt-DialogBox .dialogTopRight {
+.gwt-DialogBox .dialogTopRight {
   background: url(images/corner.png) no-repeat -18px 0px;
+  -background: url(images/corner_ie6.png) no-repeat -18px 0px;
 }
-html>body .gwt-DialogBox .dialogBottomLeft {
+.gwt-DialogBox .dialogBottomLeft {
   background: url(images/corner.png) no-repeat 0px -15px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -15px;
 }
-html>body .gwt-DialogBox .dialogBottomRight {
+.gwt-DialogBox .dialogBottomRight {
   background: url(images/corner.png) no-repeat -5px -15px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -15px;
 }
-* html .gwt-DialogBox .dialogTopLeft {
+* html .gwt-DialogBox .dialogTopLeftInner {
   width: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/corner_dialog_topleft.png',sizingMethod='crop');
 }
-* html .gwt-DialogBox .dialogTopRight {
+* html .gwt-DialogBox .dialogTopRightInner {
   width: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/corner_dialog_topright.png',sizingMethod='crop');
 }
 * html .gwt-DialogBox .dialogBottomLeftInner {
   width: 5px;
-  height: 23px;
-  margin-top: -15px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DialogBox .dialogBottomRightInner {
-  width: 13px;
-  height: 23px;
-  margin-left: -5px;
-  margin-top: -15px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-DisclosurePanel {
@@ -346,20 +320,17 @@
 .gwt-MenuBarPopup .menuPopupTopCenter {
   background: url(images/hborder.png) 0px -12px repeat-x;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomCenter {
+.gwt-MenuBarPopup .menuPopupBottomCenter {
   background: url(images/hborder.png) 0px -13px repeat-x;
-}
-* html .gwt-MenuBarPopup .menuPopupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/hborder_gray_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) 0px -13px repeat-x;
 }
 .gwt-MenuBarPopup .menuPopupMiddleLeft {
   background: url(images/vborder.png) -12px 0px repeat-y;
+  -background: url(images/vborder_ie6.png) -12px 0px repeat-y;
 }
-html>body .gwt-MenuBarPopup .menuPopupMiddleRight {
+.gwt-MenuBarPopup .menuPopupMiddleRight {
   background: url(images/vborder.png) -13px 0px repeat-y;
-}
-* html .gwt-MenuBarPopup .menuPopupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/vborder_gray_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) -13px 0px repeat-y;
 }
 .gwt-MenuBarPopup .menuPopupTopLeftInner {
   width: 5px;
@@ -381,47 +352,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-MenuBarPopup .menuPopupTopLeft {
+.gwt-MenuBarPopup .menuPopupTopLeft {
   background: url(images/corner.png) no-repeat 0px -36px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -36px;
 }
-html>body .gwt-MenuBarPopup .menuPopupTopRight {
+.gwt-MenuBarPopup .menuPopupTopRight {
   background: url(images/corner.png) no-repeat -5px -36px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -36px;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomLeft {
+.gwt-MenuBarPopup .menuPopupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -41px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -41px;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomRight {
+.gwt-MenuBarPopup .menuPopupBottomRight {
   background: url(images/corner.png) no-repeat -5px -41px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -41px;
 }
 * html .gwt-MenuBarPopup .menuPopupTopLeftInner {
   width: 5px;
-  height: 41px;
-  margin-top: -36px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupTopRightInner {
-  width: 13px;
-  height: 41px;
-  margin-left: -5px;
-  margin-top: -36px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupBottomLeftInner {
   width: 5px;
-  height: 49px;
-  margin-top: -41px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupBottomRightInner {
-  width: 13px;
-  height: 49px;
-  margin-left: -5px;
-  margin-top: -41px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-PasswordTextBox {
@@ -446,20 +411,16 @@
 .gwt-DecoratedPopupPanel .popupTopCenter {
   background: url(images/hborder.png) repeat-x;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomCenter {
+.gwt-DecoratedPopupPanel .popupBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-DecoratedPopupPanel .popupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-DecoratedPopupPanel .popupMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-DecoratedPopupPanel .popupMiddleRight {
+.gwt-DecoratedPopupPanel .popupMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-DecoratedPopupPanel .popupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-DecoratedPopupPanel .popupTopLeftInner {
   width: 5px;
@@ -481,47 +442,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-DecoratedPopupPanel .popupTopLeft {
+.gwt-DecoratedPopupPanel .popupTopLeft {
   background: url(images/corner.png) no-repeat 0px -10px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -10px;
 }
-html>body .gwt-DecoratedPopupPanel .popupTopRight {
+.gwt-DecoratedPopupPanel .popupTopRight {
   background: url(images/corner.png) no-repeat -5px -10px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -10px;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomLeft {
+.gwt-DecoratedPopupPanel .popupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -15px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -15px;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomRight {
+.gwt-DecoratedPopupPanel .popupBottomRight {
   background: url(images/corner.png) no-repeat -5px -15px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -15px;
 }
 * html .gwt-DecoratedPopupPanel .popupTopLeftInner {
   width: 5px;
-  height: 15px;
-  margin-top: -10px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupTopRightInner {
-  width: 13px;
-  height: 15px;
-  margin-left: -5px;
-  margin-top: -10px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupBottomLeftInner {
   width: 5px;
-  height: 23px;
-  margin-top: -15px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupBottomRightInner {
-  width: 13px;
-  height: 23px;
-  margin-left: -5px;
-  margin-top: -15px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-PushButton-up,
@@ -686,37 +641,26 @@
   width: 6px;
   zoom: 1;
 }
-html>body .gwt-DecoratedStackPanel .stackItemTopLeft {
-  background: #e4e4e4 url(images/corner.png) no-repeat 0px -49px;
+.gwt-DecoratedStackPanel .stackItemTopLeft {
   border-left: 1px solid #bbbbbb;
+  background: #e4e4e4 url(images/corner.png) no-repeat 0px -49px;
+  -background: #e4e4e4 url(images/corner_ie6.png) no-repeat 0px -49px;
 }
-html>body .gwt-DecoratedStackPanel .stackItemTopRight {
-  background: #e4e4e4 url(images/corner.png) no-repeat -6px -49px;
+.gwt-DecoratedStackPanel .stackItemTopRight {
   border-right: 1px solid #bbbbbb;
+  background: #e4e4e4 url(images/corner.png) no-repeat -6px -49px;
+  -background: #e4e4e4 url(images/corner_ie6.png) no-repeat -6px -49px;
 }
 .gwt-DecoratedStackPanel .stackItemTopLeftInner,
 .gwt-DecoratedStackPanel .stackItemTopRightInner {
   width: 1px;
   height: 1px;
 }
-* html .gwt-DecoratedStackPanel .stackItemTopLeftInner {
-  width: 6px;
-  height: 55px;
-  margin-top: -49px;
-  overflow: hidden;
-  border-left: 1px solid #bbbbbb;
-  background-color: #d3def6;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
-}
+* html .gwt-DecoratedStackPanel .stackItemTopLeftInner,
 * html .gwt-DecoratedStackPanel .stackItemTopRightInner {
-  width: 12px;
-  height: 55px;
-  margin-top: -49px;
-  margin-left: -6px;
+  width: 6px;
+  height: 6px;
   overflow: hidden;
-  border-right: 1px solid #bbbbbb;
-  background-color: #d3def6;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 .gwt-DecoratedStackPanel .stackItemTopCenter {
   background: url(images/hborder.png) 0px -21px repeat-x;
@@ -739,25 +683,13 @@
   font-size: 1.3em;
   background: #d3def6 url(images/hborder.png) repeat-x 0px -989px;
 }
-html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRight,
-html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeft {
+.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRight,
+.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeft {
   border: 0px;
   background-color: white;
 }
-html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeft,
-html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRight {
-  background-color: white;
-}
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeftInner,
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRightInner {
-  border: 0px;
-  background-color: white;
-}
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeftInner {
-  padding-right: 1px;
-}
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeftInner,
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRightInner {
+.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeft,
+.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRight {
   background-color: white;
 }
 
@@ -781,20 +713,16 @@
 .gwt-SuggestBoxPopup .suggestPopupTopCenter {
   background: url(images/hborder.png) repeat-x;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomCenter {
+.gwt-SuggestBoxPopup .suggestPopupBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-SuggestBoxPopup .suggestPopupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-SuggestBoxPopup .suggestPopupMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupMiddleRight {
+.gwt-SuggestBoxPopup .suggestPopupMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-SuggestBoxPopup .suggestPopupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-SuggestBoxPopup .suggestPopupTopLeftInner {
   width: 5px;
@@ -816,47 +744,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupTopLeft {
+.gwt-SuggestBoxPopup .suggestPopupTopLeft {
   background: url(images/corner.png) no-repeat 0px -23px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -23px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupTopRight {
+.gwt-SuggestBoxPopup .suggestPopupTopRight {
   background: url(images/corner.png) no-repeat -5px -23px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -23px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomLeft {
+.gwt-SuggestBoxPopup .suggestPopupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -28px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -28px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomRight {
+.gwt-SuggestBoxPopup .suggestPopupBottomRight {
   background: url(images/corner.png) no-repeat -5px -28px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -28px;
 }
 * html .gwt-SuggestBoxPopup .suggestPopupTopLeftInner {
   width: 5px;
-  height: 28px;
-  margin-top: -23px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupTopRightInner {
-  width: 13px;
-  height: 28px;
-  margin-left: -5px;
-  margin-top: -23px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupBottomLeftInner {
   width: 5px;
-  height: 36px;
-  margin-top: -28px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupBottomRightInner {
-  width: 13px;
-  height: 36px;
-  margin-left: -5px;
-  margin-top: -28px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-TabBar {
@@ -919,26 +841,19 @@
   width: 6px;
   height: 6px;
 }
-html>body .gwt-DecoratedTabBar .tabTopLeft {
+.gwt-DecoratedTabBar .tabTopLeft {
   background: url(images/corner.png) no-repeat 0px -55px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -55px;
 }
-html>body .gwt-DecoratedTabBar .tabTopRight {
+.gwt-DecoratedTabBar .tabTopRight {
   background: url(images/corner.png) no-repeat -6px -55px;
+  -background: url(images/corner_ie6.png) no-repeat -6px -55px;
 }
-* html .gwt-DecoratedTabBar .tabTopLeftInner {
-  width: 5px;
-  height: 61px;
-  margin-top: -55px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
-}
+* html .gwt-DecoratedTabBar .tabTopLeftInner,
 * html .gwt-DecoratedTabBar .tabTopRightInner {
-  width: 12px;
-  height: 61px;
-  margin-top: -55px;
-  margin-left: -6px;
+  width: 6px;
+  height: 6px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
 }
 .gwt-DecoratedTabBar .tabMiddleLeft,
 .gwt-DecoratedTabBar .tabMiddleRight {
@@ -963,27 +878,12 @@
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopCenter {
   background: #747474;
 }
-html>body .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft {
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft {
   background-position: 0px -61px;
 }
-html>body .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight {
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight {
   background-position: -6px -61px;
 }
-* html .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeftInner {
-  width: 5px;
-  height: 67px;
-  margin-top: -61px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
-}
-* html .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRightInner {
-  width: 12px;
-  height: 67px;
-  margin-top: -61px;
-  margin-left: -6px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/chrome/images/corner.png',sizingMethod='crop');
-}
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleLeft,
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleRight {
   background: #bcbcbc url(images/hborder.png) repeat-x 0px -2511px;
diff --git a/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/images/corner.png b/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/images/corner.png
index 73ae36e..f57b153 100644
--- a/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/images/corner.png
+++ b/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/images/corner.png
Binary files differ
diff --git a/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/images/corner_ie6.png b/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/images/corner_ie6.png
new file mode 100644
index 0000000..fd1ccf0
--- /dev/null
+++ b/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/images/corner_ie6.png
Binary files differ
diff --git a/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/images/hborder_ie6.png b/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/images/hborder_ie6.png
new file mode 100644
index 0000000..4f4dea1
--- /dev/null
+++ b/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/images/hborder_ie6.png
Binary files differ
diff --git a/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/images/vborder_ie6.png b/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/images/vborder_ie6.png
new file mode 100644
index 0000000..c5596d3
--- /dev/null
+++ b/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/images/vborder_ie6.png
Binary files differ
diff --git a/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark.css b/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark.css
index 6b274f3..1bde5b3 100644
--- a/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark.css
+++ b/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark.css
@@ -3,21 +3,19 @@
  *
  * In order to maintain cross-browser compatibility, the following syntax is
  * used to create IE6 specific style rules:
- *    html>body .gwt-Widget {
- *      Rule applies to all browsers (including IE7), except IE6
+ *    .gwt-Widget {
+ *      property: rule applies to all browsers
+ *      -property: rule applies only to IE6 (overrides previous rule)
  *    }
  *    * html .gwt-Widget {
- *      Rule applied to IE6 only (not to IE7)
+ *      property: rule applies to all versions of IE
  *    }
- * 
- * Specifically, IE6 does not support images with multiple transparent colors,
- * so we need to use the AlphaImageLoader in IE6 only.
  */
 
 body, table td, select {
   font-family: Arial Unicode MS, Arial, sans-serif;
   font-size: small;
-  color: #bec7cc
+  color: #bec7cc;
 }
 select {
   color: #000;
@@ -115,20 +113,16 @@
   padding: 3px;
   background: #666666;
 }
-html>body .gwt-DialogBox .dialogBottomCenter {
+.gwt-DialogBox .dialogBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-DialogBox .dialogBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-DialogBox .dialogMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-DialogBox .dialogMiddleRight {
+.gwt-DialogBox .dialogMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-DialogBox .dialogMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-DialogBox .dialogTopLeftInner {
   width: 5px;
@@ -148,42 +142,39 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-DialogBox .dialogTopLeft {
+.gwt-DialogBox .dialogTopLeft {
   background: url(images/corner.png) no-repeat -13px 0px;
+  -background: url(images/corner_ie6.png) no-repeat -13px 0px;
 }
-html>body .gwt-DialogBox .dialogTopRight {
+.gwt-DialogBox .dialogTopRight {
   background: url(images/corner.png) no-repeat -18px 0px;
+  -background: url(images/corner_ie6.png) no-repeat -18px 0px;
 }
-html>body .gwt-DialogBox .dialogBottomLeft {
+.gwt-DialogBox .dialogBottomLeft {
   background: url(images/corner.png) no-repeat 0px -15px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -15px;
 }
-html>body .gwt-DialogBox .dialogBottomRight {
+.gwt-DialogBox .dialogBottomRight {
   background: url(images/corner.png) no-repeat -5px -15px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -15px;
 }
-* html .gwt-DialogBox .dialogTopLeft {
+* html .gwt-DialogBox .dialogTopLeftInner {
   width: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/corner_dialog_topleft.png',sizingMethod='crop');
 }
-* html .gwt-DialogBox .dialogTopRight {
+* html .gwt-DialogBox .dialogTopRightInner {
   width: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/corner_dialog_topright.png',sizingMethod='crop');
 }
 * html .gwt-DialogBox .dialogBottomLeftInner {
   width: 5px;
-  height: 23px;
-  margin-top: -15px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DialogBox .dialogBottomRightInner {
-  width: 13px;
-  height: 23px;
-  margin-left: -5px;
-  margin-top: -15px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-DisclosurePanel {
@@ -312,20 +303,17 @@
 .gwt-MenuBarPopup .menuPopupTopCenter {
   background: url(images/hborder.png) 0px -12px repeat-x;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomCenter {
+.gwt-MenuBarPopup .menuPopupBottomCenter {
   background: url(images/hborder.png) 0px -13px repeat-x;
-}
-* html .gwt-MenuBarPopup .menuPopupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/hborder_gray_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) 0px -13px repeat-x;
 }
 .gwt-MenuBarPopup .menuPopupMiddleLeft {
   background: url(images/vborder.png) -12px 0px repeat-y;
+  -background: url(images/vborder_ie6.png) -12px 0px repeat-y;
 }
-html>body .gwt-MenuBarPopup .menuPopupMiddleRight {
+.gwt-MenuBarPopup .menuPopupMiddleRight {
   background: url(images/vborder.png) -13px 0px repeat-y;
-}
-* html .gwt-MenuBarPopup .menuPopupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/vborder_gray_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) -13px 0px repeat-y;
 }
 .gwt-MenuBarPopup .menuPopupTopLeftInner {
   width: 5px;
@@ -347,47 +335,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-MenuBarPopup .menuPopupTopLeft {
+.gwt-MenuBarPopup .menuPopupTopLeft {
   background: url(images/corner.png) no-repeat 0px -36px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -36px;
 }
-html>body .gwt-MenuBarPopup .menuPopupTopRight {
+.gwt-MenuBarPopup .menuPopupTopRight {
   background: url(images/corner.png) no-repeat -5px -36px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -36px;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomLeft {
+.gwt-MenuBarPopup .menuPopupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -41px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -41px;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomRight {
+.gwt-MenuBarPopup .menuPopupBottomRight {
   background: url(images/corner.png) no-repeat -5px -41px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -41px;
 }
 * html .gwt-MenuBarPopup .menuPopupTopLeftInner {
   width: 5px;
-  height: 41px;
-  margin-top: -36px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupTopRightInner {
-  width: 13px;
-  height: 41px;
-  margin-left: -5px;
-  margin-top: -36px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupBottomLeftInner {
   width: 5px;
-  height: 49px;
-  margin-top: -41px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupBottomRightInner {
-  width: 13px;
-  height: 49px;
-  margin-left: -5px;
-  margin-top: -41px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-PasswordTextBox {
@@ -413,20 +395,16 @@
 .gwt-DecoratedPopupPanel .popupTopCenter {
   background: url(images/hborder.png) repeat-x;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomCenter {
+.gwt-DecoratedPopupPanel .popupBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-DecoratedPopupPanel .popupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-DecoratedPopupPanel .popupMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-DecoratedPopupPanel .popupMiddleRight {
+.gwt-DecoratedPopupPanel .popupMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-DecoratedPopupPanel .popupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-DecoratedPopupPanel .popupTopLeftInner {
   width: 5px;
@@ -448,47 +426,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-DecoratedPopupPanel .popupTopLeft {
+.gwt-DecoratedPopupPanel .popupTopLeft {
   background: url(images/corner.png) no-repeat 0px -10px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -10px;
 }
-html>body .gwt-DecoratedPopupPanel .popupTopRight {
+.gwt-DecoratedPopupPanel .popupTopRight {
   background: url(images/corner.png) no-repeat -5px -10px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -10px;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomLeft {
+.gwt-DecoratedPopupPanel .popupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -15px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -15px;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomRight {
+.gwt-DecoratedPopupPanel .popupBottomRight {
   background: url(images/corner.png) no-repeat -5px -15px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -15px;
 }
 * html .gwt-DecoratedPopupPanel .popupTopLeftInner {
   width: 5px;
-  height: 15px;
-  margin-top: -10px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupTopRightInner {
-  width: 13px;
-  height: 15px;
-  margin-left: -5px;
-  margin-top: -10px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupBottomLeftInner {
   width: 5px;
-  height: 23px;
-  margin-top: -15px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupBottomRightInner {
-  width: 13px;
-  height: 23px;
-  margin-left: -5px;
-  margin-top: -15px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-PushButton-up,
@@ -682,20 +654,16 @@
 .gwt-SuggestBoxPopup .suggestPopupTopCenter {
   background: url(images/hborder.png) repeat-x;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomCenter {
+.gwt-SuggestBoxPopup .suggestPopupBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-SuggestBoxPopup .suggestPopupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-SuggestBoxPopup .suggestPopupMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupMiddleRight {
+.gwt-SuggestBoxPopup .suggestPopupMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-SuggestBoxPopup .suggestPopupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-SuggestBoxPopup .suggestPopupTopLeftInner {
   width: 5px;
@@ -717,47 +685,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupTopLeft {
+.gwt-SuggestBoxPopup .suggestPopupTopLeft {
   background: url(images/corner.png) no-repeat 0px -23px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -23px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupTopRight {
+.gwt-SuggestBoxPopup .suggestPopupTopRight {
   background: url(images/corner.png) no-repeat -5px -23px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -23px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomLeft {
+.gwt-SuggestBoxPopup .suggestPopupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -28px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -28px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomRight {
+.gwt-SuggestBoxPopup .suggestPopupBottomRight {
   background: url(images/corner.png) no-repeat -5px -28px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -28px;
 }
 * html .gwt-SuggestBoxPopup .suggestPopupTopLeftInner {
   width: 5px;
-  height: 28px;
-  margin-top: -23px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupTopRightInner {
-  width: 13px;
-  height: 28px;
-  margin-left: -5px;
-  margin-top: -23px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupBottomLeftInner {
   width: 5px;
-  height: 36px;
-  margin-top: -28px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupBottomRightInner {
-  width: 13px;
-  height: 36px;
-  margin-left: -5px;
-  margin-top: -28px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-TabBar {
@@ -821,26 +783,19 @@
   width: 6px;
   height: 6px;
 }
-html>body .gwt-DecoratedTabBar .tabTopLeft {
+.gwt-DecoratedTabBar .tabTopLeft {
   background: url(images/corner.png) no-repeat 0px -55px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -55px;
 }
-html>body .gwt-DecoratedTabBar .tabTopRight {
+.gwt-DecoratedTabBar .tabTopRight {
   background: url(images/corner.png) no-repeat -6px -55px;
+  -background: url(images/corner_ie6.png) no-repeat -6px -55px;
 }
-* html .gwt-DecoratedTabBar .tabTopLeftInner {
-  width: 5px;
-  height: 61px;
-  margin-top: -55px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
-}
+* html .gwt-DecoratedTabBar .tabTopLeftInner,
 * html .gwt-DecoratedTabBar .tabTopRightInner {
-  width: 12px;
-  height: 61px;
-  margin-top: -55px;
-  margin-left: -6px;
+  width: 6px;
+  height: 6px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 .gwt-DecoratedTabBar .tabMiddleLeft,
 .gwt-DecoratedTabBar .tabMiddleRight {
@@ -864,27 +819,12 @@
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopCenter {
   background: #00CCFF;
 }
-html>body .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft {
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft {
   background-position: 0px -61px;
 }
-html>body .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight {
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight {
   background-position: -6px -61px;
 }
-* html .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeftInner {
-  width: 5px;
-  height: 67px;
-  margin-top: -61px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
-}
-* html .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRightInner {
-  width: 12px;
-  height: 67px;
-  margin-top: -61px;
-  margin-left: -6px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
-}
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleLeft,
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleRight {
   background: #00CCFF;
diff --git a/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark_rtl.css b/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark_rtl.css
index 4c7e922..881bd4d 100644
--- a/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark_rtl.css
+++ b/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark_rtl.css
@@ -3,15 +3,13 @@
  *
  * In order to maintain cross-browser compatibility, the following syntax is
  * used to create IE6 specific style rules:
- *    html>body .gwt-Widget {
- *      Rule applies to all browsers (including IE7), except IE6
+ *    .gwt-Widget {
+ *      property: rule applies to all browsers
+ *      -property: rule applies only to IE6 (overrides previous rule)
  *    }
  *    * html .gwt-Widget {
- *      Rule applied to IE6 only (not to IE7)
+ *      property: rule applies to all versions of IE
  *    }
- * 
- * Specifically, IE6 does not support images with multiple transparent colors,
- * so we need to use the AlphaImageLoader in IE6 only.
  */
 
 body, table td, select {
@@ -115,20 +113,16 @@
   padding: 3px;
   background: #666666;
 }
-html>body .gwt-DialogBox .dialogBottomCenter {
+.gwt-DialogBox .dialogBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-DialogBox .dialogBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-DialogBox .dialogMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-DialogBox .dialogMiddleRight {
+.gwt-DialogBox .dialogMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-DialogBox .dialogMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-DialogBox .dialogTopLeftInner {
   width: 5px;
@@ -148,42 +142,39 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-DialogBox .dialogTopLeft {
+.gwt-DialogBox .dialogTopLeft {
   background: url(images/corner.png) no-repeat -13px 0px;
+  -background: url(images/corner_ie6.png) no-repeat -13px 0px;
 }
-html>body .gwt-DialogBox .dialogTopRight {
+.gwt-DialogBox .dialogTopRight {
   background: url(images/corner.png) no-repeat -18px 0px;
+  -background: url(images/corner_ie6.png) no-repeat -18px 0px;
 }
-html>body .gwt-DialogBox .dialogBottomLeft {
+.gwt-DialogBox .dialogBottomLeft {
   background: url(images/corner.png) no-repeat 0px -15px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -15px;
 }
-html>body .gwt-DialogBox .dialogBottomRight {
+.gwt-DialogBox .dialogBottomRight {
   background: url(images/corner.png) no-repeat -5px -15px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -15px;
 }
-* html .gwt-DialogBox .dialogTopLeft {
+* html .gwt-DialogBox .dialogTopLeftInner {
   width: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/corner_dialog_topleft.png',sizingMethod='crop');
 }
-* html .gwt-DialogBox .dialogTopRight {
+* html .gwt-DialogBox .dialogTopRightInner {
   width: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/corner_dialog_topright.png',sizingMethod='crop');
 }
 * html .gwt-DialogBox .dialogBottomLeftInner {
   width: 5px;
-  height: 23px;
-  margin-top: -15px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DialogBox .dialogBottomRightInner {
-  width: 13px;
-  height: 23px;
-  margin-left: -5px;
-  margin-top: -15px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-DisclosurePanel {
@@ -312,20 +303,17 @@
 .gwt-MenuBarPopup .menuPopupTopCenter {
   background: url(images/hborder.png) 0px -12px repeat-x;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomCenter {
+.gwt-MenuBarPopup .menuPopupBottomCenter {
   background: url(images/hborder.png) 0px -13px repeat-x;
-}
-* html .gwt-MenuBarPopup .menuPopupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/hborder_gray_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) 0px -13px repeat-x;
 }
 .gwt-MenuBarPopup .menuPopupMiddleLeft {
   background: url(images/vborder.png) -12px 0px repeat-y;
+  -background: url(images/vborder_ie6.png) -12px 0px repeat-y;
 }
-html>body .gwt-MenuBarPopup .menuPopupMiddleRight {
+.gwt-MenuBarPopup .menuPopupMiddleRight {
   background: url(images/vborder.png) -13px 0px repeat-y;
-}
-* html .gwt-MenuBarPopup .menuPopupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/vborder_gray_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) -13px 0px repeat-y;
 }
 .gwt-MenuBarPopup .menuPopupTopLeftInner {
   width: 5px;
@@ -347,47 +335,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-MenuBarPopup .menuPopupTopLeft {
+.gwt-MenuBarPopup .menuPopupTopLeft {
   background: url(images/corner.png) no-repeat 0px -36px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -36px;
 }
-html>body .gwt-MenuBarPopup .menuPopupTopRight {
+.gwt-MenuBarPopup .menuPopupTopRight {
   background: url(images/corner.png) no-repeat -5px -36px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -36px;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomLeft {
+.gwt-MenuBarPopup .menuPopupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -41px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -41px;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomRight {
+.gwt-MenuBarPopup .menuPopupBottomRight {
   background: url(images/corner.png) no-repeat -5px -41px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -41px;
 }
 * html .gwt-MenuBarPopup .menuPopupTopLeftInner {
   width: 5px;
-  height: 41px;
-  margin-top: -36px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupTopRightInner {
-  width: 13px;
-  height: 41px;
-  margin-left: -5px;
-  margin-top: -36px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupBottomLeftInner {
   width: 5px;
-  height: 49px;
-  margin-top: -41px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupBottomRightInner {
-  width: 13px;
-  height: 49px;
-  margin-left: -5px;
-  margin-top: -41px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-PasswordTextBox {
@@ -413,20 +395,16 @@
 .gwt-DecoratedPopupPanel .popupTopCenter {
   background: url(images/hborder.png) repeat-x;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomCenter {
+.gwt-DecoratedPopupPanel .popupBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-DecoratedPopupPanel .popupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-DecoratedPopupPanel .popupMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-DecoratedPopupPanel .popupMiddleRight {
+.gwt-DecoratedPopupPanel .popupMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-DecoratedPopupPanel .popupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-DecoratedPopupPanel .popupTopLeftInner {
   width: 5px;
@@ -448,47 +426,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-DecoratedPopupPanel .popupTopLeft {
+.gwt-DecoratedPopupPanel .popupTopLeft {
   background: url(images/corner.png) no-repeat 0px -10px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -10px;
 }
-html>body .gwt-DecoratedPopupPanel .popupTopRight {
+.gwt-DecoratedPopupPanel .popupTopRight {
   background: url(images/corner.png) no-repeat -5px -10px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -10px;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomLeft {
+.gwt-DecoratedPopupPanel .popupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -15px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -15px;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomRight {
+.gwt-DecoratedPopupPanel .popupBottomRight {
   background: url(images/corner.png) no-repeat -5px -15px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -15px;
 }
 * html .gwt-DecoratedPopupPanel .popupTopLeftInner {
   width: 5px;
-  height: 15px;
-  margin-top: -10px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupTopRightInner {
-  width: 13px;
-  height: 15px;
-  margin-left: -5px;
-  margin-top: -10px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupBottomLeftInner {
   width: 5px;
-  height: 23px;
-  margin-top: -15px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupBottomRightInner {
-  width: 13px;
-  height: 23px;
-  margin-left: -5px;
-  margin-top: -15px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-PushButton-up,
@@ -682,20 +654,16 @@
 .gwt-SuggestBoxPopup .suggestPopupTopCenter {
   background: url(images/hborder.png) repeat-x;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomCenter {
+.gwt-SuggestBoxPopup .suggestPopupBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-SuggestBoxPopup .suggestPopupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-SuggestBoxPopup .suggestPopupMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupMiddleRight {
+.gwt-SuggestBoxPopup .suggestPopupMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-SuggestBoxPopup .suggestPopupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-SuggestBoxPopup .suggestPopupTopLeftInner {
   width: 5px;
@@ -717,47 +685,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupTopLeft {
+.gwt-SuggestBoxPopup .suggestPopupTopLeft {
   background: url(images/corner.png) no-repeat 0px -23px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -23px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupTopRight {
+.gwt-SuggestBoxPopup .suggestPopupTopRight {
   background: url(images/corner.png) no-repeat -5px -23px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -23px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomLeft {
+.gwt-SuggestBoxPopup .suggestPopupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -28px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -28px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomRight {
+.gwt-SuggestBoxPopup .suggestPopupBottomRight {
   background: url(images/corner.png) no-repeat -5px -28px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -28px;
 }
 * html .gwt-SuggestBoxPopup .suggestPopupTopLeftInner {
   width: 5px;
-  height: 28px;
-  margin-top: -23px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupTopRightInner {
-  width: 13px;
-  height: 28px;
-  margin-left: -5px;
-  margin-top: -23px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupBottomLeftInner {
   width: 5px;
-  height: 36px;
-  margin-top: -28px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupBottomRightInner {
-  width: 13px;
-  height: 36px;
-  margin-left: -5px;
-  margin-top: -28px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-TabBar {
@@ -821,26 +783,19 @@
   width: 6px;
   height: 6px;
 }
-html>body .gwt-DecoratedTabBar .tabTopLeft {
+.gwt-DecoratedTabBar .tabTopLeft {
   background: url(images/corner.png) no-repeat 0px -55px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -55px;
 }
-html>body .gwt-DecoratedTabBar .tabTopRight {
+.gwt-DecoratedTabBar .tabTopRight {
   background: url(images/corner.png) no-repeat -6px -55px;
+  -background: url(images/corner_ie6.png) no-repeat -6px -55px;
 }
-* html .gwt-DecoratedTabBar .tabTopLeftInner {
-  width: 5px;
-  height: 61px;
-  margin-top: -55px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
-}
+* html .gwt-DecoratedTabBar .tabTopLeftInner,
 * html .gwt-DecoratedTabBar .tabTopRightInner {
-  width: 12px;
-  height: 61px;
-  margin-top: -55px;
-  margin-left: -6px;
+  width: 6px;
+  height: 6px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
 }
 .gwt-DecoratedTabBar .tabMiddleLeft,
 .gwt-DecoratedTabBar .tabMiddleRight {
@@ -864,27 +819,12 @@
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopCenter {
   background: #00CCFF;
 }
-html>body .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft {
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft {
   background-position: 0px -61px;
 }
-html>body .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight {
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight {
   background-position: -6px -61px;
 }
-* html .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeftInner {
-  width: 5px;
-  height: 67px;
-  margin-top: -61px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
-}
-* html .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRightInner {
-  width: 12px;
-  height: 67px;
-  margin-top: -61px;
-  margin-left: -6px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/dark/images/corner.png',sizingMethod='crop');
-}
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleLeft,
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleRight {
   background: #00CCFF;
diff --git a/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/images/corner_ie6.png b/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/images/corner_ie6.png
new file mode 100644
index 0000000..24466ad
--- /dev/null
+++ b/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/images/corner_ie6.png
Binary files differ
diff --git a/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/images/hborder_ie6.png b/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/images/hborder_ie6.png
new file mode 100644
index 0000000..a86e9bd
--- /dev/null
+++ b/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/images/hborder_ie6.png
Binary files differ
diff --git a/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/images/vborder_ie6.png b/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/images/vborder_ie6.png
new file mode 100644
index 0000000..6c18782
--- /dev/null
+++ b/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/images/vborder_ie6.png
Binary files differ
diff --git a/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/images/corner_ie6.png b/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/images/corner_ie6.png
new file mode 100644
index 0000000..5197449
--- /dev/null
+++ b/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/images/corner_ie6.png
Binary files differ
diff --git a/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/images/hborder_ie6.png b/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/images/hborder_ie6.png
new file mode 100644
index 0000000..87d7cf7
--- /dev/null
+++ b/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/images/hborder_ie6.png
Binary files differ
diff --git a/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/images/vborder_ie6.png b/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/images/vborder_ie6.png
new file mode 100644
index 0000000..d633b17
--- /dev/null
+++ b/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/images/vborder_ie6.png
Binary files differ
diff --git a/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard.css b/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard.css
index 2b0341d..fc62adb 100644
--- a/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard.css
+++ b/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard.css
@@ -3,15 +3,13 @@
  *
  * In order to maintain cross-browser compatibility, the following syntax is
  * used to create IE6 specific style rules:
- *    html>body .gwt-Widget {
- *      Rule applies to all browsers (including IE7), except IE6
+ *    .gwt-Widget {
+ *      property: rule applies to all browsers
+ *      -property: rule applies only to IE6 (overrides previous rule)
  *    }
  *    * html .gwt-Widget {
- *      Rule applied to IE6 only (not to IE7)
+ *      property: rule applies to all versions of IE
  *    }
- * 
- * Specifically, IE6 does not support images with multiple transparent colors,
- * so we need to use the AlphaImageLoader in IE6 only.
  */
 
 body, table td, select {
@@ -94,46 +92,29 @@
   height: 5px;
   zoom: 1;
 }
-html>body .gwt-DecoratorPanel .topLeft {
+.gwt-DecoratorPanel .topLeft {
   background: url(images/corner.png) no-repeat 0px 0px;
+  -background: url(images/corner_ie6.png) no-repeat 0px 0px;
 }
-html>body .gwt-DecoratorPanel .topRight {
+.gwt-DecoratorPanel .topRight {
   background: url(images/corner.png) no-repeat -5px 0px;
+  -background: url(images/corner_ie6.png) no-repeat -5px 0px;
 }
-html>body .gwt-DecoratorPanel .bottomLeft {
+.gwt-DecoratorPanel .bottomLeft {
   background: url(images/corner.png) no-repeat 0px -5px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -5px;
 }
-html>body .gwt-DecoratorPanel .bottomRight {
+.gwt-DecoratorPanel .bottomRight {
   background: url(images/corner.png) no-repeat -5px -5px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -5px;
 }
-* html .gwt-DecoratorPanel .topLeftInner {
-  width: 5px;
-  height: 5px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
-}
-* html .gwt-DecoratorPanel .topRightInner {
-  width: 10px;
-  height: 5px;
-  margin-left: -5px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
-}
-* html .gwt-DecoratorPanel .bottomLeftInner {
-  width: 5px;
-  height: 10px;
-  margin-left: 0px;
-  margin-top: -5px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
-}
+* html .gwt-DecoratorPanel .topLeftInner,
+* html .gwt-DecoratorPanel .topRightInner,
+* html .gwt-DecoratorPanel .bottomLeftInner,
 * html .gwt-DecoratorPanel .bottomRightInner {
-  width: 10px;
-  height: 10px;
-  margin-left: -5px;
-  margin-top: -5px;
+  width: 5px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-DialogBox .Caption {
@@ -149,20 +130,16 @@
   padding: 3px;
   background: white;
 }
-html>body .gwt-DialogBox .dialogBottomCenter {
+.gwt-DialogBox .dialogBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-DialogBox .dialogBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-DialogBox .dialogMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-DialogBox .dialogMiddleRight {
+.gwt-DialogBox .dialogMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-DialogBox .dialogMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-DialogBox .dialogTopLeftInner {
   width: 5px;
@@ -182,42 +159,39 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-DialogBox .dialogTopLeft {
+.gwt-DialogBox .dialogTopLeft {
   background: url(images/corner.png) no-repeat -13px 0px;
+  -background: url(images/corner_ie6.png) no-repeat -13px 0px;
 }
-html>body .gwt-DialogBox .dialogTopRight {
+.gwt-DialogBox .dialogTopRight {
   background: url(images/corner.png) no-repeat -18px 0px;
+  -background: url(images/corner_ie6.png) no-repeat -18px 0px;
 }
-html>body .gwt-DialogBox .dialogBottomLeft {
+.gwt-DialogBox .dialogBottomLeft {
   background: url(images/corner.png) no-repeat 0px -15px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -15px;
 }
-html>body .gwt-DialogBox .dialogBottomRight {
+.gwt-DialogBox .dialogBottomRight {
   background: url(images/corner.png) no-repeat -5px -15px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -15px;
 }
-* html .gwt-DialogBox .dialogTopLeft {
+* html .gwt-DialogBox .dialogTopLeftInner {
   width: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/corner_dialog_topleft.png',sizingMethod='crop');
 }
-* html .gwt-DialogBox .dialogTopRight {
+* html .gwt-DialogBox .dialogTopRightInner {
   width: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/corner_dialog_topright.png',sizingMethod='crop');
 }
 * html .gwt-DialogBox .dialogBottomLeftInner {
   width: 5px;
-  height: 23px;
-  margin-top: -15px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DialogBox .dialogBottomRightInner {
-  width: 13px;
-  height: 23px;
-  margin-left: -5px;
-  margin-top: -15px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-DisclosurePanel {
@@ -346,20 +320,17 @@
 .gwt-MenuBarPopup .menuPopupTopCenter {
   background: url(images/hborder.png) 0px -12px repeat-x;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomCenter {
+.gwt-MenuBarPopup .menuPopupBottomCenter {
   background: url(images/hborder.png) 0px -13px repeat-x;
-}
-* html .gwt-MenuBarPopup .menuPopupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/hborder_gray_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) 0px -13px repeat-x;
 }
 .gwt-MenuBarPopup .menuPopupMiddleLeft {
   background: url(images/vborder.png) -12px 0px repeat-y;
+  -background: url(images/vborder_ie6.png) -12px 0px repeat-y;
 }
-html>body .gwt-MenuBarPopup .menuPopupMiddleRight {
+.gwt-MenuBarPopup .menuPopupMiddleRight {
   background: url(images/vborder.png) -13px 0px repeat-y;
-}
-* html .gwt-MenuBarPopup .menuPopupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/vborder_gray_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) -13px 0px repeat-y;
 }
 .gwt-MenuBarPopup .menuPopupTopLeftInner {
   width: 5px;
@@ -381,47 +352,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-MenuBarPopup .menuPopupTopLeft {
+.gwt-MenuBarPopup .menuPopupTopLeft {
   background: url(images/corner.png) no-repeat 0px -36px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -36px;
 }
-html>body .gwt-MenuBarPopup .menuPopupTopRight {
+.gwt-MenuBarPopup .menuPopupTopRight {
   background: url(images/corner.png) no-repeat -5px -36px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -36px;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomLeft {
+.gwt-MenuBarPopup .menuPopupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -41px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -41px;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomRight {
+.gwt-MenuBarPopup .menuPopupBottomRight {
   background: url(images/corner.png) no-repeat -5px -41px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -41px;
 }
 * html .gwt-MenuBarPopup .menuPopupTopLeftInner {
   width: 5px;
-  height: 41px;
-  margin-top: -36px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupTopRightInner {
-  width: 13px;
-  height: 41px;
-  margin-left: -5px;
-  margin-top: -36px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupBottomLeftInner {
   width: 5px;
-  height: 49px;
-  margin-top: -41px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupBottomRightInner {
-  width: 13px;
-  height: 49px;
-  margin-left: -5px;
-  margin-top: -41px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-PasswordTextBox {
@@ -446,20 +411,16 @@
 .gwt-DecoratedPopupPanel .popupTopCenter {
   background: url(images/hborder.png) repeat-x;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomCenter {
+.gwt-DecoratedPopupPanel .popupBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-DecoratedPopupPanel .popupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-DecoratedPopupPanel .popupMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-DecoratedPopupPanel .popupMiddleRight {
+.gwt-DecoratedPopupPanel .popupMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-DecoratedPopupPanel .popupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-DecoratedPopupPanel .popupTopLeftInner {
   width: 5px;
@@ -481,47 +442,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-DecoratedPopupPanel .popupTopLeft {
+.gwt-DecoratedPopupPanel .popupTopLeft {
   background: url(images/corner.png) no-repeat 0px -10px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -10px;
 }
-html>body .gwt-DecoratedPopupPanel .popupTopRight {
+.gwt-DecoratedPopupPanel .popupTopRight {
   background: url(images/corner.png) no-repeat -5px -10px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -10px;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomLeft {
+.gwt-DecoratedPopupPanel .popupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -15px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -15px;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomRight {
+.gwt-DecoratedPopupPanel .popupBottomRight {
   background: url(images/corner.png) no-repeat -5px -15px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -15px;
 }
 * html .gwt-DecoratedPopupPanel .popupTopLeftInner {
   width: 5px;
-  height: 15px;
-  margin-top: -10px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupTopRightInner {
-  width: 13px;
-  height: 15px;
-  margin-left: -5px;
-  margin-top: -10px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupBottomLeftInner {
   width: 5px;
-  height: 23px;
-  margin-top: -15px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupBottomRightInner {
-  width: 13px;
-  height: 23px;
-  margin-left: -5px;
-  margin-top: -15px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-PushButton-up,
@@ -686,37 +641,26 @@
   width: 6px;
   zoom: 1;
 }
-html>body .gwt-DecoratedStackPanel .stackItemTopLeft {
-  background: #d3def6 url(images/corner.png) no-repeat 0px -49px;
+.gwt-DecoratedStackPanel .stackItemTopLeft {
   border-left: 1px solid #bbbbbb;
+  background: #d3def6 url(images/corner.png) no-repeat 0px -49px;
+  -background: #d3def6 url(images/corner_ie6.png) no-repeat 0px -49px;
 }
-html>body .gwt-DecoratedStackPanel .stackItemTopRight {
-  background: #d3def6 url(images/corner.png) no-repeat -6px -49px;
+.gwt-DecoratedStackPanel .stackItemTopRight {
   border-right: 1px solid #bbbbbb;
+  background: #d3def6 url(images/corner.png) no-repeat -6px -49px;
+  -background: #d3def6 url(images/corner_ie6.png) no-repeat -6px -49px;
 }
 .gwt-DecoratedStackPanel .stackItemTopLeftInner,
 .gwt-DecoratedStackPanel .stackItemTopRightInner {
   width: 1px;
   height: 1px;
 }
-* html .gwt-DecoratedStackPanel .stackItemTopLeftInner {
-  width: 6px;
-  height: 55px;
-  margin-top: -49px;
-  overflow: hidden;
-  border-left: 1px solid #bbbbbb;
-  background-color: #d3def6;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
-}
+* html .gwt-DecoratedStackPanel .stackItemTopLeftInner,
 * html .gwt-DecoratedStackPanel .stackItemTopRightInner {
-  width: 12px;
-  height: 55px;
-  margin-top: -49px;
-  margin-left: -6px;
+  width: 6px;
+  height: 6px;
   overflow: hidden;
-  border-right: 1px solid #bbbbbb;
-  background-color: #d3def6;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 .gwt-DecoratedStackPanel .stackItemTopCenter {
   background: url(images/hborder.png) 0px -21px repeat-x;
@@ -739,25 +683,13 @@
   font-size: 1.3em;
   background: #d3def6 url(images/hborder.png) repeat-x 0px -989px;
 }
-html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRight,
-html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeft {
+.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRight,
+.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeft {
   border: 0px;
   background-color: white;
 }
-html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeft,
-html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRight {
-  background-color: white;
-}
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeftInner,
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRightInner {
-  border: 0px;
-  background-color: white;
-}
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeftInner {
-  padding-left: 1px;
-}
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeftInner,
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRightInner {
+.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeft,
+.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRight {
   background-color: white;
 }
 
@@ -781,20 +713,16 @@
 .gwt-SuggestBoxPopup .suggestPopupTopCenter {
   background: url(images/hborder.png) repeat-x;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomCenter {
+.gwt-SuggestBoxPopup .suggestPopupBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-SuggestBoxPopup .suggestPopupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-SuggestBoxPopup .suggestPopupMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupMiddleRight {
+.gwt-SuggestBoxPopup .suggestPopupMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-SuggestBoxPopup .suggestPopupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-SuggestBoxPopup .suggestPopupTopLeftInner {
   width: 5px;
@@ -816,47 +744,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupTopLeft {
+.gwt-SuggestBoxPopup .suggestPopupTopLeft {
   background: url(images/corner.png) no-repeat 0px -23px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -23px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupTopRight {
+.gwt-SuggestBoxPopup .suggestPopupTopRight {
   background: url(images/corner.png) no-repeat -5px -23px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -23px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomLeft {
+.gwt-SuggestBoxPopup .suggestPopupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -28px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -28px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomRight {
+.gwt-SuggestBoxPopup .suggestPopupBottomRight {
   background: url(images/corner.png) no-repeat -5px -28px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -28px;
 }
 * html .gwt-SuggestBoxPopup .suggestPopupTopLeftInner {
   width: 5px;
-  height: 28px;
-  margin-top: -23px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupTopRightInner {
-  width: 13px;
-  height: 28px;
-  margin-left: -5px;
-  margin-top: -23px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupBottomLeftInner {
   width: 5px;
-  height: 36px;
-  margin-top: -28px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupBottomRightInner {
-  width: 13px;
-  height: 36px;
-  margin-left: -5px;
-  margin-top: -28px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-TabBar {
@@ -919,26 +841,19 @@
   width: 6px;
   height: 6px;
 }
-html>body .gwt-DecoratedTabBar .tabTopLeft {
+.gwt-DecoratedTabBar .tabTopLeft {
   background: url(images/corner.png) no-repeat 0px -55px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -55px;
 }
-html>body .gwt-DecoratedTabBar .tabTopRight {
+.gwt-DecoratedTabBar .tabTopRight {
   background: url(images/corner.png) no-repeat -6px -55px;
+  -background: url(images/corner_ie6.png) no-repeat -6px -55px;
 }
-* html .gwt-DecoratedTabBar .tabTopLeftInner {
-  width: 5px;
-  height: 61px;
-  margin-top: -55px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
-}
+* html .gwt-DecoratedTabBar .tabTopLeftInner,
 * html .gwt-DecoratedTabBar .tabTopRightInner {
-  width: 12px;
-  height: 61px;
-  margin-top: -55px;
-  margin-left: -6px;
+  width: 6px;
+  height: 6px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 .gwt-DecoratedTabBar .tabMiddleLeft,
 .gwt-DecoratedTabBar .tabMiddleRight {
@@ -963,27 +878,12 @@
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopCenter {
   background: #92c1f0;
 }
-html>body .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft {
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft {
   background-position: 0px -61px;
 }
-html>body .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight {
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight {
   background-position: -6px -61px;
 }
-* html .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeftInner {
-  width: 5px;
-  height: 67px;
-  margin-top: -61px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
-}
-* html .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRightInner {
-  width: 12px;
-  height: 67px;
-  margin-top: -61px;
-  margin-left: -6px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
-}
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleLeft,
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleRight {
   background: #92c1f0;
@@ -1174,4 +1074,3 @@
   cursor: pointer;
   padding: 0px 4px;
 }
-
diff --git a/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard_rtl.css b/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard_rtl.css
index 22db0da..c6b7ee4 100644
--- a/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard_rtl.css
+++ b/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard_rtl.css
@@ -3,15 +3,13 @@
  *
  * In order to maintain cross-browser compatibility, the following syntax is
  * used to create IE6 specific style rules:
- *    html>body .gwt-Widget {
- *      Rule applies to all browsers (including IE7), except IE6
+ *    .gwt-Widget {
+ *      property: rule applies to all browsers
+ *      -property: rule applies only to IE6 (overrides previous rule)
  *    }
  *    * html .gwt-Widget {
- *      Rule applied to IE6 only (not to IE7)
+ *      property: rule applies to all versions of IE
  *    }
- * 
- * Specifically, IE6 does not support images with multiple transparent colors,
- * so we need to use the AlphaImageLoader in IE6 only.
  */
 
 body, table td, select {
@@ -94,46 +92,29 @@
   height: 5px;
   zoom: 1;
 }
-html>body .gwt-DecoratorPanel .topLeft {
+.gwt-DecoratorPanel .topLeft {
   background: url(images/corner.png) no-repeat 0px 0px;
+  -background: url(images/corner_ie6.png) no-repeat 0px 0px;
 }
-html>body .gwt-DecoratorPanel .topRight {
+.gwt-DecoratorPanel .topRight {
   background: url(images/corner.png) no-repeat -5px 0px;
+  -background: url(images/corner_ie6.png) no-repeat -5px 0px;
 }
-html>body .gwt-DecoratorPanel .bottomLeft {
+.gwt-DecoratorPanel .bottomLeft {
   background: url(images/corner.png) no-repeat 0px -5px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -5px;
 }
-html>body .gwt-DecoratorPanel .bottomRight {
+.gwt-DecoratorPanel .bottomRight {
   background: url(images/corner.png) no-repeat -5px -5px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -5px;
 }
-* html .gwt-DecoratorPanel .topLeftInner {
-  width: 5px;
-  height: 5px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
-}
-* html .gwt-DecoratorPanel .topRightInner {
-  width: 10px;
-  height: 5px;
-  margin-left: -5px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
-}
-* html .gwt-DecoratorPanel .bottomLeftInner {
-  width: 5px;
-  height: 10px;
-  margin-left: 0px;
-  margin-top: -5px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
-}
+* html .gwt-DecoratorPanel .topLeftInner,
+* html .gwt-DecoratorPanel .topRightInner,
+* html .gwt-DecoratorPanel .bottomLeftInner,
 * html .gwt-DecoratorPanel .bottomRightInner {
-  width: 10px;
-  height: 10px;
-  margin-left: -5px;
-  margin-top: -5px;
+  width: 5px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-DialogBox .Caption {
@@ -149,20 +130,16 @@
   padding: 3px;
   background: white;
 }
-html>body .gwt-DialogBox .dialogBottomCenter {
+.gwt-DialogBox .dialogBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-DialogBox .dialogBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-DialogBox .dialogMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-DialogBox .dialogMiddleRight {
+.gwt-DialogBox .dialogMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-DialogBox .dialogMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-DialogBox .dialogTopLeftInner {
   width: 5px;
@@ -182,42 +159,39 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-DialogBox .dialogTopLeft {
+.gwt-DialogBox .dialogTopLeft {
   background: url(images/corner.png) no-repeat -13px 0px;
+  -background: url(images/corner_ie6.png) no-repeat -13px 0px;
 }
-html>body .gwt-DialogBox .dialogTopRight {
+.gwt-DialogBox .dialogTopRight {
   background: url(images/corner.png) no-repeat -18px 0px;
+  -background: url(images/corner_ie6.png) no-repeat -18px 0px;
 }
-html>body .gwt-DialogBox .dialogBottomLeft {
+.gwt-DialogBox .dialogBottomLeft {
   background: url(images/corner.png) no-repeat 0px -15px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -15px;
 }
-html>body .gwt-DialogBox .dialogBottomRight {
+.gwt-DialogBox .dialogBottomRight {
   background: url(images/corner.png) no-repeat -5px -15px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -15px;
 }
-* html .gwt-DialogBox .dialogTopLeft {
+* html .gwt-DialogBox .dialogTopLeftInner {
   width: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/corner_dialog_topleft.png',sizingMethod='crop');
 }
-* html .gwt-DialogBox .dialogTopRight {
+* html .gwt-DialogBox .dialogTopRightInner {
   width: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/corner_dialog_topright.png',sizingMethod='crop');
 }
 * html .gwt-DialogBox .dialogBottomLeftInner {
   width: 5px;
-  height: 23px;
-  margin-top: -15px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DialogBox .dialogBottomRightInner {
-  width: 13px;
-  height: 23px;
-  margin-left: -5px;
-  margin-top: -15px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-DisclosurePanel {
@@ -346,20 +320,17 @@
 .gwt-MenuBarPopup .menuPopupTopCenter {
   background: url(images/hborder.png) 0px -12px repeat-x;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomCenter {
+.gwt-MenuBarPopup .menuPopupBottomCenter {
   background: url(images/hborder.png) 0px -13px repeat-x;
-}
-* html .gwt-MenuBarPopup .menuPopupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/hborder_gray_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) 0px -13px repeat-x;
 }
 .gwt-MenuBarPopup .menuPopupMiddleLeft {
   background: url(images/vborder.png) -12px 0px repeat-y;
+  -background: url(images/vborder_ie6.png) -12px 0px repeat-y;
 }
-html>body .gwt-MenuBarPopup .menuPopupMiddleRight {
+.gwt-MenuBarPopup .menuPopupMiddleRight {
   background: url(images/vborder.png) -13px 0px repeat-y;
-}
-* html .gwt-MenuBarPopup .menuPopupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/vborder_gray_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) -13px 0px repeat-y;
 }
 .gwt-MenuBarPopup .menuPopupTopLeftInner {
   width: 5px;
@@ -381,47 +352,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-MenuBarPopup .menuPopupTopLeft {
+.gwt-MenuBarPopup .menuPopupTopLeft {
   background: url(images/corner.png) no-repeat 0px -36px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -36px;
 }
-html>body .gwt-MenuBarPopup .menuPopupTopRight {
+.gwt-MenuBarPopup .menuPopupTopRight {
   background: url(images/corner.png) no-repeat -5px -36px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -36px;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomLeft {
+.gwt-MenuBarPopup .menuPopupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -41px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -41px;
 }
-html>body .gwt-MenuBarPopup .menuPopupBottomRight {
+.gwt-MenuBarPopup .menuPopupBottomRight {
   background: url(images/corner.png) no-repeat -5px -41px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -41px;
 }
 * html .gwt-MenuBarPopup .menuPopupTopLeftInner {
   width: 5px;
-  height: 41px;
-  margin-top: -36px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupTopRightInner {
-  width: 13px;
-  height: 41px;
-  margin-left: -5px;
-  margin-top: -36px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupBottomLeftInner {
   width: 5px;
-  height: 49px;
-  margin-top: -41px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-MenuBarPopup .menuPopupBottomRightInner {
-  width: 13px;
-  height: 49px;
-  margin-left: -5px;
-  margin-top: -41px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-PasswordTextBox {
@@ -446,20 +411,16 @@
 .gwt-DecoratedPopupPanel .popupTopCenter {
   background: url(images/hborder.png) repeat-x;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomCenter {
+.gwt-DecoratedPopupPanel .popupBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-DecoratedPopupPanel .popupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-DecoratedPopupPanel .popupMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-DecoratedPopupPanel .popupMiddleRight {
+.gwt-DecoratedPopupPanel .popupMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-DecoratedPopupPanel .popupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-DecoratedPopupPanel .popupTopLeftInner {
   width: 5px;
@@ -481,47 +442,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-DecoratedPopupPanel .popupTopLeft {
+.gwt-DecoratedPopupPanel .popupTopLeft {
   background: url(images/corner.png) no-repeat 0px -10px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -10px;
 }
-html>body .gwt-DecoratedPopupPanel .popupTopRight {
+.gwt-DecoratedPopupPanel .popupTopRight {
   background: url(images/corner.png) no-repeat -5px -10px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -10px;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomLeft {
+.gwt-DecoratedPopupPanel .popupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -15px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -15px;
 }
-html>body .gwt-DecoratedPopupPanel .popupBottomRight {
+.gwt-DecoratedPopupPanel .popupBottomRight {
   background: url(images/corner.png) no-repeat -5px -15px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -15px;
 }
 * html .gwt-DecoratedPopupPanel .popupTopLeftInner {
   width: 5px;
-  height: 15px;
-  margin-top: -10px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupTopRightInner {
-  width: 13px;
-  height: 15px;
-  margin-left: -5px;
-  margin-top: -10px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupBottomLeftInner {
   width: 5px;
-  height: 23px;
-  margin-top: -15px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-DecoratedPopupPanel .popupBottomRightInner {
-  width: 13px;
-  height: 23px;
-  margin-left: -5px;
-  margin-top: -15px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-PushButton-up,
@@ -686,37 +641,26 @@
   width: 6px;
   zoom: 1;
 }
-html>body .gwt-DecoratedStackPanel .stackItemTopLeft {
-  background: #d3def6 url(images/corner.png) no-repeat 0px -49px;
+.gwt-DecoratedStackPanel .stackItemTopLeft {
   border-left: 1px solid #bbbbbb;
+  background: #d3def6 url(images/corner.png) no-repeat 0px -49px;
+  -background: #d3def6 url(images/corner_ie6.png) no-repeat 0px -49px;
 }
-html>body .gwt-DecoratedStackPanel .stackItemTopRight {
-  background: #d3def6 url(images/corner.png) no-repeat -6px -49px;
+.gwt-DecoratedStackPanel .stackItemTopRight {
   border-right: 1px solid #bbbbbb;
+  background: #d3def6 url(images/corner.png) no-repeat -6px -49px;
+  -background: #d3def6 url(images/corner_ie6.png) no-repeat -6px -49px;
 }
 .gwt-DecoratedStackPanel .stackItemTopLeftInner,
 .gwt-DecoratedStackPanel .stackItemTopRightInner {
   width: 1px;
   height: 1px;
 }
-* html .gwt-DecoratedStackPanel .stackItemTopLeftInner {
-  width: 6px;
-  height: 55px;
-  margin-top: -49px;
-  overflow: hidden;
-  border-left: 1px solid #bbbbbb;
-  background-color: #d3def6;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
-}
+* html .gwt-DecoratedStackPanel .stackItemTopLeftInner,
 * html .gwt-DecoratedStackPanel .stackItemTopRightInner {
-  width: 12px;
-  height: 55px;
-  margin-top: -49px;
-  margin-left: -6px;
+  width: 6px;
+  height: 6px;
   overflow: hidden;
-  border-right: 1px solid #bbbbbb;
-  background-color: #d3def6;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 .gwt-DecoratedStackPanel .stackItemTopCenter {
   background: url(images/hborder.png) 0px -21px repeat-x;
@@ -739,25 +683,13 @@
   font-size: 1.3em;
   background: #d3def6 url(images/hborder.png) repeat-x 0px -989px;
 }
-html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRight,
-html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeft {
+.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRight,
+.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeft {
   border: 0px;
   background-color: white;
 }
-html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeft,
-html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRight {
-  background-color: white;
-}
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeftInner,
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRightInner {
-  border: 0px;
-  background-color: white;
-}
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeftInner {
-  padding-right: 1px;
-}
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeftInner,
-* html .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRightInner {
+.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeft,
+.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRight {
   background-color: white;
 }
 
@@ -781,20 +713,16 @@
 .gwt-SuggestBoxPopup .suggestPopupTopCenter {
   background: url(images/hborder.png) repeat-x;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomCenter {
+.gwt-SuggestBoxPopup .suggestPopupBottomCenter {
   background: url(images/hborder.png) repeat-x 0px -4px;
-}
-* html .gwt-SuggestBoxPopup .suggestPopupBottomCenter {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
 }
 .gwt-SuggestBoxPopup .suggestPopupMiddleLeft {
   background: url(images/vborder.png) repeat-y;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupMiddleRight {
+.gwt-SuggestBoxPopup .suggestPopupMiddleRight {
   background: url(images/vborder.png) repeat-y -4px 0px;
-}
-* html .gwt-SuggestBoxPopup .suggestPopupMiddleRight {
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
 }
 .gwt-SuggestBoxPopup .suggestPopupTopLeftInner {
   width: 5px;
@@ -816,47 +744,41 @@
   height: 8px;
   zoom: 1;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupTopLeft {
+.gwt-SuggestBoxPopup .suggestPopupTopLeft {
   background: url(images/corner.png) no-repeat 0px -23px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -23px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupTopRight {
+.gwt-SuggestBoxPopup .suggestPopupTopRight {
   background: url(images/corner.png) no-repeat -5px -23px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -23px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomLeft {
+.gwt-SuggestBoxPopup .suggestPopupBottomLeft {
   background: url(images/corner.png) no-repeat 0px -28px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -28px;
 }
-html>body .gwt-SuggestBoxPopup .suggestPopupBottomRight {
+.gwt-SuggestBoxPopup .suggestPopupBottomRight {
   background: url(images/corner.png) no-repeat -5px -28px;
+  -background: url(images/corner_ie6.png) no-repeat -5px -28px;
 }
 * html .gwt-SuggestBoxPopup .suggestPopupTopLeftInner {
   width: 5px;
-  height: 28px;
-  margin-top: -23px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupTopRightInner {
-  width: 13px;
-  height: 28px;
-  margin-left: -5px;
-  margin-top: -23px;
+  width: 8px;
+  height: 5px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupBottomLeftInner {
   width: 5px;
-  height: 36px;
-  margin-top: -28px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 * html .gwt-SuggestBoxPopup .suggestPopupBottomRightInner {
-  width: 13px;
-  height: 36px;
-  margin-left: -5px;
-  margin-top: -28px;
+  width: 8px;
+  height: 8px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 
 .gwt-TabBar {
@@ -919,26 +841,19 @@
   width: 6px;
   height: 6px;
 }
-html>body .gwt-DecoratedTabBar .tabTopLeft {
+.gwt-DecoratedTabBar .tabTopLeft {
   background: url(images/corner.png) no-repeat 0px -55px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -55px;
 }
-html>body .gwt-DecoratedTabBar .tabTopRight {
+.gwt-DecoratedTabBar .tabTopRight {
   background: url(images/corner.png) no-repeat -6px -55px;
+  -background: url(images/corner_ie6.png) no-repeat -6px -55px;
 }
-* html .gwt-DecoratedTabBar .tabTopLeftInner {
-  width: 5px;
-  height: 61px;
-  margin-top: -55px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
-}
+* html .gwt-DecoratedTabBar .tabTopLeftInner,
 * html .gwt-DecoratedTabBar .tabTopRightInner {
-  width: 12px;
-  height: 61px;
-  margin-top: -55px;
-  margin-left: -6px;
+  width: 6px;
+  height: 6px;
   overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
 }
 .gwt-DecoratedTabBar .tabMiddleLeft,
 .gwt-DecoratedTabBar .tabMiddleRight {
@@ -963,27 +878,12 @@
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopCenter {
   background: #92c1f0;
 }
-html>body .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft {
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft {
   background-position: 0px -61px;
 }
-html>body .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight {
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight {
   background-position: -6px -61px;
 }
-* html .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeftInner {
-  width: 5px;
-  height: 67px;
-  margin-top: -61px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
-}
-* html .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRightInner {
-  width: 12px;
-  height: 67px;
-  margin-top: -61px;
-  margin-left: -6px;
-  overflow: hidden;
-  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gwt/standard/images/corner.png',sizingMethod='crop');
-}
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleLeft,
 .gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleRight {
   background: #92c1f0;
diff --git a/user/src/com/google/gwt/user/tools/App.launchsrc b/user/src/com/google/gwt/user/tools/App.launchsrc
index 428e717..92200c3 100644
--- a/user/src/com/google/gwt/user/tools/App.launchsrc
+++ b/user/src/com/google/gwt/user/tools/App.launchsrc
@@ -9,7 +9,7 @@
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry externalArchive=&quot;@gwtDevPath&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
 </listAttribute>
 <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx256M@vmargs"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-startupUrl&#10;@startupUrl @moduleName"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-startupUrl @startupUrl&#10;@moduleName"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="@moduleShortName"/>
 <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
 </launchConfiguration>
diff --git a/user/src/com/google/gwt/user/tools/web.xmlsrc b/user/src/com/google/gwt/user/tools/web.xmlsrc
index 62ca7c8..28baff4 100644
--- a/user/src/com/google/gwt/user/tools/web.xmlsrc
+++ b/user/src/com/google/gwt/user/tools/web.xmlsrc
@@ -1,6 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <web-app>
 
+  <!-- Default page to serve -->
+  <welcome-file-list>
+    <welcome-file>@startupUrl</welcome-file>
+  </welcome-file-list>
+  
+  <!-- Servlets -->
   <servlet>
     <servlet-name>echoServlet</servlet-name>
     <servlet-class>@serverPackage.EchoServiceImpl</servlet-class>
diff --git a/user/test/com/google/gwt/dev/jjs/test/CompilerTest.java b/user/test/com/google/gwt/dev/jjs/test/CompilerTest.java
index 764cce8..20807b9 100644
--- a/user/test/com/google/gwt/dev/jjs/test/CompilerTest.java
+++ b/user/test/com/google/gwt/dev/jjs/test/CompilerTest.java
@@ -1040,7 +1040,11 @@
 
     try {
       u.intField = 0;
-      fail("Expected NullPointerException (5)");
+      /*
+       * Currently, null.nullField gets pruned rather than being allowed to
+       * execute its side effect of tripping an NPE.
+       */
+      // fail("Expected NullPointerException (5)");
     } catch (Exception expected) {
     }
 
diff --git a/user/test/com/google/gwt/event/shared/HandlerManagerTest.java b/user/test/com/google/gwt/event/shared/HandlerManagerTest.java
index ec450f2..480db2f 100644
--- a/user/test/com/google/gwt/event/shared/HandlerManagerTest.java
+++ b/user/test/com/google/gwt/event/shared/HandlerManagerTest.java
@@ -223,7 +223,6 @@
     assertFired(one, mouse1);

   }

 

-  @SuppressWarnings("deprecation")

   public void testMultiFiring() {

 

     HandlerManager manager = new HandlerManager("source1");

@@ -261,4 +260,38 @@
     });

     assertFired(mouse1, adaptor1, mouse3);

   }

+

+  public void testReverseOrder() {

+    // Add some handlers to a manager

+    final HandlerManager manager = new HandlerManager("source1", true);

+    final MouseDownHandler handler0 = new MouseDownHandler() {

+      public void onMouseDown(MouseDownEvent event) {

+        add(this);

+      }

+    };

+    final MouseDownHandler handler1 = new MouseDownHandler() {

+      public void onMouseDown(MouseDownEvent event) {

+        assertNotFired(handler0);

+        add(this);

+      }

+    };

+    final MouseDownHandler handler2 = new MouseDownHandler() {

+      public void onMouseDown(MouseDownEvent event) {

+        assertNotFired(handler0, handler1);

+        add(this);

+      }

+    };

+    HandlerRegistration reg0 = manager.addHandler(MouseDownEvent.getType(),

+        handler0);

+    HandlerRegistration reg1 = manager.addHandler(MouseDownEvent.getType(),

+        handler1);

+    HandlerRegistration reg2 = manager.addHandler(MouseDownEvent.getType(),

+        handler2);

+

+    // Fire the event

+    reset();

+    manager.fireEvent(new MouseDownEvent() {

+    });

+    assertFired(handler0, handler1, handler2);

+  }

 }

diff --git a/user/test/com/google/gwt/user/client/EventTest.java b/user/test/com/google/gwt/user/client/EventTest.java
index a894e85..1ed7e7b 100644
--- a/user/test/com/google/gwt/user/client/EventTest.java
+++ b/user/test/com/google/gwt/user/client/EventTest.java
@@ -94,6 +94,36 @@
   }
 
   /**
+   * Test that concurrent removal of a {@link NativePreviewHandler} does not
+   * trigger an exception. The handler should not actually be removed until the
+   * end of the event loop.
+   */
+  public void testConcurrentRemovalOfNativePreviewHandler() {
+    // Add handler0
+    final TestNativePreviewHandler handler0 = new TestNativePreviewHandler(
+        false, false);
+    final HandlerRegistration reg0 = Event.addNativePreviewHandler(handler0);
+
+    // Add handler 1
+    final TestNativePreviewHandler handler1 = new TestNativePreviewHandler(
+        false, false) {
+      @Override
+      public void onPreviewNativeEvent(NativePreviewEvent event) {
+        super.onPreviewNativeEvent(event);
+        handler0.assertIsFired(false);
+        reg0.removeHandler();
+      }
+    };
+    HandlerRegistration reg1 = Event.addNativePreviewHandler(handler1);
+    assertTrue(Event.fireNativePreviewEvent(null));
+
+    // Verify both handlers fired even though one was removed
+    handler0.assertIsFired(true);
+    handler1.assertIsFired(true);
+    reg1.removeHandler();
+  }
+
+  /**
    * Test that {@link Event#fireNativePreviewEvent(Event)} returns the correct
    * value if the native event is canceled.
    */
@@ -132,17 +162,21 @@
 
   /**
    * Test that {@link Event#fireNativePreviewEvent(Event)} fires handlers in
-   * reverse order. Also verify that the legacy EventPreview fires last.
+   * reverse order, and that the legacy EventPreview fires only if it is at the
+   * top of the stack.
    */
   @SuppressWarnings("deprecation")
   public void testFireNativePreviewEventReverseOrder() {
-    final TestEventPreview preview = new TestEventPreview(false);
+    final TestEventPreview preview0 = new TestEventPreview(false);
+    final TestEventPreview preview1 = new TestEventPreview(false);
     final TestNativePreviewHandler handler0 = new TestNativePreviewHandler(
         false, false) {
       @Override
       public void onPreviewNativeEvent(NativePreviewEvent event) {
         super.onPreviewNativeEvent(event);
-        preview.assertIsFired(false);
+        preview0.assertIsFired(false);
+        preview1.assertIsFired(true);
+        assertFalse(event.isFirstHandler());
       }
     };
     final TestNativePreviewHandler handler1 = new TestNativePreviewHandler(
@@ -151,7 +185,9 @@
       public void onPreviewNativeEvent(NativePreviewEvent event) {
         super.onPreviewNativeEvent(event);
         handler0.assertIsFired(false);
-        preview.assertIsFired(false);
+        preview0.assertIsFired(false);
+        preview1.assertIsFired(true);
+        assertFalse(event.isFirstHandler());
       }
     };
     final TestNativePreviewHandler handler2 = new TestNativePreviewHandler(
@@ -161,7 +197,9 @@
         super.onPreviewNativeEvent(event);
         handler0.assertIsFired(false);
         handler1.assertIsFired(false);
-        preview.assertIsFired(false);
+        preview0.assertIsFired(false);
+        preview1.assertIsFired(true);
+        assertFalse(event.isFirstHandler());
       }
     };
     final TestNativePreviewHandler handler3 = new TestNativePreviewHandler(
@@ -172,25 +210,30 @@
         handler0.assertIsFired(false);
         handler1.assertIsFired(false);
         handler2.assertIsFired(false);
-        preview.assertIsFired(false);
+        preview0.assertIsFired(false);
+        preview1.assertIsFired(true);
+        assertFalse(event.isFirstHandler());
       }
     };
+    DOM.addEventPreview(preview0);
     HandlerRegistration reg0 = Event.addNativePreviewHandler(handler0);
     HandlerRegistration reg1 = Event.addNativePreviewHandler(handler1);
     HandlerRegistration reg2 = Event.addNativePreviewHandler(handler2);
     HandlerRegistration reg3 = Event.addNativePreviewHandler(handler3);
-    DOM.addEventPreview(preview);
+    DOM.addEventPreview(preview1);
     assertTrue(DOM.previewEvent(null));
     handler0.assertIsFired(true);
     handler1.assertIsFired(true);
     handler2.assertIsFired(true);
     handler3.assertIsFired(true);
-    preview.assertIsFired(true);
+    preview0.assertIsFired(false);
+    preview1.assertIsFired(true);
     reg0.removeHandler();
     reg1.removeHandler();
     reg2.removeHandler();
     reg3.removeHandler();
-    DOM.removeEventPreview(preview);
+    DOM.removeEventPreview(preview0);
+    DOM.removeEventPreview(preview1);
   }
 
   /**
@@ -399,6 +442,7 @@
       public void onPreviewNativeEvent(NativePreviewEvent event) {
         assertFalse(event.isCanceled());
         assertFalse(event.isConsumed());
+        assertTrue(event.isFirstHandler());
         super.onPreviewNativeEvent(event);
       }
     };
diff --git a/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java b/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java
index c7ba8e2..95fb16c 100644
--- a/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java
+++ b/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java
@@ -15,6 +15,8 @@
  */
 package com.google.gwt.user.client.ui;
 
+import com.google.gwt.dom.client.Document;
+import com.google.gwt.dom.client.InputElement;
 import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.event.logical.shared.ValueChangeEvent;
 import com.google.gwt.event.logical.shared.ValueChangeHandler;
@@ -28,49 +30,70 @@
  */
 public class CheckBoxTest extends GWTTestCase {
 
+  @SuppressWarnings("deprecation")
+  static class ListenerTester implements ClickListener {
+    static int fired = 0;
+    static HandlerManager manager;
+
+    public static void fire() {
+      fired = 0;
+      manager.fireEvent(new ClickEvent() {
+      });
+    }
+
+    public void onClick(Widget sender) {
+      ++fired;
+    }
+  }
+
+  private static class Handler implements ValueChangeHandler<Boolean> {
+    Boolean received = null;
+
+    public void onValueChange(ValueChangeEvent<Boolean> event) {
+      received = event.getValue();
+    }
+  }
+
+  private CheckBox cb;
+
   @Override
   public String getModuleName() {
     return "com.google.gwt.user.DebugTest";
   }
 
-  @Override
-  protected void gwtSetUp() throws Exception {
-    super.gwtSetUp();
-    RootPanel.get().clear();
-  }
-
-  @Override
-  protected void gwtTearDown() throws Exception {
-    RootPanel.get().clear();
-    super.gwtTearDown();
-  }
-
   /**
    * Test accessors.
    */
+  @SuppressWarnings("deprecation")
   public void testAccessors() {
-    final CheckBox cb = new CheckBox();
-    RootPanel.get().add(cb);
-
-    // Label accessors
     cb.setHTML("test HTML");
     assertEquals(cb.getHTML(), "test HTML");
     cb.setText("test Text");
     assertEquals(cb.getText(), "test Text");
 
-    // Input accessors
     cb.setChecked(true);
     assertTrue(cb.isChecked());
     cb.setChecked(false);
     assertFalse(cb.isChecked());
+
+    cb.setValue(true);
+    assertTrue(cb.getValue());
+    cb.setValue(false);
+    assertFalse(cb.getValue());
+
     cb.setEnabled(false);
     assertFalse(cb.isEnabled());
     cb.setEnabled(true);
     assertTrue(cb.isEnabled());
+
     cb.setTabIndex(2);
     assertEquals(cb.getTabIndex(), 2);
+
     cb.setName("my name");
     assertEquals(cb.getName(), "my name");
+
+    cb.setFormValue("valuable");
+    assertEquals("valuable", cb.getFormValue());
   }
 
   public void testDebugId() {
@@ -88,8 +111,79 @@
     UIObjectTest.assertDebugIdContents("myCheck-label", "myLabel");
   }
 
+  public void testConstructorInputElement() {
+    InputElement elm = DOM.createInputCheck().cast();
+    CheckBox box = new CheckBox(elm.<Element> cast());
+    assertFalse(box.getValue());
+    elm.setDefaultChecked(true);
+    assertTrue(box.getValue());
+  }
+
+  public void testReplaceInputElement() {
+    cb.setValue(true);
+    cb.setTabIndex(1234);
+    cb.setEnabled(false);
+    cb.setAccessKey('k');
+    cb.setFormValue("valuable");
+
+    InputElement elm = Document.get().createCheckInputElement();
+    assertFalse(elm.isChecked());
+
+    Element asOldElement = elm.cast();
+    cb.replaceInputElement(asOldElement);
+
+    // The values should be preserved
+    assertTrue(cb.getValue());
+    assertEquals(1234, cb.getTabIndex());
+    assertFalse(cb.isEnabled());
+    assertEquals("k", elm.getAccessKey());
+    assertEquals("valuable", cb.getFormValue());
+
+    assertTrue(elm.isChecked());
+    cb.setValue(false);
+    assertFalse(elm.isChecked());
+
+    elm.setChecked(true);
+    assertTrue(cb.getValue());
+
+    // TODO: When event creation is in, test that click on the new element works
+  }
+
+  public void testFormValue() {
+    InputElement elm = Document.get().createCheckInputElement();
+    Element asOldElement = elm.cast();
+    cb.replaceInputElement(asOldElement);
+
+    // assertEquals("", elm.getValue());
+    cb.setFormValue("valuable");
+    assertEquals("valuable", elm.getValue());
+
+    elm.setValue("invaluable");
+    assertEquals("invaluable", cb.getFormValue());
+  }
+
+  @SuppressWarnings("deprecation")
+  public void testListenerRemoval() {
+    ClickListener r1 = new ListenerTester();
+    ClickListener r2 = new ListenerTester();
+    ListenerTester.manager = cb.ensureHandlers();
+    cb.addClickListener(r1);
+    cb.addClickListener(r2);
+
+    ListenerTester.fire();
+    assertEquals(ListenerTester.fired, 2);
+
+    cb.removeClickListener(r1);
+    ListenerTester.fire();
+    assertEquals(ListenerTester.fired, 1);
+
+    cb.removeClickListener(r2);
+    ListenerTester.fire();
+    assertEquals(ListenerTester.fired, 0);
+  }
+
+  @SuppressWarnings("deprecation")
   public void testValueChangeEvent() {
-    CheckBox cb = new CheckBox();
     Handler h = new Handler();
     cb.addValueChangeHandler(h);
     cb.setChecked(false);
@@ -119,48 +213,17 @@
     }
   }
 
-  static class ListenerTester implements ClickListener {
-    static int fired = 0;
-    static HandlerManager manager;
-
-    public static void fire() {
-      fired = 0;
-      manager.fireEvent(new ClickEvent() {
-      });
-    }
- 
-    public void onClick(Widget sender) {
-      ++fired;
-    }
+  @Override
+  protected void gwtSetUp() throws Exception {
+    super.gwtSetUp();
+    RootPanel.get().clear();
+    cb = new CheckBox();
+    RootPanel.get().add(cb);
   }
 
-  @SuppressWarnings("deprecation")
-  public void testListenerRemoval() {
-    CheckBox b = new CheckBox();
- 
-    ClickListener r1 = new ListenerTester();
-    ClickListener r2 = new ListenerTester();
-    ListenerTester.manager = b.ensureHandlers();
-    b.addClickListener(r1);
-    b.addClickListener(r2);
-
-    ListenerTester.fire();
-    assertEquals(ListenerTester.fired, 2);
-
-    b.removeClickListener(r1);
-    ListenerTester.fire();
-    assertEquals(ListenerTester.fired, 1);
-
-    b.removeClickListener(r2);
-    ListenerTester.fire();
-    assertEquals(ListenerTester.fired, 0);
-  }
-
-  private static class Handler implements ValueChangeHandler<Boolean> {
-    Boolean received = null;
-
-    public void onValueChange(ValueChangeEvent<Boolean> event) {
-      received = event.getValue();
-    }
+  @Override
+  protected void gwtTearDown() throws Exception {
+    RootPanel.get().clear();
+    super.gwtTearDown();
   }
 }
diff --git a/user/test/com/google/gwt/user/client/ui/FlowPanelTest.java b/user/test/com/google/gwt/user/client/ui/FlowPanelTest.java
index d1c8b34..441ac03 100644
--- a/user/test/com/google/gwt/user/client/ui/FlowPanelTest.java
+++ b/user/test/com/google/gwt/user/client/ui/FlowPanelTest.java
@@ -17,6 +17,9 @@
 
 import com.google.gwt.junit.client.GWTTestCase;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * Tests the FlowPanel widget.
  */
@@ -29,4 +32,30 @@
   public void testAttachDetachOrder() {
     HasWidgetsTester.testAll(new FlowPanel());
   }
+
+  public void testClear() {
+    int size = 10;
+    FlowPanel target;
+    List<Widget> children = new ArrayList<Widget>();
+
+    target = new FlowPanel();
+
+    for (int i = 0; i < size; i++) {
+      Widget w = new Label("widget-" + i);
+      target.add(w);
+      children.add(w);
+    }
+
+    RootPanel.get().add(target);
+    for (Widget child : target) {
+      assertNotNull(child.getElement().getPropertyString("__listener"));
+    }
+    assertEquals(10, target.getWidgetCount());
+    target.clear();
+    assertEquals(0, target.getWidgetCount());
+
+    for (Widget child : target) {
+      assertNull(child.getElement().getPropertyString("__listener") == null);
+    }
+  }
 }
diff --git a/user/test/com/google/gwt/user/client/ui/RadioButtonTest.java b/user/test/com/google/gwt/user/client/ui/RadioButtonTest.java
index a03ec82..9f75759 100644
--- a/user/test/com/google/gwt/user/client/ui/RadioButtonTest.java
+++ b/user/test/com/google/gwt/user/client/ui/RadioButtonTest.java
@@ -45,9 +45,10 @@
   }
 
   /**
-   * Test the name and grouping methods.
+   * Test the name and grouping methods via deprecated calls.
    */
-  public void testGrouping() {
+  @SuppressWarnings("deprecation")
+  public void testGroupingDeprecated() {
     // Create some radio buttons
     RadioButton r1 = new RadioButton("group1", "Radio 1");
     RadioButton r2 = new RadioButton("group1", "Radio 2");
@@ -76,4 +77,37 @@
     assertFalse(r2.isChecked());
     assertTrue(r3.isChecked());
   }
+  
+  /**
+   * Test the name and grouping methods.
+   */
+  public void testGrouping() {
+    // Create some radio buttons
+    RadioButton r1 = new RadioButton("group1", "Radio 1");
+    RadioButton r2 = new RadioButton("group1", "Radio 2");
+    RadioButton r3 = new RadioButton("group2", "Radio 3");
+    RootPanel.get().add(r1);
+    RootPanel.get().add(r2);
+    RootPanel.get().add(r3);
+
+    // Check one button in each group
+    r2.setValue(true);
+    r3.setValue(true);
+
+    // Move a button over
+    r2.setName("group2");
+
+    // Check that the correct buttons are checked
+    assertTrue(r2.getValue());
+    assertFalse(r3.getValue());
+
+    r1.setValue(true);
+    assertTrue(r1.getValue());
+    assertTrue(r2.getValue());
+
+    r3.setValue(true);
+    assertTrue(r1.getValue());
+    assertFalse(r2.getValue());
+    assertTrue(r3.getValue());
+  }
 }
diff --git a/user/test/com/google/gwt/user/client/ui/SuggestBoxTest.java b/user/test/com/google/gwt/user/client/ui/SuggestBoxTest.java
index 82546d8..96e2f3c 100644
--- a/user/test/com/google/gwt/user/client/ui/SuggestBoxTest.java
+++ b/user/test/com/google/gwt/user/client/ui/SuggestBoxTest.java
@@ -40,10 +40,10 @@
     assertEquals(5, box.getLimit());
 
     // setSelectsFirstItem
-    box.setSelectsFirstItem(true);
-    assertTrue(box.getSelectsFirstItem());
-    box.setSelectsFirstItem(false);
-    assertFalse(box.getSelectsFirstItem());
+    box.setAutoSelectEnabled(true);
+    assertTrue(box.isAutoSelectEnabled());
+    box.setAutoSelectEnabled(false);
+    assertFalse(box.isAutoSelectEnabled());
 
     // isSuggestionListShowing
     assertFalse(box.isSuggestionListShowing());
@@ -93,11 +93,11 @@
 
   public void testShowFirst() {
     SuggestBox box = createSuggestBox();
-    assertTrue(box.getSelectsFirstItem());
+    assertTrue(box.isAutoSelectEnabled());
     SuggestBox box2 = createSuggestBox();
-    assertTrue(box2.getSelectsFirstItem());
-    box.setSelectsFirstItem(false);
-    assertFalse(box.getSelectsFirstItem());
+    assertTrue(box2.isAutoSelectEnabled());
+    box.setAutoSelectEnabled(false);
+    assertFalse(box.isAutoSelectEnabled());
     box.setText("t");
     box.showSuggestionList();
     // Todo(ecc) once event triggering is enabled, submit a return key to the
diff --git a/user/test/com/google/gwt/user/server/rpc/LogFilterServletContext.java b/user/test/com/google/gwt/user/server/rpc/LogFilterServletContext.java
index 1685b65..6ebaa39 100644
--- a/user/test/com/google/gwt/user/server/rpc/LogFilterServletContext.java
+++ b/user/test/com/google/gwt/user/server/rpc/LogFilterServletContext.java
@@ -46,6 +46,10 @@
     return realContext.getContext(uripath);
   }
 
+  public String getContextPath() {
+    return realContext.getContextPath();
+  }
+
   public String getInitParameter(String name) {
     return realContext.getInitParameter(name);
   }
diff --git a/user/test/com/google/gwt/user/server/rpc/RemoteServiceServletTest.java b/user/test/com/google/gwt/user/server/rpc/RemoteServiceServletTest.java
index 6914928..dd0d39b 100644
--- a/user/test/com/google/gwt/user/server/rpc/RemoteServiceServletTest.java
+++ b/user/test/com/google/gwt/user/server/rpc/RemoteServiceServletTest.java
@@ -104,6 +104,10 @@
       throw new UnsupportedOperationException();
     }
 
+    public String getContextPath() {
+      throw new UnsupportedOperationException();
+    }
+
     public String getInitParameter(String arg0) {
       throw new UnsupportedOperationException();
     }