Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9A761200BDE for ; Thu, 10 Nov 2016 10:23:18 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9977C160B01; Thu, 10 Nov 2016 09:23:18 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8327F160B17 for ; Thu, 10 Nov 2016 10:23:17 +0100 (CET) Received: (qmail 99906 invoked by uid 500); 10 Nov 2016 09:23:11 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 97621 invoked by uid 99); 10 Nov 2016 09:23:09 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Nov 2016 09:23:09 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8D64FEEE25; Thu, 10 Nov 2016 09:23:09 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: carlosrovira@apache.org To: commits@flex.apache.org Date: Thu, 10 Nov 2016 09:23:36 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [29/53] git commit: [flex-asjs] [refs/heads/feature/mdl] - Fix scrolling runtime error on combobox. archived-at: Thu, 10 Nov 2016 09:23:18 -0000 Fix scrolling runtime error on combobox. Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/2a06fe6e Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/2a06fe6e Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/2a06fe6e Branch: refs/heads/feature/mdl Commit: 2a06fe6ef55a9749a609bc449b9fb53c1b9414b3 Parents: ec60f6a Author: yishayw Authored: Mon Nov 7 13:02:11 2016 +0200 Committer: yishayw Committed: Mon Nov 7 13:02:11 2016 +0200 ---------------------------------------------------------------------- .../flex/org/apache/flex/core/CSSTextField.as | 19 +++++++++++++------ .../flex/org/apache/flex/utils/PointUtils.as | 5 +++++ .../controllers/ScrollBarMouseControllerBase.as | 6 +++--- .../html/supportClasses/TextFieldItemRenderer.as | 6 ------ 4 files changed, 21 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2a06fe6e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as index 6ec8158..68a8bf3 100644 --- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as +++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as @@ -20,10 +20,11 @@ package org.apache.flex.core { COMPILE::SWF { import flash.display.DisplayObject; - import flash.text.TextField; - import flash.text.TextFieldAutoSize; - import flash.text.TextFormat; - import org.apache.flex.events.Event; + import flash.text.TextField; + import flash.text.TextFieldAutoSize; + import flash.text.TextFormat; + + import org.apache.flex.events.Event; import org.apache.flex.events.EventDispatcher; } @@ -41,7 +42,7 @@ package org.apache.flex.core * @productversion FlexJS 0.0 */ COMPILE::SWF - public class CSSTextField extends TextField + public class CSSTextField extends TextField implements IRenderedObject { /** * Constructor. @@ -157,7 +158,13 @@ package org.apache.flex.core // force styles to be re-calculated this.text = text; } - + + COMPILE::SWF + public function get $displayObject():DisplayObject + { + return this; + } + } COMPILE::JS http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2a06fe6e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as index c00bfa7..8b7b9e2 100644 --- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as +++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as @@ -26,6 +26,7 @@ package org.apache.flex.utils import org.apache.flex.core.IUIBase; import org.apache.flex.geom.Point; + import flash.display.Stage; /** * The PointUtils class is a collection of static functions that convert @@ -103,6 +104,10 @@ package org.apache.flex.utils { COMPILE::SWF { + if (local is Stage) + { + return pt; + } var fpt:flash.geom.Point = DisplayObject(local.$displayObject).localToGlobal(new flash.geom.Point(pt.x,pt.y)); return new org.apache.flex.geom.Point(fpt.x, fpt.y); } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2a06fe6e/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/ScrollBarMouseControllerBase.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/ScrollBarMouseControllerBase.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/ScrollBarMouseControllerBase.as index 8d9d27b..eea9234 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/ScrollBarMouseControllerBase.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/ScrollBarMouseControllerBase.as @@ -23,7 +23,7 @@ package org.apache.flex.html.beads.controllers import org.apache.flex.core.IStrand; import org.apache.flex.events.Event; import org.apache.flex.events.IEventDispatcher; - import org.apache.flex.events.MouseEvent; + import org.apache.flex.events.MouseEvent; import org.apache.flex.html.beads.IScrollBarView; /** @@ -135,7 +135,7 @@ package org.apache.flex.html.beads.controllers * @playerversion AIR 2.6 * @productversion FlexJS 0.0 */ - protected function decrementClickHandler(event:Event):void + protected function decrementClickHandler(event:Object):void { sbModel.value = snap(Math.max(sbModel.minimum, sbModel.value - sbModel.stepSize)); IEventDispatcher(_strand).dispatchEvent(new Event("scroll")); @@ -149,7 +149,7 @@ package org.apache.flex.html.beads.controllers * @playerversion AIR 2.6 * @productversion FlexJS 0.0 */ - protected function incrementClickHandler(event:Event):void + protected function incrementClickHandler(event:Object):void { sbModel.value = snap(Math.min(sbModel.maximum - sbModel.pageSize, sbModel.value + sbModel.stepSize)); IEventDispatcher(_strand).dispatchEvent(new Event("scroll")); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2a06fe6e/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/TextFieldItemRenderer.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/TextFieldItemRenderer.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/TextFieldItemRenderer.as index 1b2bb6f..5965a17 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/TextFieldItemRenderer.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/TextFieldItemRenderer.as @@ -550,12 +550,6 @@ package org.apache.flex.html.supportClasses return null; return IUIBase(parent).topMostEventDispatcher; } - - COMPILE::SWF - public function get $displayObject():DisplayObject - { - return this; - } } }