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

Unified Diff: third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp

Issue 2408913002: Push hasValidAttributeName/Type down into SVGAnimateElement (Closed)
Patch Set: Created 4 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 | « third_party/WebKit/Source/core/svg/animation/SVGSMILElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp b/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
index 1e2dfff24dde60de9bf803331d50278355f4eac6..02dc37c732ecf236cf0a86aceb9bb4cb9b7119d3 100644
--- a/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
+++ b/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
@@ -325,10 +325,6 @@ void SVGSMILElement::removedFrom(ContainerNode* rootParent) {
SVGElement::removedFrom(rootParent);
}
-bool SVGSMILElement::hasValidAttributeName() {
- return attributeName() != anyQName();
-}
-
SMILTime SVGSMILElement::parseOffsetValue(const String& data) {
bool ok;
double result = 0;
@@ -1322,11 +1318,14 @@ void SVGSMILElement::dispatchPendingEvent(const AtomicString& eventType) {
}
}
+bool SVGSMILElement::hasValidTarget() {
+ return targetElement() && targetElement()->inActiveDocument();
+}
+
void SVGSMILElement::schedule() {
- ASSERT(!m_isScheduled);
+ DCHECK(!m_isScheduled);
- if (!m_timeContainer || !m_targetElement || !hasValidAttributeName() ||
- !hasValidAttributeType() || !m_targetElement->inActiveDocument())
+ if (!m_timeContainer || !hasValidTarget())
return;
m_timeContainer->schedule(this, m_targetElement, m_attributeName);
@@ -1337,8 +1336,8 @@ void SVGSMILElement::unscheduleIfScheduled() {
if (!m_isScheduled)
return;
- ASSERT(m_timeContainer);
- ASSERT(m_targetElement);
+ DCHECK(m_timeContainer);
+ DCHECK(m_targetElement);
m_timeContainer->unschedule(this, m_targetElement, m_attributeName);
m_isScheduled = false;
}
« no previous file with comments | « third_party/WebKit/Source/core/svg/animation/SVGSMILElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698