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

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

Issue 31063004: Have Frame::loader() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | « Source/core/svg/SVGAElement.cpp ('k') | Source/core/testing/Internals.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 d4b2002b98f5f34cdc47d6a68693c914ef12547c..685429489c87a713fae8bde6aab94486a7abc986 100644
--- a/Source/core/svg/graphics/SVGImage.cpp
+++ b/Source/core/svg/graphics/SVGImage.cpp
@@ -62,7 +62,7 @@ SVGImage::~SVGImage()
if (m_page) {
// Store m_page in a local variable, clearing m_page, so that SVGImageChromeClient knows we're destructed.
OwnPtr<Page> currentPage = m_page.release();
- currentPage->mainFrame()->loader()->frameDetached(); // Break both the loader and view references to the frame
+ currentPage->mainFrame()->loader().frameDetached(); // Break both the loader and view references to the frame
}
// Verify that page teardown destroyed the Chrome
@@ -391,17 +391,17 @@ bool SVGImage::dataChanged(bool allDataReceived)
RefPtr<Frame> frame = Frame::create(m_page.get(), 0, dummyFrameLoaderClient);
frame->setView(FrameView::create(frame.get()));
frame->init();
- FrameLoader* loader = frame->loader();
- loader->forceSandboxFlags(SandboxAll);
+ FrameLoader& loader = frame->loader();
+ loader.forceSandboxFlags(SandboxAll);
frame->view()->setScrollbarsSuppressed(true);
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->activeDocumentLoader()); // DocumentLoader should have been created by frame->init().
- DocumentWriter* writer = loader->activeDocumentLoader()->beginWriting("image/svg+xml", "UTF-8");
+ ASSERT(loader.activeDocumentLoader()); // DocumentLoader should have been created by frame->init().
+ DocumentWriter* writer = loader.activeDocumentLoader()->beginWriting("image/svg+xml", "UTF-8");
writer->addData(data()->data(), data()->size());
- loader->activeDocumentLoader()->endWriting(writer);
+ loader.activeDocumentLoader()->endWriting(writer);
// Set the intrinsic size before a container size is available.
m_intrinsicSize = containerSize();
}
« no previous file with comments | « Source/core/svg/SVGAElement.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698