Adding Joel as a reviewer, as IE leaks are his Moby Dick (as he says).


http://gwt-code-reviews.appspot.com/1601803/diff/1/user/src/com/google/gwt/user/client/ui/ScrollImpl.java
File user/src/com/google/gwt/user/client/ui/ScrollImpl.java (right):

http://gwt-code-reviews.appspot.com/1601803/diff/1/user/src/com/google/gwt/user/client/ui/ScrollImpl.java#newcode56
user/src/com/google/gwt/user/client/ui/ScrollImpl.java:56:
scrollable.__scrollHandler = scrollHandler;
On 2011/11/27 01:06:33, stephenh wrote:
On 2011/11/26 10:36:07, tbroyer wrote:
> How about creating static functions (have a look into
> com.google.gwt.user.client.impl.DOMImplTrident)

I don't see any static methods in DOMImplTrident?

I meant the callDispatchEvent et al.

> that use window.event.srcElement to get a reference to the
scrollableElem?
That way it wouldn't leak and wouldn't need to be "uninstalled".

That seems cool.

> For the container.onresize, one solution could be to set the
scrollableElem as
an expando; e.g.

I think Dirk's other leak (issue 1601804 in reitveld) was caused by a
parent DOM
element having an expando property to one of its children. (AFAIK,
would
appreciate your comments on that review if I'm wrong.)

It seems like you're right:
http://msdn.microsoft.com/en-us/library/bb250448(v=vs.85).aspx

In this case scrollableElem is the parent, so perhaps a child
(container) having
an expando to its parent would be okay?

I'm afraid it'd leak too (according to the MSDN). A quick and dirty fix
would be to set an expando on the 'container' just saying "hey, I'm the
'container', the 'scrollable' is my parent", and then using:
if (scrollableElem.__container) scrollableElem = scrollableElem.parent;

Otherwise, I'm afraid an onAttach/onDetach is necessary; but using the
technique I proposed and just setting the expando back to 'null' in
onDetach would then be more readable I guess.

http://gwt-code-reviews.appspot.com/1601803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to