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..abbd79cf15b151184041d6fa29ae53a134cc8f16 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) |
|
pdr.
2013/10/30 04:53:08
I think you'll need to move this above m_textAutos
skobes
2013/10/30 17:35:51
Done.
|
| , 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::recalculateTextAutosizingMultipliers() |
| { |
| - 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; |
| + recalculateTextAutosizingMultipliers(); |
| +} |
| + |
| +void Settings::setDeviceScaleAdjustment(float deviceScaleAdjustment) |
|
pdr.
2013/10/30 04:53:08
In plumbing this through for the inspector side I
skobes
2013/10/30 17:35:51
I tried to make the name agnostic as to where it i
|
| +{ |
| + m_deviceScaleAdjustment = deviceScaleAdjustment; |
| + recalculateTextAutosizingMultipliers(); |
| +} |
| + |
| void Settings::setMediaTypeOverride(const String& mediaTypeOverride) |
| { |
| if (m_mediaTypeOverride == mediaTypeOverride) |