Chromium Code Reviews| Index: Source/core/page/Settings.cpp |
| diff --git a/Source/core/page/Settings.cpp b/Source/core/page/Settings.cpp |
| index 3bde44c93c2bbe2bbf28ffc5af339883aee439f3..97704d2d230aa34a288d94b53c1e7b0267eba6fb 100644 |
| --- a/Source/core/page/Settings.cpp |
| +++ b/Source/core/page/Settings.cpp |
| @@ -120,6 +120,7 @@ Settings::Settings(Page* page) |
| #else |
| , m_textAutosizingEnabled(false) |
| #endif |
| + , m_deviceScaleAdjustment(1.0f) |
| , m_useWideViewport(true) |
| , m_loadWithOverviewMode(true) |
| SETTINGS_INITIALIZER_LIST |
| @@ -258,10 +259,8 @@ void Settings::setLoadWithOverviewMode(bool loadWithOverviewMode) |
| m_page->chrome().dispatchViewportPropertiesDidChange(m_page->mainFrame()->document()->viewportDescription()); |
| } |
| -void Settings::setTextAutosizingFontScaleFactor(float fontScaleFactor) |
| +void Settings::recalculateAutosizingMultipliers() |
|
pdr.
2013/10/29 02:04:44
Confusingly, autosizing and text autosizing are di
skobes
2013/10/29 17:43:32
Done.
|
| { |
| - m_textAutosizingFontScaleFactor = fontScaleFactor; |
| - |
| // FIXME: I wonder if this needs to traverse frames like in WebViewImpl::resize, or whether there is only one document per Settings instance? |
| for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) |
| frame->document()->textAutosizer()->recalculateMultipliers(); |
| @@ -269,6 +268,18 @@ void Settings::setTextAutosizingFontScaleFactor(float fontScaleFactor) |
| m_page->setNeedsRecalcStyleInAllFrames(); |
| } |
| +void Settings::setTextAutosizingFontScaleFactor(float fontScaleFactor) |
| +{ |
| + m_textAutosizingFontScaleFactor = fontScaleFactor; |
| + recalculateAutosizingMultipliers(); |
| +} |
| + |
| +void Settings::setDeviceScaleAdjustment(float deviceScaleAdjustment) |
| +{ |
| + m_deviceScaleAdjustment = deviceScaleAdjustment; |
| + recalculateAutosizingMultipliers(); |
| +} |
| + |
| void Settings::setMediaTypeOverride(const String& mediaTypeOverride) |
| { |
| if (m_mediaTypeOverride == mediaTypeOverride) |