From 607cdd1e6b5e4716dc6d781e78257ff33e86b819 Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Wed, 3 Dec 2014 18:35:21 +0100 Subject: [PATCH] Adding IE10 and deprecating stdoctype-linker. Adding missing create method in super GQ. Deprecating IFrameWithDocTypeLinker so as we can remove soon We dont force to load it anymore --- .../src/main/java/com/google/gwt/query/Query.gwt.xml | 5 ++++- .../src/main/java/com/google/gwt/query/QueryMin.gwt.xml | 4 ++-- .../main/java/com/google/gwt/query/client/Browser.java | 2 ++ .../google/gwt/query/linker/IFrameWithDocTypeLinker.java | 8 +++++++- .../com/google/gwt/query/rebind/BrowserGenerator.java | 2 ++ .../gwt/query/super/com/google/gwt/query/client/GQ.java | 6 ++++++ 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 8ba4fc33..09ed473e 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 @@ + @@ -95,6 +96,7 @@ + @@ -115,6 +117,7 @@ + @@ -134,6 +137,7 @@ + @@ -162,6 +166,5 @@ module in your .gwt.xml file. See issue #213 --> - 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 @@ @@ -69,6 +68,7 @@ + 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 = "\n"; + @Deprecated protected String getModulePrefix(TreeLogger logger, LinkerContext context, String strongName) throws UnableToCompleteException { + logger.log(Type.WARN, + "GQuery IFrameWithDocTypeLinker is deprecated, remove 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 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 create(Class clz, IsProperties obj) { + T ret = create(clz); + ret.load(obj.getDataImpl()); + return ret; + } public static IsProperties create(String s) { return getFactory().create(s); -- 2.39.5