Package com.google.gwt.resources.css.ast.CssProperty

Examples of com.google.gwt.resources.css.ast.CssProperty.FunctionValue


            expression =
                String.format(VALUE_WITH_SUFFIX, dotPathValue.getPath(), dotPathValue.getSuffix());
          }
        }
      } else if (value.isFunctionValue() != null) {
        FunctionValue functionValue = value.isFunctionValue();

        // process the argument list values
        String arguments = printValuesList(functionValue.getValues().getValues(), insideUrlNode);

        expression = unescape(functionValue.getName()) + "(" + arguments + ")";
      }

      // don't escape content of quoted string and don't escape isFunctionValue because the
      // arguments and the name of the functions are already unescaped if needed.
      if (value.isStringValue() != null || value.isFunctionValue() != null) {
View Full Code Here


    for (Value value : cssPropertyValues) {
      if (value.isListValue() != null) {
        newValues.add(visitListValue(value.isListValue(), cssPropertyName, selector));

      } else if (value.isFunctionValue() != null) {
        FunctionValue functionValue = value.isFunctionValue();
        ListValue listValue = visitListValue(functionValue.getValues(), cssPropertyName,
            selector);

        newValues.add(new FunctionValue(functionValue.getName(), listValue));

      } else if (value.isIdentValue() != null) {
        newValues.add(visitIdentValue(value.isIdentValue(), cssPropertyName, selector));

      } else {
View Full Code Here

          return new IdentValue(s);

        } else {
          List<Value> parameters = new ArrayList<Value>();
          extractValueOf(parameters, value.getParameters());
          return new FunctionValue(value.getFunctionName(),
              new ListValue(parameters));
        }
      }
      case LexicalUnit.SAC_INHERIT:
        return new IdentValue("inherit");
View Full Code Here

  private ListValue substituteDefs(ListValue listValue) {
    List<Value> result = new ArrayList<Value>(listValue.getValues().size());
    for (Value val : listValue.getValues()) {
      if (val.isFunctionValue() != null) {
        // Recursively perform substitution on a function's values
        FunctionValue fnVal = val.isFunctionValue();
        ListValue newVals = substituteDefs(fnVal.getValues());
        result.add(new FunctionValue(fnVal.getName(), newVals));
        continue;
      }

      IdentValue maybeIdent = val.isIdentValue();
      if (maybeIdent == null) {
View Full Code Here

    for (int i = 0; i < 5; i++) {
      arguments.add(new IdentValue("ARGUMENT" + i));
    }

    ListValue listValue = new ListValue(arguments);
    FunctionValue function = new FunctionValue("fct", listValue);

    when(property.getValues()).thenReturn(new ListValue(Lists.<Value>newArrayList(function)));

    when(cssRule.getProperties()).thenReturn(Lists.newArrayList(property));
View Full Code Here

TOP

Related Classes of com.google.gwt.resources.css.ast.CssProperty.FunctionValue

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.