diff options
author | Manuel Carrasco Moñino <manolo@apache.org> | 2014-12-07 07:19:28 +0100 |
---|---|---|
committer | Manuel Carrasco Moñino <manolo@apache.org> | 2014-12-07 07:19:28 +0100 |
commit | 7b9743b0979316299adc47197deee0d2809c3a70 (patch) | |
tree | 1e79c521eade3284ba88b8a0bb6a5f2e19a1f327 | |
parent | d0601f955bd58db1825cec76499bbb6ffefa26bd (diff) | |
parent | 607cdd1e6b5e4716dc6d781e78257ff33e86b819 (diff) | |
download | gwtquery-7b9743b0979316299adc47197deee0d2809c3a70.tar.gz gwtquery-7b9743b0979316299adc47197deee0d2809c3a70.zip |
Merge pull request #314 from manolo/mcm_ie10_stdlinker
Adding IE10 and deprecating stdoctype-linker.
6 files changed, 23 insertions, 4 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/Query.gwt.xml b/gwtquery-core/src/main/java/com/google/gwt/query/Query.gwt.xml index 3ba5c445..08a6ff11 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/Query.gwt.xml +++ b/gwtquery-core/src/main/java/com/google/gwt/query/Query.gwt.xml @@ -70,6 +70,7 @@ <generate-with class="com.google.gwt.query.rebind.SelectorGeneratorNativeIE9"> <when-type-assignable class="com.google.gwt.query.client.Selectors"/> <when-property-is name="user.agent" value="ie9"/> + <when-property-is name="user.agent" value="ie10"/> </generate-with> <!-- Document Style --> @@ -95,6 +96,7 @@ <when-property-is name="user.agent" value="ie6"/> <when-property-is name="user.agent" value="ie8"/> <when-property-is name="user.agent" value="ie9"/> + <when-property-is name="user.agent" value="ie10"/> </any> </replace-with> @@ -115,6 +117,7 @@ <when-property-is name="user.agent" value="opera"/> <when-property-is name="user.agent" value="safari"/> <when-property-is name="user.agent" value="ie9"/> + <when-property-is name="user.agent" value="ie10"/> </any> </replace-with> <replace-with class="com.google.gwt.query.client.impl.SelectorEngineNativeIE8"> @@ -139,6 +142,7 @@ <when-property-is name="user.agent" value="ie6" /> <when-property-is name="user.agent" value="ie8" /> <when-property-is name="user.agent" value="ie9" /> + <when-property-is name="user.agent" value="ie10" /> </any> </replace-with> @@ -167,6 +171,5 @@ module in your .gwt.xml file. See issue #213 --> <define-linker name="stddoctype" class="com.google.gwt.query.linker.IFrameWithDocTypeLinker"/> - <add-linker name="stddoctype"/> </module> diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/QueryMin.gwt.xml b/gwtquery-core/src/main/java/com/google/gwt/query/QueryMin.gwt.xml index f3e2e72a..644cd2e3 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/QueryMin.gwt.xml +++ b/gwtquery-core/src/main/java/com/google/gwt/query/QueryMin.gwt.xml @@ -31,8 +31,7 @@ <property-provider name="selectorCapability"> <![CDATA[ return !/_force_no_native/.test(document.location.search) && - document.querySelectorAll && - /native/.test(String(document.querySelectorAll)) ? "native" : "js"; + typeof document.querySelectorAll == 'function'; ]]> </property-provider> @@ -69,6 +68,7 @@ <any> <when-property-is name="user.agent" value="ie8"/> <when-property-is name="user.agent" value="ie9"/> + <when-property-is name="user.agent" value="ie10"/> </any> <when-property-is name="selectorCapability" value="native"/> </replace-with> diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/Browser.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/Browser.java index 96036567..839a0cee 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/Browser.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/Browser.java @@ -79,6 +79,8 @@ public abstract class Browser { protected abstract boolean isIe6(); protected abstract boolean isIe8(); protected abstract boolean isIe9(); + protected abstract boolean isIe10(); + protected abstract boolean isIe11(); protected abstract boolean isMozilla(); protected abstract boolean isMsie(); protected abstract boolean isOpera(); 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 0208155d..bc5ff169 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 @@ -17,6 +17,7 @@ package com.google.gwt.query.linker; import com.google.gwt.core.ext.LinkerContext; import com.google.gwt.core.ext.TreeLogger; +import com.google.gwt.core.ext.TreeLogger.Type; import com.google.gwt.core.ext.UnableToCompleteException; import com.google.gwt.core.ext.linker.LinkerOrder; import com.google.gwt.core.ext.linker.Shardable; @@ -32,15 +33,20 @@ public class IFrameWithDocTypeLinker extends IFrameLinker { private static final String DOCTYPE = "<!doctype html>\n"; + @Deprecated protected String getModulePrefix(TreeLogger logger, LinkerContext context, String strongName) throws UnableToCompleteException { + logger.log(Type.WARN, + "GQuery IFrameWithDocTypeLinker is deprecated, remove <add-linker name=\"stddoctype\"/> from your module file"); return DOCTYPE + super.getModulePrefix(logger, context, strongName); - } @Override + @Deprecated protected String getModulePrefix(TreeLogger logger, LinkerContext context, String strongName, int numFragments) throws UnableToCompleteException { + logger.log(Type.WARN, + "GQuery IFrameWithDocTypeLinker is deprecated, remove <add-linker name=\"stddoctype\"/> from your module file"); return DOCTYPE + super.getModulePrefix(logger, context, strongName, numFragments); diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/BrowserGenerator.java b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/BrowserGenerator.java index 6c627cf5..3f18fd10 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/BrowserGenerator.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/BrowserGenerator.java @@ -65,6 +65,8 @@ public class BrowserGenerator extends Generator { writer.println("protected boolean isIe6() {return " + "ie6".equals(ua) + ";}"); writer.println("protected boolean isIe8() {return " + "ie8".equals(ua) + ";}"); writer.println("protected boolean isIe9() {return " + "ie9".equals(ua) + ";}"); + writer.println("protected boolean isIe10() {return " + "ie10".equals(ua) + ";}"); + writer.println("protected boolean isIe11() {return " + "gecko1_8".equals(ua) + ";}"); writer.println("public String toString() {return \"Browser:\"" + " + \" webkit=\" + webkit" + " + \" mozilla=\" + mozilla" + diff --git a/gwtquery-core/src/main/super/com/google/gwt/query/super/com/google/gwt/query/client/GQ.java b/gwtquery-core/src/main/super/com/google/gwt/query/super/com/google/gwt/query/client/GQ.java index 3647538b..713f908a 100644 --- a/gwtquery-core/src/main/super/com/google/gwt/query/super/com/google/gwt/query/client/GQ.java +++ b/gwtquery-core/src/main/super/com/google/gwt/query/super/com/google/gwt/query/client/GQ.java @@ -40,6 +40,12 @@ public class GQ { ret.load(payload); return ret; } + + public static <T extends JsonBuilder> T create(Class<T> clz, IsProperties obj) { + T ret = create(clz); + ret.load(obj.getDataImpl()); + return ret; + } public static IsProperties create(String s) { return getFactory().create(s); |