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

Unified Diff: Source/core/dom/Document.cpp

Issue 209353003: Clean up handling of autosizing state changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@crap_base
Patch Set: Fix segfault in unit test. Created 6 years, 9 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/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index dc167e613183440e9272369d25018eacdcc1eb27..3640d9657aa47199c94438f1bb7b7620588b2137 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -2072,6 +2072,10 @@ void Document::attach(const AttachContext& context)
ContainerNode::attach(context);
+ // FTA can't update render view info while the Document is detached, so update now in case anything changed.
+ if (FastTextAutosizer* textAutosizer = fastTextAutosizer())
+ textAutosizer->updatePageInfo();
+
m_lifecycle.advanceTo(DocumentLifecycle::StyleClean);
}
« no previous file with comments | « LayoutTests/fast/text-autosizing/font-scale-factor-change-expected.html ('k') | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698