ICSSFontFace: add getProperties() to allow tools to access the original ICSSProperty values
diff --git a/compiler/src/main/java/org/apache/royale/compiler/css/ICSSFontFace.java b/compiler/src/main/java/org/apache/royale/compiler/css/ICSSFontFace.java
index 426d8df..35e50f5 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/css/ICSSFontFace.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/css/ICSSFontFace.java
@@ -19,6 +19,8 @@
package org.apache.royale.compiler.css;
+import com.google.common.collect.ImmutableList;
+
/**
* CSS DOM for an <code>@font-face</code> statement.
*/
@@ -80,4 +82,11 @@
*/
boolean getAdvancedAntiAliasing();
+ /**
+ * Get the CSS properties in their declared order.
+ *
+ * @return A list of CSS properties.
+ */
+ ImmutableList<ICSSProperty> getProperties();
+
}
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSFontFace.java b/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSFontFace.java
index 9e0feac..bb45dc9 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSFontFace.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSFontFace.java
@@ -28,10 +28,13 @@
import org.apache.royale.compiler.common.SourceLocation;
import org.apache.royale.compiler.css.FontFaceSourceType;
import org.apache.royale.compiler.css.ICSSFontFace;
+import org.apache.royale.compiler.css.ICSSProperty;
import org.apache.royale.compiler.css.ICSSPropertyValue;
import org.apache.royale.compiler.problems.CSSRequiredDescriptorProblem;
import org.apache.royale.compiler.problems.ICompilerProblem;
+import com.google.common.collect.ImmutableList;
+
/**
* Implementation for {@code @font-face} statement DOM.
*/
@@ -61,6 +64,15 @@
ICSSPropertyValue embedAsCFFValue = null;
ICSSPropertyValue advancedAAValue = null;
+ if (properties == null)
+ {
+ this.propertyList = ImmutableList.of();
+ }
+ else
+ {
+ this.propertyList = new ImmutableList.Builder<ICSSProperty>().addAll(properties).build();
+ }
+
if (properties != null)
{
// don't use children.add() or addAll() here because JBurg doesn't
@@ -141,6 +153,7 @@
private final String fontWeight;
private final boolean isEmbedAsCFF;
private final boolean isAdvancedAntiAliasing;
+ private final ImmutableList<ICSSProperty> propertyList;
private final List<ICompilerProblem> problems = new ArrayList<ICompilerProblem>();
@@ -194,6 +207,12 @@
}
@Override
+ public ImmutableList<ICSSProperty> getProperties()
+ {
+ return propertyList;
+ }
+
+ @Override
public boolean getAdvancedAntiAliasing()
{
return isAdvancedAntiAliasing;