aboutsummaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2013-11-20 14:26:40 +0200
committerJohn Ahlroos <john@vaadin.com>2013-11-20 14:27:09 +0200
commite3b1e6be389cbe48d1782723adf1595edbd10ea2 (patch)
tree61dbd2fac407f0b6657863d100d6b1f09e67e356 /shared
parent96de019ea4ee5536dab87d1f04d4cb94ae71371d (diff)
parentdd7e6fee8c4717df59699f04f7e72a6f2e92008f (diff)
downloadvaadin-framework-e3b1e6be389cbe48d1782723adf1595edbd10ea2.tar.gz
vaadin-framework-e3b1e6be389cbe48d1782723adf1595edbd10ea2.zip
Merge branch 'master' into grid
Change-Id: I9f669ec38c39a42d1ef2a25121b77aab31551863
Diffstat (limited to 'shared')
-rw-r--r--shared/ivy.xml2
-rw-r--r--shared/src/com/vaadin/shared/ApplicationConstants.java4
-rw-r--r--shared/src/com/vaadin/shared/EventId.java2
-rw-r--r--shared/src/com/vaadin/shared/VBrowserDetails.java38
-rw-r--r--shared/src/com/vaadin/shared/ui/link/LinkState.java6
-rw-r--r--shared/src/com/vaadin/shared/ui/window/WindowServerRpc.java2
6 files changed, 46 insertions, 8 deletions
diff --git a/shared/ivy.xml b/shared/ivy.xml
index 3b044e9ab4..fc54d680fa 100644
--- a/shared/ivy.xml
+++ b/shared/ivy.xml
@@ -21,7 +21,7 @@
</publications>
<dependencies>
<dependency org="com.vaadin" name="vaadin-shared-deps"
- rev="1.0.2" conf="build,ide,test->default" />
+ rev="1.0.3" conf="build,ide,test->default" />
</dependencies>
</ivy-module>
diff --git a/shared/src/com/vaadin/shared/ApplicationConstants.java b/shared/src/com/vaadin/shared/ApplicationConstants.java
index 8e66afbb32..a81f29b77c 100644
--- a/shared/src/com/vaadin/shared/ApplicationConstants.java
+++ b/shared/src/com/vaadin/shared/ApplicationConstants.java
@@ -49,6 +49,10 @@ public class ApplicationConstants implements Serializable {
public static final String SERVICE_URL_PATH_AS_PARAMETER = "usePathParameter";
+ // Denotes the namespace which parameters should be prefixed with when
+ // passed as GET parameters. Currently only used by Liferay.
+ public static final String SERVICE_URL_PARAMETER_NAMESPACE = "pathParameterNS";
+
// Javadocs in ApplicationConfiguration should be updated if this is changed
public static final String V_RESOURCE_PATH = "v-resourcePath";
diff --git a/shared/src/com/vaadin/shared/EventId.java b/shared/src/com/vaadin/shared/EventId.java
index dd30379d41..d669f8fa83 100644
--- a/shared/src/com/vaadin/shared/EventId.java
+++ b/shared/src/com/vaadin/shared/EventId.java
@@ -22,5 +22,5 @@ public interface EventId extends Serializable {
public static final String FOCUS = "focus";
public static final String CLICK_EVENT_IDENTIFIER = "click";
public static final String LAYOUT_CLICK_EVENT_IDENTIFIER = "lClick";
-
+ public static final String POLL = "poll";
}
diff --git a/shared/src/com/vaadin/shared/VBrowserDetails.java b/shared/src/com/vaadin/shared/VBrowserDetails.java
index f31f5f3c04..a745a212b0 100644
--- a/shared/src/com/vaadin/shared/VBrowserDetails.java
+++ b/shared/src/com/vaadin/shared/VBrowserDetails.java
@@ -31,6 +31,7 @@ public class VBrowserDetails implements Serializable {
private boolean isGecko = false;
private boolean isWebKit = false;
private boolean isPresto = false;
+ private boolean isTrident = false;
private boolean isChromeFrameCapable = false;
private boolean isChromeFrame = false;
@@ -65,9 +66,11 @@ public class VBrowserDetails implements Serializable {
// browser engine name
isGecko = userAgent.indexOf("gecko") != -1
- && userAgent.indexOf("webkit") == -1;
+ && userAgent.indexOf("webkit") == -1
+ && userAgent.indexOf("trident/") == -1;
isWebKit = userAgent.indexOf("applewebkit") != -1;
isPresto = userAgent.indexOf(" presto/") != -1;
+ isTrident = userAgent.indexOf("trident/") != -1;
// browser name
isChrome = userAgent.indexOf(" chrome/") != -1;
@@ -75,6 +78,9 @@ public class VBrowserDetails implements Serializable {
isOpera = userAgent.indexOf("opera") != -1;
isIE = userAgent.indexOf("msie") != -1 && !isOpera
&& (userAgent.indexOf("webtv") == -1);
+ // IE 11 no longer contains MSIE in the user agent
+ isIE = isIE || isTrident;
+
isFirefox = userAgent.indexOf(" firefox/") != -1;
// chromeframe
@@ -113,11 +119,21 @@ public class VBrowserDetails implements Serializable {
// Browser version
try {
if (isIE) {
- String ieVersionString = userAgent.substring(userAgent
- .indexOf("msie ") + 5);
- ieVersionString = safeSubstring(ieVersionString, 0,
- ieVersionString.indexOf(";"));
- parseVersionString(ieVersionString);
+ if (userAgent.indexOf("msie") == -1) {
+ // IE 11+
+ int rvPos = userAgent.indexOf("rv:");
+ if (rvPos >= 0) {
+ String tmp = userAgent.substring(rvPos + 3);
+ tmp = tmp.replaceFirst("(\\.[0-9]+).+", "$1");
+ parseVersionString(tmp);
+ }
+ } else {
+ String ieVersionString = userAgent.substring(userAgent
+ .indexOf("msie ") + 5);
+ ieVersionString = safeSubstring(ieVersionString, 0,
+ ieVersionString.indexOf(";"));
+ parseVersionString(ieVersionString);
+ }
} else if (isFirefox) {
int i = userAgent.indexOf(" firefox/") + 9;
parseVersionString(safeSubstring(userAgent, i, i + 5));
@@ -288,6 +304,16 @@ public class VBrowserDetails implements Serializable {
}
/**
+ * Tests if the browser is using the Trident engine
+ *
+ * @since 7.1.7
+ * @return true if it is Trident, false otherwise
+ */
+ public boolean isTrident() {
+ return isTrident;
+ }
+
+ /**
* Tests if the browser is Safari.
*
* @return true if it is Safari, false otherwise
diff --git a/shared/src/com/vaadin/shared/ui/link/LinkState.java b/shared/src/com/vaadin/shared/ui/link/LinkState.java
index 269496767d..33ede86378 100644
--- a/shared/src/com/vaadin/shared/ui/link/LinkState.java
+++ b/shared/src/com/vaadin/shared/ui/link/LinkState.java
@@ -16,9 +16,15 @@
package com.vaadin.shared.ui.link;
import com.vaadin.shared.AbstractComponentState;
+import com.vaadin.shared.ui.BorderStyle;
public class LinkState extends AbstractComponentState {
{
primaryStyleName = "v-link";
}
+ public String name = "";
+ public String target = null;
+ public BorderStyle targetBorder = BorderStyle.DEFAULT;
+ public int targetWidth = -1;
+ public int targetHeight = -1;
}
diff --git a/shared/src/com/vaadin/shared/ui/window/WindowServerRpc.java b/shared/src/com/vaadin/shared/ui/window/WindowServerRpc.java
index b43765274e..1307b1e765 100644
--- a/shared/src/com/vaadin/shared/ui/window/WindowServerRpc.java
+++ b/shared/src/com/vaadin/shared/ui/window/WindowServerRpc.java
@@ -22,4 +22,6 @@ public interface WindowServerRpc extends ClickRpc, ServerRpc {
public void windowModeChanged(WindowMode newState);
+ public void windowMoved(int x, int y);
+
} \ No newline at end of file