You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2020/01/13 19:15:22 UTC

[royale-asjs] branch develop updated: The browser parses valid color values, so there's no need to do it manually Related to #677

This is an automated email from the ASF dual-hosted git repository.

harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 8fb162b  The browser parses valid color values, so there's no need to do it manually Related to #677
     new 3382fcc  Merge branch 'develop' of https://github.com/apache/royale-asjs into develop
8fb162b is described below

commit 8fb162b26fc6eb39e360a620c8b40c8045f967f2
Author: Harbs <ha...@in-tools.com>
AuthorDate: Mon Jan 13 21:15:04 2020 +0200

    The browser parses valid color values, so there's no need to do it manually
    Related to #677
---
 .../main/royale/org/apache/royale/core/SimpleCSSValuesImpl.as  | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/SimpleCSSValuesImpl.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/SimpleCSSValuesImpl.as
index 5b68b47..c2221c1 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/SimpleCSSValuesImpl.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/SimpleCSSValuesImpl.as
@@ -684,8 +684,16 @@ package org.apache.royale.core
                     if (isNaN(n))
                     {
                         if (value.charAt(0) == "#" || value.indexOf("rgb") == 0)
-                        {                            
+                        {                     
+                            COMPILE::SWF{
+                                // in SWF we need int or uint values
                             obj[valueName] = CSSUtils.toColor(value);
+                            }
+                            COMPILE::JS
+                            {
+                                //In JS these values can be applied directly
+                                obj[valueName] = value;
+                            }
                         }
                         else
                         {