Removing call to RootLayoutPanel#get() in SplitLayoutPanel so that it does not force the creation of a RootLayoutPanel, which attaches itself to the document body and blocks other elements attached to the RootPanel. The new implenetation uses the max of the client size and the scroll size, which is what PopupPanel does.

Review at http://gwt-code-reviews.appspot.com/1210801

Review by: rchandia@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@9406 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java b/user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java
index fefd6bb..4d40b80 100644
--- a/user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java
+++ b/user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java
@@ -23,6 +23,7 @@
 import com.google.gwt.dom.client.Style.Unit;
 import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.Event;
+import com.google.gwt.user.client.Window;
 
 /**
  * A panel that adds user-positioned splitters between each of its child
@@ -109,9 +110,14 @@
         case Event.ONMOUSEDOWN:
           mouseDown = true;
 
-          // Resize glassElem to take up the entire scrollable window area
-          int height = RootLayoutPanel.get().getElement().getScrollHeight() - 1;
-          int width = RootLayoutPanel.get().getElement().getScrollWidth() - 1;
+          /*
+           * Resize glassElem to take up the entire scrollable window area,
+           * which is the greater of the scroll size and the client size.
+           */
+          int width = Math.max(Window.getClientWidth(),
+              Document.get().getScrollWidth());
+          int height = Math.max(Window.getClientHeight(),
+              Document.get().getScrollHeight());
           glassElem.getStyle().setHeight(height, Unit.PX);
           glassElem.getStyle().setWidth(width, Unit.PX);
           Document.get().getBody().appendChild(glassElem);