]> source.dussan.org Git - vaadin-framework.git/commitdiff
[merge from 6.7] Revert fix for #3401 as it causes problems with scrolled viewports
authorAutomerge <automerge@vaadin.com>
Tue, 6 Mar 2012 10:06:28 +0000 (10:06 +0000)
committerAutomerge <automerge@vaadin.com>
Tue, 6 Mar 2012 10:06:28 +0000 (10:06 +0000)
svn changeset:23188/svn branch:6.8

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

index f48fc7c19508283f82f57820ab5b89454da685f5..07ade6a8b1479826a0d6599a732723266ab88a15 100644 (file)
@@ -149,50 +149,10 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
             connection.runDescendentsLayout(VView.this);
             Util.runWebkitOverflowAutoFix(getElement());
 
-            ensureSubWindowsVisible();
             sendClientResized();
         }
     }
 
-    private void ensureSubWindowsVisible() {
-        for (VWindow subWindow : subWindows) {
-            // First process width as it might affect the height
-            int oldLeft = subWindow.getPopupLeft();
-            int oldWidth = subWindow.getOffsetWidth();
-            int oldRight = oldLeft + oldWidth;
-
-            int newLeft = oldLeft;
-
-            if (oldRight > width) {
-                newLeft = width - oldWidth;
-                if (newLeft < 0) {
-                    newLeft = 0;
-                    subWindow.setWidth(width + "px");
-                    subWindow.updateContentsSize();
-                }
-            }
-
-            // Process height once the width is final
-            int oldTop = subWindow.getPopupTop();
-            int oldHeight = subWindow.getOffsetHeight();
-            int oldBottom = oldTop + oldHeight;
-
-            int newTop = oldTop;
-
-            if (oldBottom > height) {
-                newTop = height - oldHeight;
-                if (newTop < 0) {
-                    newTop = 0;
-                    subWindow.setHeight(height + "px");
-                    subWindow.updateContentsSize();
-                }
-            }
-
-            subWindow.setPopupPosition(newLeft, newTop);
-        }
-
-    }
-
     public String getTheme() {
         return theme;
     }
index a7a4a8ae2899ff80162bda6b11ca7b10a68a005f..de0106164100cb108e77986795a570185d7b91e7 100644 (file)
@@ -1060,7 +1060,7 @@ public class VWindow extends VOverlay implements Container,
         }
     }
 
-    void updateContentsSize() {
+    private void updateContentsSize() {
         // Update child widget dimensions
         if (client != null) {
             client.handleComponentRelativeSize((Widget) layout);