[gwt-contrib] Re: Fix for ScrollImplTrident leak (issue1601803)

2011-11-25 Thread stephen . haberman

My local commit message didn't make it into the issue description, but
this patch should include in the commit message attribution to Dirk
Scheffler.

If also fixes issue 7015:

http://code.google.com/p/google-web-toolkit/issues/detail?id=7015

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

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


Re: [gwt-contrib] Re: Add SourceMap support to GWT (issue1558803)

2011-11-25 Thread Stephen Haberman

> I can't compile because
> "${gwt.tools.lib}/jscomp/sourcemap-rebased.jar" is missing. Where to
> get it or how can I create this jar?

gwt.tools.lib should point to a working copy of this directory in svn:

http://google-web-toolkit.googlecode.com/svn/tools

Which has the jars GWT requires to build. See more info here:

http://code.google.com/webtoolkit/makinggwtbetter.html#workingoncode

Also note the eclipse/README.txt file in svn is useful for setting up
your build environment, assuming you're using Eclipse.

- Stephen

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


Re: [gwt-contrib] Re: Add SourceMap support to GWT (issue1558803)

2011-11-25 Thread John Tamplin
On Fri, Nov 25, 2011 at 4:39 PM,  wrote:

> On 2011/09/23 21:55:56, cromwellian wrote:
>
> I can't compile because "${gwt.tools.lib}/jscomp/**sourcemap-rebased.jar"
> is missing. Where to get it or how can I create this jar?
>
> http://gwt-code-reviews.**appspot.com/1558803/
>

You need to svn up in your GWT tools directory.

-- 
John A. Tamplin
Software Engineer (GWT), Google

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

[gwt-contrib] Re: Add SourceMap support to GWT (issue1558803)

2011-11-25 Thread cleciovarjao

On 2011/09/23 21:55:56, cromwellian wrote:

I can't compile because "${gwt.tools.lib}/jscomp/sourcemap-rebased.jar"
is missing. Where to get it or how can I create this jar?

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

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


[gwt-contrib] Fix for ScrollImplTrident leak (issue1601803)

2011-11-25 Thread stephen . haberman

Reviewers: jlabanca,



Please review this at http://gwt-code-reviews.appspot.com/1601803/

Affected files:
  M user/src/com/google/gwt/user/client/ui/NativeHorizontalScrollbar.java
  M user/src/com/google/gwt/user/client/ui/NativeVerticalScrollbar.java
  M user/src/com/google/gwt/user/client/ui/ScrollImpl.java
  M user/src/com/google/gwt/user/client/ui/ScrollPanel.java


Index: user/src/com/google/gwt/user/client/ui/NativeHorizontalScrollbar.java
diff --git  
a/user/src/com/google/gwt/user/client/ui/NativeHorizontalScrollbar.java  
b/user/src/com/google/gwt/user/client/ui/NativeHorizontalScrollbar.java
index  
deaadaa50919b0ab4b5afb29b4da65741de9448e..a5ed423633adff3b0ffb433025581f27196c78a8  
100644

--- a/user/src/com/google/gwt/user/client/ui/NativeHorizontalScrollbar.java
+++ b/user/src/com/google/gwt/user/client/ui/NativeHorizontalScrollbar.java
@@ -130,9 +130,6 @@ public class NativeHorizontalScrollbar extends  
AbstractNativeScrollbar implement

 Style style = resources.nativeHorizontalScrollbarStyle();
 style.ensureInjected();
 getScrollableElement().addClassName(style.nativeHorizontalScrollbar());
-
-// Initialize the implementation.
-ScrollImpl.get().initialize(scrollable, contentDiv);
   }

   public int getHorizontalScrollPosition() {
@@ -193,4 +190,18 @@ public class NativeHorizontalScrollbar extends  
AbstractNativeScrollbar implement

   protected Element getScrollableElement() {
 return scrollable;
   }
+
+  @Override
+  protected void onAttach() {
+super.onAttach();
+// Initialize the implementation.
+ScrollImpl.get().onAttach(scrollable, contentDiv);
+  }
+
+  @Override
+  protected void onDetach() {
+// Uninitialize the implementation.
+ScrollImpl.get().onDetach(scrollable, contentDiv);
+super.onDetach();
+  }
 }
