summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/widgetset/client
diff options
context:
space:
mode:
authorPekka Hyvönen <pekka@vaadin.com>2014-03-14 16:17:27 +0200
committerHenri Sara <hesara@vaadin.com>2014-03-14 16:17:27 +0200
commit0c7cbc73dba97ad0b95cb11f4b4eabb37046fe61 (patch)
tree40fe7b9f17b8b343ab3cc224a47711e3c8b8911d /uitest/src/com/vaadin/tests/widgetset/client
parent2f9318610ca83902060173bf0caae1a2fe385f21 (diff)
downloadvaadin-framework-0c7cbc73dba97ad0b95cb11f4b4eabb37046fe61.tar.gz
vaadin-framework-0c7cbc73dba97ad0b95cb11f4b4eabb37046fe61.zip
Fixes a memory leak on IE8 in LayoutManagerIE8 (#12688)
Change-Id: Ieae3b1d82e92fadf5ab517c1c878fc82bcc0ecbd
Diffstat (limited to 'uitest/src/com/vaadin/tests/widgetset/client')
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/client/LayoutMemoryUsageIE8ExtensionConnector.java45
1 files changed, 45 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/widgetset/client/LayoutMemoryUsageIE8ExtensionConnector.java b/uitest/src/com/vaadin/tests/widgetset/client/LayoutMemoryUsageIE8ExtensionConnector.java
new file mode 100644
index 0000000000..c92e688520
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/widgetset/client/LayoutMemoryUsageIE8ExtensionConnector.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.widgetset.client;
+
+import com.vaadin.client.BrowserInfo;
+import com.vaadin.client.LayoutManager;
+import com.vaadin.client.LayoutManagerIE8;
+import com.vaadin.client.ServerConnector;
+import com.vaadin.client.extensions.AbstractExtensionConnector;
+import com.vaadin.shared.ui.Connect;
+import com.vaadin.tests.extensions.LayoutMemoryUsageIE8Extension;
+
+@Connect(LayoutMemoryUsageIE8Extension.class)
+public class LayoutMemoryUsageIE8ExtensionConnector extends
+ AbstractExtensionConnector {
+
+ @Override
+ protected void extend(ServerConnector target) {
+ if (BrowserInfo.get().isIE8()) {
+ LayoutManagerIE8 manager = (LayoutManagerIE8) LayoutManager
+ .get(getConnection());
+ configureGetMapSizeJS(manager);
+ }
+ }
+
+ private native void configureGetMapSizeJS(LayoutManagerIE8 manager)
+ /*-{
+ $wnd.vaadin.getMeasuredSizesCount = function() {
+ return manager.@com.vaadin.client.LayoutManagerIE8::getMeasuredSizesMapSize()();
+ };
+ }-*/;
+}