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

Unified Diff: Source/core/svg/animation/SMILTimeContainer.cpp

Issue 191963002: Use new Traversal<SVG*Element> API more in SVG code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « Source/core/svg/animation/SMILTimeContainer.h ('k') | Source/core/svg/animation/SVGSMILElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/animation/SMILTimeContainer.cpp
diff --git a/Source/core/svg/animation/SMILTimeContainer.cpp b/Source/core/svg/animation/SMILTimeContainer.cpp
index 02a6444e36d13bfda217f4f73f0d7ac8341dbc6f..4edfff19f3ba49934eb5052085b4291bd4e65f58 100644
--- a/Source/core/svg/animation/SMILTimeContainer.cpp
+++ b/Source/core/svg/animation/SMILTimeContainer.cpp
@@ -37,7 +37,7 @@ using namespace std;
namespace WebCore {
-SMILTimeContainer::SMILTimeContainer(SVGSVGElement* owner)
+SMILTimeContainer::SMILTimeContainer(SVGSVGElement& owner)
: m_beginTime(0)
, m_pauseTime(0)
, m_resumeTime(0)
@@ -268,10 +268,8 @@ void SMILTimeContainer::wakeupTimerFired(Timer<SMILTimeContainer>*)
void SMILTimeContainer::updateDocumentOrderIndexes()
{
unsigned timingElementCount = 0;
- for (Element* element = m_ownerSVGElement; element; element = ElementTraversal::next(*element, m_ownerSVGElement)) {
- if (isSVGSMILElement(*element))
- toSVGSMILElement(element)->setDocumentOrderIndex(timingElementCount++);
- }
+ for (SVGSMILElement* element = Traversal<SVGSMILElement>::firstWithin(m_ownerSVGElement); element; element = Traversal<SVGSMILElement>::next(*element, &m_ownerSVGElement))
+ element->setDocumentOrderIndex(timingElementCount++);
m_documentOrderIndexesDirty = false;
}
@@ -294,8 +292,7 @@ struct PriorityCompare {
Document& SMILTimeContainer::document() const
{
- ASSERT(m_ownerSVGElement);
- return m_ownerSVGElement->document();
+ return m_ownerSVGElement.document();
}
AnimationClock& SMILTimeContainer::animationClock() const
« no previous file with comments | « Source/core/svg/animation/SMILTimeContainer.h ('k') | Source/core/svg/animation/SVGSMILElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698