With the latest documentRoot patch, Window.getClientHeight returns the wrong value in Safari 2.  This patch figures our the current version of Safari and returns the correct value for the clientHeight.

Issue: 1400
Patch by: jlabanca, fredsa
Review by: ecc



git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1806 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/user/client/impl/WindowImplSafari.java b/user/src/com/google/gwt/user/client/impl/WindowImplSafari.java
index b98d53d..75b9130 100644
--- a/user/src/com/google/gwt/user/client/impl/WindowImplSafari.java
+++ b/user/src/com/google/gwt/user/client/impl/WindowImplSafari.java
@@ -20,6 +20,17 @@
  */
 public class WindowImplSafari extends WindowImpl {
   @Override
+  public native int getClientHeight() /*-{
+    // Safari 2 and Safari 3 disagree on the clientHeight value.
+    // $wnd.devicePixelRatio is only defined in Safari 3.
+    // documentRoot.clientWidth works in both Safari 2 and 3, so we do not need
+    // an override for the width.
+    return $wnd.devicePixelRatio ?
+        @com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.clientHeight :
+        $wnd.innerHeight;
+  }-*/;
+
+  @Override
   public native int getScrollLeft() /*-{
     return $doc.body.scrollLeft;
   }-*/;