You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2024/05/13 19:29:31 UTC
(royale-compiler) branch develop updated (a1ae0e223 -> 152d7408f)
This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
from a1ae0e223 fix CSS children for JBurg
new 9d2dc13fa ICSSCombinator: should extend ICSSNode, like other CSS interfaces
new 152d7408f ICSSFontFace: add getProperties() to allow tools to access the original ICSSProperty values
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../apache/royale/compiler/css/ICSSCombinator.java | 2 +-
.../org/apache/royale/compiler/css/ICSSFontFace.java | 9 +++++++++
.../royale/compiler/internal/css/CSSFontFace.java | 19 +++++++++++++++++++
3 files changed, 29 insertions(+), 1 deletion(-)
(royale-compiler) 01/02: ICSSCombinator: should extend ICSSNode, like other CSS interfaces
Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 9d2dc13fac2138ed79b6b8575392dcbdb1673c01
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Mon May 13 09:55:38 2024 -0700
ICSSCombinator: should extend ICSSNode, like other CSS interfaces
CSSCombinator extends CSSNodeBase, for reference
---
.../src/main/java/org/apache/royale/compiler/css/ICSSCombinator.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler/src/main/java/org/apache/royale/compiler/css/ICSSCombinator.java b/compiler/src/main/java/org/apache/royale/compiler/css/ICSSCombinator.java
index b68f257f9..debe31dee 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/css/ICSSCombinator.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/css/ICSSCombinator.java
@@ -30,7 +30,7 @@ package org.apache.royale.compiler.css;
* "descendant" (space character) and the combined selector is
* {@code s|Button.rounded}.
*/
-public interface ICSSCombinator
+public interface ICSSCombinator extends ICSSNode
{
/**
(royale-compiler) 02/02: ICSSFontFace: add getProperties() to allow tools to access the original ICSSProperty values
Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 152d7408f10ce33545ef3fc02cd674acfda4860e
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Mon May 13 12:11:34 2024 -0700
ICSSFontFace: add getProperties() to allow tools to access the original ICSSProperty values
---
.../org/apache/royale/compiler/css/ICSSFontFace.java | 9 +++++++++
.../royale/compiler/internal/css/CSSFontFace.java | 19 +++++++++++++++++++
2 files changed, 28 insertions(+)
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 426d8df1c..35e50f5ba 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 @@ public interface ICSSFontFace extends ICSSNode
*/
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 9e0feac89..bb45dc954 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.ISourceLocation;
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 @@ public class CSSFontFace extends CSSNodeBase implements ICSSFontFace
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 @@ public class CSSFontFace extends CSSNodeBase implements ICSSFontFace
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>();
@@ -193,6 +206,12 @@ public class CSSFontFace extends CSSNodeBase implements ICSSFontFace
return isEmbedAsCFF;
}
+ @Override
+ public ImmutableList<ICSSProperty> getProperties()
+ {
+ return propertyList;
+ }
+
@Override
public boolean getAdvancedAntiAliasing()
{