]> source.dussan.org Git - vaadin-framework.git/commitdiff
Avoid getting root panel document multiple times (#8717)
authorArtur Signell <artur@vaadin.com>
Mon, 25 Jun 2012 11:09:50 +0000 (14:09 +0300)
committerArtur Signell <artur@vaadin.com>
Mon, 25 Jun 2012 11:09:50 +0000 (14:09 +0300)
src/com/vaadin/terminal/gwt/client/LayoutManagerIE8.java

index 742594671fdbda3ee8f81ee87a63760dbd1918d0..ea130779ea3b122d0af0bd56198895860b62ef0d 100644 (file)
@@ -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<Element> i = measuredSizes.keySet().iterator();
         while (i.hasNext()) {
             Element e = i.next();
-            if (e.getOwnerDocument() != RootPanel.get().getElement()
-                    .getOwnerDocument()) {
+            if (e.getOwnerDocument() != document) {
                 i.remove();
             }
         }