0 Replies Latest reply on Jan 30, 2009 7:58 AM by Peter Farland

    [svn] 4756: Bug fix for universal Advanced CSS selectors.

    Peter Farland Level 3
      Revision: 4756
      Author: pfarland@adobe.com
      Date: 2009-01-30 07:58:55 -0800 (Fri, 30 Jan 2009)

      Log Message:
      -----------
      Bug fix for universal Advanced CSS selectors.

      1. In CSS, the universal selector * matches any element. It is often implied in selectors, such as the .foo class selector would formally be written *.foo { }. So, what we were previously calling "global selectors" will now be referred to as universal selectors. Flex retains its own special top level "global" selector to function as the root of the inheriting style prototype chain, but other universal selectors will not be associated with this special subject.

      2. When looking for universal selectors, we now match against all possible selectors that have * as the subject rather than trying to pick out specific styleName (class), id or pseudo conditions. This is needed as there may arbitrary advanced conditions in the selector chain, for example, descendant selectors that have a universal subject. Note this was the actual cause of the bug - but the other fixes were needed to separate "global" from "*".

      3. In the compiler, we'll still use the generated _globalStyles.as (i.e. from the "global" StyleDef collection of style declarations) as the place holder for universal selectors (as _*Styles.as would be an invalid ActionScript class name), though these universal selectors will report their subject as "*".

      4. When representing a selector in full as a String, we'll continue to omit "*" as the subject and substitute the empty string, so "*.foo" will be printed as ".foo".

      QA: Yes
      Doc: No
      Checkintests: Pass
      Reviewer: Paul
      Bugs:
      SDK-18196 - [Advanced CSS] Descendant selectors with class selectors like VBox .greenBox are not working correctly.

      Ticket Links:
      ------------
      http://bugs.adobe.com/jira/browse/SDK-18196

      Modified Paths:
      --------------
      flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSSelector.as
      flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.vm
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java