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 4764911104 bad merge
4764911104 is described below

commit 4764911104d0f778c778d694e85fb1be843cb550
Author: Harbs <[email protected]>
AuthorDate: Fri Mar 13 13:30:16 2026 +0200

    bad merge
---
 .../Style/src/main/resources/style-manifest.xml    |   2 +
 .../projects/Style/src/main/royale/StyleClasses.as |   2 +-
 .../royale/org/apache/royale/style/IStyleUIBase.as |   1 +
 .../main/royale/org/apache/royale/style/Icon.as    | 103 ++++++++++++---------
 .../royale/org/apache/royale/style/StyleSkin.as    |   2 +-
 .../royale/org/apache/royale/style/StyleUIBase.as  |  30 +++++-
 .../royale/style/stylebeads/interact/UserSelect.as |   9 ++
 .../royale/style/stylebeads/states/HoverState.as   |   3 -
 8 files changed, 100 insertions(+), 52 deletions(-)

diff --git a/frameworks/projects/Style/src/main/resources/style-manifest.xml 
b/frameworks/projects/Style/src/main/resources/style-manifest.xml
index 41855d9a00..fa83e9da8e 100644
--- a/frameworks/projects/Style/src/main/resources/style-manifest.xml
+++ b/frameworks/projects/Style/src/main/resources/style-manifest.xml
@@ -22,6 +22,7 @@
 <componentPackage>
   <component id="Application" class="org.apache.royale.style.Application"/>
   <component id="View" class="org.apache.royale.style.View"/>
+  <component id="CheckBox" class="org.apache.royale.style.CheckBox"/>
   <component id="StyleSkin" class="org.apache.royale.style.StyleSkin"/>
   <component id="Icon" class="org.apache.royale.style.Icon"/>
   <component id="FlexLayout" class="org.apache.royale.style.beads.FlexLayout"/>
@@ -152,6 +153,7 @@
   <component id="Stroke" 
class="org.apache.royale.style.stylebeads.svg.Stroke"/>
   <component id="StrokeWidth" 
class="org.apache.royale.style.stylebeads.svg.StrokeWidth"/>
   <component id="ForcedColorAdjust" 
class="org.apache.royale.style.stylebeads.access.ForcedColorAdjust"/>
+  <component id="ScreenReader" 
class="org.apache.royale.style.stylebeads.utils.ScreenReader"/>
   <component id="CompositeStyle" 
class="org.apache.royale.style.stylebeads.CompositeStyle"/>
   <component id="MixBlendMode" 
class="org.apache.royale.style.stylebeads.effects.MixBlendMode"/>
   <component id="RingEffect" 
class="org.apache.royale.style.stylebeads.effects.RingEffect"/>
diff --git a/frameworks/projects/Style/src/main/royale/StyleClasses.as 
b/frameworks/projects/Style/src/main/royale/StyleClasses.as
index 30b5087e06..351753be36 100644
--- a/frameworks/projects/Style/src/main/royale/StyleClasses.as
+++ b/frameworks/projects/Style/src/main/royale/StyleClasses.as
@@ -57,7 +57,7 @@ package
                import org.apache.royale.style.util.ThemeManager; ThemeManager;
                import org.apache.royale.style.util.ContentAlign; ContentAlign;
                import org.apache.royale.style.support.UIItemRendererBase; 
UIItemRendererBase;
-
+               import org.apache.royale.style.const.Theme; Theme;
        }
 
 }
diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/IStyleUIBase.as
 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/IStyleUIBase.as
index 7e35bd1ebd..d75ba8176f 100644
--- 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/IStyleUIBase.as
+++ 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/IStyleUIBase.as
@@ -34,5 +34,6 @@ package org.apache.royale.style
                function toggleClass(classNameVal:String,add:Boolean):void;
                function addStyleBead(bead:IStyleBead):void;
                function get theme():String;
+               function get skin():IStyleSkin;
        }
 }
\ No newline at end of file
diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/Icon.as 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/Icon.as
index d6388c27a3..c5754eb895 100644
--- a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/Icon.as
+++ b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/Icon.as
@@ -24,34 +24,37 @@ package org.apache.royale.style
        }
        import org.apache.royale.debugging.assert;
        import org.apache.royale.utils.async.HttpRequestTask;
+
        /**
         * The Icon class represents an SVG icon that can be used in the UI.
         * It can be created with a name that corresponds to registered SVG 
markup in XML
         * or with a path to an SVG file.
-        * 
+        *
         * The SVG markup is parsed and rendered as an icon in the UI.
-        * 
+        *
         * When using XML markup, the markup must be registered before the Icon 
object is added to its parent.
-        * 
+        *
         */
