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

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

commit 220e57c9280d4fce3e168c31b61b35c591e598aa
Author: Alex Harui <aha...@apache.org>
AuthorDate: Mon Apr 9 09:21:56 2018 -0700

    measurement is not PAYG and should be its own subsystem
---
 .../royale/org/apache/royale/core/LayoutBase.as    |  6 ++++-
 .../main/royale/org/apache/royale/core/UIBase.as   | 31 ----------------------
 .../royale/org/apache/royale/core/ILayoutChild.as  | 24 -----------------
 .../org/apache/royale/utils/measureComponent.as    |  5 ++--
 4 files changed, 8 insertions(+), 58 deletions(-)

diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/LayoutBase.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/LayoutBase.as
index 6688e84..d38fedf 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/LayoutBase.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/LayoutBase.as
@@ -312,12 +312,14 @@ package org.apache.royale.core
                        if (isLayoutRunning) return;
                        
                        isLayoutRunning = true;
+            /* Not all components need measurement
                        COMPILE::SWF
                        {
                                host.measuredHeight = host.height;
                                host.measuredWidth = host.width;
                        }
-                       
+                       */
+            
                        var viewBead:ILayoutHost = (host as 
ILayoutParent).getLayoutHost();
                        
                        viewBead.beforeLayout();
@@ -329,6 +331,7 @@ package org.apache.royale.core
                        
                        host.dispatchEvent(new Event("layoutComplete"));
                        
+            /* measurement may not matter for all components
                        COMPILE::SWF
                        {
                                // check sizes to see if layout changed the 
size or not
@@ -341,6 +344,7 @@ package org.apache.royale.core
                                        isLayoutRunning = false;
                                }
                        }
+            */
 
                }
 
diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
index f62e2e1..81f350d 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
@@ -594,37 +594,6 @@ package org.apache.royale.core
                     dispatchEvent(new Event("widthChanged"));
             }
         }
-
-        /**
-         * @private
-         * Used by layout to prevent causing unnecessary reflows when 
measuring.
-         */
-        private var _measuredWidth:Number;
-
-               public function get measuredWidth():Number
-               {
-                       return _measuredWidth;
-               }
-
-               public function set measuredWidth(value:Number):void
-               {
-                       _measuredWidth = value;
-               }
-        /**
-         * @private
-         * Used by layout to prevent causing unnecessary reflows when 
measuring.
-         */
-        private var _measuredHeight:Number;
-
-               public function get measuredHeight():Number
-               {
-                       return _measuredHeight;
-               }
-
-               public function set measuredHeight(value:Number):void
-               {
-                       _measuredHeight = value;
-               }
         
         /**
          *  @copy org.apache.royale.core.ILayoutChild#setWidthAndHeight
diff --git 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ILayoutChild.as
 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ILayoutChild.as
index 8d39cc4..90c001c 100755
--- 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ILayoutChild.as
+++ 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ILayoutChild.as
@@ -83,30 +83,6 @@ package org.apache.royale.core
         function set explicitHeight(value:Number):void;
 
         /**
-         *  The measured width of this component 
-         *  This value can be cached by layouts to prevent reflow caused by 
measuring
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9.3
-         */
-        function get measuredWidth():Number;
-        function set measuredWidth(value:Number):void;
-        
-        /**
-         *  The measured height of this component 
-         *  This value can be cached by layouts to prevent reflow caused by 
measuring
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9.3
-         */
-        function get measuredHeight():Number;
-        function set measuredHeight(value:Number):void;
-        
-        /**
          * Sets the height of the component without
          * setting explicitHeight.
          * 
diff --git 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/measureComponent.as
 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/measureComponent.as
index 3132eec..f29401f 100644
--- 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/measureComponent.as
+++ 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/measureComponent.as
@@ -21,7 +21,8 @@ package org.apache.royale.utils
     import org.apache.royale.core.ILayoutChild
     public function measureComponent(component:ILayoutChild):void
     {
-        component.measuredWidth = component.width;
-        component.measuredHeight = component.height;
+        // this should be replaced by loading a measurement bead.
+        //component.measuredWidth = component.width;
+        //component.measuredHeight = component.height;
     }
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
aha...@apache.org.

Reply via email to