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

Unified Diff: Source/core/rendering/TextAutosizer.cpp

Issue 637283010: Return early from TextAutosizer::updatePageInfo for remote main frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | « no previous file | no next file » | 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 226c2894214abbd795d09dd63e2337002984b9a1..8685e0fce5cf979207fd6fefc206c0ce0139a8ad 100644
--- a/Source/core/rendering/TextAutosizer.cpp
+++ b/Source/core/rendering/TextAutosizer.cpp
@@ -509,7 +509,13 @@ void TextAutosizer::updatePageInfo()
RenderView* renderView = m_document->renderView();
bool horizontalWritingMode = isHorizontalWritingMode(renderView->style()->writingMode());
- LocalFrame* mainFrame = m_document->page()->deprecatedLocalMainFrame();
+ // FIXME: With out-of-process iframes, the top frame can be remote and
+ // doesn't have sizing information. Just return if this is the case.
+ Frame* frame = m_document->frame()->tree().top();
+ if (frame->isRemoteFrame())
+ return;
+
+ LocalFrame* mainFrame = toLocalFrame(frame);
dcheng 2014/10/23 21:48:17 I would probably still use dprecatedLocalMainFrame
nasko 2014/10/23 21:50:44 Done.
IntSize frameSize = m_document->settings()->textAutosizingWindowSizeOverride();
if (frameSize.isEmpty())
frameSize = windowSize();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698