Lines Matching refs:Element
78 // If there is no element instance tree, force immediate SVGElementInstance tree
81 // object right after creating the element on-the-fly
223 // If attributes width and/or height are provided on the 'use' element, then these attributes
225 // the generated 'svg' element will use values of 100% for these attributes.
227 // Spec (<use> on <svg>): If attributes width and/or height are provided on the 'use' element, then these
274 // and y represent the values of the x and y attributes on the 'use' element.
307 // Eventually mark shadow root element needing style recalc
336 SVGElement* element = targetInstance->correspondingElement();
337 ASSERT(element);
342 String elementId = element->getIDAttribute();
343 String elementNodeName = element->nodeName();
345 String parentNodeName = element->parentNode() ? element->parentNode()->nodeName() : "null";
346 String firstChildNodeName = element->firstChild() ? element->firstChild()->nodeName() : "null";
352 targetInstance, parentNodeName.latin1().data(), element->parentNode(), firstChildNodeName.latin1().data(), element->firstChild(),
353 elementNodeName.latin1().data(), element, shadowTreeElementNodeName.latin1().data(), shadowTreeElement, elementId.latin1().data());
358 const HashSet<SVGElementInstance*>& elementInstances = element->instancesForElement();
359 text += String::format("Corresponding element is associated with %i instance(s):\n", elementInstances.size());
379 static bool isDisallowedElement(Node* element)
383 if (element->hasTagName(SVGNames::foreignObjectTag))
387 if (SVGSMILElement::isSMILElement(element))
413 Element* targetElement = document()->getElementById(id);
436 Element* targetElement = document()->getElementById(id);
457 // 'target' may be null, if it's a non SVG namespaced element.
468 // Spec: If the 'use' element references a simple graphics element such as a 'rect', then there is only a
470 // is the SVGRectElement that corresponds to the referenced 'rect' element.
496 // Expand means: replace the actual <use> element by what it references.
500 // Expand means: replace the actual <symbol> element by the <svg> element.
508 // If no shadow tree element is present, this means that the reference root
509 // element was removed, as it is disallowed (ie. <use> on <foreignObject>)
541 // Transfer event listeners assigned to the referenced element to our shadow tree elements.
609 // Spec: If the 'use' element references a 'g' which contains two 'rect' elements, then the instance tree
615 SVGElement* element = 0;
617 element = static_cast<SVGElement*>(node);
619 // Skip any non-svg nodes or any disallowed element.
620 if (!element || isDisallowedElement(element))
624 RefPtr<SVGElementInstance> instance = SVGElementInstance::create(this, element);
629 buildInstanceTree(element, instancePtr, foundProblem);
641 Element* targetElement = document()->getElementById(id);
658 SVGElement* element = instance->correspondingElement();
660 if (element->getIDAttribute() == id) {
699 RefPtr<Element> newChild = targetInstance->correspondingElement()->cloneElementWithChildren();
701 // We don't walk the target tree element-by-element, and clone each element,
720 void SVGUseElement::expandUseElementsInShadowTree(SVGShadowTreeRootElement* shadowRoot, Node* element)
723 // do this directly in buildShadowTree, if we encounter a <use> element?
729 if (element->hasTagName(SVGNames::useTag)) {
730 SVGUseElement* use = static_cast<SVGUseElement*>(element);
733 Element* targetElement = document()->getElementById(id);
744 // 'use' element except for x, y, width, height and xlink:href are transferred to the generated 'g' element.
760 RefPtr<Element> newChild = target->cloneElementWithChildren();
762 // We don't walk the target tree element-by-element, and clone each element,
789 for (RefPtr<Node> child = element->firstChild(); child; child = child->nextSibling())
793 void SVGUseElement::expandSymbolElementsInShadowTree(SVGShadowTreeRootElement* shadowRoot, Node* element)
795 if (element->hasTagName(SVGNames::symbolTag)) {
799 // height are provided on the 'use' element, then these attributes will be transferred to
801 // 'svg' element will use values of 100% for these attributes.
804 // Transfer all attributes from <symbol> to the new <svg> element
805 svgElement->attributes()->setAttributes(*element->attributes());
807 // Only clone symbol children, and add them to the new <svg> element
809 for (Node* child = element->firstChild(); child; child = child->nextSibling()) {
815 // We don't walk the target tree element-by-element, and clone each element,
824 ASSERT(element->parentNode());
825 element->parentNode()->replaceChild(svgElement.release(), element, ec);
833 for (RefPtr<Node> child = element->firstChild(); child; child = child->nextSibling())
889 SVGElement* element = 0;
891 element = static_cast<SVGElement*>(target);
894 targetInstance->setShadowTreeElement(element);
907 SVGElementInstance* SVGUseElement::instanceForShadowTreeElement(Node* element) const
914 return instanceForShadowTreeElement(element, m_targetElementInstance.get());
917 SVGElementInstance* SVGUseElement::instanceForShadowTreeElement(Node* element, SVGElementInstance* instance) const
919 ASSERT(element);
923 // this instance hasn't yet been associated to a shadowTree element.
927 if (element == instance->shadowTreeElement())
931 if (SVGElementInstance* search = instanceForShadowTreeElement(element, current))