| Index: Source/core/page/Page.cpp
|
| diff --git a/Source/core/page/Page.cpp b/Source/core/page/Page.cpp
|
| index 2530af92a517b260752070675d004691affc9c68..a5986abd7e881ebf5f3bb49056b6105c65251e86 100644
|
| --- a/Source/core/page/Page.cpp
|
| +++ b/Source/core/page/Page.cpp
|
| @@ -51,7 +51,6 @@
|
| #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"
|
| @@ -489,19 +488,20 @@ void Page::settingsChanged(SettingsDelegate::ChangeType changeType)
|
| }
|
| break;
|
| case SettingsDelegate::TextAutosizingChange:
|
| - if (!mainFrame())
|
| - break;
|
| - if (FastTextAutosizer* textAutosizer = mainFrame()->document()->fastTextAutosizer()) {
|
| - textAutosizer->updatePageInfoInAllFrames();
|
| + // FTA needs both setNeedsRecalcStyle and setNeedsLayout after a setting change.
|
| + if (RuntimeEnabledFeatures::fastTextAutosizingEnabled()) {
|
| + setNeedsRecalcStyleInAllFrames();
|
| } else {
|
| + // FIXME: I wonder if this needs to traverse frames like in WebViewImpl::resize, or whether there is only one document per Settings instance?
|
| for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().traverseNext()) {
|
| - if (TextAutosizer* textAutosizer = frame->document()->textAutosizer())
|
| + TextAutosizer* textAutosizer = frame->document()->textAutosizer();
|
| + if (textAutosizer)
|
| textAutosizer->recalculateMultipliers();
|
| }
|
| - // TextAutosizing updates RenderStyle during layout phase (via TextAutosizer::processSubtree).
|
| - // We should invoke setNeedsLayout here.
|
| - setNeedsLayoutInAllFrames();
|
| }
|
| + // TextAutosizing updates RenderStyle during layout phase (via TextAutosizer::processSubtree).
|
| + // We should invoke setNeedsLayout here.
|
| + setNeedsLayoutInAllFrames();
|
| break;
|
| case SettingsDelegate::ScriptEnableChange:
|
| m_inspectorController->scriptsEnabled(settings().scriptEnabled());
|
|
|