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

Unified Diff: Source/core/page/Page.cpp

Issue 209353003: Clean up handling of autosizing state changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@crap_base
Patch Set: 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/page/Page.cpp
diff --git a/Source/core/page/Page.cpp b/Source/core/page/Page.cpp
index bf754e02fb7af76e3e3c43c8c9d19040afd8b2fb..270065c4283d3697d16c6d9c18795e2775f2a2fb 100644
--- a/Source/core/page/Page.cpp
+++ b/Source/core/page/Page.cpp
@@ -52,6 +52,7 @@
#include "core/page/StorageClient.h"
#include "core/page/ValidationMessageClient.h"
#include "core/page/scrolling/ScrollingCoordinator.h"
+#include "core/rendering/FastTextAutosizer.h"
#include "core/rendering/RenderView.h"
#include "core/rendering/TextAutosizer.h"
#include "core/storage/StorageNamespace.h"
@@ -486,10 +487,10 @@ void Page::settingsChanged(SettingsDelegate::ChangeType changeType)
}
break;
case SettingsDelegate::TextAutosizingChange:
- if (RuntimeEnabledFeatures::fastTextAutosizingEnabled()) {
- // FTA needs both setNeedsRecalcStyle and setNeedsLayout after a setting change.
- setNeedsRecalcStyleInAllFrames();
- setNeedsLayoutInAllFrames();
+ if (!mainFrame())
+ break;
+ if (FastTextAutosizer* textAutosizer = mainFrame()->document()->fastTextAutosizer()) {
+ textAutosizer->updatePageInfoInAllFrames();
} else {
for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().traverseNext()) {
if (TextAutosizer* textAutosizer = frame->document()->textAutosizer())

Powered by Google App Engine
This is Rietveld 408576698