You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/05/23 06:25:48 UTC
[royale-compiler] branch develop updated: try filtering out
non-platform css rules
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
The following commit(s) were added to refs/heads/develop by this push:
new ca5ee44 try filtering out non-platform css rules
ca5ee44 is described below
commit ca5ee44d291f5fc6b2df7a9d48c3b18491c04328
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue May 22 23:25:37 2018 -0700
try filtering out non-platform css rules
---
.../internal/css/semantics/CSSSemanticAnalyzer.java | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/css/semantics/CSSSemanticAnalyzer.java b/compiler/src/main/java/org/apache/royale/compiler/internal/css/semantics/CSSSemanticAnalyzer.java
index 99ef61f..b0f1f91 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/css/semantics/CSSSemanticAnalyzer.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/css/semantics/CSSSemanticAnalyzer.java
@@ -349,6 +349,11 @@ public class CSSSemanticAnalyzer
private static class MatchedCSSRulePredicate implements Predicate<ICSSRule>
{
/**
+ * The project
+ */
+ private final IRoyaleProject project;
+
+ /**
* QNames of the definitions to be matched by the CSS rules.
*/
private final ImmutableSet<String> qnames;
@@ -366,13 +371,14 @@ public class CSSSemanticAnalyzer
* @param resolvedSelectors A map of selectors resolved to class
* definitions.
*/
- public MatchedCSSRulePredicate(final ImmutableSet<String> qnames,
+ public MatchedCSSRulePredicate(final ImmutableSet<String> qnames, IRoyaleProject project,
final ImmutableMap<ICSSSelector, String> resolvedSelectors)
{
assert qnames != null : "Expected a set of definition for the CSS rules to match.";
assert resolvedSelectors != null : "Expected a map of selectors resolved to class definitions.";
this.qnames = qnames;
this.resolvedSelectors = resolvedSelectors;
+ this.project = project;
}
/**
@@ -383,6 +389,9 @@ public class CSSSemanticAnalyzer
@Override
public boolean apply(final ICSSRule rule)
{
+ if (!project.isPlatformRule(rule))
+ return false;
+
for (final ICSSSelector selector : rule.getSelectorGroup())
{
if (isWildcardSelector(selector))
@@ -487,7 +496,7 @@ public class CSSSemanticAnalyzer
}
else
{
- predicate = new MatchedCSSRulePredicate(qnames, resolvedSelectors);
+ predicate = new MatchedCSSRulePredicate(qnames, royaleProject, resolvedSelectors);
}
// Cache the result of selector resolution on the session.
--
To stop receiving notification emails like this one, please contact
aharui@apache.org.