summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-04-11 13:51:41 +0300
committerLeif Åstrand <leif@vaadin.com>2012-04-11 13:51:41 +0300
commit25d5b0eebdb841589ac8cb8c1301a4cc494d03ff (patch)
tree1a21d6b659e91f588604561c8aee806f2de377cf
parent492ba61dbc51aaa036ef904f6e7fbf94e9a8c1a0 (diff)
downloadvaadin-framework-25d5b0eebdb841589ac8cb8c1301a4cc494d03ff.tar.gz
vaadin-framework-25d5b0eebdb841589ac8cb8c1301a4cc494d03ff.zip
Change to a more efficient overflow fix and enable it for IE9 (#8615)
-rw-r--r--src/com/vaadin/terminal/gwt/client/LayoutManager.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/LayoutManager.java b/src/com/vaadin/terminal/gwt/client/LayoutManager.java
index 09c811a2de..40823f4bee 100644
--- a/src/com/vaadin/terminal/gwt/client/LayoutManager.java
+++ b/src/com/vaadin/terminal/gwt/client/LayoutManager.java
@@ -12,7 +12,8 @@ import java.util.Set;
import com.google.gwt.core.client.Duration;
import com.google.gwt.core.client.JsArrayString;
import com.google.gwt.dom.client.Element;
-import com.google.gwt.dom.client.Style.Unit;
+import com.google.gwt.dom.client.Style;
+import com.google.gwt.dom.client.Style.Overflow;
import com.google.gwt.user.client.Timer;
import com.vaadin.terminal.gwt.client.MeasuredSize.MeasureResult;
import com.vaadin.terminal.gwt.client.ui.ManagedLayout;
@@ -349,8 +350,10 @@ public class LayoutManager {
if (!pendingOverflowFixes.isEmpty()) {
Duration duration = new Duration();
for (ComponentConnector componentConnector : pendingOverflowFixes) {
- componentConnector.getWidget().getElement().getParentElement()
- .getStyle().setTop(1, Unit.PX);
+ Style style = componentConnector.getWidget().getElement()
+ .getParentElement().getStyle();
+ assert (style.getOverflow() == null);
+ style.setOverflow(Overflow.HIDDEN);
}
for (ComponentConnector componentConnector : pendingOverflowFixes) {
componentConnector.getWidget().getElement().getParentElement()
@@ -358,7 +361,7 @@ public class LayoutManager {
}
for (ComponentConnector componentConnector : pendingOverflowFixes) {
componentConnector.getWidget().getElement().getParentElement()
- .getStyle().setTop(0, Unit.PX);
+ .getStyle().clearOverflow();
layoutDependencyTree.setNeedsMeasure(componentConnector, true);
ComponentContainerConnector parent = componentConnector
.getParent();
@@ -425,8 +428,10 @@ public class LayoutManager {
}
private void doOverflowAutoFix(ComponentConnector connector) {
+ // IE9 doesn't need the original fix, but for some reason it needs one
if (connector.getParent() instanceof MayScrollChildren
- && BrowserInfo.get().requiresOverflowAutoFix()
+ && (BrowserInfo.get().requiresOverflowAutoFix() || BrowserInfo
+ .get().isIE9())
&& !"absolute".equals(connector.getWidget().getElement()
.getStyle().getPosition())) {
pendingOverflowFixes.add(connector);