Changeset 15743 for lang/actionscript

Show
Ignore:
Timestamp:
07/13/08 16:39:58 (4 months ago)
Author:
gyuque
Message:

supported important!

Location:
lang/actionscript/ascss/src/css
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • lang/actionscript/ascss/src/css/ASCSS.asy

    r12326 r15743  
    21422142                                break; 
    21432143                        } 
     2144                        valid_primitive = (id == 0 && validUnit(val, U_FInteger, false)); 
     2145                        break; 
     2146 
    21442147                        /* nobreak */ 
    21452148                case CSSPropertyID.CSSPropertyOrphans:                    // <integer> | inherit 
     
    22982301                                if (mPropertyExtension.isValidPrimitiveValue(propId, val, id, mPropExtHost)) 
    22992302                                        valid_primitive = true; 
     2303 
     2304                                if (!valid_primitive && mPropertyExtension.isColorValue(propId)) 
     2305                                { 
     2306                            parsedValue = parseColor(); 
     2307                            if (parsedValue != null) 
     2308                                valueList.next(); 
     2309                                } 
    23002310                        } 
    23012311                        break; 
  • lang/actionscript/ascss/src/css/CSSLexer.as

    r10752 r15743  
    5454                public static const RX_URL2:String = "url\\([ \t\r\n\f]*" +RX_URL+ "[ \t\r\n\f]*\\)" 
    5555 
     56                private static const mRxImportant:RegExp   = /^![ \\t\\r\\n\\f]*important/ 
     57                private static const mRxIntnum:RegExp      = /^[0-9]+$/ 
    5658                private static const mRxIncludes:RegExp    = /^~=/ 
    5759                private static const mRxDashMatch:RegExp   = /^\|=/ 
     
    195197                        } 
    196198                        else if ((rxr = mRxNum.exec(mCurSource)) != null) 
     199                        { 
    197200                                kw = PARSER.FLOATTOKEN; 
     201                                mTokBody = rxr[0].toString(); 
     202                                advance = mTokBody.length; 
     203 
     204                                if ((rxr = mRxIntnum.exec(rxr[0])) != null) 
     205                                        kw = PARSER.INTEGER; 
     206                        } 
     207                        else if ((rxr = mRxImportant.exec(mCurSource)) != null) 
     208                                kw = PARSER.IMPORTANT_SYM; 
    198209                        else if ((rxr = mRxIdent.exec(mCurSource)) != null) 
    199210                                kw = PARSER.IDENT; 
  • lang/actionscript/ascss/src/css/CSSStyleSelector.as

    r12321 r15743  
    197197                        if (startIndex == -1) 
    198198                                return; 
     199 
    199200                        var i:int; 
    200201                        for (i = startIndex; i <= endIndex; i++) { 
     
    312313                } 
    313314 
    314                 private function get matchedRulesIsEmpty():Boolean 
     315                public function get matchedRulesIsEmpty():Boolean 
    315316                { 
    316317                        return mMatchedRules.length < 1; 
     
    354355Exl.puts("selector '"+ rule.selector.selectorText +"' matched for <"+localName+">"); 
    355356}*/ 
     357 
    356358                                                // Add this rule to our list of matched rules. 
    357359                                                addMatchedRule(d); 
  • lang/actionscript/ascss/src/css/Document.as

    r11240 r15743  
    11package css 
    22{ 
    3         import cssdom.IASCSSDocument 
     3        import cssdom.*; 
    44        public interface Document 
    55        { 
     
    1111                function setUsesDescendantRules(b:Boolean):void; 
    1212                function setUsesFirstLineRules(b:Boolean):void; 
     13                function getElementById(id:String):IASCSSElement; 
    1314 
    1415/* 
  • lang/actionscript/ascss/src/css/IPropertyExtension.as

    r11516 r15743  
    33        public interface IPropertyExtension 
    44        { 
     5                function isColorValue(aPropID:int):Boolean; 
    56                function isValidPrimitiveValue(aPropID:int, aValue:Value, aValueId:int, aHost:IPropertyExtensionHost):Boolean; 
    67        }