aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2015-01-01 20:07:28 +0100
committerManolo Carrasco <manolo@apache.org>2015-01-02 09:22:29 +0100
commit74e91e7fc6a0ed4e8674bf287b83a722d72a3b97 (patch)
tree6a497721122c4cfcb6f31297631c21bb89e7b35b
parent791e62c0ad78c03228882421a239d71b9f073401 (diff)
downloadgwtquery-74e91e7fc6a0ed4e8674bf287b83a722d72a3b97.tar.gz
gwtquery-74e91e7fc6a0ed4e8674bf287b83a722d72a3b97.zip
move jsni start marks to new line so as eclipse formatter ignores them
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java15
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java1
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java8
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundAttachmentProperty.java1
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundPositionProperty.java1
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderCollapseProperty.java1
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderSpacingProperty.java1
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/CSS.java12
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/HasCssValue.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/MarginProperty.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/PaddingProperty.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/SimpleCssSetter.java3
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesCssValue.java1
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesInteger.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesNumber.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/css/ZIndexProperty.java5
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/AttributeTridentImpl.java8
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/ConsoleBrowser.java64
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java12
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImplIE.java8
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/HasSelector.java1
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java40
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineImpl.java1
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzle.java10
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzleIE.java10
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJS.java44
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJSIE.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineSizzleGwt.java42
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineXPath.java9
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsCache.java68
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsClosure.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsNodeArray.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsRegexp.java20
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java116
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java3
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEffects.java1
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java1
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java1
-rwxr-xr-xgwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MouseOptions.java2
-rwxr-xr-xgwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MousePlugin.java13
-rwxr-xr-xgwtquery-core/src/main/java/com/google/gwt/query/client/plugins/UiPlugin.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilder.java8
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilderJSONP.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Fx.java1
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transitions.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java24
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/GqEvent.java20
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsHtmlPanel.java5
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java18
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/linker/IFrameWithDocTypeLinker.java1
50 files changed, 429 insertions, 207 deletions
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 c8edace5..a88427e4 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
@@ -695,7 +695,6 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
wrapperMap.put("col", new TagWrapper(2, "<table><tbody></tbody><colgroup>",
"</colgroup></table>"));
wrapperMap.put("area", new TagWrapper(1, "<map>", "</map>"));
-
}
private static GQuery innerHtml(String html, Document doc) {
@@ -778,12 +777,16 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
return engine;
}
- private static native void scrollIntoViewImpl(Node n) /*-{
+ private static native void scrollIntoViewImpl(Node n)
+ /*-{
+
if (n)
n.scrollIntoView()
}-*/;
- private static native void setElementValue(Element e, String value) /*-{
+ private static native void setElementValue(Element e, String value)
+ /*-{
+
e.value = value;
}-*/;
@@ -1465,7 +1468,6 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
}
return $(unique(result));
-
}
/**
@@ -2378,7 +2380,9 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
return end();
}
- private native Element getPreviousSiblingElement(Element elem) /*-{
+ private native Element getPreviousSiblingElement(Element elem)
+ /*-{
+
var sib = elem.previousSibling;
while (sib && sib.nodeType != 1)
sib = sib.previousSibling;
@@ -3982,7 +3986,6 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
$(el).remove();
}
return this;
-
}
/**
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java
index 8addc6db..3dbf86db 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java
@@ -2549,5 +2549,4 @@ public interface LazyGQuery<T> extends LazyBase<T>{
* everything else.
*/
LazyGQuery<T> wrapInner(String html);
-
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java
index 0997404e..027f8840 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java
@@ -89,7 +89,9 @@ public class Properties extends JavaScriptObject implements IsProperties {
return this.<JsCache>cast();
}
- public final native Properties cloneProps() /*-{
+ public final native Properties cloneProps()
+ /*-{
+
var props = {};
for(p in this) {
props[p] = this[p];
@@ -180,7 +182,9 @@ public class Properties extends JavaScriptObject implements IsProperties {
* Its useful for exporting or importing to javascript.
*
*/
- public final native <T> void setFunction(T name, Function f) /*-{
+ public final native <T> void setFunction(T name, Function f)
+ /*-{
+
if (!f) return;
this[name] = function() {
f.@com.google.gwt.query.client.Function::fe(Ljava/lang/Object;)(arguments);
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundAttachmentProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundAttachmentProperty.java
index 6460b350..2be77855 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundAttachmentProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundAttachmentProperty.java
@@ -46,7 +46,6 @@ public class BackgroundAttachmentProperty extends
};
public abstract String getCssName();
-
}
private static final String CSS_PROPERTY = "backgroundAttachment";
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundPositionProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundPositionProperty.java
index c0b37fb4..e16a5daf 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundPositionProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BackgroundPositionProperty.java
@@ -134,7 +134,6 @@ public class BackgroundPositionProperty extends
RIGHT_TOP = new BackgroundPosition(RIGHT_VALUE + " " + TOP_VALUE);
TOP = new BackgroundPosition(TOP_VALUE);
BOTTOM = new BackgroundPosition(BOTTOM_VALUE);
-
}
/**
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderCollapseProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderCollapseProperty.java
index 7a626105..3f5c4e66 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderCollapseProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderCollapseProperty.java
@@ -45,7 +45,6 @@ public class BorderCollapseProperty extends
public static void init() {
CSS.BORDER_COLLAPSE = new BorderCollapseProperty();
-
}
private BorderCollapseProperty() {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderSpacingProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderSpacingProperty.java
index eee9f71d..979b5933 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderSpacingProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/BorderSpacingProperty.java
@@ -66,7 +66,6 @@ public class BorderSpacingProperty extends
public static void init() {
CSS.BORDER_SPACING = new BorderSpacingProperty();
-
}
private BorderSpacingProperty() {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CSS.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CSS.java
index f55e648d..c72fa5ee 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CSS.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/CSS.java
@@ -15,17 +15,6 @@
*/
package com.google.gwt.query.client.css;
-import com.google.gwt.dom.client.Style.VerticalAlign;
-import com.google.gwt.query.client.css.BackgroundAttachmentProperty.BackgroundAttachment;
-import com.google.gwt.query.client.css.BackgroundPositionProperty.BackgroundPosition;
-import com.google.gwt.query.client.css.BackgroundRepeatProperty.BackgroundRepeat;
-import com.google.gwt.query.client.css.BorderCollapseProperty.BorderCollapse;
-import com.google.gwt.query.client.css.BorderSpacingProperty.BorderSpacing;
-import com.google.gwt.query.client.css.BorderWidthProperty.BorderWidth;
-import com.google.gwt.query.client.css.CaptionSideProperty.CaptionSide;
-import com.google.gwt.query.client.css.EmptyCellsProperty.EmptyCells;
-import com.google.gwt.query.client.css.FontVariantProperty.FontVariant;
-import com.google.gwt.query.client.css.ListStylePositionProperty.ListStylePosition;
import com.google.gwt.query.client.css.MarginProperty.ShorthandMarginProperty;
import com.google.gwt.query.client.css.PaddingProperty.ShorthandPaddingProperty;
import com.google.gwt.query.client.css.UnicodeBidiProperty.UnicodeBidi;
@@ -1296,6 +1285,5 @@ public class CSS {
WhiteSpaceProperty.init();
WordSpacingProperty.init();
ZIndexProperty.init();
-
}
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/HasCssValue.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/HasCssValue.java
index e219b4d8..f6ea511a 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/HasCssValue.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/HasCssValue.java
@@ -19,7 +19,7 @@ import com.google.gwt.dom.client.Style;
import com.google.gwt.dom.client.Style.HasCssName;
/**
- * Minimal contract for an object defining a css property
+ * Minimal contract for an object defining a css property.
*
*/
public interface HasCssValue extends HasCssName {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/MarginProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/MarginProperty.java
index a6cf8e41..1355276c 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/MarginProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/MarginProperty.java
@@ -40,7 +40,6 @@ public class MarginProperty extends CssProperty<Length> {
*/
public CssSetter with(Length margin) {
return new MultipleValueCssSetter(getCssName(), margin);
-
}
/**
@@ -49,7 +48,6 @@ public class MarginProperty extends CssProperty<Length> {
*/
public CssSetter with(Length topAndBottom, Length leftAndRight) {
return new MultipleValueCssSetter(getCssName(), topAndBottom, leftAndRight);
-
}
/**
@@ -58,7 +56,6 @@ public class MarginProperty extends CssProperty<Length> {
*/
public CssSetter with(Length top, Length leftAndRight, Length bottom) {
return new MultipleValueCssSetter(getCssName(), top, leftAndRight, bottom);
-
}
/**
@@ -68,7 +65,6 @@ public class MarginProperty extends CssProperty<Length> {
Length margin4) {
return new MultipleValueCssSetter(getCssName(), margin1, margin2,
margin3, margin4);
-
}
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/PaddingProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/PaddingProperty.java
index 8dbca5d3..dac18f81 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/PaddingProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/PaddingProperty.java
@@ -41,7 +41,6 @@ public class PaddingProperty extends CssProperty<Length> {
*/
public CssSetter with(Length padding) {
return new MultipleValueCssSetter(getCssName(), padding);
-
}
/**
@@ -51,7 +50,6 @@ public class PaddingProperty extends CssProperty<Length> {
public CssSetter with(Length topAndBottom, Length leftAndRight) {
return new MultipleValueCssSetter(getCssName(), topAndBottom,
leftAndRight);
-
}
/**
@@ -60,7 +58,6 @@ public class PaddingProperty extends CssProperty<Length> {
*/
public CssSetter with(Length top, Length leftAndRight, Length bottom) {
return new MultipleValueCssSetter(getCssName(), top, leftAndRight, bottom);
-
}
/**
@@ -70,7 +67,6 @@ public class PaddingProperty extends CssProperty<Length> {
Length padding4) {
return new MultipleValueCssSetter(getCssName(), padding1, padding2,
padding3, padding4);
-
}
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/SimpleCssSetter.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/SimpleCssSetter.java
index 468a1edf..fb605568 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/SimpleCssSetter.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/SimpleCssSetter.java
@@ -21,7 +21,7 @@ import com.google.gwt.query.client.css.TakesCssValue.CssSetter;
/**
* Simple implementation of {@link CssSetter} interface. It does its job for the
- * most CSS property
+ * most CSS property.
*
*/
public class SimpleCssSetter implements CssSetter {
@@ -41,6 +41,5 @@ public class SimpleCssSetter implements CssSetter {
public void applyCss(Element e) {
assert e != null : "Impossible to apply css to a null object";
e.getStyle().setProperty(property, value != null ? value : "");
-
}
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesCssValue.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesCssValue.java
index 5f9d922d..62947bb5 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesCssValue.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesCssValue.java
@@ -27,5 +27,4 @@ public interface TakesCssValue<T> extends HasCssValue {
}
CssSetter with(T value);
-
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesInteger.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesInteger.java
index f298feaa..1ec7fadf 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesInteger.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesInteger.java
@@ -19,7 +19,7 @@ import com.google.gwt.query.client.css.TakesCssValue.CssSetter;
/**
* Interface to be implemented by properties which take a integer as defined in
- * css2 specification
+ * css2 specification.
*
* @see http://www.w3.org/TR/CSS21/syndata.html#value-def-number
*/
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesNumber.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesNumber.java
index fb443198..5fefe271 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesNumber.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/TakesNumber.java
@@ -19,7 +19,7 @@ import com.google.gwt.query.client.css.TakesCssValue.CssSetter;
/**
* Interface to be implemented by properties which take a number as defined in
- * css2 specification
+ * css2 specification.
*
* @see http://www.w3.org/TR/CSS21/syndata.html#value-def-number
*/
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/ZIndexProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/ZIndexProperty.java
index 76c9bcb3..7202f5f3 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/ZIndexProperty.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/ZIndexProperty.java
@@ -62,9 +62,10 @@ public class ZIndexProperty implements TakesInteger {
* See GWT issue 5548
* http://code.google.com/p/google-web-toolkit/issues/detail?id=5548
*/
- private native String getZIndex(Style s) /*-{
+ private native String getZIndex(Style s)
+ /*-{
+
//force to return a string
return "" + s["zIndex"];
}-*/;
-
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/AttributeTridentImpl.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/AttributeTridentImpl.java
index 2e22ceda..7b10f69e 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/AttributeTridentImpl.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/AttributeTridentImpl.java
@@ -60,7 +60,9 @@ public class AttributeTridentImpl extends AttributeImpl {
}
}
- private static native String getAttributeNode(Element e, String name)/*-{
+ private static native String getAttributeNode(Element e, String name)
+ /*-{
+
var attrNode = e.getAttributeNode(name);
if (attrNode && attrNode.nodeValue !== "") {
return attrNode.nodeValue;
@@ -69,7 +71,9 @@ public class AttributeTridentImpl extends AttributeImpl {
}-*/;
private static native boolean setAttributeNode(Element e, String name,
- Object value)/*-{
+ Object value)
+ /*-{
+
var attrNode = e.getAttributeNode(name);
if (attrNode) {
attrNode.nodeValue = value;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/ConsoleBrowser.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/ConsoleBrowser.java
index 6b7fb162..ace13666 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/ConsoleBrowser.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/ConsoleBrowser.java
@@ -31,7 +31,9 @@ public class ConsoleBrowser implements Console {
*/
private static class ConsoleIe8 extends ConsoleIe9 {
@Override
- protected native void init()/*-{
+ protected native void init()
+ /*-{
+
try {
Function.prototype.call.call($wnd.console.log, $wnd.console, Array.prototype.slice.call(arguments));
this.@com.google.gwt.query.client.impl.ConsoleBrowser.ConsoleIe9::initialized = true;
@@ -51,7 +53,9 @@ public class ConsoleBrowser implements Console {
init();
}
- protected native void init()/*-{
+ protected native void init()
+ /*-{
+
try {
[ "log", "info", "warn", "error", "dir", "clear", "profile", "profileEnd" ]
.forEach(function(method) {
@@ -108,59 +112,87 @@ public class ConsoleBrowser implements Console {
* Default implementation: webkit, opera, FF, ie10
*/
private static class ConsoleImpl {
- public native void clear() /*-{
+ public native void clear()
+ /*-{
+
$wnd.console.clear();
}-*/;
- public native void dir(Object arg) /*-{
+ public native void dir(Object arg)
+ /*-{
+
$wnd.console.dir(arg);
}-*/;
- public native void error(JavaScriptObject arg) /*-{
+ public native void error(JavaScriptObject arg)
+ /*-{
+
$wnd.console.error.apply($wnd.console, arg);
}-*/;
- public native void group(Object arg) /*-{
+ public native void group(Object arg)
+ /*-{
+
$wnd.console.group(arg);
}-*/;
- public native void groupCollapsed(Object arg) /*-{
+ public native void groupCollapsed(Object arg)
+ /*-{
+
$wnd.console.groupCollapsed(arg);
}-*/;
- public native void groupEnd() /*-{
+ public native void groupEnd()
+ /*-{
+
$wnd.console.groupEnd();
}-*/;
- public native void info(JavaScriptObject arg) /*-{
+ public native void info(JavaScriptObject arg)
+ /*-{
+
$wnd.console.info.apply($wnd.console, arg);
}-*/;
- public native void log(JavaScriptObject arg) /*-{
+ public native void log(JavaScriptObject arg)
+ /*-{
+
$wnd.console.log.apply($wnd.console, arg);
}-*/;
- public native void profile(String title) /*-{
+ public native void profile(String title)
+ /*-{
+
$wnd.console.profile(title);
}-*/;
- public native void profileEnd(String title) /*-{
+ public native void profileEnd(String title)
+ /*-{
+
$wnd.console.profileEnd(title);
}-*/;
- public native void time(String title) /*-{
+ public native void time(String title)
+ /*-{
+
$wnd.console.time(title);
}-*/;
- public native void timeEnd(String title) /*-{
+ public native void timeEnd(String title)
+ /*-{
+
$wnd.console.timeEnd(title);
}-*/;
- public native void timeStamp(Object arg) /*-{
+ public native void timeStamp(Object arg)
+ /*-{
+
$wnd.console.timeStamp(arg);
}-*/;
- public native void warn(JavaScriptObject arg) /*-{
+ public native void warn(JavaScriptObject arg)
+ /*-{
+
$wnd.console.warn.apply($wnd.console, arg);
}-*/;
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java
index 4bd133ec..585cb4a1 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java
@@ -251,7 +251,9 @@ public class DocumentStyleImpl {
}
protected native String getComputedStyle(Element elem, String hyphenName,
- String camelName, String pseudo) /*-{
+ String camelName, String pseudo)
+ /*-{
+
try {
var cStyle = $doc.defaultView.getComputedStyle(elem, pseudo);
return cStyle && cStyle.getPropertyValue ? cStyle.getPropertyValue(hyphenName) : null;
@@ -278,14 +280,18 @@ public class DocumentStyleImpl {
return ret;
}
- public native Document getContentDocument(Node n) /*-{
+ public native Document getContentDocument(Node n)
+ /*-{
+
var d = n.contentDocument || n.document || n.contentWindow.document;
if (!d.body)
this.@com.google.gwt.query.client.impl.DocumentStyleImpl::emptyDocument(Lcom/google/gwt/dom/client/Document;)(d);
return d;
}-*/;
- public native void emptyDocument(Document d) /*-{
+ public native void emptyDocument(Document d)
+ /*-{
+
d.open();
d.write("<head/><body/>");
d.close();
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImplIE.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImplIE.java
index 04074656..6193dff3 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImplIE.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImplIE.java
@@ -62,7 +62,9 @@ public class DocumentStyleImplIE extends DocumentStyleImpl {
/**
* Remove a style property from an element.
*/
- public native void removeStyleProperty(Element e, String prop) /*-{
+ public native void removeStyleProperty(Element e, String prop)
+ /*-{
+
if (e && e.style && 'removeAttribute' in e)
e.style.removeAttribute(prop);
}-*/;
@@ -82,7 +84,9 @@ public class DocumentStyleImplIE extends DocumentStyleImpl {
@Override
protected native String getComputedStyle(Element elem, String hyphenName,
- String camelName, String pseudo) /*-{
+ String camelName, String pseudo)
+ /*-{
+
// code lifted from jQuery
if (!elem.style || !'currentStyle' in elem || !'runtimeStyle' in elem) return null;
var style = elem.style;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/HasSelector.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/HasSelector.java
index 8ca0a3b7..b8e6fc67 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/HasSelector.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/HasSelector.java
@@ -29,5 +29,4 @@ public interface HasSelector {
* @return a list of matched nodes
*/
NodeList<Element> select(String selector, Node ctx);
-
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java
index 858ee141..9a8d16d0 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java
@@ -41,15 +41,21 @@ public class SelectorEngine implements HasSelector {
private static DocumentStyleImpl styleImpl;
public static native NodeList<Element> getElementsByClassName(String clazz,
- Node ctx) /*-{
+ Node ctx)
+ /*-{
+
return ctx.getElementsByClassName(clazz);
}-*/;
- public static native Node getNextSibling(Node n) /*-{
+ public static native Node getNextSibling(Node n)
+ /*-{
+
return n.nextSibling || null;
}-*/;
- public static native Node getPreviousSibling(Node n) /*-{
+ public static native Node getPreviousSibling(Node n)
+ /*-{
+
return n.previousSibling || null;
}-*/;
@@ -65,17 +71,23 @@ public class SelectorEngine implements HasSelector {
}
public static native NodeList<Element> querySelectorAllImpl(String selector,
- Node ctx) /*-{
+ Node ctx)
+ /*-{
+
return ctx.querySelectorAll(selector);
}-*/;
public static native NodeList<Element> elementsByTagName(String selector,
- Node ctx) /*-{
+ Node ctx)
+ /*-{
+
return ctx.getElementsByTagName(selector);
}-*/;
public static native NodeList<Element> elementsByClassName(String selector,
- Node ctx) /*-{
+ Node ctx)
+ /*-{
+
return ctx.getElementsByClassName(selector);
}-*/;
@@ -90,7 +102,9 @@ public class SelectorEngine implements HasSelector {
}
public static native NodeList<Element> xpathEvaluate(String selector,
- Node ctx, JsNodeArray r) /*-{
+ Node ctx, JsNodeArray r)
+ /*-{
+
var node;
var ownerDoc = ctx && (ctx.ownerDocument || ctx );
var evalDoc = ownerDoc ? ownerDoc : $doc;
@@ -263,7 +277,9 @@ public class SelectorEngine implements HasSelector {
}
}
- public native boolean contains(Element a, Element b) /*-{
+ public native boolean contains(Element a, Element b)
+ /*-{
+
return a.contains ? a != b && a.contains(b) : !!(a.compareDocumentPosition(b) & 16)
}-*/;
@@ -283,12 +299,16 @@ public class SelectorEngine implements HasSelector {
/**
* Check if the browser has native support for css selectors
*/
- public static native boolean hasQuerySelectorAll() /*-{
+ public static native boolean hasQuerySelectorAll()
+ /*-{
+
return $doc.location.href.indexOf("_force_no_native") < 0 &&
typeof $doc.querySelectorAll == 'function';
}-*/;
- public static native boolean hasXpathEvaluate() /*-{
+ public static native boolean hasXpathEvaluate()
+ /*-{
+
return !!$doc.evaluate;
}-*/;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineImpl.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineImpl.java
index a957334c..bc2a4587 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineImpl.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineImpl.java
@@ -19,5 +19,4 @@ package com.google.gwt.query.client.impl;
* Base/Utility class for runtime selector engine implementations.
*/
public abstract class SelectorEngineImpl implements HasSelector {
-
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzle.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzle.java
index 718883bc..927a5259 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzle.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzle.java
@@ -28,7 +28,9 @@ import com.google.gwt.dom.client.NodeList;
*/
public class SelectorEngineSizzle extends SelectorEngineImpl {
- public static native void initialize() /*-{
+ public static native void initialize()
+ /*-{
+
(function(){
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
@@ -1088,12 +1090,12 @@ var posProcess = function(selector, context){
window.GQS = GQS;
$wnd.GQS = GQS;
-
})();
-
}-*/;
- private static native JsArray<Element> select(String selector, Node context, JsArray<Element> results, JsArray<Element> seed) /*-{
+ private static native JsArray<Element> select(String selector, Node context, JsArray<Element> results, JsArray<Element> seed)
+ /*-{
+
return $wnd.GQS(selector, context, results, seed);
}-*/;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzleIE.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzleIE.java
index b4130f97..227e1a4b 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzleIE.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineSizzleIE.java
@@ -40,7 +40,9 @@ import com.google.gwt.dom.client.NodeList;
*/
public class SelectorEngineSizzleIE extends SelectorEngineImpl {
- public static native void initialize() /*-{
+ public static native void initialize()
+ /*-{
+
(function(){
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
@@ -928,12 +930,12 @@ var posProcess = function(selector, context){
window.IES = IES;
$wnd.IES = IES;
-
})();
-
}-*/;
- private static native JsArray<Element> select(String selector, Node context, JsArray<Element> results, JsArray<Element> seed) /*-{
+ private static native JsArray<Element> select(String selector, Node context, JsArray<Element> results, JsArray<Element> seed)
+ /*-{
+
return $wnd.IES(selector, context, results, seed);
}-*/;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJS.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJS.java
index 92da332d..733848f8 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJS.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJS.java
@@ -139,24 +139,34 @@ public class SelectorEngineJS extends SelectorEngineImpl {
}
}
- public static native void clearAdded(Node node) /*-{
+ public static native void clearAdded(Node node)
+ /*-{
+
node.added = null;
}-*/;
public static native NodeList<Element> getElementsByClassName(String clazz,
- Node ctx) /*-{
+ Node ctx)
+ /*-{
+
return ctx.getElementsByClassName(clazz);
}-*/;
- public static native boolean isAdded(Node prevRef) /*-{
+ public static native boolean isAdded(Node prevRef)
+ /*-{
+
return prevRef.added || false;
}-*/;
- public static native void setAdded(Node prevRef, boolean added) /*-{
+ public static native void setAdded(Node prevRef, boolean added)
+ /*-{
+
prevRef.added = added;
}-*/;
- public static native void setSkipTag(JsNodeArray prevElem, boolean skip) /*-{
+ public static native void setSkipTag(JsNodeArray prevElem, boolean skip)
+ /*-{
+
prevElem.skipTag = skip;
}-*/;
@@ -179,7 +189,9 @@ public class SelectorEngineJS extends SelectorEngineImpl {
return JsUtils.truth(attrVal) ? "^" + attrVal + "$" : null;
}
- private static native boolean checked(Node previous) /*-{
+ private static native boolean checked(Node previous)
+ /*-{
+
return previous.checked || false;
}-*/;
@@ -189,7 +201,9 @@ public class SelectorEngineJS extends SelectorEngineImpl {
}
}
- private static native boolean enabled(Node node) /*-{
+ private static native boolean enabled(Node node)
+ /*-{
+
return !node.disabled;
}-*/;
@@ -238,20 +252,28 @@ public class SelectorEngineJS extends SelectorEngineImpl {
}
}
- private static native boolean hasChildElms(Node prevParent) /*-{
+ private static native boolean hasChildElms(Node prevParent)
+ /*-{
+
return prevParent.childElms || false;
}-*/;
- private static native boolean isSkipped(JsNodeArray prevElem) /*-{
+ private static native boolean isSkipped(JsNodeArray prevElem)
+ /*-{
+
return prevElem.skipTag || false;
}-*/;
- private static native void setHasChildElms(Node prevParent, boolean bool) /*-{
+ private static native void setHasChildElms(Node prevParent, boolean bool)
+ /*-{
+
prevParent.childElms = bool ? bool : null;
}-*/;
private static native JsNodeArray subtractArray(JsNodeArray previousMatch,
- JsNodeArray elementsByPseudo) /*-{
+ JsNodeArray elementsByPseudo)
+ /*-{
+
for (var i=0, src1; (src1=arr1[i]); i++) {
var found = false;
for (var j=0, src2; (src2=arr2[j]); j++) {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJSIE.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJSIE.java
index f02eb857..3bd5da24 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJSIE.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJSIE.java
@@ -23,7 +23,9 @@ import com.google.gwt.dom.client.Element;
*/
public class SelectorEngineJSIE extends SelectorEngineJS {
- public native String getAttr(Element elm, String attr) /*-{
+ public native String getAttr(Element elm, String attr)
+ /*-{
+
switch (attr) {
case "id":
return elm.id;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineSizzleGwt.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineSizzleGwt.java
index c536c3c8..2374cf96 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineSizzleGwt.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineSizzleGwt.java
@@ -28,12 +28,14 @@ import com.google.gwt.query.client.js.JsUtils;
* Sizzle CSS Selector Engine v1.0.
*
* It has so many JSNI code, the idea is to make an entire implementation
- * using Java. Right now it performs worse than pure JSNI implementation
+ * using Java. Right now it performs worse than pure JSNI implementation.
*
*/
public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
- public static native boolean contains(Object a, Object b) /*-{
+ public static native boolean contains(Object a, Object b)
+ /*-{
+
var ret =
document.compareDocumentPosition ?
(a.compareDocumentPosition(b) & 16):
@@ -41,7 +43,9 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
return ret ? true : false;
}-*/;
- public static native JavaScriptObject createExpr() /*-{
+ public static native JavaScriptObject createExpr()
+ /*-{
+
var done = 0;
$wnd.Expr = {
order: [ "ID", "NAME", "TAG" ],
@@ -431,7 +435,9 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
return $wnd.Expr;
}-*/;
- public static native void dirCheck(String dir, Object cur, int doneName, Object checkSet) /*-{
+ public static native void dirCheck(String dir, Object cur, int doneName, Object checkSet)
+ /*-{
+
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
var elem = checkSet[i];
if ( elem ) {
@@ -462,7 +468,9 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
}
}-*/;
- public static native void dirNodeCheck(String dir, Object cur, int doneName, Object checkSet) /*-{
+ public static native void dirNodeCheck(String dir, Object cur, int doneName, Object checkSet)
+ /*-{
+
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
var elem = checkSet[i];
if ( elem ) {
@@ -492,7 +500,9 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
throw new IllegalArgumentException("Syntax error, unrecognized expression: " + msg);
}
- public static native JsArray<Node> filter(String expr, JsArray<Node> set, boolean inplace, Object not) /*-{
+ public static native JsArray<Node> filter(String expr, JsArray<Node> set, boolean inplace, Object not)
+ /*-{
+
var old = expr, result = [], curLoop = set, match, anyFound;
while ( expr && set.length ) {
for ( var type in $wnd.Expr.filter ) {
@@ -558,7 +568,9 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
return curLoop;
}-*/;
- public static native JavaScriptObject find(String expr, Node context) /*-{
+ public static native JavaScriptObject find(String expr, Node context)
+ /*-{
+
var set, match;
if ( !expr ) {
return [];
@@ -586,7 +598,9 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
return {set: set, expr: expr};
}-*/;
- public static native String getText(Object elems) /*-{
+ public static native String getText(Object elems)
+ /*-{
+
var ret = "", elem;
for ( var i = 0; elems[i]; i++ ) {
elem = elems[i];
@@ -601,7 +615,9 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
return ret;
}-*/;
- public static native JsArray<Node> makeArray(NodeList<Node> array, JsArray<Node> results) /*-{
+ public static native JsArray<Node> makeArray(NodeList<Node> array, JsArray<Node> results)
+ /*-{
+
var ret = results || [];
if ( Object.prototype.toString.call(array) === "[object Array]" ) {
Array.prototype.push.apply( ret, array );
@@ -619,7 +635,9 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
return ret;
}-*/;
- public static native JsArray<Element> posProcess(String selector, Node context) /*-{
+ public static native JsArray<Element> posProcess(String selector, Node context)
+ /*-{
+
var tmpSet = [], later = "", match, root = context.nodeType ? [context] : context;
// Position selectors must be done after the filter
// And so must :not(positional) so we move all PSEUDOs to the end
@@ -634,7 +652,9 @@ public class SelectorEngineSizzleGwt extends SelectorEngineImpl {
return @com.google.gwt.query.client.impl.research.SelectorEngineSizzleGwt::filter(Ljava/lang/String;Lcom/google/gwt/core/client/JsArray;ZLjava/lang/Object;)( later, tmpSet, false );
}-*/;
- private static native JsArray<Element> select(String selector, Node context, JsArray<Element> results, JsArray<Element> seed) /*-{
+ private static native JsArray<Element> select(String selector, Node context, JsArray<Element> results, JsArray<Element> seed)
+ /*-{
+
results = results || [];
var origContext = context = context || document;
var parts = [], m, set, checkSet, extra, prune = true, soFar = selector;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineXPath.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineXPath.java
index 47322d6c..c2de9b6d 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineXPath.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineXPath.java
@@ -234,16 +234,19 @@ public class SelectorEngineXPath extends SelectorEngineImpl {
return xpath;
}
- private native String replaceAttr(String allAttr) /*-{
+ private native String replaceAttr(String allAttr)
+ /*-{
+
if(!allAttr) return "";
return allAttr.replace(/["']+/g,'').replace(/(\w+)(\^|\$|\*|\||~)?=?([\w\u00C0-\uFFFF\s\-_\.]+)?/g,
function(a,b,c,d) {
return @com.google.gwt.query.client.impl.research.SelectorEngineXPath::attrToXPath(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)(a,b || "",c || "",d || "");
});
-
}-*/;
- private native String replaceAttr2(String allAttr) /*-{
+ private native String replaceAttr2(String allAttr)
+ /*-{
+
if(!allAttr) return "";
return allAttr.replace(/\[(\w+)(\^|\$|\*|\||~)?=?([\w\u00C0-\uFFFF\s\-_\.]+)?\]/g, @com.google.gwt.query.client.impl.research.SelectorEngineXPath::attrToXPath(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;));
}-*/;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsCache.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsCache.java
index dff21481..e63eb076 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsCache.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsCache.java
@@ -32,7 +32,9 @@ public class JsCache extends JavaScriptObject {
return createObject().cast();
}
- public final native void concat(Object ary) /*-{
+ public final native void concat(Object ary)
+ /*-{
+
if (ary) this.concat(ary);
}-*/;
@@ -50,7 +52,9 @@ public class JsCache extends JavaScriptObject {
}
}
- public final native void delete(Object name) /*-{
+ public final native void delete(Object name)
+ /*-{
+
delete this[name];
}-*/;
@@ -60,7 +64,9 @@ public class JsCache extends JavaScriptObject {
}
}
- public final native boolean exists(Object name) /*-{
+ public final native boolean exists(Object name)
+ /*-{
+
return !!this[name];
}-*/;
@@ -84,7 +90,9 @@ public class JsCache extends JavaScriptObject {
return (T)o;
}
- public final native <T> T get(Object id) /*-{
+ public final native <T> T get(Object id)
+ /*-{
+
return @com.google.gwt.query.client.js.JsCache::gwtBox(*)([ this && this[id] ]);
}-*/;
@@ -112,11 +120,15 @@ public class JsCache extends JavaScriptObject {
return r == null ? 0 : r;
}
- public final native String getString(Object id) /*-{
+ public final native String getString(Object id)
+ /*-{
+
return this[id] == null ? null : String(this[id]);
}-*/;
- public final native JsArrayMixed getArray(Object id) /*-{
+ public final native JsArrayMixed getArray(Object id)
+ /*-{
+
var r = this[id];
if (Object.prototype.toString.call(r) == '[object Array]') {
return r;
@@ -129,31 +141,43 @@ public class JsCache extends JavaScriptObject {
return (o != null && o instanceof JavaScriptObject) ? ((JavaScriptObject)o).<T>cast() : null;
}
- public final native boolean isEmpty() /*-{
+ public final native boolean isEmpty()
+ /*-{
+
for (k in this) return false;
return true;
}-*/;
- public final native boolean contains(Object o)/*-{
+ public final native boolean contains(Object o)
+ /*-{
+
return this.indexOf(o) >= 0;
}-*/;
- public final native void remove(Object o) /*-{
+ public final native void remove(Object o)
+ /*-{
+
var i = this.indexOf(o);
if (i >= 0) this.splice(i, 1);
}-*/;
- public final native int indexOf(Object o) /*-{
+ public final native int indexOf(Object o)
+ /*-{
+
// HtmlUnit fails when this returns 0
return this.indexOf(o);
}-*/;
- public final native JsCache putBoolean(Object id, boolean b) /*-{
+ public final native JsCache putBoolean(Object id, boolean b)
+ /*-{
+
this[id] = b;
return this;
}-*/;
- public final native JsCache putNumber(Object id, double n) /*-{
+ public final native JsCache putNumber(Object id, double n)
+ /*-{
+
this[id] = n;
return this;
}-*/;
@@ -169,12 +193,16 @@ public class JsCache extends JavaScriptObject {
return this;
}
- public final native JsCache putObject(Object id, Object obj) /*-{
+ public final native JsCache putObject(Object id, Object obj)
+ /*-{
+
this[id] = obj;
return this;
}-*/;
- public final native int length() /*-{
+ public final native int length()
+ /*-{
+
if (typeof(this.length) == 'number')
return this.length;
@@ -231,7 +259,9 @@ public class JsCache extends JavaScriptObject {
checkNull(this);
}
- private final native JsArrayString keysImpl() /*-{
+ private final native JsArrayString keysImpl()
+ /*-{
+
var key, keys=[];
// Chrome in DevMode sets '__gwt_ObjectId' to JS objects
// GWT sets '$H' when calling getHashCode (see com/google/gwt/core/client/impl/Impl.java)
@@ -260,14 +290,18 @@ public class JsCache extends JavaScriptObject {
*
* Example
* <pre>
- * native Object myMethod() /*-{
+ * native Object myMethod()
+ /*-{
+
* var myJsVar = ... ;
* return @com.google.gwt.query.client.js.JsCache::gwtBox(*)([ myJsVar ]);
* }-* /
* </pre>
*
*/
- public static native Object gwtBox(JavaScriptObject oneElementArray) /*-{
+ public static native Object gwtBox(JavaScriptObject oneElementArray)
+ /*-{
+
var r = oneElementArray;
if (typeof r == 'object' && r.length == 1) {
var r = r[0], t = typeof r;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsClosure.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsClosure.java
index 2481325d..ceb5fe51 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsClosure.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsClosure.java
@@ -28,7 +28,9 @@ public class JsClosure extends JavaScriptObject {
/**
* Invoke the closure with no arguments and expecting no return value.
*/
- public final native void invoke() /*-{
+ public final native void invoke()
+ /*-{
+
return this();
}-*/;
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsNodeArray.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsNodeArray.java
index 8b989a50..7101f840 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsNodeArray.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsNodeArray.java
@@ -29,7 +29,9 @@ public class JsNodeArray extends NodeList<Element> {
return create((Node)null);
}
- public static native JsNodeArray create(Node node) /*-{
+ public static native JsNodeArray create(Node node)
+ /*-{
+
return node ? [node] : [];
}-*/;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsRegexp.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsRegexp.java
index b4018cf8..d5c977ba 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsRegexp.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsRegexp.java
@@ -24,11 +24,15 @@ import com.google.gwt.core.client.JavaScriptObject;
@Deprecated
public class JsRegexp {
- public static native JavaScriptObject compile(String pat) /*-{
+ public static native JavaScriptObject compile(String pat)
+ /*-{
+
return new RegExp(pat);
}-*/;
- public static native JavaScriptObject compileFlags(String pat, String flags) /*-{
+ public static native JavaScriptObject compileFlags(String pat, String flags)
+ /*-{
+
return new RegExp(pat, flags);
}-*/;
@@ -36,7 +40,9 @@ public class JsRegexp {
return new JsRegexp(regexp, flags).match(string);
}
- private static native JsObjectArray<String> exec0(JavaScriptObject regexp, String str) /*-{
+ private static native JsObjectArray<String> exec0(JavaScriptObject regexp, String str)
+ /*-{
+
return regexp.exec(str);
}-*/;
@@ -70,11 +76,15 @@ public class JsRegexp {
return test0(regexp, rule);
}
- private native JsObjectArray<String> match0(JavaScriptObject regexp, String currentRule)/*-{
+ private native JsObjectArray<String> match0(JavaScriptObject regexp, String currentRule)
+ /*-{
+
return currentRule.match(regexp);
}-*/;
- private native boolean test0(JavaScriptObject regexp, String rule) /*-{
+ private native boolean test0(JavaScriptObject regexp, String rule)
+ /*-{
+
return regexp.test(rule);
}-*/;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java
index f59a2b75..73438417 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java
@@ -49,7 +49,9 @@ public class JsUtils {
return jso.equals(obj);
}
- private native Object exec(JavaScriptObject f, Object data) /*-{
+ private native Object exec(JavaScriptObject f, Object data)
+ /*-{
+
return @com.google.gwt.query.client.js.JsCache::gwtBox(*)([ f(data) ]);
}-*/;
@@ -68,7 +70,9 @@ public class JsUtils {
* Wraps a GQuery function into a native javascript one so as we can
* export Java methods without using JSNI.
*/
- public static native JavaScriptObject wrapFunction (Function f) /*-{
+ public static native JavaScriptObject wrapFunction (Function f)
+ /*-{
+
return function(r) {
var o = @java.util.ArrayList::new()();
for (i in arguments) {
@@ -82,15 +86,21 @@ public class JsUtils {
}-*/;
public static class JsUtilsImpl {
- public native Properties parseJSON(String json) /*-{
+ public native Properties parseJSON(String json)
+ /*-{
+
return $wnd.JSON.parse(json);
}-*/;
- public native String JSON2String(JavaScriptObject o) /*-{
+ public native String JSON2String(JavaScriptObject o)
+ /*-{
+
return $wnd.JSON.stringify(o);
}-*/;
- public native Element parseXML(String xml) /*-{
+ public native Element parseXML(String xml)
+ /*-{
+
return new DOMParser().parseFromString(xml, "text/xml").documentElement;
}-*/;
@@ -112,13 +122,17 @@ public class JsUtils {
return ret;
}
- public native String XML2String(JavaScriptObject o) /*-{
+ public native String XML2String(JavaScriptObject o)
+ /*-{
+
return (new XMLSerializer()).serializeToString(o);
}-*/;
}
public static class JsUtilsImplIE6 extends JsUtilsImpl {
- public static final native Properties evalImpl(String properties) /*-{
+ public static final native Properties evalImpl(String properties)
+ /*-{
+
return eval(properties);
}-*/;
@@ -165,7 +179,9 @@ public class JsUtils {
}
@Override
- public native Element parseXML(String xml) /*-{
+ public native Element parseXML(String xml)
+ /*-{
+
var d = new ActiveXObject("Microsoft.XmlDom");
d.loadXML(xml);
return d.documentElement;
@@ -186,11 +202,15 @@ public class JsUtils {
}
@Override
- public native String XML2String(JavaScriptObject o) /*-{
+ public native String XML2String(JavaScriptObject o)
+ /*-{
+
return o.xml;
}-*/;
- private native String xmlText(Element e) /*-{
+ private native String xmlText(Element e)
+ /*-{
+
return e.text;
}-*/;
}
@@ -223,7 +243,9 @@ public class JsUtils {
/**
* Camelize style property names. for instance: font-name -> fontName
*/
- public static native String camelize(String s)/*-{
+ public static native String camelize(String s)
+ /*-{
+
return s.replace(/\-(\w)/g, function(all, letter) {
return letter.toUpperCase();
});
@@ -266,14 +288,18 @@ public class JsUtils {
/**
* Compare two numbers using javascript equality.
*/
- public static native boolean eq(double s1, double s2) /*-{
+ public static native boolean eq(double s1, double s2)
+ /*-{
+
return s1 == s2;
}-*/;
/**
* Compare two objects using javascript equality.
*/
- public static native boolean eq(Object s1, Object s2) /*-{
+ public static native boolean eq(Object s1, Object s2)
+ /*-{
+
return s1 == s2;
}-*/;
@@ -289,7 +315,9 @@ public class JsUtils {
* Check if an object has already a property with name <code>name</code>
* defined.
*/
- public static native boolean hasProperty(JavaScriptObject o, String name)/*-{
+ public static native boolean hasProperty(JavaScriptObject o, String name)
+ /*-{
+
return o && name in o;
}-*/;
@@ -298,21 +326,27 @@ public class JsUtils {
* implementation returns an empty string instead of null when the attribute is not
* present
*/
- public static native boolean hasAttribute(Element o, String name)/*-{
+ public static native boolean hasAttribute(Element o, String name)
+ /*-{
+
return !!(o && o.getAttribute(name));
}-*/;
/**
* Hyphenize style property names. for instance: fontName -> font-name
*/
- public static native String hyphenize(String name) /*-{
+ public static native String hyphenize(String name)
+ /*-{
+
return name.replace(/([A-Z])/g, "-$1").toLowerCase();
}-*/;
/**
* Check is a javascript object can be used as an array
*/
- public static native boolean isArray(JavaScriptObject o) /*-{
+ public static native boolean isArray(JavaScriptObject o)
+ /*-{
+
return Object.prototype.toString.call(o) == '[object Array]'
|| typeof o.length == 'number';
}-*/;
@@ -320,14 +354,18 @@ public class JsUtils {
/**
* Check is a javascript object is a FormData
*/
- public static native boolean isFormData(JavaScriptObject o) /*-{
+ public static native boolean isFormData(JavaScriptObject o)
+ /*-{
+
return Object.prototype.toString.call(o) == '[object FormData]';
}-*/;
/**
* Return whether the event was prevented
*/
- public static native boolean isDefaultPrevented(JavaScriptObject e)/*-{
+ public static native boolean isDefaultPrevented(JavaScriptObject e)
+ /*-{
+
return e.defaultPrevented || e.returnValue === false || e.getPreventDefault
&& e.getPreventDefault() ? true : false;
}-*/;
@@ -349,7 +387,9 @@ public class JsUtils {
/**
* Check is a javascript object can be cast to an Element
*/
- public static native boolean isElement(Object o) /*-{
+ public static native boolean isElement(Object o)
+ /*-{
+
return o && o.nodeType && o.nodeName ? true : false;
}-*/;
@@ -363,14 +403,18 @@ public class JsUtils {
/**
* Check is a javascript object is a function
*/
- public static native boolean isFunction(JavaScriptObject o) /*-{
+ public static native boolean isFunction(JavaScriptObject o)
+ /*-{
+
return Object.prototype.toString.call(o) == '[object Function]';
}-*/;
/**
* Check is a javascript can be cast to a node list
*/
- public static native boolean isNodeList(JavaScriptObject o) /*-{
+ public static native boolean isNodeList(JavaScriptObject o)
+ /*-{
+
var r = Object.prototype.toString.call(o);
return r == '[object HTMLCollection]' || r == '[object NodeList]'
|| (typeof o == 'object' && o.length && o[0].tagName) ? true : false;
@@ -411,14 +455,18 @@ public class JsUtils {
/**
* Return the element which is truth in the double scope.
*/
- public static native double or(double s1, double s2) /*-{
+ public static native double or(double s1, double s2)
+ /*-{
+
return s1 || s2;
}-*/;
/**
* Return the element which is truth in the javascript scope.
*/
- public static native <T> T or(T s1, T s2) /*-{
+ public static native <T> T or(T s1, T s2)
+ /*-{
+
return s1 || s2;
}-*/;
@@ -454,14 +502,18 @@ public class JsUtils {
* Utility method to cast objects in production.
* Useful for casting native implementations to interfaces like JsInterop
*/
- public static native <T> T cast(Object o) /*-{
+ public static native <T> T cast(Object o)
+ /*-{
+
return o;
}-*/;
/**
* Utility method to cast objects to array of string in production.
*/
- public static native String[] castArrayString(Object a)/*-{
+ public static native String[] castArrayString(Object a)
+ /*-{
+
return a
}-*/;
@@ -488,7 +540,9 @@ public class JsUtils {
return runJavascriptFunctionImpl(o, meth, JsObjectArray.create().add(args).<JsArrayMixed>cast());
}
- private static native <T> T runJavascriptFunctionImpl(JavaScriptObject o, String meth, JsArrayMixed args) /*-{
+ private static native <T> T runJavascriptFunctionImpl(JavaScriptObject o, String meth, JsArrayMixed args)
+ /*-{
+
return (f = o && o[meth])
&& @com.google.gwt.query.client.js.JsUtils::isFunction(*)(f)
&& @com.google.gwt.query.client.js.JsCache::gwtBox(*)([f.apply(o, args)]);
@@ -497,14 +551,18 @@ public class JsUtils {
/**
* Check if a number is true in the javascript scope.
*/
- public static native boolean truth(double a) /*-{
+ public static native boolean truth(double a)
+ /*-{
+
return a ? true : false;
}-*/;
/**
* Check if an object is true in the javascript scope.
*/
- public static native boolean truth(Object a) /*-{
+ public static native boolean truth(Object a)
+ /*-{
+
return a ? true : false;
}-*/;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java
index 901e3892..c614a08c 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java
@@ -130,14 +130,12 @@ public class Events extends GQuery {
public GQuery live(int eventbits, final Object data, Function... funcs) {
return live(eventbits, null, data, funcs);
-
}
public GQuery live(int eventbits, String nameSpace, final Object data, Function... funcs) {
EventsListener.getInstance(Element.is(currentContext) ? (Element) currentContext : body).live(
eventbits, nameSpace, null, null, currentSelector, data, funcs);
return this;
-
}
public GQuery live(String eventName, final Object data, Function... funcs) {
@@ -183,7 +181,6 @@ public class Events extends GQuery {
}
return bind("mouseleave", null, fs);
-
}
/**
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEffects.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEffects.java
index 5178862d..6827487c 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEffects.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEffects.java
@@ -386,5 +386,4 @@ public interface LazyEffects<T> extends LazyBase<T>{
* layout of the page.
*/
LazyEffects<T> toggle(int millisecs, Function... f);
-
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java
index 7ba49eed..830f91df 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyEvents.java
@@ -180,5 +180,4 @@ public interface LazyEvents<T> extends LazyBase<T>{
LazyEvents<T> unbind(String name, Function f);
LazyEvents<T> undelegate();
-
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java
index fac96f09..fbc994f3 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/LazyWidgets.java
@@ -107,5 +107,4 @@ public interface LazyWidgets<T> extends LazyBase<T>{
*
*/
LazyWidgets<T> textArea(WidgetInitializer<TextArea> initializers);
-
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MouseOptions.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MouseOptions.java
index 4d010276..b0aed03f 100755
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MouseOptions.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MouseOptions.java
@@ -16,7 +16,7 @@
package com.google.gwt.query.client.plugins;
/**
- * Object use to configure a Plugin extending {@link MousePlugin}
+ * Object use to configure a Plugin extending {@link MousePlugin}.
*
*/
public class MouseOptions {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MousePlugin.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MousePlugin.java
index c7b8f67d..78cd3614 100755
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MousePlugin.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MousePlugin.java
@@ -67,7 +67,6 @@ public abstract class MousePlugin extends UiPlugin {
return true;
}
return mouseDown(e, GqEvent.create(event));
-
}
}).bind(Event.ONTOUCHSTART, getPluginName(), (Object) null, new Function() {
public boolean f(com.google.gwt.user.client.Event event) {
@@ -77,7 +76,6 @@ public abstract class MousePlugin extends UiPlugin {
touchSupported = true;
return mouseDown(e, GqEvent.create(event));
-
}
}).bind(Event.ONCLICK, getPluginName(), (Object) null, new Function() {
@Override
@@ -219,7 +217,6 @@ public abstract class MousePlugin extends UiPlugin {
}
return true;
-
}
private void bindOtherEvents(final Element element) {
@@ -252,7 +249,6 @@ public abstract class MousePlugin extends UiPlugin {
return false;
}
});
-
}
}
@@ -278,12 +274,16 @@ public abstract class MousePlugin extends UiPlugin {
return mouseDistance >= neededDistance;
}
- private native boolean isEventAlreadyHandled(GqEvent event)/*-{
+ private native boolean isEventAlreadyHandled(GqEvent event)
+ /*-{
+
var result = event.mouseHandled ? event.mouseHandled : false;
return result;
}-*/;
- private native void markEventAsHandled(GqEvent event)/*-{
+ private native void markEventAsHandled(GqEvent event)
+ /*-{
+
event.mouseHandled = true;
}-*/;
@@ -298,7 +298,6 @@ public abstract class MousePlugin extends UiPlugin {
}
return isNotBoutonLeft || isElementCancel || !mouseCapture(element, mouseDownEvent);
-
}
private void reset(GqEvent nativeEvent) {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/UiPlugin.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/UiPlugin.java
index d2f01187..b595c524 100755
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/UiPlugin.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/UiPlugin.java
@@ -25,7 +25,7 @@ import com.google.gwt.query.client.Predicate;
/**
* GWT clone of jQueryUi-core. This class define some function present in the
- * jQuery-ui core and not directly in jQuery
+ * jQuery-ui core and not directly in jQuery.
*
*/
public class UiPlugin extends GQuery {
@@ -83,7 +83,6 @@ public class UiPlugin extends GQuery {
&& isOverflowEnabled($e);
}
});
-
} else {
scrollParent = gQueryUi.parents().filter(new Predicate() {
@@ -94,7 +93,6 @@ public class UiPlugin extends GQuery {
}
return scrollParent.length() > 0 ? $(scrollParent.get(0))
: $(getViewportElement());
-
}
protected boolean scrollParentPositionTest(UiPlugin gQueryUi) {
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilder.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilder.java
index 14ff309b..971160d6 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilder.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilder.java
@@ -172,14 +172,18 @@ public class PromiseReqBuilder extends DeferredPromiseImpl implements RequestCal
/**
* Using violator pattern to execute private method
*/
- private native void fireOnResponseReceivedVltr(Request rq, RequestCallback cb) /*-{
+ private native void fireOnResponseReceivedVltr(Request rq, RequestCallback cb)
+ /*-{
+
rq.@com.google.gwt.http.client.Request::fireOnResponseReceived(Lcom/google/gwt/http/client/RequestCallback;)(cb);
}-*/;
/**
* Using violator pattern to use protected constructor
*/
- private native Request createRequestVltr(XMLHttpRequest rq, int ms, RequestCallback cb) /*-{
+ private native Request createRequestVltr(XMLHttpRequest rq, int ms, RequestCallback cb)
+ /*-{
+
return @com.google.gwt.http.client.Request::new(Lcom/google/gwt/xhr/client/XMLHttpRequest;ILcom/google/gwt/http/client/RequestCallback;)(rq,ms,cb);
}-*/;
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilderJSONP.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilderJSONP.java
index 6bb96f83..2f51218c 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilderJSONP.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/deferred/PromiseReqBuilderJSONP.java
@@ -75,7 +75,9 @@ public class PromiseReqBuilderJSONP extends DeferredPromiseImpl {
}
// Using jsni because method send in JsonpRequestBuilder is private
- private final native void send(JsonpRequestBuilder bld, String url, AsyncCallback<?> cb) /*-{
+ private final native void send(JsonpRequestBuilder bld, String url, AsyncCallback<?> cb)
+ /*-{
+
bld.@com.google.gwt.jsonp.client.JsonpRequestBuilder::send(Ljava/lang/String;Lcom/google/gwt/user/client/rpc/AsyncCallback;Z)(url,cb,false);
}-*/;
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Fx.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Fx.java
index 3ece61d6..d1bdc922 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Fx.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Fx.java
@@ -218,7 +218,6 @@ public class Fx {
color += color;
}
result[i] = Math.max(0, Math.min(255, Integer.parseInt(color, 16)));
-
}
return result;
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transitions.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transitions.java
index d5f15bbe..fed2ffdf 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transitions.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transitions.java
@@ -52,7 +52,7 @@ import java.util.Map.Entry;
/**
* Transitions and transformation plugin for gQuery.
*
- * It is inspired on jquery.transit (http://github.com/rstacruz/jquery.transit)
+ * It is inspired on jquery.transit (http://github.com/rstacruz/jquery.transit).
*
* Usage examples:
* <pre>
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java
index 0b6478a5..7c6ec716 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java
@@ -37,7 +37,7 @@ import java.util.List;
* This class implements an event queue instance for one Element. The queue instance is configured
* as the default event listener in GWT.
*
- * The reference to this queue is stored as a unique variable in the element's DOM
+ * The reference to this queue is stored as a unique variable in the element's DOM.
*
* The class takes care of calling the appropriate functions for each browser event and it also
* calls sinkEvents method.
@@ -409,22 +409,30 @@ public class EventsListener implements EventListener {
}
}
- private static native void cleanGQListeners(Element elem) /*-{
+ private static native void cleanGQListeners(Element elem)
+ /*-{
+
if (elem.__gwtlistener) {
@com.google.gwt.user.client.DOM::setEventListener(*)(elem, elem.__gwtlistener);
}
elem.__gwtlistener = elem.__gqueryevent = elem.__gquery = null;
}-*/;
- private static native EventsListener getGQueryEventListener(Element elem) /*-{
+ private static native EventsListener getGQueryEventListener(Element elem)
+ /*-{
+
return elem.__gqueryevent;
}-*/;
- private static native EventListener getGwtEventListener(Element elem) /*-{
+ private static native EventListener getGwtEventListener(Element elem)
+ /*-{
+
return elem.__gwtlistener;
}-*/;
- private static native void init(Element elem, EventsListener gqevent)/*-{
+ private static native void init(Element elem, EventsListener gqevent)
+ /*-{
+
elem.__gwtlistener = @com.google.gwt.user.client.DOM::getEventListener(*)(elem);
elem.__gqueryevent = gqevent;
// Someone has reported that in IE the init can be called multiple times
@@ -433,7 +441,9 @@ public class EventsListener implements EventListener {
if (elem.__gwtlistener == gqevent) elem.__gwtlistener = null;
}-*/;
- private static native void sinkBitlessEvent(Element elem, String name) /*-{
+ private static native void sinkBitlessEvent(Element elem, String name)
+ /*-{
+
if (!elem.__gquery)
elem.__gquery = [];
if (elem.__gquery[name])
@@ -752,7 +762,6 @@ public class EventsListener implements EventListener {
newList.add(listener);
}
elementEvents = newList;
-
}
private boolean isNullOrEmpty(String s) {
@@ -808,7 +817,6 @@ public class EventsListener implements EventListener {
}
DOM.sinkEvents((com.google.gwt.user.client.Element) element, eventBits
| DOM.getEventsSunk((com.google.gwt.user.client.Element) element));
-
} else {
sinkBitlessEvent(element, eventName);
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/GqEvent.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/GqEvent.java
index ed4da4db..ec35dbdc 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/GqEvent.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/GqEvent.java
@@ -35,11 +35,15 @@ import com.google.gwt.user.client.Event;
*/
public class GqEvent extends Event {
- public static native void setOriginalEventType(NativeEvent evt, String originalEventName)/*-{
+ public static native void setOriginalEventType(NativeEvent evt, String originalEventName)
+ /*-{
+
evt["__gwtquery_originalEventName"] = originalEventName;
}-*/;
- public static native String getOriginalEventType(Event evt)/*-{
+ public static native String getOriginalEventType(Event evt)
+ /*-{
+
return evt["__gwtquery_originalEventName"] || null;
}-*/;
@@ -58,7 +62,9 @@ public class GqEvent extends Event {
}
private static native void copy(
- Event originalEvent, GqEvent gQueryEvent) /*-{
+ Event originalEvent, GqEvent gQueryEvent)
+ /*-{
+
for ( var field in originalEvent) {
gQueryEvent[field] = originalEvent[field];
}
@@ -71,11 +77,15 @@ public class GqEvent extends Event {
/**
* Return the original event (the one created by the browser)
*/
- public final native Event getOriginalEvent()/*-{
+ public final native Event getOriginalEvent()
+ /*-{
+
return this.originalEvent;
}-*/;
- public final native void setCurrentElementTarget(Element e)/*-{
+ public final native void setCurrentElementTarget(Element e)
+ /*-{
+
this.currentTarget = e;
//ie don't have a currentEventTarget field on event
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsHtmlPanel.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsHtmlPanel.java
index 9aa350e8..e03c7b7f 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsHtmlPanel.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsHtmlPanel.java
@@ -62,7 +62,9 @@ public class WidgetsHtmlPanel extends HTMLPanel {
/**
* use jsni to access private attribute
*/
- private native void setElementImpl(Element e)/*-{
+ private native void setElementImpl(Element e)
+ /*-{
+
this.@com.google.gwt.user.client.ui.UIObject::element = e;
}-*/;
@@ -125,6 +127,5 @@ public class WidgetsHtmlPanel extends HTMLPanel {
}
adopt(w);
-
}
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java
index b7da510a..6d1045fc 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java
@@ -76,7 +76,6 @@ public class WidgetsUtils {
regExp.append(")$");
return e.getTagName().toUpperCase().matches(regExp.toString());
-
}
/**
@@ -140,7 +139,6 @@ public class WidgetsUtils {
newElement.setId(oldElement.getId());
//ensure no duplicate id
oldElement.setId("");
-
}
}
@@ -262,19 +260,27 @@ public class WidgetsUtils {
return $(element).parents().widget();
}
- private static native void widgetOnAttach(Widget w) /*-{
+ private static native void widgetOnAttach(Widget w)
+ /*-{
+
w.@com.google.gwt.user.client.ui.Widget::onAttach()();
}-*/;
- private static native void widgetSetParent(Widget w, Widget p) /*-{
+ private static native void widgetSetParent(Widget w, Widget p)
+ /*-{
+
w.@com.google.gwt.user.client.ui.Widget::setParent(Lcom/google/gwt/user/client/ui/Widget;)(p);
}-*/;
- private static native Widget compositeGetWidget(Composite w) /*-{
+ private static native Widget compositeGetWidget(Composite w)
+ /*-{
+
return w.@com.google.gwt.user.client.ui.Composite::getWidget()();
}-*/;
- private static native WidgetCollection complexPanelGetChildren(ComplexPanel w) /*-{
+ private static native WidgetCollection complexPanelGetChildren(ComplexPanel w)
+ /*-{
+
return w.@com.google.gwt.user.client.ui.ComplexPanel::getChildren()();
}-*/;
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/linker/IFrameWithDocTypeLinker.java b/gwtquery-core/src/main/java/com/google/gwt/query/linker/IFrameWithDocTypeLinker.java
index bc5ff169..ff98b757 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/linker/IFrameWithDocTypeLinker.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/linker/IFrameWithDocTypeLinker.java
@@ -49,7 +49,6 @@ public class IFrameWithDocTypeLinker extends IFrameLinker {
"GQuery IFrameWithDocTypeLinker is deprecated, remove <add-linker name=\"stddoctype\"/> from your module file");
return DOCTYPE
+ super.getModulePrefix(logger, context, strongName, numFragments);
-
}
}