      */
     public function getClassStyleDeclarations():Array
     {
-        var myApplicationDomain:ApplicationDomain;
-
-        var factory:IFlexModuleFactory = ModuleManager.getAssociatedFactory(this);
-        if (factory != null)
-        {
-            myApplicationDomain = ApplicationDomain(factory.info()["currentDomain"]);
-        }
-        else
-        {
-            var myRoot:DisplayObject = SystemManager.getSWFRoot(this);
-            if (!myRoot)
-                return [];
-            myApplicationDomain = myRoot.loaderInfo.applicationDomain;
-        }
-
-        var className:String = getQualifiedClassName(this)
-        className = className.replace("::", ".");
-        var cache:Array;
-        cache = StyleManager.typeSelectorCache[className];
-        if (cache)
-            return cache;
-        
-        // trace("getClassStyleDeclaration", className);
-        var decls:Array = [];
-        var classNames:Array = [];
-        var caches:Array = [];
-        var declcache:Array = [];
-
-        while (className != null &&
-               className != "mx.core.UIComponent" &&
-               className != "mx.core.UITextField")
-        {
-            var s:CSSStyleDeclaration;
-            cache = StyleManager.typeSelectorCache[className];
-            if (cache)
-            {
-                decls = decls.concat(cache);
-                break;
-            }
-
-            s = StyleManager.getStyleDeclaration(className);
-            
-            if (s)
-            {
-                decls.unshift(s);
-                // we found one so the next set define the selectors for this
-                // found class and its ancestors.  Save the old list and start
-                // a new list
-                classNames.push(className);
-                caches.push(classNames);
-                declcache.push(decls);
-                decls = [];
-                classNames = [];
-                // trace("   ", className);
-                // break;
-            }
-            else
-                classNames.push(className);
-
-            try
-            {
-                className = getQualifiedSuperclassName(myApplicationDomain.getDefinition(className));
-                className = className.replace("::", ".");
-            }
-            catch(e:ReferenceError)
-            {
-                className = null;
-            }
-        }
-
-        caches.push(classNames);
-        declcache.push(decls);
-        decls = [];
-        while (caches.length)
-        {
-            classNames = caches.pop();
-            decls = decls.concat(declcache.pop());
-            while (classNames.length)
-            {
-                StyleManager.typeSelectorCache[classNames.pop()] = decls;
-            }
-        }
-
-        return decls;
-    }
-
+        return StyleProtoChain.getClassStyleDeclarations(this);
+    }
 
     /**
      *  Builds or rebuilds the CSS style cache for this component

import mx.utils.StringUtil;
import mx.validators.IValidatorListener;
import mx.validators.ValidationResult;
import flash.system.Security;

use namespace mx_internal;


    /**
     *  @private
     */
    mx_internal var _owner:DisplayObjectContainer;

    /**
     *  The owner of this UIComponent. By default, it is the parent of this UIComponent.
