You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2017/05/01 03:47:48 UTC
[22/38] git commit: [flex-falcon] [refs/heads/develop] - skip rules
that don't apply to platform
skip rules that don't apply to platform
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/07aa3782
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/07aa3782
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/07aa3782
Branch: refs/heads/develop
Commit: 07aa37825e78752a1e246aeb8d6f77f1ec5527f2
Parents: 962fd89
Author: Alex Harui <ah...@apache.org>
Authored: Wed Mar 1 12:59:52 2017 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Mar 1 12:59:52 2017 -0800
----------------------------------------------------------------------
.../compiler/internal/projects/FlexJSProject.java | 16 ++++++++++++++++
.../compiler/internal/projects/FlexProject.java | 7 +++++++
.../apache/flex/compiler/projects/IFlexProject.java | 5 +++++
3 files changed, 28 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07aa3782/compiler-jx/src/main/java/org/apache/flex/compiler/internal/projects/FlexJSProject.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/projects/FlexJSProject.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/projects/FlexJSProject.java
index f90d2ac..0b971f8 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/projects/FlexJSProject.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/projects/FlexJSProject.java
@@ -31,6 +31,8 @@ import org.apache.flex.compiler.clients.JSConfiguration;
import org.apache.flex.compiler.common.DependencyType;
import org.apache.flex.compiler.config.Configuration;
import org.apache.flex.compiler.config.Configurator;
+import org.apache.flex.compiler.css.ICSSMediaQueryCondition;
+import org.apache.flex.compiler.css.ICSSRule;
import org.apache.flex.compiler.definitions.IDefinition;
import org.apache.flex.compiler.definitions.metadata.IMetaTag;
import org.apache.flex.compiler.definitions.metadata.IMetaTagAttribute;
@@ -53,6 +55,8 @@ import org.apache.flex.compiler.tree.as.IASNode;
import org.apache.flex.compiler.tree.as.IDefinitionNode;
import org.apache.flex.compiler.units.ICompilationUnit;
+import com.google.common.collect.ImmutableList;
+
/**
* @author aharui
*
@@ -414,5 +418,17 @@ public class FlexJSProject extends FlexProject
return list;
return config.getCompilerNamespacesManifestMappings();
}
+
+ @Override
+ public boolean isPlatformRule(ICSSRule rule) {
+ ImmutableList<ICSSMediaQueryCondition> mqlist = rule.getMediaQueryConditions();
+ int n = mqlist.size();
+ if (n > 0)
+ {
+ if (mqlist.get(0).toString().equals("-flex-flash"))
+ return false;
+ }
+ return true;
+ }
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07aa3782/compiler/src/main/java/org/apache/flex/compiler/internal/projects/FlexProject.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/projects/FlexProject.java b/compiler/src/main/java/org/apache/flex/compiler/internal/projects/FlexProject.java
index 5ba8cdd..7a29c35 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/internal/projects/FlexProject.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/internal/projects/FlexProject.java
@@ -44,6 +44,7 @@ import org.apache.flex.compiler.config.RSLSettings;
import org.apache.flex.compiler.constants.IASLanguageConstants;
import org.apache.flex.compiler.constants.IMetaAttributeConstants;
import org.apache.flex.compiler.css.ICSSManager;
+import org.apache.flex.compiler.css.ICSSRule;
import org.apache.flex.compiler.definitions.IClassDefinition;
import org.apache.flex.compiler.definitions.IDefinition;
import org.apache.flex.compiler.definitions.IEffectDefinition;
@@ -2356,4 +2357,10 @@ public class FlexProject extends ASProject implements IFlexProject
{
return config.getCompilerNamespacesManifestMappings();
}
+
+ @Override
+ public boolean isPlatformRule(ICSSRule rule) {
+ return true;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07aa3782/compiler/src/main/java/org/apache/flex/compiler/projects/IFlexProject.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/projects/IFlexProject.java b/compiler/src/main/java/org/apache/flex/compiler/projects/IFlexProject.java
index 937c259..adf8817 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/projects/IFlexProject.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/projects/IFlexProject.java
@@ -30,6 +30,7 @@ import org.apache.flex.compiler.common.XMLName;
import org.apache.flex.compiler.config.Configuration;
import org.apache.flex.compiler.config.RSLSettings;
import org.apache.flex.compiler.css.ICSSManager;
+import org.apache.flex.compiler.css.ICSSRule;
import org.apache.flex.compiler.exceptions.LibraryCircularDependencyException;
import org.apache.flex.compiler.internal.config.IWriteOnlyProjectSettings;
import org.apache.flex.compiler.internal.css.CSSManager;
@@ -223,5 +224,9 @@ public interface IFlexProject extends IASProject, IXMLNameResolver, IWriteOnlyPr
*/
List<MXMLNamespaceMapping> getCompilerNamespacesManifestMappings(Configuration config);
+ /**
+ * True if Rule will work on the destination platform
+ */
+ boolean isPlatformRule(ICSSRule rule);
}