PassRefPtr<NodeList> SVGSVGElement::collectIntersectionOrEnclosureList(const FloatRect& rect, SVGElement* referenceElement, CollectIntersectionOrEnclosure collect) const { Vector<RefPtr<Node> > nodes; SVGElement* svgElement = Traversal<SVGElement>::firstWithin(referenceElement ? referenceElement : this); while (svgElement) { if (collect == CollectIntersectionList) { if (checkIntersection(svgElement, rect)) nodes.append(svgElement); } else { if (checkEnclosure(svgElement, rect)) nodes.append(svgElement); } svgElement = Traversal<SVGElement>::next(svgElement, referenceElement ? referenceElement : this); } return StaticNodeList::adopt(nodes); }
PassRefPtr<NodeList> SVGSVGElement::collectIntersectionOrEnclosureList(const FloatRect& rect, SVGElement* referenceElement, CollectIntersectionOrEnclosure collect) const { Vector<RefPtr<Node> > nodes; Node* node = traverseNextNode(referenceElement ? referenceElement : this); while (node) { if (node->isSVGElement()) { if (collect == CollectIntersectionList) { if (checkIntersection(static_cast<SVGElement*>(node), rect)) nodes.append(node); } else { if (checkEnclosure(static_cast<SVGElement*>(node), rect)) nodes.append(node); } } node = node->traverseNextNode(referenceElement ? referenceElement : this); } return StaticNodeList::adopt(nodes); }
PassRefPtr<NodeList> SVGSVGElement::collectIntersectionOrEnclosureList(const FloatRect& rect, SVGElement* referenceElement, CollectIntersectionOrEnclosure collect) const { Vector<RefPtr<Node> > nodes; Element* element = ElementTraversal::next(referenceElement ? referenceElement : this); while (element) { if (element->isSVGElement()) { if (collect == CollectIntersectionList) { if (checkIntersection(static_cast<SVGElement*>(element), rect)) nodes.append(element); } else { if (checkEnclosure(static_cast<SVGElement*>(element), rect)) nodes.append(element); } } element = ElementTraversal::next(element, referenceElement ? referenceElement : this); } return StaticNodeList::adopt(nodes); }