bool SVGUseElement::instanceTreeIsLoading(SVGElementInstance* targetElementInstance) { for (SVGElementInstance* instance = targetElementInstance->firstChild(); instance; instance = instance->nextSibling()) { if (SVGUseElement* use = instance->correspondingUseElement()) { if (use->cachedDocumentIsStillLoading()) return true; } if (instance->hasChildNodes()) instanceTreeIsLoading(instance); } return false; }
JSValue* JSSVGElementInstance::getValueProperty(ExecState* exec, int token) const { switch (token) { case CorrespondingElementAttrNum: { SVGElementInstance* imp = static_cast<SVGElementInstance*>(impl()); return toJS(exec, WTF::getPtr(imp->correspondingElement())); } case CorrespondingUseElementAttrNum: { SVGElementInstance* imp = static_cast<SVGElementInstance*>(impl()); return toJS(exec, WTF::getPtr(imp->correspondingUseElement())); } case ParentNodeAttrNum: { SVGElementInstance* imp = static_cast<SVGElementInstance*>(impl()); return toJS(exec, WTF::getPtr(imp->parentNode())); } case ChildNodesAttrNum: { SVGElementInstance* imp = static_cast<SVGElementInstance*>(impl()); return toJS(exec, WTF::getPtr(imp->childNodes())); } case FirstChildAttrNum: { SVGElementInstance* imp = static_cast<SVGElementInstance*>(impl()); return toJS(exec, WTF::getPtr(imp->firstChild())); } case LastChildAttrNum: { SVGElementInstance* imp = static_cast<SVGElementInstance*>(impl()); return toJS(exec, WTF::getPtr(imp->lastChild())); } case PreviousSiblingAttrNum: { SVGElementInstance* imp = static_cast<SVGElementInstance*>(impl()); return toJS(exec, WTF::getPtr(imp->previousSibling())); } case NextSiblingAttrNum: { SVGElementInstance* imp = static_cast<SVGElementInstance*>(impl()); return toJS(exec, WTF::getPtr(imp->nextSibling())); } } return 0; }