flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Rovira <carlosrov...@apache.org>
Subject Re: [1/2] git commit: [flex-asjs] [refs/heads/develop] - Remove css prefixing whitespaces in UIBase when value is empty
Date Mon, 06 Feb 2017 18:58:52 GMT
Hi Alex,

the problem is that many times we end modifying className we end with empty
spacing prepending the className (for example: class=" some class other",
so if you want to make some check to avoid to trim always is ok for me.

The effects of this could be checked quickly in MDLExample html output. If
you see all class selectors are starting with white spaces, something would
be wrong

Thanks!



2017-02-06 18:36 GMT+01:00 Alex Harui <aharui@adobe.com>:

> 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, "carlosrovira@apache.org" <carlosrovira@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 <carlosrovira@apache.org>
> >Authored: Tue Jan 3 19:38:48 2017 +0100
> >Committer: Carlos Rovira <carlosrovira@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"));
> >
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira

Mime
View raw message