aboutsummaryrefslogtreecommitdiffstats
path: root/gwtquery-core
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2015-01-04 10:57:21 +0100
committerManolo Carrasco <manolo@apache.org>2015-01-04 11:17:12 +0100
commit04a0fd7f36a481c028c33ed4a608e12d135e34c0 (patch)
tree4aaadbcf9bfd5fc0b8f990d70f3dd806219eb291 /gwtquery-core
parent7551a677f9f96935a95b694a57299a0d347cfc03 (diff)
parent0b490ea05a0c05da8abff00724db4c4e24586934 (diff)
downloadgwtquery-04a0fd7f36a481c028c33ed4a608e12d135e34c0.tar.gz
gwtquery-04a0fd7f36a481c028c33ed4a608e12d135e34c0.zip
Rebasing master
Diffstat (limited to 'gwtquery-core')
-rw-r--r--gwtquery-core/pom.xml13
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transform.java6
4 files changed, 17 insertions, 6 deletions
diff --git a/gwtquery-core/pom.xml b/gwtquery-core/pom.xml
index 65aaf451..0a56bc8c 100644
--- a/gwtquery-core/pom.xml
+++ b/gwtquery-core/pom.xml
@@ -148,10 +148,21 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.13</version>
<configuration>
<configLocation>src/main/code-style/gwt-checkstyle.xml</configLocation>
</configuration>
+ <executions>
+ <execution>
+ <id>checkstyle</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <configuration>
+ <failOnViolation>true</failOnViolation>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
index eea88ce4..418bfdb0 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
@@ -13,8 +13,6 @@
*/
package com.google.gwt.query.client;
-import static com.google.gwt.query.client.GQuery.$;
-import static com.google.gwt.query.client.GQuery.document;
import static com.google.gwt.query.client.plugins.QueuePlugin.Queue;
import com.google.gwt.core.client.GWT;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java
index ceb6b556..883fdf20 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java
@@ -155,7 +155,7 @@ public class PropertiesAnimation extends GQAnimation {
.compile("^([+-]=)?([0-9+-.]+)(.*)?$");
protected static final RegExp REGEX_NON_PIXEL_ATTRS =
- RegExp.compile("z-?index|font-?weight|opacity|zoom|line-?height|scale|rotat|^\\$", "i");
+ RegExp.compile("z-?index|font-?weight|opacity|zoom|line-?height|scale|rotat|skew|perspect|^\\$", "i");
private static final RegExp REGEX_COLOR_ATTR = RegExp.compile(".*color$", "i");
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transform.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transform.java
index a165cf81..00016147 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transform.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transform.java
@@ -53,6 +53,8 @@ public class Transform {
protected static final RegExp transformRegex = RegExp.compile("^(matrix(3d)?|(translate|scale|rotate)([XYZ]|3d)?|skew([XY])?|perspective|x|y|z)$");
private static final RegExp transform3dRegex = RegExp.compile("^(rotate[XY]|\\w+(Z|3d)|perspective)$");
private static final RegExp transformParseRegex = RegExp.compile("(\\w+)\\((.*?)\\)", "g");
+ private static final RegExp anglePropRegex = RegExp.compile("(rotate[XYZ]?|skew[XY]?)");
+ private static final RegExp translatePropRegex = RegExp.compile("translate[XYZ]");
private HashMap<String, List<String>> map = new HashMap<String, List<String>>();
@@ -170,7 +172,7 @@ public class Transform {
}
private void setter(String prop, String ...val) {
- if (prop.matches("(rotate[XYZ]?|skew[XY])")) {
+ if (anglePropRegex.test(prop)) {
map.put(prop, unit(val[0], "deg"));
} else if ("scale".equals(prop)) {
String x = val.length < 1 ? "1" : val[0];
@@ -184,7 +186,7 @@ public class Transform {
setter("translate", null, val[0]);
} else if ("z".equals(prop)) {
setter("translate", null, null, val[0]);
- } else if (prop.matches("(translate[XYZ])")) {
+ } else if (translatePropRegex.test(prop)) {
map.put(prop, unit(val[0], "px"));
} else if ("translate".equals(prop)) {
if (val[0] != null) {