Package com.google.caja.lang.css

Examples of com.google.caja.lang.css.CssSchema


            el.removeAttributeNode(classAttr);
            String identifiers = classAttr.getValue().trim();
            if (!"".equals(identifiers)) {
              WhiteList wl = WhiteList.Factory.empty();
              HtmlAttributeRewriter rw = new HtmlAttributeRewriter(
                  jobs.getPluginMeta(), new CssSchema(wl, wl),
                  htmlSchema, Maps.<Attr, EmbeddedContent>newHashMap(),
                  jobs.getMessageQueue());
              HtmlAttributeRewriter.SanitizedAttr sanitized
                  = rw.sanitizeStringValue(HtmlAttributeRewriter.fromAttr(
                      classAttr, htmlSchema.lookupAttribute(BODY_CLASS),
View Full Code Here


  }
  public URI getBaseUri() { return baseUri; }
  public File getFetcherBase() { return fetcherBase; }

  public CssSchema getCssSchema(MessageQueue mq) {
    return new CssSchema(
        whitelist(cssPropertyWhitelistUri, mq),
        whitelist(URI.create(
            "resource:///com/google/caja/lang/css/css-extensions-fns.json"),
            mq));
  }
View Full Code Here

      StringBuilder msgBuf = new StringBuilder();
      t.formatTree(mc, 0, msgBuf);
      msg = msgBuf.toString();
    }

    CssSchema cssSchema = CssSchema.getDefaultCss21Schema(mq);
    new CssValidator(cssSchema, HtmlSchema.getDefault(mq), mq)
        .validateCss(AncestorChain.instance(t));
    new CssRewriter(
        new UriPolicy() {
          public String rewriteUri(
View Full Code Here

    final Set<String> propertyParts = Sets.newLinkedHashSet();

    CssTree t = cssCode.trim().endsWith("}")
        ? css(fromString(cssCode)) : cssDecls(fromString(cssCode));

    CssSchema cssSchema = CssSchema.getDefaultCss21Schema(mq);
    new CssValidator(cssSchema, HtmlSchema.getDefault(mq), mq)
        .validateCss(AncestorChain.instance(t));
    new CssRewriter(
        new UriPolicy() {
          public String rewriteUri(
View Full Code Here

TOP

Related Classes of com.google.caja.lang.css.CssSchema

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.