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

Unified Diff: Source/core/svg/graphics/SVGImage.cpp

Issue 188903003: Revert "Drive SVG Animations via requestAnimationFrame" (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/graphics/SVGImage.h ('k') | Source/core/svg/graphics/SVGImageChromeClient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/graphics/SVGImage.cpp
diff --git a/Source/core/svg/graphics/SVGImage.cpp b/Source/core/svg/graphics/SVGImage.cpp
index c234096f3930b720667b4100a7887c7f1845f04c..9fb0700d56825cc1d7b068b3bbb8abb3ceb76f94 100644
--- a/Source/core/svg/graphics/SVGImage.cpp
+++ b/Source/core/svg/graphics/SVGImage.cpp
@@ -42,7 +42,6 @@
#include "core/svg/SVGFEImageElement.h"
#include "core/svg/SVGImageElement.h"
#include "core/svg/SVGSVGElement.h"
-#include "core/svg/animation/SMILTimeContainer.h"
#include "core/svg/graphics/SVGImageChromeClient.h"
#include "platform/LengthFunctions.h"
#include "platform/geometry/IntRect.h"
@@ -417,17 +416,6 @@ void SVGImage::resetAnimation()
stopAnimation();
}
-bool SVGImage::hasAnimations() const
-{
- if (!m_page)
- return false;
- LocalFrame* frame = m_page->mainFrame();
- SVGSVGElement* rootElement = toSVGDocument(frame->document())->rootElement();
- if (!rootElement)
- return false;
- return rootElement->timeContainer()->hasAnimations();
-}
-
bool SVGImage::dataChanged(bool allDataReceived)
{
TRACE_EVENT0("webkit", "SVGImage::dataChanged");
@@ -450,12 +438,12 @@ bool SVGImage::dataChanged(bool allDataReceived)
// This will become an issue when SVGImage will be able to load other
// SVGImage objects, but we're safe now, because SVGImage can only be
// loaded by a top-level document.
- OwnPtr<Page> page = adoptPtr(new Page(pageClients));
- page->settings().setScriptEnabled(false);
- page->settings().setPluginsEnabled(false);
- page->settings().setAcceleratedCompositingEnabled(false);
+ m_page = adoptPtr(new Page(pageClients));
+ m_page->settings().setScriptEnabled(false);
+ m_page->settings().setPluginsEnabled(false);
+ m_page->settings().setAcceleratedCompositingEnabled(false);
- RefPtr<LocalFrame> frame = LocalFrame::create(FrameInit::create(&page->frameHost(), dummyFrameLoaderClient));
+ RefPtr<LocalFrame> frame = LocalFrame::create(FrameInit::create(&m_page->frameHost(), dummyFrameLoaderClient));
frame->setView(FrameView::create(frame.get()));
frame->init();
FrameLoader& loader = frame->loader();
@@ -465,8 +453,6 @@ bool SVGImage::dataChanged(bool allDataReceived)
frame->view()->setCanHaveScrollbars(false); // SVG Images will always synthesize a viewBox, if it's not available, and thus never see scrollbars.
frame->view()->setTransparent(true); // SVG Images are transparent.
- m_page = page.release();
-
loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data(), "image/svg+xml", "UTF-8", KURL(), ForceSynchronousLoad)));
// Set the intrinsic size before a container size is available.
m_intrinsicSize = containerSize();
« no previous file with comments | « Source/core/svg/graphics/SVGImage.h ('k') | Source/core/svg/graphics/SVGImageChromeClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698