{
// The below teardown is all handled by weak pointer processing in oilpan.
#if !ENABLE(OILPAN)
- HashSet<RawPtr<SVGElement> >::iterator end = m_clients.end();
- for (HashSet<RawPtr<SVGElement> >::iterator it = m_clients.begin(); it != end; ++it)
- (*it)->cursorElementRemoved();
+ for (const auto& client : m_clients)
+ client->cursorElementRemoved();
#endif
}
void SVGCursorElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
- SVGParsingError parseError = NoError;
-
- if (!isSupportedAttribute(name)) {
- SVGElement::parseAttribute(name, value);
- } else if (name == SVGNames::xAttr) {
- m_x->setBaseValueAsString(value, parseError);
- } else if (name == SVGNames::yAttr) {
- m_y->setBaseValueAsString(value, parseError);
- } else if (SVGURIReference::parseAttribute(name, value, parseError)) {
- } else if (SVGTests::parseAttribute(name, value)) {
- } else {
- ASSERT_NOT_REACHED();
- }
-
- reportAttributeParsingError(parseError, name, value);
+ parseAttributeNew(name, value);
}
void SVGCursorElement::addClient(SVGElement* element)
SVGElement::InvalidationGuard invalidationGuard(this);
// Any change of a cursor specific attribute triggers this recalc.
- WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement> >::const_iterator it = m_clients.begin();
- WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement> >::const_iterator end = m_clients.end();
-
- for (; it != end; ++it)
- (*it)->setNeedsStyleRecalc(SubtreeStyleChange);
+ for (const auto& client : m_clients)
+ client->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::SVGCursor));
}
void SVGCursorElement::trace(Visitor* visitor)