Return-Path: X-Original-To: apmail-flex-commits-archive@www.apache.org Delivered-To: apmail-flex-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 11D1910818 for ; Wed, 16 Apr 2014 21:45:09 +0000 (UTC) Received: (qmail 64778 invoked by uid 500); 16 Apr 2014 21:44:42 -0000 Delivered-To: apmail-flex-commits-archive@flex.apache.org Received: (qmail 64368 invoked by uid 500); 16 Apr 2014 21:44:25 -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 63617 invoked by uid 99); 16 Apr 2014 21:44:08 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Apr 2014 21:44:08 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id DB91F93CBC3; Wed, 16 Apr 2014 21:44:06 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aharui@apache.org To: commits@flex.apache.org Date: Wed, 16 Apr 2014 21:44:49 -0000 Message-Id: In-Reply-To: <6a84ac523292470ea9668f75721ae5bf@git.apache.org> References: <6a84ac523292470ea9668f75721ae5bf@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [46/50] [abbrv] git commit: [flex-sdk] [refs/heads/release4.12.0] - UNDO FIX - FLEX-24502 Mobile optimized skins and item renderers don't show text when mirrored UNDO FIX - FLEX-24502 Mobile optimized skins and item renderers don't show text when mirrored Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/0402da5c Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/0402da5c Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/0402da5c Branch: refs/heads/release4.12.0 Commit: 0402da5ca145725130e9ac2406c877aa93a9d546 Parents: 3cd078e Author: mamsellem Authored: Sat Mar 29 19:38:05 2014 +0100 Committer: mamsellem Committed: Sat Mar 29 19:38:05 2014 +0100 ---------------------------------------------------------------------- .../supportClasses/StyleableTextField.as | 79 +------------------- 1 file changed, 2 insertions(+), 77 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/0402da5c/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as b/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as index 1b74e1d..fd674de 100644 --- a/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as +++ b/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as @@ -49,7 +49,6 @@ import mx.core.FlexGlobals; import mx.core.FlexTextField; import mx.core.IInvalidating; import mx.core.IVisualElement; -import mx.core.LayoutDirection; import mx.core.UIComponent; import mx.core.mx_internal; import mx.events.FlexEvent; @@ -215,66 +214,6 @@ public class StyleableTextField extends FlexTextField invalidateTightTextHeight = true; invalidateTextSizeFlag = true; } - validateTransformMatrix(); - } - - /** - * @private - * True if we've inherited layoutDirection="rtl". - * (implementation largely inspired from UITextField) - */ - private var mirror: Boolean = false; - - //---------------------------------- - // x - //---------------------------------- - - private var _x: Number = 0; - - /** - * @private - */ - override public function set x(value: Number): void - { - _x = value; - super.x = value; - validateTransformMatrix(); - } - - /** - * @private - */ - override public function get x(): Number - { - return (mirror) ? _x : super.x; - } - - /** - * @private - * Update the transform.matrix based on the mirror flag. This method must be - * called when x, width, or layoutDirection changes. - */ - private function validateTransformMatrix(): void - { - if (mirror) { - var mirrorMatrix: Matrix = this.transform.matrix; - // matrix a must be negative - if (mirrorMatrix.a > 0){ - mirrorMatrix.a = -mirrorMatrix.a; - } - mirrorMatrix.tx = _x + width; - transform.matrix = mirrorMatrix; - } - else // layoutDirection changed, mirror=false, reset transform.matrix to its default - { - var defaultMatrix: Matrix = this.transform.matrix; - if (defaultMatrix.a < 0) { - defaultMatrix.a = -defaultMatrix.a; - } - defaultMatrix.tx = _x; - defaultMatrix.ty = y; - transform.matrix = defaultMatrix; - } } /** @@ -1112,25 +1051,11 @@ public class StyleableTextField extends FlexTextField { if (invalidateStyleFlag) { - // compute mirror - const oldMirror: Boolean = mirror; - if (parent is IVisualElement) - mirror = IVisualElement(parent).layoutDirection == LayoutDirection.RTL; - if (mirror || oldMirror) - validateTransformMatrix(); - var align:String = getStyle("textAlign"); if (align == "start") align = TextFormatAlign.LEFT; if (align == "end") align = TextFormatAlign.RIGHT; - // textalign must be mirrored as well - if (mirror){ - if (align == TextFormatAlign.LEFT) - align =TextFormatAlign.RIGHT; - else if (align == TextFormatAlign.RIGHT ) - align = TextFormatAlign.LEFT; - } textFormat.align = align; textFormat.font = getStyle("fontFamily"); textFormat.bold = getStyle("fontWeight") == "bold"; @@ -1188,7 +1113,7 @@ public class StyleableTextField extends FlexTextField invalidateTightTextHeight = true; } } - + /** * @copy mx.core.UIComponent#getStyle() * @@ -2239,7 +2164,7 @@ public class StyleableTextField extends FlexTextField mx_internal var leftMargin:Object; mx_internal var rightMargin:Object; - private static const supportedStyles:Vector. = new ["textAlign", "fontFamily", "fontWeight", "fontStyle", "color", "fontSize" , "textDecoration","textIndent" ,"leading" ,"letterSpacing" ,"layoutDirection"]; + private static var supportedStyles:String = "textAlign fontFamily fontWeight fontStyle color fontSize textDecoration textIndent leading letterSpacing" private var invalidateStyleFlag:Boolean = true;