Package com.google.caja.parser.css

Examples of com.google.caja.parser.css.CssPropertySignature


      // space added at the end.
      data.literals.add(withoutVendorPrefix(litValue));
    }

    private void inspectRep(CssPropertySignature.RepeatedSignature sig) {
      CssPropertySignature rep = sig.getRepeatedSignature();
      inspectSig(rep);
    }
View Full Code Here


    }
    if (!CSS_IDENTIFIER.matcher(name.getCanonicalForm()).matches()) {
      throw new IllegalArgumentException("Bad property name: " + name);
    }

    CssPropertySignature csssig = parseSignature(name, sig);
    properties.put(name, new CssPropertyInfo(
        name, csssig, mediaGroups, inherited, appliesTo, defaultValue));
  }
View Full Code Here

      throw new NullPointerException("Null signature for symbol " + name);
    }
    if (!CSS_IDENTIFIER.matcher(name.getCanonicalForm()).matches()) {
      throw new IllegalArgumentException("Bad symbol name: " + name);
    }
    CssPropertySignature csssig = parseSignature(name, sig);
    symbols.put(name, new SymbolInfo(name, csssig));
  }
View Full Code Here

      toApply = applySignature(
          toApply, propertyName, rsig.getRepeatedSignature());
      if (toApply.isEmpty()) { break; }
    }
    if (!toApply.isEmpty()) {
      CssPropertySignature repeated = rsig.getRepeatedSignature();
      BitSet used = null;
      if (repeated instanceof CssPropertySignature.ExclusiveSetSignature) {
        used = new BitSet(repeated.children().size());
      }

      toApply = new ArrayList<Candidate>(toApply);
      for (; k < rsig.maxCount; ++k) {
        // Try not following the extra repetitions
View Full Code Here

      if (null == term.getOperator()
          && atom instanceof CssTree.FunctionCall) {
        CssTree.FunctionCall fn = (CssTree.FunctionCall) atom;
        if (fn.getName().getCanonicalForm().equals(
                call.children().get(0).getValue())) {
          CssPropertySignature formals = call.children().get(1);
          CssTree.Expr actuals = fn.getArguments();
          if (DEBUG) {
            System.err.println("formals=\n" + dump(formals) +
                               "\nactuals=\n" + dump(actuals));
          }
View Full Code Here

      toApply = applySignature(
          toApply, propertyName, rsig.getRepeatedSignature());
      if (toApply.isEmpty()) { break; }
    }
    if (!toApply.isEmpty()) {
      CssPropertySignature repeated = rsig.getRepeatedSignature();
      BitSet used = null;
      if (repeated instanceof CssPropertySignature.ExclusiveSetSignature) {
        used = new BitSet(repeated.children().size());
      }

      toApply = new ArrayList<Candidate>(toApply);
      for (; k < rsig.maxCount; ++k) {
        if (k < MAX_BRANCHING_FACTOR) {
View Full Code Here

      if (null == term.getOperator()
          && atom instanceof CssTree.FunctionCall) {
        CssTree.FunctionCall fn = (CssTree.FunctionCall) atom;
        if (fn.getName().getCanonicalForm().equals(
                call.children().get(0).getValue())) {
          CssPropertySignature formals = call.children().get(1);
          CssTree.Expr actuals = fn.getArguments();
          if (DEBUG) {
            System.err.println("formals=\n" + dump(formals) +
                               "\nactuals=\n" + dump(actuals));
          }
View Full Code Here

      if (!JS_IDENTIFIER.matcher(dom2property).matches()) {
        throw new IllegalArgumentException("Bad DOM2 name: " + dom2property);
      }
    }

    CssPropertySignature csssig = parseSignature(name, sig);
    properties.put(name, new CssPropertyInfo(
        name, csssig, mediaGroups, inherited, appliesTo, defaultValue,
        dom2properties));
  }
View Full Code Here

      throw new NullPointerException("Null signature for symbol " + name);
    }
    if (!CSS_IDENTIFIER.matcher(name.getCanonicalForm()).matches()) {
      throw new IllegalArgumentException("Bad symbol name: " + name);
    }
    CssPropertySignature csssig = parseSignature(name, sig);
    symbols.put(name, new SymbolInfo(name, csssig));
  }
View Full Code Here

          ident, JSRE.cat(ident && identBefore ? spaces : optSpaces, p));
    }

    private JSREBuilder repToPattern(
        boolean identBefore, CssPropertySignature.RepeatedSignature sig) {
      CssPropertySignature rep = sig.getRepeatedSignature();
      if (rep instanceof CssPropertySignature.ExclusiveSetSignature) {
        // The spec (http://www.w3.org/TR/REC-CSS1/#css1-properties) defines
        // A double bar (A || B) means that either A or B or both must occur
        // in any order.
        // We convert [ a || b ] -> [a | b]+
View Full Code Here

TOP

Related Classes of com.google.caja.parser.css.CssPropertySignature

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.