still putting Helloworld on diet.  Create AllCSSValuesImpl to handle 
'everything' someday, make it the default for Express Application and strip 
stuff out of SimpleCSSStyles and SimpleCSSValuesImpl that isn't needed for 
HelloWorld and put some of it in SimpleCSSStylesWithFlex for FlexBox layout 
users.  Saved 100+ bytes from HelloWorld and helps make sure these classes are 
replacable


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/af1f5c9a
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/af1f5c9a
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/af1f5c9a

Branch: refs/heads/release0.8.0
Commit: af1f5c9a2a5c727c3b4d54a4ef6dbbb2102d1913
Parents: a6f3b45
Author: Alex Harui <aha...@apache.org>
Authored: Tue May 16 08:57:13 2017 -0700
Committer: Alex Harui <aha...@apache.org>
Committed: Tue May 16 09:47:41 2017 -0700

----------------------------------------------------------------------
 .../flex/productsView/ProductCatalogPanel.mxml  |   2 +-
 .../flex/productsView/ProductCatalogPanel.mxml  |   2 +-
 .../flex/html/beads/DataGridPercentageView.as   |   8 +-
 .../org/apache/flex/html/beads/DataGridView.as  |   8 +-
 .../apache/flex/html/beads/DateChooserView.as   |  14 +-
 .../org/apache/flex/html/beads/PanelView.as     |   6 +-
 .../flex/html/beads/PanelWithControlBarView.as  |   4 +-
 .../supportClasses/TextButtonItemRenderer.as    |   4 +-
 .../org/apache/flex/core/AllCSSValuesImpl.as    | 772 +++++++++++++++++++
 .../org/apache/flex/core/BindableCSSStyles.as   |   1 -
 .../flex/core/BindableCSSStylesWithFlex.as      | 116 +++
 .../org/apache/flex/core/SimpleCSSStyles.as     |  10 +-
 .../apache/flex/core/SimpleCSSStylesWithFlex.as | 110 +++
 .../org/apache/flex/core/SimpleCSSValuesImpl.as |  14 +-
 .../Core/src/main/resources/basic-manifest.xml  |   3 +
 .../flex/org/apache/flex/express/Application.as |   4 +-
 .../flex/mobile/beads/StackedViewManagerView.as |   4 +-
 .../flex/mobile/beads/TabbedViewManagerView.as  |   4 +-
 18 files changed, 1034 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/examples/flexjs/FlexJSStore/src/main/flex/productsView/ProductCatalogPanel.mxml
----------------------------------------------------------------------
diff --git 
a/examples/flexjs/FlexJSStore/src/main/flex/productsView/ProductCatalogPanel.mxml
 
b/examples/flexjs/FlexJSStore/src/main/flex/productsView/ProductCatalogPanel.mxml
index 5fc7373..38b09a6 100755
--- 
a/examples/flexjs/FlexJSStore/src/main/flex/productsView/ProductCatalogPanel.mxml
+++ 
b/examples/flexjs/FlexJSStore/src/main/flex/productsView/ProductCatalogPanel.mxml
@@ -512,7 +512,7 @@ limitations under the License.
             <js:titleBar>
                 <js:TitleBar height="20" >
                     <js:style>
-                        <js:SimpleCSSStyles backgroundColor="0xA65904" />
+                        <js:SimpleCSSStylesWithFlex backgroundColor="0xA65904" 
/>
                     </js:style>
                     <js:beads>
                         <productsView:ProductCatalogPanelTitleBarView />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/examples/flexjs/FlexJSStore_jquery/src/main/flex/productsView/ProductCatalogPanel.mxml
----------------------------------------------------------------------
diff --git 
a/examples/flexjs/FlexJSStore_jquery/src/main/flex/productsView/ProductCatalogPanel.mxml
 
b/examples/flexjs/FlexJSStore_jquery/src/main/flex/productsView/ProductCatalogPanel.mxml
index 5fc7373..38b09a6 100755
--- 
a/examples/flexjs/FlexJSStore_jquery/src/main/flex/productsView/ProductCatalogPanel.mxml
+++ 
b/examples/flexjs/FlexJSStore_jquery/src/main/flex/productsView/ProductCatalogPanel.mxml
@@ -512,7 +512,7 @@ limitations under the License.
             <js:titleBar>
                 <js:TitleBar height="20" >
                     <js:style>
-                        <js:SimpleCSSStyles backgroundColor="0xA65904" />
+                        <js:SimpleCSSStylesWithFlex backgroundColor="0xA65904" 
/>
                     </js:style>
                     <js:beads>
                         <productsView:ProductCatalogPanelTitleBarView />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridPercentageView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridPercentageView.as
 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridPercentageView.as
