int relativeY = DOM.eventGetClientY(event) -
DOM.getAbsoluteTop(element) + Window.getScrollTop();
Will have I have to adjust this with body offset?
-Ray
user/src/com/google/gwt/dom/client/DOMImplMozilla.java
- I think DocumentRootImpl should be used instead of doc.documentElement. In quirks mode the scroll is on the body in FF.
user/src/com/google/gwt/user/client/ui/PopupPanel.java
- Do you want to mention that the PopupPanel should be added to the RootPanel in the JavaDocs?
- getPopupLeft/Top and UIObject.getAbsoluteLeft/Top are redundant. Do you want to deprecate getPopupLeft/Top?
getBodyOffsetLeft/Top:
- method name: It's only related to the <body> on IE quirks. That said, I don't have a suggestion for a better name.
- What are your thoughts on adding an example to the JavaDoc?
- @return: seems to imply that it returns body.offsetLeft/Top
user/src/com/google/gwt/dom/client/DOMImpl.java
tab on line 75
user/src/com/google/gwt/dom/client/DOMImplMozilla.java
indentation on lines 31 and 51
user/src/com/google/gwt/dom/client/DOMImplIE6.java
lines 45 and 51: indentation; '+' should be on preceding line
1. FF3 document scroll causes coordinate problems in quirks mode, but is fine in standards mode
2. IE7 zoom (both quirks + standards) throws off coordinates
[https://blogs.msdn.com/ie/archive/2008/03/25/internet-explorer-8-and-adaptive-zoom.aspx:]
DHTML properties: In IE7 zoom, some properties were treated as physical (e.g.: mouse coordinates) while others were logical (offset). This implementation essentially required web developers to be aware of or manually calculate the zoom state based on the property being used. In IE8 zoom, all DHTML properties are now assumed to be logical. This enables some key scenarios such as fly-out menus and "drag-and-drop". There are a few known issues, such as the incorrect scaling with screen.width and screen.height, that were not addressed in Beta 1. These will be fixed in a future release.
On Wed, Jul 30, 2008 at 10:03 PM, Scott Blum <sco...@google.com> wrote:
Glad you guys finally got to the bottom of this!!dom.client:- DOMImpl(75) has a tab char in it- Document(616,629): these lines should end with one space, not two
- Document: how about example code in the javadoc, I would have no idea whether to add or subtract the returned value, which would suck in the common case where it might be 0
RootPanel:- Consider subclassing RootPanel with a private static inner class and returning the subclass from RootPanel.get(); this will most likely optimize out the runtime test in 99% of all cases.
2. IE7 zoom (both quirks + standards) throws off coordinatesYikes, I've never actually used the 'zoom' feature. It looks like it creates a dichotomy between logical and device coordinates, which kind of sucks because I'm not sure where to find that ratio. Do you know if the zoom ratio (I assume it's the zoom: style) is always applied to the body or documentElement? Unless this turns out to be trivially simple, I'd be in favor of getting these patches checked in and dealing with this separately.I also found some documentation on IE8's equivalent feature, which implies that they realize they screwed it up in IE7:[https://blogs.msdn.com/ie/archive/2008/03/25/internet-explorer-8-and-adaptive-zoom.aspx:]DHTML properties: In IE7 zoom, some properties were treated as physical (e.g.: mouse coordinates) while others were logical (offset). This implementation essentially required web developers to be aware of or manually calculate the zoom state based on the property being used. In IE8 zoom, all DHTML properties are now assumed to be logical. This enables some key scenarios such as fly-out menus and "drag-and-drop". There are a few known issues, such as the incorrect scaling with screen.width and screen.height, that were not addressed in Beta 1. These will be fixed in a future release.