Fixes Issue #757.

Due to bugs in Mozilla's offsetLeft & offsetTop implementation, the
widget's position (getWidgetLeft & getWidgetTop) is now calculated by
taking the absolute position of the panel and subtracting it from the
absolute position of the widget. This calculation consistently gives
the distance from the widget's outer border edge to the panel's outer
border edge.

Patch by: rdayal
Review by: knorton



git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1128 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/user/client/ui/AbsolutePanel.java b/user/src/com/google/gwt/user/client/ui/AbsolutePanel.java
index f1eca83..1225002 100644
--- a/user/src/com/google/gwt/user/client/ui/AbsolutePanel.java
+++ b/user/src/com/google/gwt/user/client/ui/AbsolutePanel.java
@@ -88,25 +88,27 @@
   }
 
   /**
-   * Gets the left position of the specified widget within the panel.
+   * Gets the position of the left outer border edge of the widget relative to
+   * the left outer border edge of the panel.
    * 
    * @param w the widget whose position is to be retrieved
    * @return the widget's left position
    */
   public int getWidgetLeft(Widget w) {
     checkWidgetParent(w);
-    return DOM.getElementPropertyInt(w.getElement(), "offsetLeft");
+    return DOM.getAbsoluteLeft(w.getElement()) - DOM.getAbsoluteLeft(getElement());
   }
 
   /**
-   * Gets the top position of the specified widget within the panel.
+   * Gets the position of the top outer border edge of the widget relative to
+   * the top outer border edge of the panel.
    * 
    * @param w the widget whose position is to be retrieved
    * @return the widget's top position
    */
   public int getWidgetTop(Widget w) {
     checkWidgetParent(w);
-    return DOM.getElementPropertyInt(w.getElement(), "offsetTop");
+    return DOM.getAbsoluteTop(w.getElement()) - DOM.getAbsoluteTop(getElement());
   }
 
   /**