index f8e749d..74bd364 100644
--- 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridPercentageView.as
+++ 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridPercentageView.as
@@ -38,7 +38,7 @@ package org.apache.flex.html.beads
        import org.apache.flex.html.supportClasses.Viewport;
        
        COMPILE::SWF {
-               import org.apache.flex.core.SimpleCSSStyles;
+               import org.apache.flex.core.SimpleCSSStylesWithFlex;
        }
 
        /**
@@ -123,10 +123,10 @@ package org.apache.flex.html.beads
                        _listArea.className = 
"opt_org-apache-flex-html-DataGrid_ListArea";
                        
                        COMPILE::SWF {
-                               _header.style = new SimpleCSSStyles();
+                               _header.style = new SimpleCSSStylesWithFlex();
                                _header.style.flexGrow = 0;
                                
-                               _listArea.style = new SimpleCSSStyles();
+                               _listArea.style = new SimpleCSSStylesWithFlex();
                                _listArea.style.flexGrow = 1;
                        }
                        COMPILE::JS {
@@ -169,7 +169,7 @@ package org.apache.flex.html.beads
                                        list.percentWidth = Number(colWidth);
                                } else {
                                        COMPILE::SWF {
-                                               list.style = new 
SimpleCSSStyles();
+                                               list.style = new 
SimpleCSSStylesWithFlex();
                                                list.style.flexGrow = 1;
                                        }
                                                COMPILE::JS {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridView.as
 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridView.as
index da40854..10e317f 100644
--- 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridView.as
+++ 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataGridView.as
@@ -38,7 +38,7 @@ package org.apache.flex.html.beads
        import org.apache.flex.html.supportClasses.Viewport;
        
        COMPILE::SWF {
-               import org.apache.flex.core.SimpleCSSStyles;
+               import org.apache.flex.core.SimpleCSSStylesWithFlex;
        }
                
                /**
@@ -122,10 +122,10 @@ package org.apache.flex.html.beads
                                _listArea.className = 
"opt_org-apache-flex-html-DataGrid_ListArea";
                                
                                COMPILE::SWF {
-                                       _header.style = new SimpleCSSStyles();
+                                       _header.style = new 
SimpleCSSStylesWithFlex();
                                        _header.style.flexGrow = 0;
                                        
-                                       _listArea.style = new SimpleCSSStyles();
+                                       _listArea.style = new 
SimpleCSSStylesWithFlex();
                                        _listArea.style.flexGrow = 1;
                                }
                                COMPILE::JS {
@@ -173,7 +173,7 @@ package org.apache.flex.html.beads
                                                list.width = Number(colWidth - 
marginBorderOffset);
                                        } else {
                                                COMPILE::SWF {
-                                                       list.style = new 
SimpleCSSStyles();
+                                                       list.style = new 
SimpleCSSStylesWithFlex();
                                                        list.style.flexGrow = 1;
                                                }
                                                        COMPILE::JS {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
index 20b698c..3ea3edd 100644
--- 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
+++ 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
@@ -23,7 +23,7 @@ package org.apache.flex.html.beads
        import org.apache.flex.core.IBeadModel;
        import org.apache.flex.core.IBeadView;
        import org.apache.flex.core.IStrand;
-       import org.apache.flex.core.SimpleCSSStyles;
+       import org.apache.flex.core.SimpleCSSStylesWithFlex;
        import org.apache.flex.core.UIBase;
        import org.apache.flex.core.ValuesManager;
        import org.apache.flex.events.Event;
@@ -131,7 +131,7 @@ package org.apache.flex.html.beads
                        monthButtonsContainer.height = controlHeight;
                        monthButtonsContainer.id = "dateChooserMonthButtons";
                        monthButtonsContainer.className = 
"opt_org-apache-flex-html-DateChooser_MonthButtons";
-                       monthButtonsContainer.style = new SimpleCSSStyles();
+                       monthButtonsContainer.style = new 
SimpleCSSStylesWithFlex();
                        monthButtonsContainer.style.flexGrow = 0;
                        COMPILE::JS {
                                
monthButtonsContainer.element.style["flex-grow"] = "0";
@@ -141,7 +141,7 @@ package org.apache.flex.html.beads
                        _prevMonthButton.width = commonButtonWidth;
                        _prevMonthButton.text = "<";
                        if (_prevMonthButton.style == null) {
-                               _prevMonthButton.style = new SimpleCSSStyles();
+                               _prevMonthButton.style = new 
SimpleCSSStylesWithFlex();
                        }
                        _prevMonthButton.style.flexGrow = 0;
                        COMPILE::JS {
@@ -152,7 +152,7 @@ package org.apache.flex.html.beads
                        monthLabel = new DateHeaderButton();
                        monthLabel.text = "Month Here";
                        if (monthLabel.style == null) {
-                               monthLabel.style = new SimpleCSSStyles();
+                               monthLabel.style = new 
SimpleCSSStylesWithFlex();
                        }
                        monthLabel.style.flexGrow = 1;
                        COMPILE::JS {
@@ -164,7 +164,7 @@ package org.apache.flex.html.beads
                        _nextMonthButton.width = commonButtonWidth;
                        _nextMonthButton.text = ">";
                        if (_nextMonthButton.style == null) {
-                               _nextMonthButton.style = new SimpleCSSStyles();
+                               _nextMonthButton.style = new 
SimpleCSSStylesWithFlex();
                        }
                        COMPILE::JS {
                                _nextMonthButton.element.style["flex-grow"] = 
"0";
@@ -180,7 +180,7 @@ package org.apache.flex.html.beads
                        dayNamesContainer.id = "dateChooserDayNames";
                        dayNamesContainer.className = "DateChooserHeader";
                        dayNamesContainer.height = controlHeight;
-                       dayNamesContainer.style = new SimpleCSSStyles();
+                       dayNamesContainer.style = new SimpleCSSStylesWithFlex();
                        dayNamesContainer.style.flexGrow = 0;
                        COMPILE::JS {
                                dayNamesContainer.element.style["flex-grow"] = 
"0";
@@ -196,7 +196,7 @@ package org.apache.flex.html.beads
                        daysContainer = new DateChooserList();
                        daysContainer.className = "DateChooserList";
                        daysContainer.id = "dateChooserList";
-                       daysContainer.style = new SimpleCSSStyles();
+                       daysContainer.style = new SimpleCSSStylesWithFlex();
                        daysContainer.style.flexGrow = 1;
                        COMPILE::JS {
                                daysContainer.element.style["flex-grow"] = "1";

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/PanelView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/PanelView.as
 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/PanelView.as
index 167e26a..da34924 100644
--- 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/PanelView.as
+++ 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/PanelView.as
@@ -45,7 +45,7 @@ package org.apache.flex.html.beads
        import org.apache.flex.html.supportClasses.PanelLayoutProxy;
 
        COMPILE::SWF {
-               import org.apache.flex.core.SimpleCSSStyles;
+               import org.apache.flex.core.SimpleCSSStylesWithFlex;
        }
 
        /**
@@ -143,7 +143,7 @@ package org.apache.flex.html.beads
                                _titleBar.percentWidth = 100;
 
                                if (_titleBar.style == null) {
-                                       _titleBar.style = new SimpleCSSStyles();
+                                       _titleBar.style = new 
SimpleCSSStylesWithFlex();
                                }
                                _titleBar.style.flexGrow = 0;
                                _titleBar.style.order = 1;
@@ -168,7 +168,7 @@ package org.apache.flex.html.beads
                                        _contentArea.percentWidth = 100;
 
                                        if (_contentArea.style == null) {
-                                               _contentArea.style = new 
SimpleCSSStyles();
+                                               _contentArea.style = new 
SimpleCSSStylesWithFlex();
                                        }
                                        _contentArea.style.flexGrow = 1;
                                        _contentArea.style.order = 2;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/PanelWithControlBarView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/PanelWithControlBarView.as
 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/PanelWithControlBarView.as
index 3312b85..c0502a1 100644
--- 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/PanelWithControlBarView.as
+++ 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/PanelWithControlBarView.as
@@ -39,7 +39,7 @@ package org.apache.flex.html.beads
        import org.apache.flex.utils.CSSContainerUtils;
        
        COMPILE::SWF {
-               import org.apache.flex.core.SimpleCSSStyles;
+               import org.apache.flex.core.SimpleCSSStylesWithFlex;
        }
        
        /**
@@ -104,7 +104,7 @@ package org.apache.flex.html.beads
                                _controlBar.percentWidth = 100;
                                
                                if (_controlBar.style == null) {
-                                       _controlBar.style = new 
SimpleCSSStyles();
+                                       _controlBar.style = new 
SimpleCSSStylesWithFlex();
                                }
                                _controlBar.style.flexGrow = 0;
                                _controlBar.style.order = 3;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/TextButtonItemRenderer.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/TextButtonItemRenderer.as
 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/TextButtonItemRenderer.as
index 049fe9b..b164f97 100644
--- 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/TextButtonItemRenderer.as
+++ 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/TextButtonItemRenderer.as
@@ -21,7 +21,7 @@ package org.apache.flex.html.supportClasses
        import org.apache.flex.core.IItemRenderer;
        import org.apache.flex.core.IItemRendererParent;
        import org.apache.flex.core.UIBase;
-       import org.apache.flex.core.SimpleCSSStyles;
+       import org.apache.flex.core.SimpleCSSStylesWithFlex;
        import org.apache.flex.events.Event;
        import org.apache.flex.events.MouseEvent;
        import org.apache.flex.html.TextButton;
@@ -48,7 +48,7 @@ package org.apache.flex.html.supportClasses
                {
                        super();
                        
-                       style = new SimpleCSSStyles();
+                       style = new SimpleCSSStylesWithFlex();
                        
                        addEventListener('click',handleClickEvent);
                }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/AllCSSValuesImpl.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/AllCSSValuesImpl.as
 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/AllCSSValuesImpl.as
new file mode 100644
index 0000000..e0efb15
--- /dev/null
+++ 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/AllCSSValuesImpl.as
@@ -0,0 +1,772 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+    COMPILE::SWF
+    {
+        import flash.system.ApplicationDomain;
+        import flash.utils.getDefinitionByName;
+        import flash.utils.getQualifiedClassName;
+        import flash.utils.getQualifiedSuperclassName;            
+    }
+       
+       import org.apache.flex.events.EventDispatcher;
+       import org.apache.flex.events.ValueChangeEvent;
+       import org.apache.flex.events.ValueEvent;
+       import org.apache.flex.utils.CSSUtils;
+    import org.apache.flex.utils.StringUtil;
+    
+    /**
+     *  The AllCSSValuesImpl class will eventually implement a full set of
+     *  CSS lookup rules.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+       public class AllCSSValuesImpl extends EventDispatcher implements 
IValuesImpl, ICSSImpl
+       {
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function AllCSSValuesImpl()
+               {
+                       super();
+               }
+               
+        private var mainClass:Object;
+        
+               private var conditionCombiners:Object;
+
+        /**
+         *  @copy org.apache.flex.core.IValuesImpl#init()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        COMPILE::SWF
+        public function init(mainClass:Object):void
+        {
+                       var styleClassName:String;
+                       var c:Class;
+                       if (!values)
+                       {
+                               values = {};
+                   this.mainClass = mainClass;
+                   var mainClassName:String = getQualifiedClassName(mainClass);
+                               styleClassName = "_" + mainClassName + 
"_Styles";
+                               c = 
ApplicationDomain.currentDomain.getDefinition(styleClassName) as Class;
+                generateCSSStyleDeclarations(c["factoryFunctions"], c["data"]);
+                       }
+                       c = mainClass.constructor as Class;
+            generateCSSStyleDeclarations(c["factoryFunctions"], c["data"]);
+            if (hasEventListener("init"))
+                dispatchEvent(new ValueEvent("init", false, false, 
c["fontFaces"]));
+            
+            var i:int = 1;
+            while (true)
+            {
+                var ffName:String = "factoryFunctions" + i.toString();
+                var ff:Object = c[ffName];
+                if (ff == null)
+                    break;
+                generateCSSStyleDeclarations(c[ffName], c["data" + 
i.toString()]);
+                if (hasEventListener("init"))
+                    dispatchEvent(new ValueEvent("init", false, false, 
c["fontFaces" + i.toString()]));
+                i++;
+            }
+        }
+        
+        COMPILE::JS
+        public function init(mainClass:Object):void
+        {
+            var cssData:Array = mainClass.cssData;
+            var values:Object = this.values;
+            if (values == null)
+                values = {};
+            
+            if (cssData) {
+                var n:int = cssData.length;
+                var i:int = 0;
+                while (i < n)
+                {
+                    var numMQ:int = cssData[i++];
+                    if (numMQ > 0)
+                    {
+                        // skip MediaQuery tests for now
+                        i += numMQ;
+                    }
+                    var numSel:int = cssData[i++];
+                    var propFn:Function = cssData[i + numSel];
+                    var props:Object;
+                    for (var j:int = 0; j < numSel; j++)
+                    {
+                        var selName:String = cssData[i++];
+                        if (values[selName])
+                        {
+                            props = values[selName];
+                            propFn.prototype = props;
+                        }
+                        values[selName] = new propFn();
+                    }
+                    // skip the propFn
+                    props = cssData[i++];
+                }
+            }
+            
+            this.values = values;            
+        }
+        
+        /**
+         *  Process the encoded CSS data into data structures.  Usually not 
called
+         *  directly by application developers.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        COMPILE::SWF
+        public function generateCSSStyleDeclarations(factoryFunctions:Object, 
arr:Array):void
+        {
+                       if (factoryFunctions == null)
+                               return;
+                       if (arr == null)
+                               return;
+                       
+            var declarationName:String = "";
+            var segmentName:String = "";
+            var n:int = arr.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                var className:int = arr[i];
+                if (className == CSSClass.CSSSelector)
+                {
+                    var selectorName:String = arr[++i];
+                    segmentName = selectorName + segmentName;
+                    if (declarationName != "")
+                        declarationName += " ";
+                    declarationName += segmentName;
+                    segmentName = "";
+                }
+                else if (className == CSSClass.CSSCondition)
+                {
+                                       if (!conditionCombiners)
+                                       {
+                                               conditionCombiners = {};
+                                               conditionCombiners["class"] = 
".";
+                                               conditionCombiners["id"] = "#";
+                                               conditionCombiners["pseudo"] = 
':';    
+                                       }
+                                       var conditionType:String = arr[++i];
+                                       var conditionName:String = arr[++i];
+                                       segmentName = segmentName + 
conditionCombiners[conditionType] + conditionName;
+                }
+                else if (className == CSSClass.CSSStyleDeclaration)
+                {
+                    var factoryName:int = arr[++i]; // defaultFactory or 
factory
+                    var defaultFactory:Boolean = factoryName == 
CSSFactory.DefaultFactory;
+                    /*
+                    if (defaultFactory)
+                    {
+                        mergedStyle = 
styleManager.getMergedStyleDeclaration(declarationName);
+                        style = new CSSStyleDeclaration(selector, 
styleManager, mergedStyle == null);
+                    }
+                    else
+                    {
+                        style = 
styleManager.getStyleDeclaration(declarationName);
+                        if (!style)
+                        {
+                            style = new CSSStyleDeclaration(selector, 
styleManager, mergedStyle == null);
+                            if (factoryName == CSSFactory.Override)
+                                newSelectors.push(style);
+                        }
+                    }
+                    */
+                    var mq:String = null;
+                    var o:Object;
+                    if (i < n - 2)
+                    {
+                        // peek ahead to see if there is a media query
+                        if (arr[i + 1] == CSSClass.CSSMediaQuery)
+                        {
+                            mq = arr[i + 2];
+                            i += 2;
+                            declarationName = mq + "_" + declarationName;
+                        }
+                    }
+                    var finalName:String;
+                    var valuesFunction:Function;
+                    var valuesObject:Object;
+                    if (defaultFactory)
+                    {
+                        valuesFunction = factoryFunctions[declarationName];
+                        valuesObject = new valuesFunction();
+                    }
+                    else
+                    {
+                        valuesFunction = factoryFunctions[declarationName];
+                        valuesObject = new valuesFunction();
+                    }
+                    if (isValidStaticMediaQuery(mq))
+                    {
+                        finalName = fixNames(declarationName, mq);
+                        o = values[finalName];
+                        if (o == null)
+                            values[finalName] = valuesObject;
+                        else
+                        {
+                            valuesFunction["prototype"] = o;
+                            values[finalName] = new valuesFunction();
+                        }
+                    }
+                    declarationName = "";
+                }
+            }
+            
+        }
+
+        private function isValidStaticMediaQuery(mq:String):Boolean
+        {
+            if (mq == null)
+                return true;
+            
+            if (mq == "-flex-flash")
+                return true;
+            
+            // TODO: (aharui) other media query
+            
+            return false;
+        }
+        
+        private function fixNames(s:String, mq:String):String
+        {
+            if (mq != null)
+                s = s.substr(mq.length + 1); // 1 more for the hyphen
+            
+                       if (s == "")
+                               return "*";
+                       
+            var arr:Array = s.split(" ");
+            var n:int = arr.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                var segmentName:String = arr[i];
+                               if (segmentName.charAt(0) == "#" || 
segmentName.charAt(0) == ".")
+                                       continue;
+                               
+                var c:int = segmentName.lastIndexOf(".");
+                if (c > -1)    // it is 0 for class selectors
+                {
+                    segmentName = segmentName.substr(0, c) + "::" + 
segmentName.substr(c + 1);
+                    arr[i] = segmentName;
+                }
+            }
+            return arr.join(" ");
+        }
+
+        /**
+         *  The map of values.  The format is not documented and it is not 
recommended
+         *  to manipulate this structure directly.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public var values:Object;
+               
+        /**
+         *  @copy org.apache.flex.core.IValuesImpl#getValue()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function getValue(thisObject:Object, valueName:String, 
state:String = null, attrs:Object = null):*
+               {
+            var c:int = valueName.indexOf("-");
+            while (c != -1)
+            {
+                valueName = valueName.substr(0, c) +
+                    valueName.charAt(c + 1).toUpperCase() +
+                    valueName.substr(c + 2);
+                c = valueName.indexOf("-");
+            }
+
+            var value:*;
+                       var o:Object;
+                       var className:String;
+                       var selectorName:String;
+                       
+                       if (thisObject is IStyleableObject)
+                       {
+                var styleable:IStyleableObject = IStyleableObject(thisObject);
+                if (styleable.style != null)
+                {
+                    try {
+                        value = styleable.style[valueName];
+                    }
+                    catch (e:Error) {
+                        value = undefined;
+                    }
+                    if (value == "inherit")
+                        return getInheritingValue(thisObject, valueName, 
state, attrs);
+                    if (value !== undefined)
+                        return value;
+                }
+                if (styleable.id != null)
+                {
+                    o = values["#" + styleable.id];
+                    if (o)
+                    {
+                        value = o[valueName];
+                        if (value == "inherit")
+                            return getInheritingValue(thisObject, valueName, 
state, attrs);
+                        if (value !== undefined)
+                            return value;
+                    }                    
+                }
+                               var classNames:String = styleable.className;
+                if (classNames)
+                {
+                    var classNameList:Array = classNames.split(" ");
+                    for each (className in classNameList)
+                    {
+                        if (state)
+                        {
+                            selectorName = className + ":" + state;
+                            o = values["." + selectorName];
+                            if (o)
+                            {
+                                value = o[valueName];
+                                if (value == "inherit")
+                                    return getInheritingValue(thisObject, 
valueName, state, attrs);
+                                if (value !== undefined)
+                                    return value;
+                            }
+                        }
+                        
+                        o = values["." + className];
+                        if (o)
+                        {
+                            value = o[valueName];
+                            if (value == "inherit")
+                                return getInheritingValue(thisObject, 
valueName, state, attrs);
+                            if (value !== undefined)
+                                return value;
+                        }                        
+                    }
+                }
+                       }
+                       
+            COMPILE::SWF
+            {
+                       className = getQualifiedClassName(thisObject);
+            }
+            COMPILE::JS
+            {
+                className = thisObject.FLEXJS_CLASS_INFO.names[0].qName;
+            }
+            var thisInstance:Object = thisObject;
+                       while (className != "Object")
+                       {
+                               if (state)
+                               {
+                                       selectorName = className + ":" + state;
+                                       o = values[selectorName];
+                                       if (o)
+                                       {
+                                               value = o[valueName];
+                        if (value == "inherit")
+                            return getInheritingValue(thisObject, valueName, 
state, attrs);
+                                               if (value !== undefined)
+                                                       return value;
+                                       }
+                               }
+                               
+                   o = values[className];
+                   if (o)
+                   {
+                       value = o[valueName];
+                    if (value == "inherit")
+                        return getInheritingValue(thisObject, valueName, 
state, attrs);
+                       if (value !== undefined)
+                           return value;
+                   }
+                COMPILE::SWF
+                {
+                    className = getQualifiedSuperclassName(thisInstance);
+                    thisInstance = getDefinitionByName(className);             
           
+                }
+                COMPILE::JS
+                {
+                    var constructorAsObject:Object = 
thisInstance["constructor"];
+                    thisInstance = constructorAsObject.superClass_;
+                    if (!thisInstance || !thisInstance.FLEXJS_CLASS_INFO)
+                        break;
+                    
+                    className = thisInstance.FLEXJS_CLASS_INFO.names[0].qName; 
                   
+                }
+                       }
+            
+            if (inheritingStyles[valueName] != null && 
+                thisObject is IChild)
+            {
+                var parentObject:Object = IChild(thisObject).parent;
+                if (parentObject)
+                    return getValue(parentObject, valueName, state, attrs);
+            }
+            
+            o = values["global"];
+            if (o)
+            {
+                       value = o[valueName];
+                       if (value !== undefined)
+                               return value;
+            }
+                       o = values["*"];                        
+                       if(o)
+                       {
+                               return o[valueName];
+                       }
+                       return undefined;
+               }
+               
+        private function getInheritingValue(thisObject:Object, 
valueName:String, state:String = null, attrs:Object = null):*
+        {
+            var value:*;
+            if (thisObject is IChild)
+            {
+                var parentObject:Object = IChild(thisObject).parent;
+                if (parentObject)
+                {
+                    value = getValue(parentObject, valueName, state, attrs);
+                    if (value == "inherit" || value === undefined)
+                        return getInheritingValue(parentObject, valueName, 
state, attrs);
+                    if (value !== undefined)
+                        return value;
+                }
+                return undefined;
+            }
+            return "inherit";
+        }
+        
+        /**
+         *  A method that stores a value to be shared with other objects.
+         *  It is global, not per instance.  Fancier implementations
+         *  may store shared values per-instance.
+         * 
+         *  @param thisObject An object associated with this value.  Thiis
+         *                parameter is ignored.
+         *  @param valueName The name or key of the value being stored.
+         *  @param The value to be stored.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function setValue(thisObject:Object, valueName:String, 
value:*):void
+               {
+            var c:int = valueName.indexOf("-");
+            while (c != -1)
+            {
+                valueName = valueName.substr(0, c) +
+                    valueName.charAt(c + 1).toUpperCase() +
+                    valueName.substr(c + 2);
+                c = valueName.indexOf("-");
+            }
+                       var oldValue:Object = values[valueName];
+                       if (oldValue != value)
+                       {
+                               values[valueName] = value;
+                               dispatchEvent(new 
ValueChangeEvent(ValueChangeEvent.VALUE_CHANGE, false, false, oldValue, value));
+                       }
+               }
+        
+               /**
+                *  @copy org.apache.flex.core.IValuesImpl#newInstance()
+                *  
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function newInstance(thisObject:Object, 
valueName:String, state:String = null, attrs:Object = null):*
+               {
+                       var c:Class = getValue(thisObject, valueName, state, 
attrs);
+                       if (c)
+                               return new c();
+                       return null;
+               }
+               
+        /**
+         *  @copy org.apache.flex.core.IValuesImpl#getInstance()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         *  @flexjsignorecoercion Function
+         */
+        public function getInstance(valueName:String):Object
+        {
+            var o:Object = values["global"];
+            o = o[valueName];
+            COMPILE::SWF
+            {
+                var i:Class = o as Class;                    
+            }
+            COMPILE::JS
+            {
+                var i:Function = null;
+                if (typeof(o) === "function")
+                    i = o as Function;
+            }
+            if (i)
+            {
+                o[valueName] = new i();
+                var d:IDocument = o[valueName] as IDocument;
+                if (d)
+                    d.setDocument(mainClass);
+            }
+            return o;
+        }
+        
+        /**
+         *  @copy org.apache.flex.core.IValuesImpl#convertColor()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function convertColor(value:Object):uint
+        {
+            return CSSUtils.toColor(value);
+        }
+        
+        /**
+         *  @copy org.apache.flex.core.IValuesImpl#parseStyles()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function parseStyles(styles:String):Object
+        {
+            var obj:Object = {};
+            var parts:Array = styles.split(";");
+            for each (var part:String in parts)
+            {
+                var pieces:Array = StringUtil.splitAndTrim(part, ":");
+                var value:String = pieces[1];
+                if (value == "null")
+                    obj[pieces[0]] = null;
+                else if (value == "true")
+                    obj[pieces[0]] = true;
+                else if (value == "false")
+                    obj[pieces[0]] = false;
+                else
+                {
+                    var n:Number = Number(value);
+                    if (isNaN(n))
+                    {
+                        if (value.charAt(0) == "#" || value.indexOf("rgb") == 
0)
+                        {                            
+                            obj[pieces[0]] = CSSUtils.toColor(value);
+                        }
+                        else
+                        {
+                            if (value.charAt(0) == "'")
+                                value = value.substr(1, value.length - 2);
+                            else if (value.charAt(0) == '"')
+                                value = value.substr(1, value.length - 2);
+                            obj[pieces[0]] = value;
+                        }
+                    }
+                    else
+                        obj[pieces[0]] = n;
+                }
+            }
+            return obj;
+        }
+        
+        /**
+         *  @copy org.apache.flex.core.IValuesImpl#addRule()
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function addRule(ruleName:String, values:Object):void
+        {
+            var asValues:Object = {};
+            for (var valueName:String in values)
+            {
+                var v:* = values[valueName];
+                var c:int = valueName.indexOf("-");
+                while (c != -1)
+                {
+                    valueName = valueName.substr(0, c) +
+                        valueName.charAt(c + 1).toUpperCase() +
+                        valueName.substr(c + 2);
+                    c = valueName.indexOf("-");
+                }
+                asValues[valueName] = v;
+            }
+            this.values[ruleName] = asValues;
+        }
+        
+        /**
+         *  A map of inheriting styles 
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public static var inheritingStyles:Object = { 
+            "color" : 1,
+            "fontFamily" : 1,
+            "fontSize" : 1,
+            "fontStyle" : 1,
+            "textAlign" : 1
+        }
+
+        /**
+         * The styles that apply to each UI widget
+         */
+        COMPILE::JS
+        public static var perInstanceStyles:Object = {
+            'backgroundColor': 1,
+            'backgroundImage': 1,
+            'color': 1,
+            'fontFamily': 1,
+            'fontWeight': 1,
+            'fontSize': 1,
+            'fontStyle': 1
+        }
+        
+        
+        /**
+         * The styles that use color format #RRGGBB
+         */
+        COMPILE::JS
+        public static var colorStyles:Object = {
+            'backgroundColor': 1,
+            'borderColor': 1,
+            'color': 1
+        }
+
+        /**
+         * The styles that can use raw numbers
+         */
+        COMPILE::JS
+        public static var numericStyles:Object = {
+            'fontWeight': 1
+        }
+        
+        
+        /**
+         * The properties that enumerate that we skip
+         */
+        COMPILE::JS
+        public static var skipStyles:Object = {
+            'constructor': 1
+        }
+        
+        
+
+        /**
+         * @param thisObject The object to apply styles to;
+         * @param styles The styles.
+         * @flexjsignorecoercion HTMLElement
+         */
+        COMPILE::JS
+        public function applyStyles(thisObject:IUIBase, styles:Object):void
+        {
+            var styleList:Object = AllCSSValuesImpl.perInstanceStyles;
+            var colorStyles:Object = AllCSSValuesImpl.colorStyles;
+            var skipStyles:Object = AllCSSValuesImpl.skipStyles;
+            var numericStyles:Object = AllCSSValuesImpl.numericStyles;
+            var listObj:Object = styles;
+            if (styles.styleList)
+                listObj = styles.styleList;
+            for (var p:String in listObj) 
+            {
+                //if (styleList[p])
+                if (skipStyles[p])
+                    continue;
+                var value:* = styles[p];
+                if (value === undefined)
+                    continue;
+                if (typeof(value) == 'number') {
+                    if (colorStyles[p])
+                        value = CSSUtils.attributeFromColor(value);
+                    else if (numericStyles[p])
+                        value = value.toString();
+                    else
+                        value = value.toString() + 'px';
+                }
+                else if (p == 'backgroundImage') {
+                    if (p.indexOf('url') !== 0)
+                        value = 'url(' + value + ')';
+                }
+                (thisObject.element as HTMLElement).style[p] = value;
+            }
+        }
+       }
+}
+
+COMPILE::SWF
+class CSSClass
+{
+    public static const CSSSelector:int = 0;
+    public static const CSSCondition:int = 1;
+    public static const CSSStyleDeclaration:int = 2;
+    public static const CSSMediaQuery:int = 3;
+}
+
+COMPILE::SWF
+class CSSFactory
+{
+    public static const DefaultFactory:int = 0;
+    public static const Factory:int = 1;
+    public static const Override:int = 2;
+}
+
+COMPILE::SWF
+class CSSDataType
+{
+    public static const Native:int = 0;
+    public static const Definition:int = 1;
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
index 1bcd87a..f34d476 100644
--- 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
+++ 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
@@ -68,7 +68,6 @@ package org.apache.flex.core
             "color": 1,
             "fontWeight": 1,
             "fontStyle": 1,
-            "backgroundAlpha": 1,
             "backgroundColor": 1,
             "backgroundImage": 1,
                        "border": 1,

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStylesWithFlex.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStylesWithFlex.as
 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStylesWithFlex.as
new file mode 100644
index 0000000..ca380d3
--- /dev/null
+++ 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStylesWithFlex.as
@@ -0,0 +1,116 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+       import org.apache.flex.events.Event;
+       import org.apache.flex.events.EventDispatcher;
+
+    /**
+     *  The BindableCSSStyles class contains CSS style
+     *  properties supported by SimpleCSSValuesImpl but
+     *  dispatch change events when modified
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+    [Bindable]
+       public class BindableCSSStylesWithFlex extends EventDispatcher
+       {
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function BindableCSSStylesWithFlex()
+               {
+                       super();
+               }
+               
+        public var styleList:Object = {
+            "top": 1,
+            "bottom": 1,
+            "left": 1,
+            "right": 1,
+            "padding": 1,
+            "paddingLeft": 1,
+            "paddingRight": 1,
+            "paddingTop": 1,
+            "paddingBottom": 1,
+            "margin": 1,
+            "marginLeft": 1,
+            "marginRight": 1,
+            "marginTop": 1,
+            "marginBottom": 1,
+            "verticalAlign": 1,
+            "fontFamily": 1,
+            "fontSize": 1,
+            "color": 1,
+            "fontWeight": 1,
+            "fontStyle": 1,
+            "backgroundColor": 1,
+            "backgroundImage": 1,
+                       "border": 1,
+            "borderColor": 1,
+            "borderStyle": 1,
+            "borderRadius": 1,
+            "borderWidth": 1,
+                       "flexGrow": 1,
+                       "flexShrink": 1,
+                       "order": 1
+        };
+
+        public var top:*;
+        public var bottom:*;
+        public var left:*;
+        public var right:*;
+        public var padding:*;
+               public var paddingLeft:*;
+        public var paddingRight:*;
+        public var paddingTop:*;
+        public var paddingBottom:*;
+        public var margin:*;
+        public var marginLeft:*;
+        public var marginRight:*;
+        public var marginTop:*;
+        public var marginBottom:*;
+        public var verticalAlign:*;
+        public var fontFamily:*;
+        public var fontSize:*;
+        public var color:*;
+        public var fontWeight:*;
+        public var fontStyle:*;
+        public var backgroundAlpha:*;
+        public var backgroundColor:*;
+        public var backgroundImage:*;
+               public var border:*;
+        public var borderColor:*;
+        public var borderStyle:*;
+        public var borderRadius:*;
+        public var borderWidth:*;
+               public var flexGrow:*;
+               public var flexShrink:*;
+               public var order:*;
+
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSStyles.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSStyles.as
 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSStyles.as
index dc64469..1353796 100644
--- 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSStyles.as
+++ 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSStyles.as
@@ -66,16 +66,12 @@ package org.apache.flex.core
             "color": 1,
             "fontWeight": 1,
             "fontStyle": 1,
-            "backgroundAlpha": 1,
             "backgroundColor": 1,
             "backgroundImage": 1,
             "borderColor": 1,
             "borderStyle": 1,
             "borderRadius": 1,
-            "borderWidth": 1,
-                       "flexGrow": 1,
-                       "flexShrink": 1,
-                       "order": 1
+            "borderWidth": 1
         };
                
         public var top:*;
@@ -98,15 +94,11 @@ package org.apache.flex.core
         public var color:*;
         public var fontWeight:*;
         public var fontStyle:*;
-        public var backgroundAlpha:*;
         public var backgroundColor:*;
         public var backgroundImage:*;
         public var borderColor:*;
         public var borderStyle:*;
         public var borderRadius:*;
         public var borderWidth:*;
-               public var flexGrow:*;
-               public var flexShrink:*;
-               public var order:*;
        }
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSStylesWithFlex.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSStylesWithFlex.as
 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSStylesWithFlex.as
new file mode 100644
index 0000000..7359f14
--- /dev/null
+++ 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSStylesWithFlex.as
@@ -0,0 +1,110 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+       import org.apache.flex.events.Event;
+       import org.apache.flex.events.EventDispatcher;
+
+    /**
+     *  The SimpleCSSStyles class contains CSS style
+     *  properties supported by SimpleCSSValuesImpl.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+       public class SimpleCSSStylesWithFlex 
+       {
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function SimpleCSSStylesWithFlex()
+               {
+                       super();
+               }
+               
+        public var styleList:Object = {
+            "top": 1,
+            "bottom": 1,
+            "left": 1,
+            "right": 1,
+            "padding": 1,
+            "paddingLeft": 1,
+            "paddingRight": 1,
+            "paddingTop": 1,
+            "paddingBottom": 1,
+            "margin": 1,
+            "marginLeft": 1,
+            "marginRight": 1,
+            "marginTop": 1,
+            "marginBottom": 1,
+            "verticalAlign": 1,
+            "fontFamily": 1,
+            "fontSize": 1,
+            "color": 1,
+            "fontWeight": 1,
+            "fontStyle": 1,
+            "backgroundColor": 1,
+            "backgroundImage": 1,
+            "borderColor": 1,
+            "borderStyle": 1,
+            "borderRadius": 1,
+            "borderWidth": 1,
+                       "flexGrow": 1,
+                       "flexShrink": 1,
+                       "order": 1
+        };
+               
+        public var top:*;
+        public var bottom:*;
+        public var left:*;
+        public var right:*;
+        public var padding:*;
+               public var paddingLeft:*;
+        public var paddingRight:*;
+        public var paddingTop:*;
+        public var paddingBottom:*;
+        public var margin:*;
+        public var marginLeft:*;
+        public var marginRight:*;
+        public var marginTop:*;
+        public var marginBottom:*;
+        public var verticalAlign:*;
+        public var fontFamily:*;
+        public var fontSize:*;
+        public var color:*;
+        public var fontWeight:*;
+        public var fontStyle:*;
+        public var backgroundColor:*;
+        public var backgroundImage:*;
+        public var borderColor:*;
+        public var borderStyle:*;
+        public var borderRadius:*;
+        public var borderWidth:*;
+               public var flexGrow:*;
+               public var flexShrink:*;
+               public var order:*;
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
index 6b0527d..4e1cd47 100644
--- 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
+++ 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
@@ -34,7 +34,8 @@ package org.apache.flex.core
     
     /**
      *  The SimpleCSSValuesImpl class implements a minimal set of
-     *  CSS lookup rules that is sufficient for most applications.
+     *  CSS lookup rules that is sufficient for most applications
+        *  and is easily implemented for SWFs.
      *  It does not support attribute selectors or descendant selectors
      *  or id selectors.  It will filter on a custom -flex-flash
      *  media query but not other media queries.  It can be
@@ -692,14 +693,6 @@ package org.apache.flex.core
             'color': 1
         }
 
-        /**
-         * The styles that can use raw numbers
-         */
-        COMPILE::JS
-        public static var numericStyles:Object = {
-            'fontWeight': 1
-        }
-        
         
         /**
          * The properties that enumerate that we skip
@@ -722,7 +715,6 @@ package org.apache.flex.core
             var styleList:Object = SimpleCSSValuesImpl.perInstanceStyles;
             var colorStyles:Object = SimpleCSSValuesImpl.colorStyles;
             var skipStyles:Object = SimpleCSSValuesImpl.skipStyles;
-            var numericStyles:Object = SimpleCSSValuesImpl.numericStyles;
             var listObj:Object = styles;
             if (styles.styleList)
                 listObj = styles.styleList;
@@ -737,8 +729,6 @@ package org.apache.flex.core
                 if (typeof(value) == 'number') {
                     if (colorStyles[p])
                         value = CSSUtils.attributeFromColor(value);
-                    else if (numericStyles[p])
-                        value = value.toString();
                     else
                         value = value.toString() + 'px';
                 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/frameworks/projects/Core/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/resources/basic-manifest.xml 
b/frameworks/projects/Core/src/main/resources/basic-manifest.xml
index d2c3aa6..3c2e3bf 100644
--- a/frameworks/projects/Core/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Core/src/main/resources/basic-manifest.xml
@@ -22,6 +22,7 @@
 <componentPackage>
 
     <component id="SimpleCSSValuesImpl" 
class="org.apache.flex.core.SimpleCSSValuesImpl"/>
+    <component id="AllCSSValuesImpl" 
class="org.apache.flex.core.AllCSSValuesImpl"/>
     <component id="CSSFontFaceBead" 
class="org.apache.flex.core.CSSFontFaceBead" />
     <component id="BrowserScroller" 
class="org.apache.flex.core.BrowserScroller"/>
     <component id="BrowserResizeHandler" 
class="org.apache.flex.core.BrowserResizeListener"/>
@@ -31,7 +32,9 @@
     <component id="CallLaterBead" class="org.apache.flex.core.CallLaterBead" />
 
     <component id="BindableCSSStyles" 
class="org.apache.flex.core.BindableCSSStyles"/>
+    <component id="BindableCSSStylesWithFlex" 
class="org.apache.flex.core.BindableCSSStylesWithFlex"/>
     <component id="SimpleCSSStyles" 
class="org.apache.flex.core.SimpleCSSStyles"/>
+    <component id="SimpleCSSStylesWithFlex" 
class="org.apache.flex.core.SimpleCSSStylesWithFlex"/>
     <component id="AllCSSStyles" class="org.apache.flex.core.AllCSSStyles"/>
     <component id="ParentDocumentBead" 
class="org.apache.flex.core.ParentDocumentBead"/>
     <component id="MixinManager" class="org.apache.flex.utils.MixinManager" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/frameworks/projects/Express/src/main/flex/org/apache/flex/express/Application.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Express/src/main/flex/org/apache/flex/express/Application.as
 
b/frameworks/projects/Express/src/main/flex/org/apache/flex/express/Application.as
index 8a13afd..1440f91 100644
--- 
a/frameworks/projects/Express/src/main/flex/org/apache/flex/express/Application.as
+++ 
b/frameworks/projects/Express/src/main/flex/org/apache/flex/express/Application.as
@@ -20,7 +20,7 @@ package org.apache.flex.express
 {
        import org.apache.flex.binding.ApplicationDataBinding;
        import org.apache.flex.core.Application;
-       import org.apache.flex.core.SimpleCSSValuesImpl;
+       import org.apache.flex.core.AllCSSValuesImpl;
        
        /**
         * This class extends the standard Application and sets up the
@@ -32,7 +32,7 @@ package org.apache.flex.express
                {
                        super();
                        
-                       this.valuesImpl = new SimpleCSSValuesImpl();
+                       this.valuesImpl = new AllCSSValuesImpl();
                        addBead(new ApplicationDataBinding());
                }
        }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/StackedViewManagerView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/StackedViewManagerView.as
 
b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/StackedViewManagerView.as
index c2c8837..78ca831 100644
--- 
a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/StackedViewManagerView.as
+++ 
b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/StackedViewManagerView.as
@@ -22,7 +22,7 @@ package org.apache.flex.mobile.beads
        import org.apache.flex.core.IStrand;
        import org.apache.flex.core.IViewportModel;
        import org.apache.flex.core.UIBase;
-       import org.apache.flex.core.SimpleCSSStyles;
+       import org.apache.flex.core.SimpleCSSStylesWithFlex;
        import org.apache.flex.events.IEventDispatcher;
        import org.apache.flex.events.Event;
        import org.apache.flex.html.beads.ContainerView;
@@ -163,7 +163,7 @@ package org.apache.flex.mobile.beads
                        }
                        COMPILE::SWF {
                                if (UIBase(_topView).style == null) {
-                                       UIBase(_topView).style = new 
SimpleCSSStyles();
+                                       UIBase(_topView).style = new 
SimpleCSSStylesWithFlex();
                                }
                                UIBase(_topView).style.flexGrow = 1;
                                UIBase(_topView).percentWidth = 100;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/af1f5c9a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/TabbedViewManagerView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/TabbedViewManagerView.as
 
b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/TabbedViewManagerView.as
index cd60094..ad4090d 100644
--- 
a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/TabbedViewManagerView.as
+++ 
b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/TabbedViewManagerView.as
@@ -22,7 +22,7 @@ package org.apache.flex.mobile.beads
        import org.apache.flex.core.IStrand;
        import org.apache.flex.core.IViewportModel;
        import org.apache.flex.core.UIBase;
-       import org.apache.flex.core.SimpleCSSStyles;
+       import org.apache.flex.core.SimpleCSSStylesWithFlex;
        import org.apache.flex.events.IEventDispatcher;
        import org.apache.flex.events.Event;
        import org.apache.flex.html.beads.ContainerView;
@@ -130,7 +130,7 @@ package org.apache.flex.mobile.beads
                        }
                        COMPILE::SWF {
                                if (UIBase(_currentView).style == null) {
-                                       UIBase(_currentView).style = new 
SimpleCSSStyles();
+                                       UIBase(_currentView).style = new 
SimpleCSSStylesWithFlex();
                                }
                                UIBase(_currentView).style.flexGrow = 1;
                                UIBase(_currentView).percentWidth = 100;

Reply via email to