0 Replies Latest reply on Oct 13, 2008 10:00 AM by Peter Farland

    [svn] 3594: Initial check-in for Advanced CSS selector support.

    Peter Farland Level 3
      Revision: 3594<br />Author:   pfarland@adobe.com<br />Date:     2008-10-13 11:00:52 -0700 (Mon, 13 Oct 2008)<br /><br />Log Message:<br />-----------<br />Initial check-in for Advanced CSS selector support. Note that since direct AST generation for advanced styles (i.e. equivalent code of StyleModule.vm, StyleDef.vm, ClassDefLib.vm) is not yet implemented and as such advanced selector support is only enabled when the compiler -keep=true is enabled at this time. Direct AST generation to follow.<br /><br />This change adds support for descendant type selectors (e.g. Panel VBox Button), non-global class selectors (e.g. Button.special), id selectors (e.g. Button#button14), and combinations of these types of selectors (e.e. Panel.special VBox.box12 Button.cancel). Pseudo selector awareness is included but it is not yet wired up to the runtime states mechanism as an efficient method of reacting to state changes is still being developed. Combinator conditional global selectors will be supported soon (i.e. the scenario of combining both an id and class selector at the top level, e.g. .foo#foo12, this requires a more expensive search of global class selectors).<br /><br />This change juggles both the introduction of advanced selector support while retaining legacy styles APIs. The major difference with advanced styles is that multiple styles need to be considered for a type. This requires new data structures to keep track of selectors by subject. Performance analysis will be conducted to ensure these new data structures do not add unacceptable overhead to the style subsystem.<br /><br />For the compiler this change consolidates styles processing in the base StyleModule class and then MXML-specific overrides (i.e. inline <Styles> nodes and SWC defaults.css) are in the StylesContainer.java class, which now extends StyleModule. The existing structure for legacy simple style codegen was retained and advanced style codegen wedged in.<br /><br />QA: Yes<br />Doc: Not yet<br />Checkintests: Pass 100%<br />mxunit styles tests: Pass 100% (note that styles modules include tests you need to manually compile the .css files to swf and they're currently cleaned out each time a build runs... QE please correct this).<br />mustella styles tests: QE's select list of components testsuites pass 100%. Any failures in the full suite will be addressed in the next-checkin.<br />Reviewers: Glenn (framework), Paul (compiler)<br /><br />Modified Paths:<br />--------------<br />    flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as<br />    flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as<br />    flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as<br />    flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as<br />    flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleClient.as<br />    flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as<br />    flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as<br />    flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as<br />    flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ConfigMap.as<br />    flex/sdk/trunk/modules/compiler/src/java/flash/css/FontFaceRule.java<br />    flex/sdk/trunk/modules/compiler/src/java/flash/css/Rule.java<br />    flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleDeclaration.java<br />    flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleDocumentHandler.java<br />    flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleParser.java<br />    flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleSheet.java<br />    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/CssCompiler.java<br />    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.java<br />    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm<br />    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.java<br />    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.vm<br />    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java<br />    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java <br />    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm<br />    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java<br />    flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java<br />    flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt<br /><br />Added Paths:<br />-----------<br />    flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSCondition.as<br />    flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSConditionKind.as<br />    flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSSelector.as<br />    flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSSelectorKind.as<br />    flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IAdvancedStyleClient.as<br />    flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager3.as<br />    flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleCondition.java<br />    flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleProperty.java<br />    flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleSelector.java<br /><br />Removed Paths:<br />-------------<br />    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleProperty.java