Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Unified Diff: Source/core/page/Settings.h

Issue 49913005: Add Settings::deviceScaleAdjustment. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address review comments. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/page/Settings.h
diff --git a/Source/core/page/Settings.h b/Source/core/page/Settings.h
index 41f89e23f784d89be55ed04f1b272b3e101d9821..d64186a1e3144ff9a5fd8bf1e80107bf7c4fc7e2 100644
--- a/Source/core/page/Settings.h
+++ b/Source/core/page/Settings.h
@@ -91,6 +91,12 @@ public:
void setTextAutosizingFontScaleFactor(float);
float textAutosizingFontScaleFactor() const { return m_textAutosizingFontScaleFactor; }
+ // Compensates for poor text legibility on mobile devices. This value is
+ // multiplied by the font scale factor when performing text autosizing of
+ // websites that do not set an explicit viewport description.
+ void setDeviceScaleAdjustment(float);
+ float deviceScaleAdjustment() const { return m_deviceScaleAdjustment; }
+
// Only set by Layout Tests, and only used if textAutosizingEnabled() returns true.
void setTextAutosizingWindowSizeOverride(const IntSize&);
const IntSize& textAutosizingWindowSizeOverride() const { return m_textAutosizingWindowSizeOverride; }
@@ -168,6 +174,7 @@ private:
ScriptFontFamilyMap m_fantasyFontFamilyMap;
ScriptFontFamilyMap m_pictographFontFamilyMap;
float m_textAutosizingFontScaleFactor;
+ float m_deviceScaleAdjustment;
IntSize m_textAutosizingWindowSizeOverride;
bool m_textAutosizingEnabled : 1;
bool m_useWideViewport : 1;
@@ -192,6 +199,7 @@ private:
Timer<Settings> m_setImageLoadingSettingsTimer;
void imageLoadingSettingsTimerFired(Timer<Settings>*);
+ void recalculateTextAutosizingMultipliers();
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698