I just noticed this.  What does it mean "value is empty"?  Trim() can be
really expensive, so should this code just test for value is empty and do
something else?

Thanks,
-Alex

On 1/3/17, 10:39 AM, "carlosrov...@apache.org" <carlosrov...@apache.org>
wrote:

>Repository: flex-asjs
>Updated Branches:
>  refs/heads/develop 354c8dc08 -> b1f2493e3
>
>
>Remove css prefixing whitespaces in UIBase when value is empty
>
>
>Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
>Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/632b4937
>Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/632b4937
>Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/632b4937
>
>Branch: refs/heads/develop
>Commit: 632b4937da0b8253dc32706eb862a426ad7babd9
>Parents: ffd738d
>Author: Carlos Rovira <carlosrov...@apache.org>
>Authored: Tue Jan 3 19:38:48 2017 +0100
>Committer: Carlos Rovira <carlosrov...@apache.org>
>Committed: Tue Jan 3 19:38:48 2017 +0100
>
>----------------------------------------------------------------------
> .../projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as    | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>----------------------------------------------------------------------
>
>
>http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/632b4937/frameworks/
>projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as
>----------------------------------------------------------------------
>diff --git 
>a/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as
>b/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as
>index 1c825d6..b075e72 100644
>--- 
>a/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as
>+++ 
>b/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as
>@@ -33,6 +33,7 @@ package org.apache.flex.core
>           import flash.display.InteractiveObject;
>           import org.apache.flex.events.utils.MouseEventConverter;
>       }
>+    import org.apache.flex.utils.StringUtil;
>       
>       /**
>        *  Set a different class for click events so that
>@@ -950,7 +951,7 @@ package org.apache.flex.core
>                       {
>                 COMPILE::JS
>                 {
>-                    setClassName(typeNames ? value + ' ' + typeNames :
>value);           
>+                    setClassName(typeNames ? StringUtil.trim(value + ' '
>+ typeNames) : value);
>                 }
>                               _className = value;
>                               dispatchEvent(new Event("classNameChanged"));
>

Reply via email to