 
         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);
         }


import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.utils.describeType;

import mx.core.ApplicationGlobals;
import mx.core.FlexVersion;
import mx.core.IFlexDisplayObject;

import mx.core.IFontContextComponent;
import mx.core.IInvalidating;
import mx.core.IUITextField;

    }

    /**
     *  @private
     *  Returns an ordered map of unqualified class names, starting with the
     *  object's class name and then each super class name until we hit a stop
     *  class, such as mx.core::UIComponent.
     */
    private static function getUnqualifiedTypeHierarchy(object:IStyleClient):OrderedObject
    {
        var className:String = getQualifiedClassName(object);
        var hierarchy:OrderedObject = StyleManager.typeHierarchyCache[className];
        if (hierarchy == null)
        {
            hierarchy = new OrderedObject();

            var myApplicationDomain:ApplicationDomain;
            var factory:IFlexModuleFactory = ModuleManager.getAssociatedFactory(object);
            if (factory != null)
            {
                myApplicationDomain = ApplicationDomain(factory.info()["currentDomain"]);
            }
            else
            {
                var myRoot:DisplayObject = SystemManager.getSWFRoot(object);
                if (!myRoot)
                    return hierarchy;
                myApplicationDomain = myRoot.loaderInfo.applicationDomain;
            }

            StyleManager.typeHierarchyCache[className] = hierarchy;
            while (!isStopClass(className))
            {
                try
                {
                    var type:String = NameUtil.getUnqualifiedClassName(className);
                    hierarchy[type] = true;
                    className = getQualifiedSuperclassName(
                        myApplicationDomain.getDefinition(className));
                }
                catch(e:ReferenceError)
                {
                    className = null;
                }
            }
        }
        return hierarchy;
    }

