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 49382c92c5 Fixed binding on composite styles
49382c92c5 is described below

commit 49382c92c525a6ba6fd99938dcc1acaace1beb90
Author: Harbs <[email protected]>
AuthorDate: Wed Jul 8 12:23:25 2026 +0300

    Fixed binding on composite styles
---
 .../royale/org/apache/royale/style/StyleUIBase.as  |  5 +-
 .../royale/style/stylebeads/CompositeStyle.as      | 27 +++++++
 .../royale/style/stylebeads/border/Border.as       | 85 +++++++++++-----------
 .../royale/style/stylebeads/border/BorderRadius.as | 19 +++--
 .../royale/style/stylebeads/border/BorderWidth.as  | 23 +++---
 .../royale/style/stylebeads/border/Outline.as      |  9 +--
 .../royale/style/stylebeads/spacing/Margin.as      | 23 +++---
 .../royale/style/stylebeads/spacing/Padding.as     | 23 +++---
 8 files changed, 119 insertions(+), 95 deletions(-)

diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/StyleUIBase.as
 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/StyleUIBase.as
index 5f83c72769..ec6abe41bc 100644
--- 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/StyleUIBase.as
+++ 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/StyleUIBase.as
@@ -155,7 +155,8 @@ package org.apache.royale.style
                {
                        if(bead.isLeaf)
                                return addLeafStyleBead(bead as ILeafStyleBead, 
overrideExisting);
-
+                       
+                       bead.strand = this;
                        var leaves:Array = bead.getLeaves();
                        for each(var leaf:ILeafStyleBead in leaves)
                        {
@@ -190,7 +191,9 @@ package org.apache.royale.style
                        if(styleBeads)
                        {
                                for each(var bead:IStyleBead in styleBeads)
+                               {
                                        addStyleBead(bead);
+                               }
                        }
                        refreshSuspended = true;
                        styleBeads = null;
diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/CompositeStyle.as
 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/CompositeStyle.as
index cbd8a5264c..9aa23d0ebd 100644
--- 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/CompositeStyle.as
+++ 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/CompositeStyle.as
@@ -19,6 +19,7 @@
 package org.apache.royale.style.stylebeads
 {
        import org.apache.royale.debugging.assert;
+       import org.apache.royale.style.StyleUIBase;
 
        /**
         * Convenience class for styles that are composed of multiple leaf 
styles.
@@ -40,8 +41,34 @@ package org.apache.royale.style.stylebeads
                {
                        assert(styles && styles.length > 0, "Non-leaf style 
beads must have child styles");
                        // nothing to preprocess.
+                       _leavesGathered = true;
                        return gatherLeaves(parentStyle);
                }
+               private var _leavesGathered:Boolean;
+
+               override public function addStyleBead(bead:IStyleBead):void
+               {
+                       super.addStyleBead(bead);
+                       if(_leavesGathered && _strand)
+                       {
+                               var pStyle:IStyleBead = parentStyle || this;
+                               bead.parentStyle = pStyle;
+                               if(bead is ILeafStyleBead)
+                                       (bead as ILeafStyleBead).unit = unit;
+                               else if (bead is StyleBeadBase)
+                                       (bead as StyleBeadBase).unit = unit;
+
+                               if(bead.isLeaf)
+                               {
+                                       var leaf:ILeafStyleBead = bead as 
ILeafStyleBead;
+                                       if(!leaf.isDecorated())
+                                               decorateChildStyle(leaf, []);
+                                       (_strand as 
StyleUIBase).setStyles([leaf], true);
+                               }
+                               else
+                                       (_strand as 
StyleUIBase).setStyles(bead.getLeaves(), true);
+                       }
+               }
 
                //TODO: Figure this out.
                override public function 
decorateChildStyle(style:ILeafStyleBead,decorations:Array):void
diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/border/Border.as
 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/border/Border.as
index 116ac76570..54e6f8e321 100644
--- 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/border/Border.as
+++ 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/border/Border.as
@@ -35,7 +35,6 @@ package org.apache.royale.style.stylebeads.border
                public function Border(color:String = null, style:String = 
null, width:* = null, radius:* = null, unit:String = "px")
                {
                        super();
-                       styles = [];
                        this.unit = unit;
                        if(color != this.color)
                                this.color = color;
@@ -58,7 +57,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!colorStyle)
                        {
                                colorStyle = new BorderColor();
-                               styles.push(colorStyle);
+                               addStyleBead(colorStyle);
                        }
                        colorStyle.value = value;
                        _color = value;
@@ -74,7 +73,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!topColorStyle)
                        {
                                topColorStyle = new BorderColor("border-t", 
"border-top-color");
-                               styles.push(topColorStyle);
+                               addStyleBead(topColorStyle);
                        }
                        topColorStyle.value = value;
                        _topColor = value;
@@ -90,7 +89,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!bottomColorStyle)
                        {
                                bottomColorStyle = new BorderColor("border-b", 
"border-bottom-color");
-                               styles.push(bottomColorStyle);
+                               addStyleBead(bottomColorStyle);
                        }
                        bottomColorStyle.value = value;
                        _bottomColor = value;
@@ -106,7 +105,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!leftColorStyle)
                        {
                                leftColorStyle = new BorderColor("border-l", 
"border-left-color");
-                               styles.push(leftColorStyle);
+                               addStyleBead(leftColorStyle);
                        }
                        leftColorStyle.value = value;
                        _leftColor = value;
@@ -122,7 +121,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!rightColorStyle)
                        {
                                rightColorStyle = new BorderColor("border-r", 
"border-right-color");
-                               styles.push(rightColorStyle);
+                               addStyleBead(rightColorStyle);
                        }
                        rightColorStyle.value = value;
                        _rightColor = value;
@@ -138,7 +137,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!blockColorStyle)
                        {
                                blockColorStyle = new BorderColor("border-y", 
"border-block-color");
-                               styles.push(blockColorStyle);
+                               addStyleBead(blockColorStyle);
                        }
                        blockColorStyle.value = value;
                        _blockColor = value;
@@ -154,7 +153,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!blockStartColorStyle)
                        {
                                blockStartColorStyle = new 
BorderColor("border-bs", "border-block-start-color");
-                               styles.push(blockStartColorStyle);
+                               addStyleBead(blockStartColorStyle);
                        }
                        blockStartColorStyle.value = value;
                        _blockStartColor = value;
@@ -170,7 +169,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!blockEndColorStyle)
                        {
                                blockEndColorStyle = new 
BorderColor("border-be", "border-block-end-color");
-                               styles.push(blockEndColorStyle);
+                               addStyleBead(blockEndColorStyle);
                        }
                        blockEndColorStyle.value = value;
                        _blockEndColor = value;
@@ -186,7 +185,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!inlineColorStyle)
                        {
                                inlineColorStyle = new BorderColor("border-x", 
"border-inline-color");
-                               styles.push(inlineColorStyle);
+                               addStyleBead(inlineColorStyle);
                        }
                        inlineColorStyle.value = value;
                        _inlineColor = value;
@@ -202,7 +201,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!inlineStartColorStyle)
                        {
                                inlineStartColorStyle = new 
BorderColor("border-s", "border-inline-start-color");
-                               styles.push(inlineStartColorStyle);
+                               addStyleBead(inlineStartColorStyle);
                        }
                        inlineStartColorStyle.value = value;
                        _inlineStartColor = value;
@@ -218,7 +217,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!inlineEndColorStyle)
                        {
                                inlineEndColorStyle = new 
BorderColor("border-e", "border-inline-end-color");
-                               styles.push(inlineEndColorStyle);
+                               addStyleBead(inlineEndColorStyle);
                        }
                        inlineEndColorStyle.value = value;
                        _inlineEndColor = value;
@@ -235,7 +234,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!styleStyle)
                        {
                                styleStyle = new BorderStyle();
-                               styles.push(styleStyle);
+                               addStyleBead(styleStyle);
                        }
                        styleStyle.value = value;
                        _style = value;
@@ -251,7 +250,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!tStyle)
                        {
                                tStyle = new BorderStyle("border-t", 
"border-top-style");
-                               styles.push(tStyle);
+                               addStyleBead(tStyle);
                        }
                        tStyle.value = value;
                        _topStyle = value;
@@ -267,7 +266,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!bStyle)
                        {
                                bStyle = new BorderStyle("border-b", 
"border-bottom-style");
-                               styles.push(bStyle);
+                               addStyleBead(bStyle);
                        }
                        bStyle.value = value;
                        _bottomStyle = value;
@@ -283,7 +282,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!lStyle)
                        {
                                lStyle = new BorderStyle("border-l", 
"border-left-style");
-                               styles.push(lStyle);
+                               addStyleBead(lStyle);
                        }
                        lStyle.value = value;
                        _leftStyle = value;
@@ -299,7 +298,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!rStyle)
                        {
                                rStyle = new BorderStyle("border-r", 
"border-right-style");
-                               styles.push(rStyle);
+                               addStyleBead(rStyle);
                        }
                        rStyle.value = value;
                        _rightStyle = value;
@@ -315,7 +314,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!blkStyle)
                        {
                                blkStyle = new BorderStyle("border-y", 
"border-block-style");
-                               styles.push(blkStyle);
+                               addStyleBead(blkStyle);
                        }
                        blkStyle.value = value;
                        _blockStyle = value;
@@ -331,7 +330,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!blkStartStyle)
                        {
                                blkStartStyle = new BorderStyle("border-bs", 
"border-block-start-style");
-                               styles.push(blkStartStyle);
+                               addStyleBead(blkStartStyle);
                        }
                        blkStartStyle.value = value;
                        _blockStartStyle = value;
@@ -347,7 +346,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!blkEndStyle)
                        {
                                blkEndStyle = new BorderStyle("border-be", 
"border-block-end-style");
-                               styles.push(blkEndStyle);
+                               addStyleBead(blkEndStyle);
                        }
                        blkEndStyle.value = value;
                        _blockEndStyle = value;
@@ -363,7 +362,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!inlStyle)
                        {
                                inlStyle = new BorderStyle("border-x", 
"border-inline-style");
-                               styles.push(inlStyle);
+                               addStyleBead(inlStyle);
                        }
                        inlStyle.value = value;
                        _inlineStyle = value;
@@ -379,7 +378,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!inlStartStyle)
                        {
                                inlStartStyle = new BorderStyle("border-s", 
"border-inline-start-style");
-                               styles.push(inlStartStyle);
+                               addStyleBead(inlStartStyle);
                        }
                        inlStartStyle.value = value;
                        _inlineStartStyle = value;
@@ -395,7 +394,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!inlEndStyle)
                        {
                                inlEndStyle = new BorderStyle("border-e", 
"border-inline-end-style");
-                               styles.push(inlEndStyle);
+                               addStyleBead(inlEndStyle);
                        }
                        inlEndStyle.value = value;
                        _inlineEndStyle = value;
@@ -413,7 +412,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                widthStyle = new BorderWidth();
                                widthStyle.unit = unit;
-                               styles.push(widthStyle);
+                               addStyleBead(widthStyle);
                        }
                        widthStyle.width = value;
                        _width = value;
@@ -428,7 +427,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                widthStyle = new BorderWidth();
                                widthStyle.unit = unit;
-                               styles.push(widthStyle);
+                               addStyleBead(widthStyle);
                        }
                        widthStyle.top = value;
                }
@@ -442,7 +441,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                widthStyle = new BorderWidth();
                                widthStyle.unit = unit;
-                               styles.push(widthStyle);
+                               addStyleBead(widthStyle);
                        }
                        widthStyle.bottom = value;
                }
@@ -456,7 +455,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                widthStyle = new BorderWidth();
                                widthStyle.unit = unit;
-                               styles.push(widthStyle);
+                               addStyleBead(widthStyle);
                        }
                        widthStyle.left = value;
                }
@@ -470,7 +469,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                widthStyle = new BorderWidth();
                                widthStyle.unit = unit;
-                               styles.push(widthStyle);
+                               addStyleBead(widthStyle);
                        }
                        widthStyle.right = value;
                }
@@ -484,7 +483,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                widthStyle = new BorderWidth();
                                widthStyle.unit = unit;
-                               styles.push(widthStyle);
+                               addStyleBead(widthStyle);
                        }
                        widthStyle.block = value;
                }
@@ -498,7 +497,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                widthStyle = new BorderWidth();
                                widthStyle.unit = unit;
-                               styles.push(widthStyle);
+                               addStyleBead(widthStyle);
                        }
                        widthStyle.blockStart = value;
                }
@@ -512,7 +511,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                widthStyle = new BorderWidth();
                                widthStyle.unit = unit;
-                               styles.push(widthStyle);
+                               addStyleBead(widthStyle);
                        }
                        widthStyle.blockEnd = value;
                }
@@ -526,7 +525,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                widthStyle = new BorderWidth();
                                widthStyle.unit = unit;
-                               styles.push(widthStyle);
+                               addStyleBead(widthStyle);
                        }
                        widthStyle.inline = value;
                }
@@ -540,7 +539,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                widthStyle = new BorderWidth();
                                widthStyle.unit = unit;
-                               styles.push(widthStyle);
+                               addStyleBead(widthStyle);
                        }
                        widthStyle.inlineStart = value;
                }
@@ -554,7 +553,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                widthStyle = new BorderWidth();
                                widthStyle.unit = unit;
-                               styles.push(widthStyle);
+                               addStyleBead(widthStyle);
                        }
                        widthStyle.inlineEnd = value;
                }
@@ -571,7 +570,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                radiusStyle = new BorderRadius();
                                radiusStyle.unit = unit;
-                               styles.push(radiusStyle);
+                               addStyleBead(radiusStyle);
                        }
                        radiusStyle.radius = value;
                        _radius = value;
@@ -586,7 +585,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                radiusStyle = new BorderRadius();
                                radiusStyle.unit = unit;
-                               styles.push(radiusStyle);
+                               addStyleBead(radiusStyle);
                        }
                        radiusStyle.topLeft = value;
                }
@@ -600,7 +599,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                radiusStyle = new BorderRadius();
                                radiusStyle.unit = unit;
-                               styles.push(radiusStyle);
+                               addStyleBead(radiusStyle);
                        }
                        radiusStyle.topRight = value;
                }
@@ -614,7 +613,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                radiusStyle = new BorderRadius();
                                radiusStyle.unit = unit;
-                               styles.push(radiusStyle);
+                               addStyleBead(radiusStyle);
                        }
                        radiusStyle.bottomLeft = value;
                }
@@ -628,7 +627,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                radiusStyle = new BorderRadius();
                                radiusStyle.unit = unit;
-                               styles.push(radiusStyle);
+                               addStyleBead(radiusStyle);
                        }
                        radiusStyle.bottomRight = value;
                }
@@ -642,7 +641,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                radiusStyle = new BorderRadius();
                                radiusStyle.unit = unit;
-                               styles.push(radiusStyle);
+                               addStyleBead(radiusStyle);
                        }
                        radiusStyle.startStart = value;
                }
@@ -656,7 +655,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                radiusStyle = new BorderRadius();
                                radiusStyle.unit = unit;
-                               styles.push(radiusStyle);
+                               addStyleBead(radiusStyle);
                        }
                        radiusStyle.startEnd = value;
                }
@@ -670,7 +669,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                radiusStyle = new BorderRadius();
                                radiusStyle.unit = unit;
-                               styles.push(radiusStyle);
+                               addStyleBead(radiusStyle);
                        }
                        radiusStyle.endStart = value;
                }
@@ -684,7 +683,7 @@ package org.apache.royale.style.stylebeads.border
                        {
                                radiusStyle = new BorderRadius();
                                radiusStyle.unit = unit;
-                               styles.push(radiusStyle);
+                               addStyleBead(radiusStyle);
                        }
                        radiusStyle.endEnd = value;
                }
diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/border/BorderRadius.as
 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/border/BorderRadius.as
index ad5dd08b4a..085ec0efa5 100644
--- 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/border/BorderRadius.as
+++ 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/border/BorderRadius.as
@@ -29,7 +29,6 @@ package org.apache.royale.style.stylebeads.border
                public function BorderRadius(value:* = null, unit:String = "px")
                {
                        super();
-                       styles = [];
                        this.unit = unit;
                        //because of @royalesuppressexport, the following did 
not work in release/minified build from within this constructor when using the 
radius setter directly:
                        //if (value) radius = value;
@@ -49,7 +48,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!rStyle)
                        {
                                rStyle = new Radius();
-                               styles.push(rStyle);
+                               addStyleBead(rStyle);
                        }
                        _radius = value;
                        rStyle.value = value;
@@ -66,7 +65,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!tlStyle)
                        {
                                tlStyle = new TopLeft();
-                               styles.push(tlStyle);
+                               addStyleBead(tlStyle);
                        }
                        _topLeft = value;
                        tlStyle.value = value;
@@ -82,7 +81,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!trStyle)
                        {
                                trStyle = new TopRight();
-                               styles.push(trStyle);
+                               addStyleBead(trStyle);
                        }
                        _topRight = value;
                        trStyle.value = value;
@@ -98,7 +97,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!blStyle)
                        {
                                blStyle = new BottomLeft();
-                               styles.push(blStyle);
+                               addStyleBead(blStyle);
                        }
                        _bottomLeft = value;
                        blStyle.value = value;
@@ -114,7 +113,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!brStyle)
                        {
                                brStyle = new BottomRight();
-                               styles.push(brStyle);
+                               addStyleBead(brStyle);
                        }
                        _bottomRight = value;
                        brStyle.value = value;
@@ -130,7 +129,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!ssStyle)
                        {
                                ssStyle = new StartStart();
-                               styles.push(ssStyle);
+                               addStyleBead(ssStyle);
                        }
                        _startStart = value;
                        ssStyle.value = value;
@@ -146,7 +145,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!seStyle)
                        {
                                seStyle = new StartEnd();
-                               styles.push(seStyle);
+                               addStyleBead(seStyle);
                        }
                        _startEnd = value;
                        seStyle.value = value;
@@ -162,7 +161,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!esStyle)
                        {
                                esStyle = new EndStart();
-                               styles.push(esStyle);
+                               addStyleBead(esStyle);
                        }
                        _endStart = value;
                        esStyle.value = value;
@@ -178,7 +177,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!eeStyle)
                        {
                                eeStyle = new EndEnd();
-                               styles.push(eeStyle);
+                               addStyleBead(eeStyle);
                        }
                        _endEnd = value;
                        eeStyle.value = value;
diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/border/BorderWidth.as
 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/border/BorderWidth.as
index a83c2a74c0..a2754cd4db 100644
--- 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/border/BorderWidth.as
+++ 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/border/BorderWidth.as
@@ -29,7 +29,6 @@ package org.apache.royale.style.stylebeads.border
                public function BorderWidth(value:* = null, unit:String = "px")
                {
                        super();
-                       styles = [];
                        this.unit = unit;
                        if(value)
                                this.width = value;
@@ -46,7 +45,7 @@ package org.apache.royale.style.stylebeads.border
                         if(!widthStyle)
                         {
                                 widthStyle = new Width();
-                                styles.push(widthStyle);
+                                addStyleBead(widthStyle);
                         }
                         widthStyle.value = value;
                        _width = value;
@@ -63,7 +62,7 @@ package org.apache.royale.style.stylebeads.border
                         if(!topStyle)
                         {
                                 topStyle = new Top();
-                                styles.push(topStyle);
+                                addStyleBead(topStyle);
                         }
                         topStyle.value = value;
                        _top = value;
@@ -80,7 +79,7 @@ package org.apache.royale.style.stylebeads.border
                         if(!leftStyle)
                         {
                                 leftStyle = new Left();
-                                styles.push(leftStyle);
+                                addStyleBead(leftStyle);
                         }
                         leftStyle.value = value;
                        _left = value;
@@ -97,7 +96,7 @@ package org.apache.royale.style.stylebeads.border
                         if(!rightStyle)
                         {
                                 rightStyle = new Right();
-                                styles.push(rightStyle);
+                                addStyleBead(rightStyle);
                         }
                         rightStyle.value = value;
                        _right = value;
@@ -114,7 +113,7 @@ package org.apache.royale.style.stylebeads.border
                         if(!bottomStyle)
                         {
                                 bottomStyle = new Bottom();
-                                styles.push(bottomStyle);
+                                addStyleBead(bottomStyle);
                         }
                         bottomStyle.value = value;
                        _bottom = value;
@@ -131,7 +130,7 @@ package org.apache.royale.style.stylebeads.border
                         if(!blockStyle)
                         {
                                 blockStyle = new Block();
-                                styles.push(blockStyle);
+                                addStyleBead(blockStyle);
                         }
                         blockStyle.value = value;
                        _block = value;
@@ -148,7 +147,7 @@ package org.apache.royale.style.stylebeads.border
                         if(!blockEndStyle)
                         {
                                 blockEndStyle = new BlockEnd();
-                                styles.push(blockEndStyle);
+                                addStyleBead(blockEndStyle);
                         }
                         blockEndStyle.value = value;
                        _blockEnd = value;
@@ -165,7 +164,7 @@ package org.apache.royale.style.stylebeads.border
                         if(!blockStartStyle)
                         {
                                 blockStartStyle = new BlockStart();
-                                styles.push(blockStartStyle);
+                                addStyleBead(blockStartStyle);
                         }
                         blockStartStyle.value = value;
                        _blockStart = value;
@@ -182,7 +181,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!inlineStyle)
                         {
                                 inlineStyle = new Inline();
-                                styles.push(inlineStyle);
+                                addStyleBead(inlineStyle);
                         }
                         inlineStyle.value = value;
                        _inline = value;
@@ -199,7 +198,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!inlineEndStyle)
                         {
                                 inlineEndStyle = new InlineEnd();
-                                styles.push(inlineEndStyle);
+                                addStyleBead(inlineEndStyle);
                         }
                         inlineEndStyle.value = value;
                        _inlineEnd = value;
@@ -216,7 +215,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!inlineStartStyle)
                         {
                                 inlineStartStyle = new InlineStart();
-                                styles.push(inlineStartStyle);
+                                addStyleBead(inlineStartStyle);
                         }
                         inlineStartStyle.value = value;
                        _inlineStart = value;
diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/border/Outline.as
 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/border/Outline.as
index 7f93f0cba6..b2e22da49d 100644
--- 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/border/Outline.as
+++ 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/border/Outline.as
@@ -28,7 +28,6 @@ package org.apache.royale.style.stylebeads.border
                public function Outline(width:*=null, style:*=null, 
color:*=null, offset:*=null)
                {
                        super();
-                       styles = [];
                        if (width != null)
                                this.width = width;
                        if (style != null)
@@ -50,7 +49,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!colorStyle)
                        {
                                colorStyle = new BorderColor("outline", 
"outline-color");
-                               styles.push(colorStyle);
+                               addStyleBead(colorStyle);
                        }
                        colorStyle.value = value;
                        _color = value;
@@ -66,7 +65,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!offsetStyle)
                        {
                                offsetStyle = new Offset();
-                               styles.push(offsetStyle);
+                               addStyleBead(offsetStyle);
                        }
                        offsetStyle.value = value;
                        _offset = value;
@@ -82,7 +81,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!styleStyle)
                        {
                                styleStyle = new Style();
-                               styles.push(styleStyle);
+                               addStyleBead(styleStyle);
                        }
                        styleStyle.value = value;
                        _style = value;
@@ -98,7 +97,7 @@ package org.apache.royale.style.stylebeads.border
                        if(!widthStyle)
                        {
                                widthStyle = new Width();
-                               styles.push(widthStyle);
+                               addStyleBead(widthStyle);
                        }
                        widthStyle.value = value;
                        _width = value;
diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/spacing/Margin.as
 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/spacing/Margin.as
index e8de4e0029..c7945587bd 100644
--- 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/spacing/Margin.as
+++ 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/spacing/Margin.as
@@ -27,7 +27,6 @@ package org.apache.royale.style.stylebeads.spacing
                public function Margin(value:* = null, unit:String = "px")
                {
                        super();
-                       styles = [];
                        this.unit = unit;
                        if(value != null)
                                this.margin = value;
@@ -63,7 +62,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!marginStyle)
                        {
                                marginStyle = new Marg();
-                               styles.push(marginStyle);
+                               addStyleBead(marginStyle);
                        }
                        marginStyle.value = value;
                        _top = value;
@@ -130,7 +129,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!topStyle)
                        {
                                topStyle = new MarginTop();
-                               styles.push(topStyle);
+                               addStyleBead(topStyle);
                        }
                        topStyle.value = value;
                        _top = value;
@@ -147,7 +146,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!rightStyle)
                        {
                                rightStyle = new MarginRight();
-                               styles.push(rightStyle);
+                               addStyleBead(rightStyle);
                        }
                        rightStyle.value = value;
                        _right = value;
@@ -164,7 +163,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!bottomStyle)
                        {
                                bottomStyle = new MarginBottom();
-                               styles.push(bottomStyle);
+                               addStyleBead(bottomStyle);
                        }
                        bottomStyle.value = value;
                        _bottom = value;
@@ -181,7 +180,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!leftStyle)
                        {
                                leftStyle = new MarginLeft();
-                               styles.push(leftStyle);
+                               addStyleBead(leftStyle);
                        }
                        leftStyle.value = value;
                        _left = value;
@@ -198,7 +197,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!blockStyle)
                        {
                                blockStyle = new MarginBlock();
-                               styles.push(blockStyle);
+                               addStyleBead(blockStyle);
                        }
                        blockStyle.value = value;
                        _block = value;
@@ -215,7 +214,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!blockStartStyle)
                        {
                                blockStartStyle = new MarginBlockStart();
-                               styles.push(blockStartStyle);
+                               addStyleBead(blockStartStyle);
                        }
                        blockStartStyle.value = value;
                        _blockStart = value;
@@ -232,7 +231,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!blockEndStyle)
                        {
                                blockEndStyle = new MarginBlockEnd();
-                               styles.push(blockEndStyle);
+                               addStyleBead(blockEndStyle);
                        }
                        blockEndStyle.value = value;
                        _blockEnd = value;
@@ -249,7 +248,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!inlineStyle)
                        {
                                inlineStyle = new MarginInline();
-                               styles.push(inlineStyle);
+                               addStyleBead(inlineStyle);
                        }
                        inlineStyle.value = value;
                        _inline = value;
@@ -266,7 +265,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!inlineStartStyle)
                        {
                                inlineStartStyle = new MarginInlineStart();
-                               styles.push(inlineStartStyle);
+                               addStyleBead(inlineStartStyle);
                        }
                        inlineStartStyle.value = value;
                        _inlineStart = value;
@@ -283,7 +282,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!inlineEndStyle)
                        {
                                inlineEndStyle = new MarginInlineEnd();
-                               styles.push(inlineEndStyle);
+                               addStyleBead(inlineEndStyle);
                        }
                        inlineEndStyle.value = value;
                        _inlineEnd = value;
diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/spacing/Padding.as
 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/spacing/Padding.as
index 71f9bc57f2..bb4848dbfc 100644
--- 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/spacing/Padding.as
+++ 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/spacing/Padding.as
@@ -26,7 +26,6 @@ package org.apache.royale.style.stylebeads.spacing
                public function Padding(value:* = null, unit:String = "px")
                {
                        super();
-                       styles = [];
                        this.unit = unit;
                        if(value != null)
                                this.padding = value;
@@ -61,7 +60,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!paddingStyle)
                        {
                                paddingStyle = new Pad();
-                               styles.push(paddingStyle);
+                               addStyleBead(paddingStyle);
                        }
                        paddingStyle.value = value;
                        _top = value;
@@ -128,7 +127,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!topStyle)
                        {
                                topStyle = new PaddingTop();
-                               styles.push(topStyle);
+                               addStyleBead(topStyle);
                        }
                        topStyle.value = value;
                        _top = value;
@@ -145,7 +144,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!rightStyle)
                        {
                                rightStyle = new PaddingRight();
-                               styles.push(rightStyle);
+                               addStyleBead(rightStyle);
                        }
                        rightStyle.value = value;
                        _right = value;
@@ -162,7 +161,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!bottomStyle)
                        {
                                bottomStyle = new PaddingBottom();
-                               styles.push(bottomStyle);
+                               addStyleBead(bottomStyle);
                        }
                        bottomStyle.value = value;
                        _bottom = value;
@@ -179,7 +178,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!leftStyle)
                        {
                                leftStyle = new PaddingLeft();
-                               styles.push(leftStyle);
+                               addStyleBead(leftStyle);
                        }
                        leftStyle.value = value;
                        _left = value;
@@ -196,7 +195,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!blockStyle)
                        {
                                blockStyle = new PaddingBlock();
-                               styles.push(blockStyle);
+                               addStyleBead(blockStyle);
                        }
                        blockStyle.value = value;
                        _block = value;
@@ -213,7 +212,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!blockStartStyle)
                        {
                                blockStartStyle = new PaddingBlockStart();
-                               styles.push(blockStartStyle);
+                               addStyleBead(blockStartStyle);
                        }
                        blockStartStyle.value = value;
                        _blockStart = value;
@@ -230,7 +229,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!blockEndStyle)
                        {
                                blockEndStyle = new PaddingBlockEnd();
-                               styles.push(blockEndStyle);
+                               addStyleBead(blockEndStyle);
                        }
                        blockEndStyle.value = value;
                        _blockEnd = value;
@@ -247,7 +246,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!inlineStyle)
                        {
                                inlineStyle = new PaddingInline();
-                               styles.push(inlineStyle);
+                               addStyleBead(inlineStyle);
                        }
                        inlineStyle.value = value;
                        _inline = value;
@@ -264,7 +263,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!inlineStartStyle)
                        {
                                inlineStartStyle = new PaddingInlineStart();
-                               styles.push(inlineStartStyle);
+                               addStyleBead(inlineStartStyle);
                        }
                        inlineStartStyle.value = value;
                        _inlineStart = value;
@@ -281,7 +280,7 @@ package org.apache.royale.style.stylebeads.spacing
                        if(!inlineEndStyle)
                        {
                                inlineEndStyle = new PaddingInlineEnd();
-                               styles.push(inlineEndStyle);
+                               addStyleBead(inlineEndStyle);
                        }
                        inlineEndStyle.value = value;
                        _inlineEnd = value;

Reply via email to