| Index: Source/core/page/Page.cpp
|
| diff --git a/Source/core/page/Page.cpp b/Source/core/page/Page.cpp
|
| index 760493dc20d6be34330e52706b6246498e9d85a6..938dd4d7b44379e5c8f35daa9b0e9a70705478a6 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"
|
| @@ -489,20 +490,19 @@ void Page::settingsChanged(SettingsDelegate::ChangeType changeType)
|
| }
|
| break;
|
| case SettingsDelegate::TextAutosizingChange:
|
| - // FTA needs both setNeedsRecalcStyle and setNeedsLayout after a setting change.
|
| - if (RuntimeEnabledFeatures::fastTextAutosizingEnabled()) {
|
| - setNeedsRecalcStyleInAllFrames();
|
| + if (!mainFrame())
|
| + break;
|
| + if (FastTextAutosizer* textAutosizer = mainFrame()->document()->fastTextAutosizer()) {
|
| + textAutosizer->updatePageInfoInAllFrames();
|
| } 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()) {
|
| - TextAutosizer* textAutosizer = frame->document()->textAutosizer();
|
| - if (textAutosizer)
|
| + if (TextAutosizer* textAutosizer = frame->document()->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());
|
|
|