OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All rights
reserved. |
3 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 3 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 void setPictographFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMM
ON); | 85 void setPictographFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMM
ON); |
86 const AtomicString& pictographFontFamily(UScriptCode = USCRIPT_COMMON) const
; | 86 const AtomicString& pictographFontFamily(UScriptCode = USCRIPT_COMMON) const
; |
87 | 87 |
88 void setTextAutosizingEnabled(bool); | 88 void setTextAutosizingEnabled(bool); |
89 bool textAutosizingEnabled() const; | 89 bool textAutosizingEnabled() const; |
90 | 90 |
91 void setTextAutosizingFontScaleFactor(float); | 91 void setTextAutosizingFontScaleFactor(float); |
92 float textAutosizingFontScaleFactor() const { return m_textAutosizingFontSca
leFactor; } | 92 float textAutosizingFontScaleFactor() const { return m_textAutosizingFontSca
leFactor; } |
93 | 93 |
| 94 // Compensates for poor text legibility on mobile devices. This value is |
| 95 // multiplied by the font scale factor when performing text autosizing of |
| 96 // websites that do not set an explicit viewport description. |
| 97 void setDeviceScaleAdjustment(float); |
| 98 float deviceScaleAdjustment() const { return m_deviceScaleAdjustment; } |
| 99 |
94 // Only set by Layout Tests, and only used if textAutosizingEnabled() return
s true. | 100 // Only set by Layout Tests, and only used if textAutosizingEnabled() return
s true. |
95 void setTextAutosizingWindowSizeOverride(const IntSize&); | 101 void setTextAutosizingWindowSizeOverride(const IntSize&); |
96 const IntSize& textAutosizingWindowSizeOverride() const { return m_textAutos
izingWindowSizeOverride; } | 102 const IntSize& textAutosizingWindowSizeOverride() const { return m_textAutos
izingWindowSizeOverride; } |
97 | 103 |
98 void setUseWideViewport(bool); | 104 void setUseWideViewport(bool); |
99 bool useWideViewport() const { return m_useWideViewport; } | 105 bool useWideViewport() const { return m_useWideViewport; } |
100 | 106 |
101 void setLoadWithOverviewMode(bool); | 107 void setLoadWithOverviewMode(bool); |
102 bool loadWithOverviewMode() const { return m_loadWithOverviewMode; } | 108 bool loadWithOverviewMode() const { return m_loadWithOverviewMode; } |
103 | 109 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 String m_mediaTypeOverride; | 167 String m_mediaTypeOverride; |
162 KURL m_userStyleSheetLocation; | 168 KURL m_userStyleSheetLocation; |
163 ScriptFontFamilyMap m_standardFontFamilyMap; | 169 ScriptFontFamilyMap m_standardFontFamilyMap; |
164 ScriptFontFamilyMap m_serifFontFamilyMap; | 170 ScriptFontFamilyMap m_serifFontFamilyMap; |
165 ScriptFontFamilyMap m_fixedFontFamilyMap; | 171 ScriptFontFamilyMap m_fixedFontFamilyMap; |
166 ScriptFontFamilyMap m_sansSerifFontFamilyMap; | 172 ScriptFontFamilyMap m_sansSerifFontFamilyMap; |
167 ScriptFontFamilyMap m_cursiveFontFamilyMap; | 173 ScriptFontFamilyMap m_cursiveFontFamilyMap; |
168 ScriptFontFamilyMap m_fantasyFontFamilyMap; | 174 ScriptFontFamilyMap m_fantasyFontFamilyMap; |
169 ScriptFontFamilyMap m_pictographFontFamilyMap; | 175 ScriptFontFamilyMap m_pictographFontFamilyMap; |
170 float m_textAutosizingFontScaleFactor; | 176 float m_textAutosizingFontScaleFactor; |
| 177 float m_deviceScaleAdjustment; |
171 IntSize m_textAutosizingWindowSizeOverride; | 178 IntSize m_textAutosizingWindowSizeOverride; |
172 bool m_textAutosizingEnabled : 1; | 179 bool m_textAutosizingEnabled : 1; |
173 bool m_useWideViewport : 1; | 180 bool m_useWideViewport : 1; |
174 bool m_loadWithOverviewMode : 1; | 181 bool m_loadWithOverviewMode : 1; |
175 | 182 |
176 SETTINGS_MEMBER_VARIABLES | 183 SETTINGS_MEMBER_VARIABLES |
177 | 184 |
178 bool m_isJavaEnabled : 1; | 185 bool m_isJavaEnabled : 1; |
179 bool m_loadsImagesAutomatically : 1; | 186 bool m_loadsImagesAutomatically : 1; |
180 bool m_areImagesEnabled : 1; | 187 bool m_areImagesEnabled : 1; |
181 bool m_arePluginsEnabled : 1; | 188 bool m_arePluginsEnabled : 1; |
182 bool m_isScriptEnabled : 1; | 189 bool m_isScriptEnabled : 1; |
183 bool m_dnsPrefetchingEnabled : 1; | 190 bool m_dnsPrefetchingEnabled : 1; |
184 | 191 |
185 bool m_touchEventEmulationEnabled : 1; | 192 bool m_touchEventEmulationEnabled : 1; |
186 bool m_openGLMultisamplingEnabled : 1; | 193 bool m_openGLMultisamplingEnabled : 1; |
187 bool m_viewportEnabled : 1; | 194 bool m_viewportEnabled : 1; |
188 | 195 |
189 // FIXME: This is a temporary flag and should be removed once accelerated | 196 // FIXME: This is a temporary flag and should be removed once accelerated |
190 // overflow scroll is ready (crbug.com/254111). | 197 // overflow scroll is ready (crbug.com/254111). |
191 bool m_compositorDrivenAcceleratedScrollingEnabled : 1; | 198 bool m_compositorDrivenAcceleratedScrollingEnabled : 1; |
192 | 199 |
193 Timer<Settings> m_setImageLoadingSettingsTimer; | 200 Timer<Settings> m_setImageLoadingSettingsTimer; |
194 void imageLoadingSettingsTimerFired(Timer<Settings>*); | 201 void imageLoadingSettingsTimerFired(Timer<Settings>*); |
| 202 void recalculateTextAutosizingMultipliers(); |
195 }; | 203 }; |
196 | 204 |
197 } // namespace WebCore | 205 } // namespace WebCore |
198 | 206 |
199 #endif // Settings_h | 207 #endif // Settings_h |
OLD | NEW |