From: Artur Signell Date: Mon, 25 Jun 2012 11:09:50 +0000 (+0300) Subject: Avoid getting root panel document multiple times (#8717) X-Git-Tag: 7.0.0.alpha3~68^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d3e58e4d0999bb987795f2bc943c1584b2480617;p=vaadin-framework.git Avoid getting root panel document multiple times (#8717) --- diff --git a/src/com/vaadin/terminal/gwt/client/LayoutManagerIE8.java b/src/com/vaadin/terminal/gwt/client/LayoutManagerIE8.java index 742594671f..ea130779ea 100644 --- a/src/com/vaadin/terminal/gwt/client/LayoutManagerIE8.java +++ b/src/com/vaadin/terminal/gwt/client/LayoutManagerIE8.java @@ -7,6 +7,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Map; +import com.google.gwt.dom.client.Document; import com.google.gwt.dom.client.Element; import com.google.gwt.user.client.ui.RootPanel; @@ -36,11 +37,12 @@ public class LayoutManagerIE8 extends LayoutManager { @Override protected void cleanMeasuredSizes() { + Document document = RootPanel.get().getElement().getOwnerDocument(); + Iterator i = measuredSizes.keySet().iterator(); while (i.hasNext()) { Element e = i.next(); - if (e.getOwnerDocument() != RootPanel.get().getElement() - .getOwnerDocument()) { + if (e.getOwnerDocument() != document) { i.remove(); } }