summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-01-11 09:26:41 +0000
committerVaadin Code Review <review@vaadin.com>2013-01-11 09:26:41 +0000
commit0b6c89db179c03903db2423f4925ad097ce001c7 (patch)
treecfa415bebccd927020879d413279a12e91474f9a /client
parent99cbaa45fac4545cc9cd3fe7913f1fd391f30773 (diff)
parent08ddaa7ab9b8329fbcd8f2e1cd83e3b5db438148 (diff)
downloadvaadin-framework-0b6c89db179c03903db2423f4925ad097ce001c7.tar.gz
vaadin-framework-0b6c89db179c03903db2423f4925ad097ce001c7.zip
Merge "Merge of (#10460) to Vaadin 7."
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ApplicationConfiguration.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConfiguration.java b/client/src/com/vaadin/client/ApplicationConfiguration.java
index d43e2b4d31..5c3ec36d78 100644
--- a/client/src/com/vaadin/client/ApplicationConfiguration.java
+++ b/client/src/com/vaadin/client/ApplicationConfiguration.java
@@ -533,6 +533,14 @@ public class ApplicationConfiguration implements EntryPoint {
@Override
public void onModuleLoad() {
+ BrowserInfo browserInfo = BrowserInfo.get();
+
+ // Enable iOS6 cast fix (see #10460)
+ if (browserInfo.isIOS() && browserInfo.isWebkit()
+ && browserInfo.getBrowserMajorVersion() == 6) {
+ enableIOS6castFix();
+ }
+
// Prepare VConsole for debugging
if (isDebugMode()) {
Console console = GWT.create(Console.class);
@@ -569,6 +577,18 @@ public class ApplicationConfiguration implements EntryPoint {
}
/**
+ * Fix to iOS6 failing when comparing with 0 directly after the kind of
+ * comparison done by GWT when a double or float is cast to an int. Forcing
+ * another trivial operation (other than a compare to 0) after the dangerous
+ * comparison makes the issue go away. See #10460.
+ */
+ private static native void enableIOS6castFix()
+ /*-{
+ Math.max = function(a,b) {return (a > b === 1 < 2)? a : b}
+ Math.min = function(a,b) {return (a < b === 1 < 2)? a : b}
+ }-*/;
+
+ /**
* Registers that callback that the bootstrap javascript uses to start
* applications once the widgetset is loaded and all required information is
* available