/**
* Responds to the removal of a child element by re-evaluating the
* test attributes.
*/
protected void handleChildElementRemoved(Element e) {
CompositeGraphicsNode gn = (CompositeGraphicsNode) node;
if (selectedChild == e) {
gn.remove(0);
disposeTree(selectedChild);
selectedChild = null;
GraphicsNode refNode = null;
GVTBuilder builder = ctx.getGVTBuilder();
for (Node n = e.getNextSibling();
n != null;
n = n.getNextSibling()) {
if (n.getNodeType() == Node.ELEMENT_NODE) {
Element ref = (Element) n;
if (n instanceof SVGTests &&
SVGUtilities.matchUserAgent
(ref, ctx.getUserAgent())) {
refNode = builder.build(ctx, ref);
selectedChild = ref;
break;
}
}
}
if (refNode != null) {
gn.add(refNode);
}
}
}