Merged trunk r7745 into this branch.
Fix for issue 4532.
svn merge -c7745 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk
git-svn-id: https://google-web-toolkit.googlecode.com/svn/releases/2.0@7974 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/branch-info.txt b/branch-info.txt
index 4ddc0cd..f2b6220 100644
--- a/branch-info.txt
+++ b/branch-info.txt
@@ -1502,3 +1502,11 @@
trunk@r7958 was merged into this branch
Add missing flush when sending SwitchTransportMessage.
svn merge -c7958 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk
+
+trunk@r7745 was merged into this branch
+ Fix for issue 4532.
+ svn merge -c7745 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk
+
+trunk@r7931 was merged into this branch
+ Fixes a couple of issues with the RemoteUI and GPE DevMode view interaction.
+ svn merge -c7931 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk
diff --git a/user/src/com/google/gwt/user/client/ui/impl/PopupImplIE6.java b/user/src/com/google/gwt/user/client/ui/impl/PopupImplIE6.java
index 9fa79d1..c84cb9c 100644
--- a/user/src/com/google/gwt/user/client/ui/impl/PopupImplIE6.java
+++ b/user/src/com/google/gwt/user/client/ui/impl/PopupImplIE6.java
@@ -33,6 +33,8 @@
frame.parentElement.removeChild(frame);
frame.__popup = null;
popup.__frame = null;
+ popup.onresize = null;
+ popup.onmove = null;
}
}-*/;
@@ -60,7 +62,7 @@
// Visibility of frame should match visiblity of popup element.
style.visibility = popup.currentStyle.visibility;
-
+
// Issue 2443: remove styles that affect the size of the iframe
style.border = 0;
style.padding = 0;
@@ -74,14 +76,18 @@
style.zIndex = popup.currentStyle.zIndex;
// updates position and dimensions as popup is moved & resized
- style.setExpression('left', 'this.__popup.offsetLeft');
- style.setExpression('top', 'this.__popup.offsetTop');
- style.setExpression('width', 'this.__popup.offsetWidth');
- style.setExpression('height', 'this.__popup.offsetHeight');
+ popup.onmove = function() {
+ frame.style.left = popup.offsetLeft;
+ frame.style.top = popup.offsetTop;
+ };
+ popup.onresize = function() {
+ frame.style.width = popup.offsetWidth;
+ frame.style.height = popup.offsetHeight;
+ };
style.setExpression('zIndex', 'this.__popup.currentStyle.zIndex');
popup.parentElement.insertBefore(frame, popup);
}-*/;
-
+
@Override
public native void setVisible(Element popup, boolean visible) /*-{
if (popup.__frame) {
diff --git a/user/test/com/google/gwt/user/client/ui/LayoutPanelTest.java b/user/test/com/google/gwt/user/client/ui/LayoutPanelTest.java
index 3937e64..dd7c72a 100644
--- a/user/test/com/google/gwt/user/client/ui/LayoutPanelTest.java
+++ b/user/test/com/google/gwt/user/client/ui/LayoutPanelTest.java
@@ -15,6 +15,7 @@
*/
package com.google.gwt.user.client.ui;
+import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.layout.client.LayoutTest;
import com.google.gwt.layout.client.Layout.AnimationCallback;
@@ -56,4 +57,31 @@
}
});
}
+
+ /**
+ * Ensures that the popup implementation doesn't interfere with layout. This
+ * cropped up on IE7 as a result of CSS expressions used in PopupImplIE6, as
+ * described in issue 4532.
+ */
+ public void testWeirdPopupInteraction() {
+ assertTrue(Document.get().isCSS1Compat());
+
+ final LayoutPanel lp = new LayoutPanel();
+ lp.add(new HTML("foo"));
+ RootLayoutPanel.get().add(lp);
+
+ PopupPanel popup = new PopupPanel();
+ popup.center();
+
+ delayTestFinish(2000);
+ DeferredCommand.addCommand(new Command() {
+ public void execute() {
+ int offsetWidth = lp.getOffsetWidth();
+ int offsetHeight = lp.getOffsetHeight();
+ assertTrue(offsetWidth > 0);
+ assertTrue(offsetHeight > 0);
+ finishTest();
+ }
+ });
+ }
}