You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2013/11/15 18:47:50 UTC
git commit: [flex-asjs] [refs/heads/develop] - Make CSS selector
independent from the 'className' property. Instead use the class metadata.
Updated Branches:
refs/heads/develop 2f9d81409 -> 6b413f81f
Make CSS selector independent from the 'className' property. Instead use the class metadata.
Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/6b413f81
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/6b413f81
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/6b413f81
Branch: refs/heads/develop
Commit: 6b413f81f47ca2c4b14abe8b5e5cb1e2b0d9ab94
Parents: 2f9d814
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Nov 15 18:46:48 2013 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Nov 15 18:46:48 2013 +0100
----------------------------------------------------------------------
.../org/apache/flex/core/SimpleCSSValuesImpl.js | 38 +++++++++-----------
1 file changed, 17 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6b413f81/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
index 12c0f56..d09c3a1 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
@@ -55,25 +55,14 @@ org.apache.flex.core.SimpleCSSValuesImpl.prototype.getValue =
var values = this.values;
var value;
var o;
- var className;
+ var cName;
var selectorName;
- if (thisObject.hasOwnProperty('className'))
+ cName = thisObject.FLEXJS_CLASS_INFO.names[0].qName;
+ if (state)
{
- className = thisObject.className;
- if (state)
- {
- selectorName = className + ':' + state;
- o = values['.' + selectorName];
- if (o)
- {
- value = o[valueName];
- if (value !== undefined)
- return value;
- }
- }
-
- o = values['.' + className];
+ selectorName = cName + ':' + state;
+ o = values['.' + selectorName];
if (o)
{
value = o[valueName];
@@ -82,12 +71,19 @@ org.apache.flex.core.SimpleCSSValuesImpl.prototype.getValue =
}
}
- className = thisObject.FLEXJS_CLASS_INFO.names[0].qName;
- while (className != 'Object')
+ o = values['.' + cName];
+ if (o)
+ {
+ value = o[valueName];
+ if (value !== undefined)
+ return value;
+ }
+
+ while (cName != 'Object')
{
if (state)
{
- selectorName = className + ':' + state;
+ selectorName = cName + ':' + state;
o = values[selectorName];
if (o)
{
@@ -97,7 +93,7 @@ org.apache.flex.core.SimpleCSSValuesImpl.prototype.getValue =
}
}
- o = values[className];
+ o = values[cName];
if (o)
{
value = o[valueName];
@@ -108,7 +104,7 @@ org.apache.flex.core.SimpleCSSValuesImpl.prototype.getValue =
if (!thisObject || !thisObject.FLEXJS_CLASS_INFO)
break;
- className = thisObject.FLEXJS_CLASS_INFO.names[0].qName;
+ cName = thisObject.FLEXJS_CLASS_INFO.names[0].qName;
}
o = values['global'];
if (o != undefined)