On FF3, these routines can return a non-integer, which can result in
warnings in hosted mode (seen with OOPHM) and potential errors in web mode
as the function is declared to return an int. The fix is to coerce the
value to int in the FF3 code-path. This may also be related to issue
2891<http://code.google.com/p/google-web-toolkit/issues/detail?id=2891>
.
--
John A. Tamplin
Software Engineer (GWT), Google
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---
Index: user/src/com/google/gwt/dom/client/DOMImplMozilla.java
===================================================================
--- user/src/com/google/gwt/dom/client/DOMImplMozilla.java (revision 3731)
+++ user/src/com/google/gwt/dom/client/DOMImplMozilla.java (working copy)
@@ -27,8 +27,8 @@
// supported on older versions). If changing this code, make sure to check
// the museum entry for issue 1932.
if (Element.prototype.getBoundingClientRect) {
- return elem.getBoundingClientRect().left +
- @com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.scrollLeft;
+ return (elem.getBoundingClientRect().left +
+ @com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.scrollLeft) | 0;
} else {
// We cannot use DOMImpl here because offsetLeft/Top return erroneous
// values when overflow is not visible. We have to difference screenX
@@ -47,8 +47,8 @@
// supported on older versions). If changing this code, make sure to check
// the museum entry for issue 1932.
if (Element.prototype.getBoundingClientRect) {
- return elem.getBoundingClientRect().top +
- @com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.scrollTop;
+ return (elem.getBoundingClientRect().top +
+ @com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.scrollTop) | 0;
} else {
// We cannot use DOMImpl here because offsetLeft/Top return erroneous
// values when overflow is not visible. We have to difference screenX