From commits-return-3521-archive-asf-public=cust-asf.ponee.io@royale.apache.org Mon Apr 9 18:22:46 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A1D3218067B for ; Mon, 9 Apr 2018 18:22:45 +0200 (CEST) Received: (qmail 61011 invoked by uid 500); 9 Apr 2018 16:22:44 -0000 Mailing-List: contact commits-help@royale.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@royale.apache.org Delivered-To: mailing list commits@royale.apache.org Received: (qmail 60970 invoked by uid 99); 9 Apr 2018 16:22:44 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2018 16:22:44 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 3A72F80A23; Mon, 9 Apr 2018 16:22:44 +0000 (UTC) Date: Mon, 09 Apr 2018 16:22:45 +0000 To: "commits@royale.apache.org" Subject: [royale-asjs] 01/02: measurement is not PAYG and should be its own subsystem MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: aharui@apache.org In-Reply-To: <152329096415.7191.6191913492747878978@gitbox.apache.org> References: <152329096415.7191.6191913492747878978@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: royale-asjs X-Git-Refname: refs/heads/feature/MXRoyale X-Git-Reftype: branch X-Git-Rev: 220e57c9280d4fce3e168c31b61b35c591e598aa X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20180409162244.3A72F80A23@gitbox.apache.org> 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 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 aharui@apache.org.