Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1740)

Unified Diff: Source/core/svg/SVGCursorElement.cpp

Issue 643703006: SVGElement::parseAttribute resolves property via property map (Step 2.4) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: aut Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/svg/SVGGlyphRefElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGCursorElement.cpp
diff --git a/Source/core/svg/SVGCursorElement.cpp b/Source/core/svg/SVGCursorElement.cpp
index 98e2b9c20615e310f792b3abdc9aa0b0df42ae88..f5faab3e17d7b633cf2f1e92b9d61216c534c67d 100644
--- a/Source/core/svg/SVGCursorElement.cpp
+++ b/Source/core/svg/SVGCursorElement.cpp
@@ -44,9 +44,8 @@ SVGCursorElement::~SVGCursorElement()
{
// 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 (auto& client : m_clients)
+ client->cursorElementRemoved();
#endif
}
@@ -64,21 +63,7 @@ bool SVGCursorElement::isSupportedAttribute(const QualifiedName& attrName)
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)
@@ -113,11 +98,8 @@ void SVGCursorElement::svgAttributeChanged(const QualifiedName& attrName)
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, StyleChangeReasonForTracing::create(StyleChangeReason::SVGCursor));
+ for (auto& client : m_clients)
+ client->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::SVGCursor));
}
void SVGCursorElement::trace(Visitor* visitor)
« no previous file with comments | « no previous file | Source/core/svg/SVGGlyphRefElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698