import com.google.gwt.dom.client.Style;
import com.google.gwt.dom.client.Style.Overflow;
import com.google.gwt.user.client.Timer;
+import com.google.gwt.user.client.ui.RootPanel;
import com.vaadin.client.MeasuredSize.MeasureResult;
import com.vaadin.client.ui.ManagedLayout;
import com.vaadin.client.ui.PostLayoutListener;
Duration passDuration = new Duration();
passes++;
+ /*
+ * Fixes IE8 issues where IE8 sometimes forgets to update the size
+ * of the containing element. To force a reflow by modifying the
+ * magical zoom property.
+ */
+ if (BrowserInfo.get().isIE8()) {
+ int zoom = RootPanel.get().getElement().getPropertyInt("zoom");
+ RootPanel.get().getElement().setPropertyInt("zoom", zoom);
+ }
+
int measuredConnectorCount = measureConnectors(
currentDependencyTree, everythingNeedsMeasure);
everythingNeedsMeasure = false;
import java.util.List;
-import com.google.gwt.core.client.Scheduler;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.UIObject;
import com.google.gwt.user.client.ui.Widget;
-import com.vaadin.client.BrowserInfo;
import com.vaadin.client.LayoutManager;
import com.vaadin.client.StyleConstants;
-import com.vaadin.client.ui.layout.ElementResizeEvent;
import com.vaadin.client.ui.layout.ElementResizeListener;
import com.vaadin.shared.ui.AlignmentInfo;
private ElementResizeListener spacingResizeListener;
- /*
- * IE8 forgets to re-render the slot if the widget inside the slot changes
- * size. To force IE to re-render we apply the well know zoom property to
- * the widget which triggers a re-render of the slot element.
- */
- private static final ElementResizeListener ie8ElementRefresherListener = new ElementResizeListener() {
-
- @Override
- public void onElementResize(final ElementResizeEvent e) {
- Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
- @Override
- public void execute() {
- int zoom = e.getElement().getPropertyInt("zoom");
- e.getElement().setPropertyInt("zoom", zoom);
- }
- });
- }
- };
// Caption is placed after component unless there is some part which
// moves it above.
lm.addElementResizeListener(getSpacingElement(),
spacingResizeListener);
}
-
- if (BrowserInfo.get().isIE8()) {
- lm.addElementResizeListener(getWidget().getElement(),
- ie8ElementRefresherListener);
- }
}
}
lm.removeElementResizeListener(getSpacingElement(),
spacingResizeListener);
}
-
- if (BrowserInfo.get().isIE8()) {
- lm.removeElementResizeListener(getWidget().getElement(),
- ie8ElementRefresherListener);
- }
}
}