Fixes Issue 1942
FF3 Beta 1 throws WRONG_DOCUMENT_ERROR in getBoxObjectFor if the
element is not attached to the DOM. This affects our implementation
of Tree when an element is selected programmatically on a tree that
is unattached. This change wraps the call to getBoxObjectFor in a
try/catch and returns 0 if a WRONG_DOCUMENT_ERROR occurs, which
emulates what getBoxObjectFor is supposed to do. This bug is set
to P1 in bugzilla, https://bugzilla.mozilla.org/show_bug.cgi?id=409111,
so this change can be saftely removed in the future.

Found by: mmastrac
Review by: jgw



git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1871 8db76d5a-ed1c-0410-87a9-c151d255dfc7
1 file changed