Changeset 3045:71143fe473f8 in livinglogic.python.xist

Show
Ignore:
Timestamp:
11/29/07 18:15:23 (12 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Adapt css.applystylesheets() to cssutils 0.9.4a3.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/xist/css.py

    r3044 r3045  
    170170    rules = [] 
    171171    for (i, rule) in enumerate(iterrules(node, base=base, media=media)): 
    172         for sel in rule.selectorList: 
     172        for sel in rule.selectorList.seq: 
    173173            sel = selector(sel) 
    174174            rules.append((sel.cssweight(), sel, rule.style)) 
     
    643643        for rule in cssutils.CSSParser().parseString(selectors).cssRules: 
    644644            if isinstance(rule, css.CSSStyleRule): 
    645                 selectors = rule.selectorList 
     645                selectors = rule.selectorList.seq 
    646646                break 
    647647        else: 
    648648            raise ValueError("can't happen") 
    649649    elif isinstance(selectors, css.CSSStyleRule): 
    650         selectors = selectors.selectorList 
     650        selectors = selectors.selectorList.seq 
    651651    elif isinstance(selectors, css.Selector): 
    652652        selectors = [selectors] 
     
    654654        raise TypeError("can't handle %r" % type(selectors)) 
    655655    orcombinators = [] 
    656     for selector in selectors.seq: 
     656    for selector in selectors: 
    657657        rule = root = CSSTypeSelector() 
    658658        prefix = None