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

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

Issue 336553003: Change Page::m_mainFrame to be a Frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 6 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/rendering/TextAutosizer.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 600da62811bc2a888f435e864e323584b655e35d..5583443802404677dae9a014ac5a30f3bc746487 100644
--- a/Source/core/svg/graphics/SVGImage.cpp
+++ b/Source/core/svg/graphics/SVGImage.cpp
@@ -66,7 +66,7 @@ SVGImage::~SVGImage()
if (m_page) {
// Store m_page in a local variable, clearing m_page, so that SVGImageChromeClient knows we're destructed.
OwnPtrWillBeRawPtr<Page> currentPage = m_page.release();
- currentPage->mainFrame()->loader().frameDetached(); // Break both the loader and view references to the frame
+ toLocalFrame(currentPage->mainFrame())->loader().frameDetached(); // Break both the loader and view references to the frame
currentPage->willBeDestroyed();
}
@@ -90,7 +90,7 @@ bool SVGImage::currentFrameHasSingleSecurityOrigin() const
if (!m_page)
return true;
- LocalFrame* frame = m_page->mainFrame();
+ LocalFrame* frame = toLocalFrame(m_page->mainFrame());
RELEASE_ASSERT(frame->document()->loadEventFinished());
@@ -123,7 +123,7 @@ static SVGSVGElement* svgRootElement(Page* page)
{
if (!page)
return 0;
- LocalFrame* frame = page->mainFrame();
+ LocalFrame* frame = toLocalFrame(page->mainFrame());
return frame->document()->accessSVGExtensions().rootElement();
}
@@ -320,7 +320,7 @@ FrameView* SVGImage::frameView() const
if (!m_page)
return 0;
- return m_page->mainFrame()->view();
+ return toLocalFrame(m_page->mainFrame())->view();
}
void SVGImage::computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio)
@@ -370,7 +370,7 @@ bool SVGImage::hasAnimations() const
SVGSVGElement* rootElement = svgRootElement(m_page.get());
if (!rootElement)
return false;
- return rootElement->timeContainer()->hasAnimations() || m_page->mainFrame()->document()->timeline().hasPendingUpdates();
+ return rootElement->timeContainer()->hasAnimations() || toLocalFrame(m_page->mainFrame())->document()->timeline().hasPendingUpdates();
}
bool SVGImage::dataChanged(bool allDataReceived)
« no previous file with comments | « Source/core/rendering/TextAutosizer.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698