summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-05-30 11:55:31 +0300
committerVaadin Code Review <review@vaadin.com>2013-05-30 14:08:32 +0000
commit46cc08b5374f2d60de6825e88287da2b83a095c1 (patch)
tree34d4e939202b2319f3e7e8ed10e93e220a403b56 /client
parent1b274c40e6c3a57367e4f012a014a9b86e8ea909 (diff)
downloadvaadin-framework-46cc08b5374f2d60de6825e88287da2b83a095c1.tar.gz
vaadin-framework-46cc08b5374f2d60de6825e88287da2b83a095c1.zip
Remove workarounds for broken Timer.cancel in IE (#11872)
Change-Id: Ib60d6131d36e794bcf72d5f498bb59fafdbf7d0e
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ApplicationConnection.java8
-rw-r--r--client/src/com/vaadin/client/VLoadingIndicator.java57
-rw-r--r--client/src/com/vaadin/client/ui/ui/UIConnector.java13
3 files changed, 6 insertions, 72 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java
index 24275dadb9..ed9fe88269 100644
--- a/client/src/com/vaadin/client/ApplicationConnection.java
+++ b/client/src/com/vaadin/client/ApplicationConnection.java
@@ -3277,14 +3277,6 @@ public class ApplicationConnection {
Timer forceHandleMessage = new Timer() {
@Override
public void run() {
- if (responseHandlingLocks.isEmpty()) {
- /*
- * Timer fired but there's nothing to clear. This can happen
- * with IE8 as Timer.cancel is not always effective (see GWT
- * issue 8101).
- */
- return;
- }
VConsole.log("WARNING: reponse handling was never resumed, forcibly removing locks...");
responseHandlingLocks.clear();
handlePendingMessages();
diff --git a/client/src/com/vaadin/client/VLoadingIndicator.java b/client/src/com/vaadin/client/VLoadingIndicator.java
index fcce35781d..3b6cf2252c 100644
--- a/client/src/com/vaadin/client/VLoadingIndicator.java
+++ b/client/src/com/vaadin/client/VLoadingIndicator.java
@@ -42,75 +42,24 @@ public class VLoadingIndicator {
private int secondDelay = 1500;
private int thirdDelay = 5000;
- /**
- * Timer with method for checking if it has been cancelled. This class is a
- * workaround for a IE8 problem which causes a timer to be fired even if it
- * has been cancelled.
- *
- * @author Vaadin Ltd
- * @since 7.1
- */
- private abstract static class LoadingIndicatorTimer extends Timer {
- private boolean cancelled = false;
-
- @Override
- public void cancel() {
- super.cancel();
- cancelled = true;
- }
-
- @Override
- public void schedule(int delayMillis) {
- super.schedule(delayMillis);
- cancelled = false;
- }
-
- @Override
- public void scheduleRepeating(int periodMillis) {
- super.scheduleRepeating(periodMillis);
- cancelled = false;
- }
-
- /**
- * Checks if this timer has been cancelled.
- *
- * @return true if the timer has been cancelled, false otherwise
- */
- public boolean isCancelled() {
- return cancelled;
- }
- }
-
- private Timer firstTimer = new LoadingIndicatorTimer() {
+ private Timer firstTimer = new Timer() {
@Override
public void run() {
- if (isCancelled()) {
- // IE8 does not properly cancel the timer in all cases.
- return;
- }
show();
}
};
- private Timer secondTimer = new LoadingIndicatorTimer() {
+ private Timer secondTimer = new Timer() {
@Override
public void run() {
- if (isCancelled()) {
- // IE8 does not properly cancel the timer in all cases.
- return;
- }
getElement().setClassName(PRIMARY_STYLE_NAME);
getElement().addClassName("second");
// For backwards compatibility only
getElement().addClassName(PRIMARY_STYLE_NAME + "-delay");
}
};
- private Timer thirdTimer = new LoadingIndicatorTimer() {
+ private Timer thirdTimer = new Timer() {
@Override
public void run() {
- if (isCancelled()) {
- // IE8 does not properly cancel the timer in all cases.
- return;
- }
getElement().setClassName(PRIMARY_STYLE_NAME);
getElement().addClassName("third");
// For backwards compatibility only
diff --git a/client/src/com/vaadin/client/ui/ui/UIConnector.java b/client/src/com/vaadin/client/ui/ui/UIConnector.java
index 643d687f1d..e734d420f2 100644
--- a/client/src/com/vaadin/client/ui/ui/UIConnector.java
+++ b/client/src/com/vaadin/client/ui/ui/UIConnector.java
@@ -645,16 +645,9 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
pollTimer = new Timer() {
@Override
public void run() {
- /*
- * Verify that polling has not recently been canceled. This
- * is needed because Timer.cancel() does not always work
- * properly in IE 8 until GWT issue 8101 has been fixed.
- */
- if (pollTimer != null) {
- getRpcProxy(UIServerRpc.class).poll();
- // Send changes even though poll is @Delayed
- getConnection().sendPendingVariableChanges();
- }
+ getRpcProxy(UIServerRpc.class).poll();
+ // Send changes even though poll is @Delayed
+ getConnection().sendPendingVariableChanges();
}
};
pollTimer.scheduleRepeating(getState().pollInterval);