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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp

Issue 1941403002: Make servicing of SMIL animations require a FrameView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) 2007 Rob Buis <buis@kde.org> 4 * Copyright (C) 2007 Rob Buis <buis@kde.org>
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 80
81 LayoutSVGResourceContainer* SVGDocumentExtensions::resourceById(const AtomicStri ng& id) const 81 LayoutSVGResourceContainer* SVGDocumentExtensions::resourceById(const AtomicStri ng& id) const
82 { 82 {
83 if (id.isEmpty()) 83 if (id.isEmpty())
84 return nullptr; 84 return nullptr;
85 85
86 return m_resources.get(id); 86 return m_resources.get(id);
87 } 87 }
88 88
89 void SVGDocumentExtensions::serviceOnAnimationFrame(Document& document, double m onotonicAnimationStartTime) 89 void SVGDocumentExtensions::serviceOnAnimationFrame(Document& document)
90 { 90 {
91 if (!document.svgExtensions()) 91 if (!document.svgExtensions())
92 return; 92 return;
93 document.accessSVGExtensions().serviceAnimations(monotonicAnimationStartTime ); 93 document.accessSVGExtensions().serviceAnimations();
94 } 94 }
95 95
96 void SVGDocumentExtensions::serviceAnimations(double monotonicAnimationStartTime ) 96 void SVGDocumentExtensions::serviceAnimations()
97 { 97 {
98 if (RuntimeEnabledFeatures::smilEnabled()) { 98 if (RuntimeEnabledFeatures::smilEnabled()) {
99 HeapVector<Member<SVGSVGElement>> timeContainers; 99 HeapVector<Member<SVGSVGElement>> timeContainers;
100 copyToVector(m_timeContainers, timeContainers); 100 copyToVector(m_timeContainers, timeContainers);
101 for (const auto& container : timeContainers) 101 for (const auto& container : timeContainers)
102 container->timeContainer()->serviceAnimations(monotonicAnimationStar tTime); 102 container->timeContainer()->serviceAnimations();
103 } 103 }
104 104
105 SVGElementSet webAnimationsPendingSVGElements; 105 SVGElementSet webAnimationsPendingSVGElements;
106 webAnimationsPendingSVGElements.swap(m_webAnimationsPendingSVGElements); 106 webAnimationsPendingSVGElements.swap(m_webAnimationsPendingSVGElements);
107 107
108 // TODO(alancutter): Make SVG animation effect application a separate docume nt lifecycle phase from servicing animations to be responsive to Javascript mani pulation of exposed animation objects. 108 // TODO(alancutter): Make SVG animation effect application a separate docume nt lifecycle phase from servicing animations to be responsive to Javascript mani pulation of exposed animation objects.
109 for (auto& svgElement : webAnimationsPendingSVGElements) 109 for (auto& svgElement : webAnimationsPendingSVGElements)
110 svgElement->applyActiveWebAnimations(); 110 svgElement->applyActiveWebAnimations();
111 111
112 ASSERT(m_webAnimationsPendingSVGElements.isEmpty()); 112 ASSERT(m_webAnimationsPendingSVGElements.isEmpty());
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 { 360 {
361 visitor->trace(m_document); 361 visitor->trace(m_document);
362 visitor->trace(m_timeContainers); 362 visitor->trace(m_timeContainers);
363 visitor->trace(m_webAnimationsPendingSVGElements); 363 visitor->trace(m_webAnimationsPendingSVGElements);
364 visitor->trace(m_relativeLengthSVGRoots); 364 visitor->trace(m_relativeLengthSVGRoots);
365 visitor->trace(m_pendingResources); 365 visitor->trace(m_pendingResources);
366 visitor->trace(m_pendingResourcesForRemoval); 366 visitor->trace(m_pendingResourcesForRemoval);
367 } 367 }
368 368
369 } // namespace blink 369 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698