Index: user/src/com/google/gwt/user/client/ui/NativeVerticalScrollbar.java
diff --git  
a/user/src/com/google/gwt/user/client/ui/NativeVerticalScrollbar.java  
b/user/src/com/google/gwt/user/client/ui/NativeVerticalScrollbar.java
index  
e4743b1d97f4407dd3958ed6ab225cfecf1241bd..6077bc2195dcc8dc571993e060e8f1c4bc214580  
100644

--- a/user/src/com/google/gwt/user/client/ui/NativeVerticalScrollbar.java
+++ b/user/src/com/google/gwt/user/client/ui/NativeVerticalScrollbar.java
@@ -130,9 +130,6 @@ public class NativeVerticalScrollbar extends  
AbstractNativeScrollbar implements

 Style style = resources.nativeVerticalScrollbarStyle();
 style.ensureInjected();
 getScrollableElement().addClassName(style.nativeVerticalScrollbar());
-
-// Initialize the implementation.
-ScrollImpl.get().initialize(scrollable, contentDiv);
   }

   public int getMaximumVerticalScrollPosition() {
@@ -193,4 +190,18 @@ public class NativeVerticalScrollbar extends  
AbstractNativeScrollbar implements

   protected Element getScrollableElement() {
 return scrollable;
   }
+
+  @Override
+  protected void onAttach() {
+super.onAttach();
+// Initialize the implementation.
+ScrollImpl.get().onAttach(scrollable, contentDiv);
+  }
+
+  @Override
+  protected void onDetach() {
+// Uninitialize the implementation.
+ScrollImpl.get().onDetach(scrollable, contentDiv);
+super.onDetach();
+  }
 }
Index: user/src/com/google/gwt/user/client/ui/ScrollImpl.java
diff --git a/user/src/com/google/gwt/user/client/ui/ScrollImpl.java  
b/user/src/com/google/gwt/user/client/ui/ScrollImpl.java
index  
06e8a20e50efc616e19ffeafc58626022146162c..0d6c43352074e64b716dbe14e917e8b68d481bf4  
100644

--- a/user/src/com/google/gwt/user/client/ui/ScrollImpl.java
+++ b/user/src/com/google/gwt/user/client/ui/ScrollImpl.java
@@ -36,7 +36,15 @@ class ScrollImpl {
 }

 @Override
-public native void initialize(Element scrollable, Element container)  
/*-{

+public native boolean isRtl(Element scrollable) /*-{
+  return scrollable.currentStyle.direction == 'rtl';
+}-*/;
+
+/**
+ * attached event handlers are stored in properties for detachement in  
{@link #onDetach(Element, Element)}

+ */
+@Override
+public native void onAttach(Element scrollable, Element container) /*-{
   // Remember the last scroll position.
   var scrollableElem = scrollable;
   scrollableElem.__lastScrollTop = scrollableElem.__lastScrollLeft = 0;
@@ -45,6 +53,7 @@ class ScrollImpl {
 scrollableElem.__lastScrollLeft = scrollableElem.scrollLeft;
   });
   scrollable.attachEvent('onscroll', scrollHandler);
+  scrollable.__scrollHandler = scrollHandler;

   // Detect if the scrollable element or the container within it  
changes

   // size, either of which could affect the scroll position.
@@ -62,12 +71,24 @@ class ScrollImpl {
 }), 1);
   });
   scrollable.attachEvent('onresize', resizeHandler);
+  scrollable.__resizeHandler = resizeHandler;
   container.attachEvent('onresize', resizeHandler);
+  container.__resizeHandler = resizeHandler;
 }-*/;

+/**
+ * atta