 
         if (StyleManager.hasAdvancedSelectors() && advancedObject != null)
         {        
-            // Advanced selectors may mean more than one match per type so we
-            // sort based on specificity, but preserving the declaration
+            // Advanced selectors may result in more than one match per type so
+            // we sort based on specificity, but we preserve the declaration
             // order for equal selectors.
             classDecls = sortOnSpecificity(classDecls);
         }

    }

    /**
     *  @private 
     *  This should only be called once per type so avoiding a dependency on
     *  DescribeTypeCache and using describeType() directly.
     */
    private static function getUnqualifiedTypeHierarchy(object:IStyleClient):OrderedObject
    {
        var className:String = object.className;
        var hierarchy:OrderedObject = StyleManager.typeHierarchyCache[className];
        if (!hierarchy)
        {
            hierarchy = new OrderedObject();
            hierarchy[className] = true;

            var typeDescription:XML = describeType(object);
            var superClasses:XMLList = typeDescription..extendsClass;
            for each (var superClass:XML in superClasses)
            {
                var type:String = superClass.@type.toString();
                if (isStopClass(type))
                    break;
    
                type = NameUtil.getUnqualifiedClassName(type);
                hierarchy[type] = true;
            }
            StyleManager.typeHierarchyCache[className] = hierarchy;
        }

        return hierarchy;
    }



import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.system.ApplicationDomain;
import flash.utils.getQualifiedClassName;
import flash.utils.getQualifiedSuperclassName;

import mx.core.ApplicationGlobals;
import mx.core.FlexVersion;
import mx.core.IFlexDisplayObject;
import mx.core.IFlexModuleFactory;
import mx.core.IFontContextComponent;
import mx.core.IInvalidating;
import mx.core.IUITextField;