-       public class Icon extends StyleUIBase
+       public class Icon extends StyleUIBase implements IIcon
        {
                public function Icon(name:String = null)
                {
                        super();
                        typeNames = "Icon";
-                       if(name)
+                       if (name)
                        {
                                iconName = name;
                        }
                }
+
                /**
                 * The name of the icon to use.
-                * 
+                *
                 * This name should correspond to registered SVG markup in XML.
                 */
                public var iconName:String;
                private var _iconPath:String;
+
                /**
                 * The path to an SVG file that contains the markup for the 
icon.
                 */
@@ -69,26 +72,20 @@ package org.apache.royale.style
                        super.addedToParent();
                        COMPILE::JS
                        {
-                               if(iconElement)
-                               {
+                               if (_iconElement)
                                        return;
-                               }
+
                                assert(_registeredIcons.has(iconName) || 
iconPath, "Icon name or path must be provided");
                                var markup:XML;
-                               if(_registeredIcons.has(iconName))
-                               {
-                                       markup = _registeredIcons.get(iconName);
-                               }
-                               else if(_registeredIcons.has(iconPath))
-                               {
-                                       markup = _registeredIcons.get(iconPath);
-                               }
-                               if(!markup)
-                               {
-                               }
-                               if(markup)
+                               if (_registeredIcons.has(iconName))
+                                       markup = _registeredIcons.get 
(iconName);
+
+                               else if (_registeredIcons.has(iconPath))
+                                       markup = _registeredIcons.get 
(iconPath);
+
+                               if (markup)
                                        parseMarkup(markup);
-                               else if(iconPath)
+                               else if (iconPath)
                                {
                                        return loadMarkup();
                                }
@@ -98,46 +95,53 @@ package org.apache.royale.style
                {
                        assert(iconPath, "Icon path must be provided");
                        new 
HttpRequestTask(iconPath).exec(function(task:HttpRequestTask):void
-                       {
-                               if(task.completed)
                                {
-                                       parseMarkup(new XML(task.resultString));
-                               }
-                               //TODO do we want some kind of error handling 
here?
-                       });
+                                       if (task.completed)
+                                       {
+                                               parseMarkup(new 
XML(task.resultString));
+                                       }
+                                       // TODO do we want some kind of error 
handling here?
+                               });
                }
                COMPILE::JS
-               private var iconElement:SVGElement;
+               private var _iconElement:SVGElement;
+
+               COMPILE::JS
+               public function get iconElement():SVGElement
+               {
+                       return _iconElement;
+               }
                private function parseMarkup(markup:XML):void
                {
                        COMPILE::JS
                        {
-                               if(iconElement)
+                               if (_iconElement)
                                {
                                        return;
                                }
-                               iconElement = createSVG("svg");
-                               walkMarkup(markup, iconElement);
+                               _iconElement = createSVG("svg");
+                               walkMarkup(markup, _iconElement);
+                               element.appendChild(_iconElement);
                        }
                }
                COMPILE::JS
                private function walkMarkup(parent:XML, 
parentElement:SVGElement):void
                {
                        var attrs:Array = parent.getAttributeArray();
-                       for each(var attr:XML in attrs)
+                       for each (var attr:XML in attrs)
                        {
                                var attName:String = attr.localName();
-                               if(!getAttributes()[attName])
+                               if (!getAttributes()[attName])
                                {
                                        continue;
                                }
                                parentElement.setAttribute(attName, 
attr.getValue());
                        }
                        var children:Array = parent.getChildrenArray();
-                       for each(var child:XML in children)
+                       for each (var child:XML in children)
                        {
                                var childName:String = child.localName();
-                               if(!getElements()[childName])
+                               if (!getElements()[childName])
                                {
                                        assert(false, "Unsupported SVG element: 
" + childName);
                                        continue;
@@ -149,10 +153,11 @@ package org.apache.royale.style
                }
                COMPILE::JS
                private static var _registeredIcons:Map = new Map();
+
                /**
                 * Registers an icon with a name and SVG markup.
                 * The SVG markup should be a an XML object that represents the 
SVG path data for the icon.
-                * 
+                *
                 * Use this for icons which should be loaded programmatically.
                 */
                public static function registerIcon(name:String, 
svgMarkup:XML):void
@@ -162,29 +167,37 @@ package org.apache.royale.style
 
                        COMPILE::JS
                        {
-                               _registeredIcons.set(name, svgMarkup);
+                               _registeredIcons.set (name, svgMarkup);
+                       }
+               }
+               public static function isRegistered(name:String):Boolean
+               {
+                       COMPILE::JS
+                       {
+                               return _registeredIcons.has(name);
                        }
+                       return false;
                }
                private static function getAttributes():Object
                {
-                       if(!_attributes)
+                       if (!_attributes)
                        {
                                _attributes = {
-                                       
"width":1,"height":1,"viewBox":1,"fill":1,"stroke":1,"stroke-width":1,"stroke-linecap":1,"stroke-linejoin":1,"class":1,"focusable":1,"style":1,"d":1,"fill-rule":1,"clip-rule":1,"cx":1,"cy":1,"r":1,"x1":1,"y1":1,"x2":1,"y2":1,"points":1,"x":1,"y":1,"rx":1,"ry":1,"transform":1,"opacity":1,"role":1,"aria-hidden":1,"aria-label":1
-                               };
+                                               "width": 1, "height": 1, 
"viewBox": 1, "fill": 1, "stroke": 1, "stroke-width": 1, "stroke-linecap": 1, 
"stroke-linejoin": 1, "class": 1, "focusable": 1, "style": 1, "d": 1, 
"fill-rule": 1, "clip-rule": 1, "cx": 1, "cy": 1, "r": 1, "x1": 1, "y1": 1, 
"x2": 1, "y2": 1, "points": 1, "x": 1, "y": 1, "rx": 1, "ry": 1, "transform": 
1, "opacity": 1, "role": 1, "aria-hidden": 1, "aria-label": 1
+                                       };
                        }
                        return _attributes;
                }
-               // TODO: Optimize the list of attrbutes and elements to only 
those that are needed for icons. 
+               // TODO: Optimize the list of attrbutes and elements to only 
those that are needed for icons.
                // There is a very large list of all SVG attributes and 
elements.
                private static var _attributes:Object;
                private static function getElements():Object
                {
-                       if(!_elements)
+                       if (!_elements)
                        {
                                _elements = {
-                                       
"svg":1,"path":1,"g":1,"rect":1,"circle":1,"line":1,"polyline":1,"polygon":1,"defs":1,"clipPath":1,"title":1,"mask":1,"use":1,"symbol":1
-                               };
+                                               "svg": 1, "path": 1, "g": 1, 
"rect": 1, "circle": 1, "line": 1, "polyline": 1, "polygon": 1, "defs": 1, 
"clipPath": 1, "title": 1, "mask": 1, "use": 1, "symbol": 1
+                                       };
                        }
                        return _elements;
                }
diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/StyleSkin.as
 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/StyleSkin.as
index 035edb0fb8..155ed902f8 100644
--- 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/StyleSkin.as
+++ 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/StyleSkin.as
@@ -54,7 +54,7 @@ package org.apache.royale.style
                                styleUIBase.addStyleBead(styleBead);
                        }
                }
-               private var _styles:Array;
+               protected var _styles:Array;
 
                /**
                 *  The array of style beads that this StyleSkin will apply to 
the component.
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 79581d078f..8e668ed815 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
@@ -46,7 +46,7 @@ package org.apache.royale.style
         *  @playerversion AIR 2.6
         *  @productversion Royale 0.9.13
         */
-       public class StyleUIBase extends UIBase
+       public class StyleUIBase extends UIBase implements IStyleUIBase
        {
                /**
                 *  Constructor.
@@ -72,6 +72,24 @@ package org.apache.royale.style
                        return ThemeManager.instance.current;
                }
 
+               private var _size:String = "md";
+               /**
+                * The size is set as "t-shirt sizing" using a string value.
+                * The actual styles for each size value are determined by the 
skin and style beads used.
+                * 
+                * Most components have four possible sizes, but specific 
components may choose to support a different set of sizes as needed.
+                */
+               [Inspectable(category="General", enumeration="sm,md,lg,xl", 
defaultValue="md")]
+               public function get size():String
+               {
+                       return _size;
+               }
+
+               public function set size(value:String):void
+               {
+                       _size = value;
+               }
+
                /**
                 *  
                 *  @langversion 3.0
@@ -113,7 +131,7 @@ package org.apache.royale.style
                }
                COMPILE::JS
                private var styleTypes:Map;
-               private var _stylesLoaded:Boolean;
+               protected var _stylesLoaded:Boolean;
                override protected function loadBeads():void
                {
                        super.loadBeads();
@@ -370,5 +388,13 @@ package org.apache.royale.style
                {
                        return addElementToWrapper(this, getTag());
                }
+               COMPILE::JS
+               protected function newElement(tag:String,className:String = 
null):HTMLElement{
+                       var element:HTMLElement = document.createElement(tag) 
as HTMLElement;
+                       if(className){
+                               element.className = className;
+                       }
+                       return element;
+               }
        }
 }
\ No newline at end of file
diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/interact/UserSelect.as
 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/interact/UserSelect.as
index a71443e555..a46785e272 100644
--- 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/interact/UserSelect.as
+++ 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/interact/UserSelect.as
@@ -32,5 +32,14 @@ package org.apache.royale.style.stylebeads.interact
                        assert(['auto','none','text','all'].indexOf(value) != 
-1, "Invalid value for user-select: " + value);
                        calculatedRuleValue = calculatedSelector = _value = 
value;
                }
+               override public function getRule():String
+               {
+                       var rule:String = super.getRule();
+                       if(!rule)
+                               return "";
+                       // We need the webkit prefix for Safari.
+                       return "-webkit-" + rule + rule;
+               }
+
        }
 }
\ No newline at end of file
diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/states/HoverState.as
 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/states/HoverState.as
index 156e6bcead..8a3309dd73 100644
--- 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/states/HoverState.as
+++ 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/states/HoverState.as
@@ -20,9 +20,6 @@ package org.apache.royale.style.stylebeads.states
 {
        public class HoverState extends LeafDecorator
        {
-               /**
-                * TODO wrap in a media query for hover capability
-                */
                public function HoverState()
                {
                        super();

Reply via email to