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

Unified Diff: Source/core/rendering/TextAutosizer.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/FastTextAutosizer.cpp ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/TextAutosizer.cpp
diff --git a/Source/core/rendering/TextAutosizer.cpp b/Source/core/rendering/TextAutosizer.cpp
index 9bd2914519f2bec0d125914b7b48f3a975d6021e..290c008fa79c5d4a98ca3ff4a40e378e52bbc210 100644
--- a/Source/core/rendering/TextAutosizer.cpp
+++ b/Source/core/rendering/TextAutosizer.cpp
@@ -177,7 +177,7 @@ bool TextAutosizer::isApplicable() const
&& m_document->settings()->textAutosizingEnabled()
&& m_document->page()
&& m_document->page()->mainFrame()
- && m_document->page()->mainFrame()->loader().stateMachine()->committedFirstRealDocumentLoad();
+ && m_document->page()->deprecatedLocalMainFrame()->loader().stateMachine()->committedFirstRealDocumentLoad();
}
void TextAutosizer::recalculateMultipliers()
@@ -201,7 +201,7 @@ bool TextAutosizer::processSubtree(RenderObject* layoutRoot)
if (!isApplicable() || layoutRoot->view()->document().printing())
return false;
- LocalFrame* mainFrame = m_document->page()->mainFrame();
+ LocalFrame* mainFrame = m_document->page()->deprecatedLocalMainFrame();
TextAutosizingWindowInfo windowInfo;
// Window area, in logical (density-independent) pixels.
@@ -213,8 +213,7 @@ bool TextAutosizer::processSubtree(RenderObject* layoutRoot)
// frame doesn't get scaled to less than overview scale), in CSS pixels.
windowInfo.minLayoutSize = mainFrame->view()->layoutSize();
for (Frame* frame = m_document->frame(); frame; frame = frame->tree().parent()) {
- if (frame->isLocalFrame())
- windowInfo.minLayoutSize = windowInfo.minLayoutSize.shrunkTo(toLocalFrame(frame)->view()->layoutSize());
+ windowInfo.minLayoutSize = windowInfo.minLayoutSize.shrunkTo(toLocalFrame(frame)->view()->layoutSize());
}
// The layoutRoot could be neither a container nor a cluster, so walk up the tree till we find each of these.
@@ -262,7 +261,7 @@ float TextAutosizer::clusterMultiplier(WritingMode writingMode, const TextAutosi
multiplier *= m_document->settings()->accessibilityFontScaleFactor();
// If the page has a meta viewport or @viewport, don't apply the device scale adjustment.
- const ViewportDescription& viewportDescription = m_document->page()->mainFrame()->document()->viewportDescription();
+ const ViewportDescription& viewportDescription = m_document->page()->deprecatedLocalMainFrame()->document()->viewportDescription();
if (!viewportDescription.isSpecifiedByAuthor()) {
float deviceScaleAdjustment = m_document->settings()->deviceScaleAdjustment();
multiplier *= deviceScaleAdjustment;
« no previous file with comments | « Source/core/rendering/FastTextAutosizer.cpp ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698