Package com.google.caja.parser.js

Examples of com.google.caja.parser.js.ObjectConstructor.appendChild()


      int propBits = 0;
      for (CssPropBit b : data.properties) {
        propBits |= b.jsValue;
      }

      dataObj.appendChild(
          new ValueProperty(propbitsObjKey, new IntegerLiteral(unk, propBits)));

      List<Expression> litGroups = Lists.newArrayList();
      for (int groupIndex : litPartition.unions[propIndex]) {
        litGroups.add((Expression) QuasiBuilder.substV(
View Full Code Here


      for (int groupIndex : litPartition.unions[propIndex]) {
        litGroups.add((Expression) QuasiBuilder.substV(
            "L[@i]", "i", new IntegerLiteral(unk, groupIndex)));
      }
      if (!litGroups.isEmpty()) {
        dataObj.appendChild(new ValueProperty(
            litgroupObjKey, new ArrayConstructor(unk, litGroups)));
      }

      List<Expression> fnKeyStrs = Lists.newArrayList();
      for (CssPropertySignature.CallSignature fn : data.fns) {
View Full Code Here

      for (CssPropertySignature.CallSignature fn : data.fns) {
        String fnKey = fnSigToData.get(fn).key;
        fnKeyStrs.add(StringLiteral.valueOf(unk, fnKey));
      }
      ArrayConstructor fnKeyArray = new ArrayConstructor(unk, fnKeyStrs);
      dataObj.appendChild(new ValueProperty(fnsObjKey, fnKeyArray));

      String dataJs;
      {
        StringBuilder js = new StringBuilder();
        JsMinimalPrinter tokenConsumer = new JsMinimalPrinter(js);
View Full Code Here

        int poolIndex = regexPoolMap.get(regex)[0];
        Expression re = poolIndex < 0
            ? makeRegexp(commonSubstringMap, regex)
            : (Expression) QuasiBuilder.substV(
                "c[@i]", "i", new IntegerLiteral(unk, poolIndex));
        dataObj.appendChild(new ValueProperty(regexObjKey, re));
      }

      String dom2property = propertyNameToDom2Property(prop.name);
      ArrayConstructor altNames = null;
      for (String altDom2Property : prop.dom2properties) {
View Full Code Here

              unk, Collections.<Expression>emptyList());
        }
        altNames.appendChild(StringLiteral.valueOf(unk, altDom2Property));
      }
      if (altNames != null) {
        dataObj.appendChild(new ValueProperty(alternatesObjKey, altNames));
      }

      cssSchemaProps.add(new ValueProperty(
          unk, StringLiteral.valueOf(unk, prop.name.getCanonicalForm()),
          dataObj));
View Full Code Here

        propBits |= CssPropBit.HISTORY_INSENSITIVE.jsValue;
      } else if (LinkStyleWhitelist.PROPERTIES_ALLOWED_IN_LINK_CLASSES
                 .contains(prop.name)) {
        propBits |= CssPropBit.ALLOWED_IN_LINK.jsValue;
      }
      dataObj.appendChild(
          new ValueProperty(propbitsObjKey, new IntegerLiteral(unk, propBits)));

      List<Expression> litGroups = Lists.newArrayList();
      for (int groupIndex : litPartition.unions[propIndex]) {
        litGroups.add((Expression) QuasiBuilder.substV(
View Full Code Here

      for (int groupIndex : litPartition.unions[propIndex]) {
        litGroups.add((Expression) QuasiBuilder.substV(
            "L[@i]", "i", new IntegerLiteral(unk, groupIndex)));
      }
      if (!litGroups.isEmpty()) {
        dataObj.appendChild(new ValueProperty(
            litgroupObjKey, new ArrayConstructor(unk, litGroups)));
      }
    }

    ObjectConstructor cssSchema = new ObjectConstructor(unk, cssSchemaProps);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.