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

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

Issue 120513004: Don't expose DocumentWriter to embedding layer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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
Index: Source/core/svg/graphics/SVGImage.cpp
diff --git a/Source/core/svg/graphics/SVGImage.cpp b/Source/core/svg/graphics/SVGImage.cpp
index b32b3114842916a5fdca115c868fcf673823492b..565358fb3b5b0f07e95b82353c70d578c4d21001 100644
--- a/Source/core/svg/graphics/SVGImage.cpp
+++ b/Source/core/svg/graphics/SVGImage.cpp
@@ -31,7 +31,7 @@
#include "core/dom/NodeTraversal.h"
#include "core/dom/shadow/ComposedTreeWalker.h"
-#include "core/loader/DocumentLoader.h"
+#include "core/loader/FrameLoadRequest.h"
#include "core/page/Chrome.h"
#include "core/frame/Frame.h"
#include "core/frame/FrameView.h"
@@ -399,10 +399,7 @@ 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.
- ASSERT(loader.documentLoader()); // DocumentLoader should have been created by frame->init().
- DocumentWriter* writer = loader.documentLoader()->beginWriting("image/svg+xml", "UTF-8");
- writer->addData(data()->data(), data()->size());
- loader.documentLoader()->endWriting(writer);
+ 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();
}

Powered by Google App Engine
This is Rietveld 408576698