Adding code to prevent warning of converting longs->ints in IE hosted mode
Review by:jlabanca
git-svn-id: https://google-web-toolkit.googlecode.com/svn/releases/1.6@4529 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/dom/client/DOMImplIE6.java b/user/src/com/google/gwt/dom/client/DOMImplIE6.java
index f95a5f0..4d3b634 100644
--- a/user/src/com/google/gwt/dom/client/DOMImplIE6.java
+++ b/user/src/com/google/gwt/dom/client/DOMImplIE6.java
@@ -70,9 +70,9 @@
// getBoundingClientRect() throws a JS exception if the elem is not attached
// to the document, so we wrap it in a try/catch block
try {
- return (elem.getBoundingClientRect().left /
+ return Math.floor((elem.getBoundingClientRect().left /
this.@com.google.gwt.dom.client.DOMImplIE6::getZoomMultiple()()) +
- @com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.scrollLeft;
+ @com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.scrollLeft);
} catch (e) {
return 0;
}
@@ -83,18 +83,20 @@
// getBoundingClientRect() throws a JS exception if the elem is not attached
// to the document, so we wrap it in a try/catch block
try {
- return (elem.getBoundingClientRect().top /
+ return Math.floor((elem.getBoundingClientRect().top /
this.@com.google.gwt.dom.client.DOMImplIE6::getZoomMultiple()()) +
- @com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.scrollTop;
+ @com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.scrollTop);
} catch (e) {
return 0;
}
}-*/;
+ @Override
public native int getBodyOffsetLeft() /*-{
return @com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.clientLeft;
}-*/;
+ @Override
public native int getBodyOffsetTop() /*-{
return @com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.clientTop;
}-*/;