]> source.dussan.org Git - vaadin-framework.git/commitdiff
#6715 Layout calculations on browser window resize are now lazy in all browsers
authorArtur Signell <artur.signell@itmill.com>
Mon, 11 Apr 2011 08:57:04 +0000 (08:57 +0000)
committerArtur Signell <artur.signell@itmill.com>
Mon, 11 Apr 2011 08:57:04 +0000 (08:57 +0000)
svn changeset:18194/svn branch:6.6

src/com/vaadin/terminal/gwt/client/ui/VView.java

index b2be2a6daf6e4a5568dcaf1ea92daac74a6fe149..505317d4b859a89c9153f60501f00eb36dd62896 100644 (file)
@@ -480,17 +480,17 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
      * Called when a resize event is received.
      */
     private void onResize() {
-        if (BrowserInfo.get().isIE() || BrowserInfo.get().isFF3()) {
-            /*
-             * IE will give us some false resize events due bugs with
-             * scrollbars. Postponing layout phase to see if size was really
-             * changed.
-             */
-            delayedResizeExecutor.trigger();
-        } else {
-            windowSizeMaybeChanged(Window.getClientWidth(),
-                    Window.getClientHeight());
-        }
+        /*
+         * IE will give us some false resize events due to problems with
+         * scrollbars. Firefox 3 might also produce som extra events. We
+         * postpone both the re-layouting and the server side event for a while
+         * to deal with these issues.
+         * 
+         * We also postpone these events to avoid slowness when resizing the
+         * browser window. Constantly recalculating the layout causes the resize
+         * operation to be really slow.
+         */
+        delayedResizeExecutor.trigger();
     }
 
     /**