public static Filter convertFilter(Element filteredElement,
GraphicsNode filteredNode,
BridgeContext ctx) {
CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(filteredElement);
CSSPrimitiveValue filterValue =
(CSSPrimitiveValue)decl.getPropertyCSSValueInternal
(CSS_FILTER_PROPERTY);
switch(filterValue.getPrimitiveType()){
case CSSPrimitiveValue.CSS_IDENT:
return null; // 'filter:none'
case CSSPrimitiveValue.CSS_URI:
String uri = filterValue.getStringValue();
Element filter = ctx.getReferencedElement(filteredElement, uri);
Bridge bridge = ctx.getBridge(filter);
if (bridge == null || !(bridge instanceof FilterBridge)) {
throw new BridgeException(filteredElement,
ERR_CSS_URI_BAD_TARGET,