/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { switch (type) { case CSSPrimitiveValue.CSS_IDENT: if (value.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { return ValueConstants.NONE_VALUE; } break; case CSSPrimitiveValue.CSS_URI: return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
String urlString = uv.getRawCssText();
/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { switch (type) { case CSSPrimitiveValue.CSS_IDENT: if (value.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { return ValueConstants.NONE_VALUE; } break; case CSSPrimitiveValue.CSS_URI: return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { switch (type) { case CSSPrimitiveValue.CSS_IDENT: if (value.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { return ValueConstants.NONE_VALUE; } break; case CSSPrimitiveValue.CSS_URI: return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { switch (type) { case CSSPrimitiveValue.CSS_IDENT: if (value.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { return ValueConstants.NONE_VALUE; } break; case CSSPrimitiveValue.CSS_URI: return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { switch (type) { case CSSPrimitiveValue.CSS_IDENT: if (value.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { return ValueConstants.NONE_VALUE; } break; case CSSPrimitiveValue.CSS_URI: return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { switch (type) { case CSSPrimitiveValue.CSS_IDENT: if (value.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { return ValueConstants.NONE_VALUE; } break; case CSSPrimitiveValue.CSS_URI: return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { switch (type) { case CSSPrimitiveValue.CSS_IDENT: if (value.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { return ValueConstants.NONE_VALUE; } break; case CSSPrimitiveValue.CSS_URI: return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { switch (type) { case CSSPrimitiveValue.CSS_IDENT: String s = value.toLowerCase(); if (s.equals(CSSConstants.CSS_AUTO_VALUE)) { return SVGValueConstants.AUTO_VALUE; } if (s.equals(CSSConstants.CSS_SRGB_VALUE)) { return SVGValueConstants.SRGB_VALUE; } return new StringValue(CSSPrimitiveValue.CSS_IDENT, s); case CSSPrimitiveValue.CSS_URI: return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { switch (type) { case CSSPrimitiveValue.CSS_IDENT: if (value.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { return ValueConstants.NONE_VALUE; } break; case CSSPrimitiveValue.CSS_URI: return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { switch (type) { case CSSPrimitiveValue.CSS_IDENT: if (value.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { return ValueConstants.NONE_VALUE; } break; case CSSPrimitiveValue.CSS_URI: return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { switch (type) { case CSSPrimitiveValue.CSS_IDENT: String s = value.toLowerCase(); if (s.equals(CSSConstants.CSS_AUTO_VALUE)) { return SVGValueConstants.AUTO_VALUE; } if (s.equals(CSSConstants.CSS_SRGB_VALUE)) { return SVGValueConstants.SRGB_VALUE; } return new StringValue(CSSPrimitiveValue.CSS_IDENT, s); case CSSPrimitiveValue.CSS_URI: return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { switch (type) { case CSSPrimitiveValue.CSS_IDENT: String s = value.toLowerCase(); if (s.equals(CSSConstants.CSS_AUTO_VALUE)) { return SVGValueConstants.AUTO_VALUE; } if (s.equals(CSSConstants.CSS_SRGB_VALUE)) { return SVGValueConstants.SRGB_VALUE; } return new StringValue(CSSPrimitiveValue.CSS_IDENT, s); case CSSPrimitiveValue.CSS_URI: return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { if (type == CSSPrimitiveValue.CSS_IDENT) { if (value.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { return SVGValueConstants.NONE_VALUE; } throw createInvalidIdentifierDOMException(value); } if (type == CSSPrimitiveValue.CSS_URI) { return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { if (type == CSSPrimitiveValue.CSS_IDENT) { if (value.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { return SVGValueConstants.NONE_VALUE; } throw createInvalidIdentifierDOMException(value); } if (type == CSSPrimitiveValue.CSS_URI) { return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { if (type == CSSPrimitiveValue.CSS_IDENT) { if (value.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { return SVGValueConstants.NONE_VALUE; } throw createInvalidIdentifierDOMException(value); } if (type == CSSPrimitiveValue.CSS_URI) { return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
/** * Implements {@link * ValueManager#computeValue(CSSStylableElement,String,CSSEngine,int,StyleMap,Value)}. */ public Value computeValue(CSSStylableElement elt, String pseudo, CSSEngine engine, int idx, StyleMap sm, Value value) { if ((value.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) && (value.getPrimitiveType() == CSSPrimitiveValue.CSS_URI)) { // Reveal the absolute value as the cssText now. return new URIValue(value.getStringValue(), value.getStringValue()); } return value; } }
/** * Implements {@link * ValueManager#computeValue(CSSStylableElement,String,CSSEngine,int,StyleMap,Value)}. */ public Value computeValue(CSSStylableElement elt, String pseudo, CSSEngine engine, int idx, StyleMap sm, Value value) { if ((value.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) && (value.getPrimitiveType() == CSSPrimitiveValue.CSS_URI)) { // Reveal the absolute value as the cssText now. return new URIValue(value.getStringValue(), value.getStringValue()); } return value; } }
/** * Implements {@link * ValueManager#computeValue(CSSStylableElement,String,CSSEngine,int,StyleMap,Value)}. */ public Value computeValue(CSSStylableElement elt, String pseudo, CSSEngine engine, int idx, StyleMap sm, Value value) { if ((value.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) && (value.getPrimitiveType() == CSSPrimitiveValue.CSS_URI)) { // Reveal the absolute value as the cssText now. return new URIValue(value.getStringValue(), value.getStringValue()); } return value; } }
/** * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}. */ public Value createValue(LexicalUnit lu, CSSEngine engine) throws DOMException { switch (lu.getLexicalUnitType()) { case LexicalUnit.SAC_INHERIT: return SVGValueConstants.INHERIT_VALUE; case LexicalUnit.SAC_IDENT: String s = lu.getStringValue().toLowerCase(); if (s.equals(CSSConstants.CSS_AUTO_VALUE)) { return SVGValueConstants.AUTO_VALUE; } if (s.equals(CSSConstants.CSS_SRGB_VALUE)) { return SVGValueConstants.SRGB_VALUE; } return new StringValue(CSSPrimitiveValue.CSS_IDENT, s); case LexicalUnit.SAC_URI: return new URIValue(lu.getStringValue(), resolveURI(engine.getCSSBaseURI(), lu.getStringValue())); } throw createInvalidLexicalUnitDOMException(lu.getLexicalUnitType()); }