Actionscript 3 什么是样式原型链?

Actionscript 3 什么是样式原型链?,actionscript-3,apache-flex,Actionscript 3,Apache Flex,在关于flex中css的文档中,我经常遇到许多关于样式原型链的引用。我想查一下,但找不到任何相关信息。谁能告诉我类StyleProtochain做什么? 在其源代码中,有以下注释 /** * @private * This is an all-static class with methods for building the protochains * that Flex uses to look up CSS style properties. */ 很酷,它告诉我有几种方法

在关于flex中css的文档中,我经常遇到许多关于
样式原型链的引用。我想查一下,但找不到任何相关信息。谁能告诉我类StyleProtochain做什么?
在其源代码中,有以下注释

/**
 *  @private
 *  This is an all-static class with methods for building the protochains
 *  that Flex uses to look up CSS style properties.
 */

很酷,它告诉我有几种方法可以构建原型链,现在我应该知道它的功能,但我不知道什么是
原型链。

CSS样式是继承的。这意味着,当您创建一个新对象并将其作为另一个对象的子对象放置在DOM中时,该新对象必须继承父对象中的所有“可继承”样式。然后,它将通过样式名或内联样式覆盖这些样式

StyleProtoChain类负责创建任何对象(可以有样式)的样式列表。它之所以这样命名,是因为这个类必须在DOMtree上(就像在prototype链上…可能是用词不当!)并为这个对象构建样式列表。此注释指定了上升的顺序

/**
     *  @private
     *  If the styleName property points to a UIComponent, then we search
     *  for stylable properties in the following order:
     *  
     *  1) Look for inline styles on this object
     *  2) Look for inline styles on the styleName object
     *  3) Look for class selectors on the styleName object
     *  4) Look for type selectors on the styleName object
     *  5) Look for type selectors on this object
     *  6) Follow the usual search path for the styleName object
     *  
     *  If this object doesn't have any type selectors, then the
     *  search path can be simplified to two steps:
     *  
     *  1) Look for inline styles on this object
     *  2) Follow the usual search path for the styleName object
     */
希望这有帮助。如果有人想要进一步的参考,你可以找到一个链接到源代码