| Index: Source/core/rendering/FastTextAutosizer.cpp
|
| diff --git a/Source/core/rendering/FastTextAutosizer.cpp b/Source/core/rendering/FastTextAutosizer.cpp
|
| index 70c8732bbba6fb59282b1c336e9da270fa29b7ea..37979f9c8caf8e032a321b57c295068e20c88160 100644
|
| --- a/Source/core/rendering/FastTextAutosizer.cpp
|
| +++ b/Source/core/rendering/FastTextAutosizer.cpp
|
| @@ -35,6 +35,7 @@
|
| #include "core/frame/Frame.h"
|
| #include "core/frame/FrameView.h"
|
| #include "core/frame/Settings.h"
|
| +#include "core/inspector/InspectorInstrumentation.h"
|
| #include "core/page/Page.h"
|
| #include "core/rendering/InlineIterator.h"
|
| #include "core/rendering/RenderBlock.h"
|
| @@ -152,10 +153,10 @@ void FastTextAutosizer::inflate(RenderBlock* block)
|
|
|
| bool FastTextAutosizer::enabled()
|
| {
|
| - return m_document->settings()
|
| - && m_document->settings()->textAutosizingEnabled()
|
| - && !m_document->printing()
|
| - && m_document->page();
|
| + if (!m_document->settings() || !m_document->page() || m_document->printing())
|
| + return false;
|
| +
|
| + return InspectorInstrumentation::overrideTextAutosizing(m_document->page(), m_document->settings()->textAutosizingEnabled());
|
| }
|
|
|
| void FastTextAutosizer::prepareRenderViewInfo(RenderView* renderView)
|
| @@ -175,8 +176,10 @@ void FastTextAutosizer::prepareRenderViewInfo(RenderView* renderView)
|
| m_baseMultiplier = m_document->settings()->accessibilityFontScaleFactor();
|
| // If the page has a meta viewport or @viewport, don't apply the device scale adjustment.
|
| const ViewportDescription& viewportDescription = m_document->page()->mainFrame()->document()->viewportDescription();
|
| - if (!viewportDescription.isSpecifiedByAuthor())
|
| - m_baseMultiplier *= m_document->settings()->deviceScaleAdjustment();
|
| + if (!viewportDescription.isSpecifiedByAuthor()) {
|
| + float deviceScaleAdjustment = InspectorInstrumentation::overrideFontScaleFactor(m_document->page(), m_document->settings()->deviceScaleAdjustment());
|
| + m_baseMultiplier *= deviceScaleAdjustment;
|
| + }
|
| #ifndef NDEBUG
|
| m_renderViewInfoPrepared = true;
|
| #endif
|
|
|