Chromium Code Reviews| 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 30 matching lines...) Expand all Loading... | |
| 41 class Page; | 41 class Page; |
| 42 | 42 |
| 43 enum EditableLinkBehavior { | 43 enum EditableLinkBehavior { |
| 44 EditableLinkDefaultBehavior, | 44 EditableLinkDefaultBehavior, |
| 45 EditableLinkAlwaysLive, | 45 EditableLinkAlwaysLive, |
| 46 EditableLinkOnlyLiveWithShiftKey, | 46 EditableLinkOnlyLiveWithShiftKey, |
| 47 EditableLinkLiveWhenNotFocused, | 47 EditableLinkLiveWhenNotFocused, |
| 48 EditableLinkNeverLive | 48 EditableLinkNeverLive |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 enum TextAutosizingOverride { | |
| 52 NoOverride, | |
| 53 Enabled, | |
| 54 Disabled | |
| 55 }; | |
| 56 | |
| 51 // UScriptCode uses -1 and 0 for UScriptInvalidCode and UScriptCommon. | 57 // UScriptCode uses -1 and 0 for UScriptInvalidCode and UScriptCommon. |
| 52 // We need to use -2 and -3 for empty value and deleted value. | 58 // We need to use -2 and -3 for empty value and deleted value. |
| 53 struct UScriptCodeHashTraits : WTF::GenericHashTraits<int> { | 59 struct UScriptCodeHashTraits : WTF::GenericHashTraits<int> { |
| 54 static const bool emptyValueIsZero = false; | 60 static const bool emptyValueIsZero = false; |
| 55 static int emptyValue() { return -2; } | 61 static int emptyValue() { return -2; } |
| 56 static void constructDeletedValue(int& slot) { slot = -3; } | 62 static void constructDeletedValue(int& slot) { slot = -3; } |
| 57 static bool isDeletedValue(int value) { return value == -3; } | 63 static bool isDeletedValue(int value) { return value == -3; } |
| 58 }; | 64 }; |
| 59 | 65 |
| 60 typedef HashMap<int, AtomicString, DefaultHash<int>::Hash, UScriptCodeHashTraits > ScriptFontFamilyMap; | 66 typedef HashMap<int, AtomicString, DefaultHash<int>::Hash, UScriptCodeHashTraits > ScriptFontFamilyMap; |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 79 void setCursiveFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON) ; | 85 void setCursiveFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON) ; |
| 80 const AtomicString& cursiveFontFamily(UScriptCode = USCRIPT_COMMON) const; | 86 const AtomicString& cursiveFontFamily(UScriptCode = USCRIPT_COMMON) const; |
| 81 | 87 |
| 82 void setFantasyFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON) ; | 88 void setFantasyFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON) ; |
| 83 const AtomicString& fantasyFontFamily(UScriptCode = USCRIPT_COMMON) const; | 89 const AtomicString& fantasyFontFamily(UScriptCode = USCRIPT_COMMON) const; |
| 84 | 90 |
| 85 void setPictographFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMM ON); | 91 void setPictographFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMM ON); |
| 86 const AtomicString& pictographFontFamily(UScriptCode = USCRIPT_COMMON) const ; | 92 const AtomicString& pictographFontFamily(UScriptCode = USCRIPT_COMMON) const ; |
| 87 | 93 |
| 88 void setTextAutosizingEnabled(bool); | 94 void setTextAutosizingEnabled(bool); |
| 89 bool textAutosizingEnabled() const { return m_textAutosizingEnabled; } | 95 bool textAutosizingEnabled() const; |
| 90 | 96 |
| 91 void setTextAutosizingFontScaleFactor(float); | 97 void setTextAutosizingFontScaleFactor(float); |
| 92 float textAutosizingFontScaleFactor() const { return m_textAutosizingFontSca leFactor; } | 98 float textAutosizingFontScaleFactor() const { return m_textAutosizingFontSca leFactor; } |
| 93 | 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 |
| 104 void setTextAutosizingEnabledOverride(TextAutosizingOverride); | |
| 105 | |
| 98 void setUseWideViewport(bool); | 106 void setUseWideViewport(bool); |
| 99 bool useWideViewport() const { return m_useWideViewport; } | 107 bool useWideViewport() const { return m_useWideViewport; } |
| 100 | 108 |
| 101 void setLoadWithOverviewMode(bool); | 109 void setLoadWithOverviewMode(bool); |
| 102 bool loadWithOverviewMode() const { return m_loadWithOverviewMode; } | 110 bool loadWithOverviewMode() const { return m_loadWithOverviewMode; } |
| 103 | 111 |
| 104 // Only set by Layout Tests. | 112 // Only set by Layout Tests. |
| 105 void setMediaTypeOverride(const String&); | 113 void setMediaTypeOverride(const String&); |
| 106 const String& mediaTypeOverride() const { return m_mediaTypeOverride; } | 114 const String& mediaTypeOverride() const { return m_mediaTypeOverride; } |
| 107 | 115 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 ScriptFontFamilyMap m_fixedFontFamilyMap; | 173 ScriptFontFamilyMap m_fixedFontFamilyMap; |
| 166 ScriptFontFamilyMap m_sansSerifFontFamilyMap; | 174 ScriptFontFamilyMap m_sansSerifFontFamilyMap; |
| 167 ScriptFontFamilyMap m_cursiveFontFamilyMap; | 175 ScriptFontFamilyMap m_cursiveFontFamilyMap; |
| 168 ScriptFontFamilyMap m_fantasyFontFamilyMap; | 176 ScriptFontFamilyMap m_fantasyFontFamilyMap; |
| 169 ScriptFontFamilyMap m_pictographFontFamilyMap; | 177 ScriptFontFamilyMap m_pictographFontFamilyMap; |
| 170 float m_textAutosizingFontScaleFactor; | 178 float m_textAutosizingFontScaleFactor; |
| 171 IntSize m_textAutosizingWindowSizeOverride; | 179 IntSize m_textAutosizingWindowSizeOverride; |
| 172 bool m_textAutosizingEnabled : 1; | 180 bool m_textAutosizingEnabled : 1; |
| 173 bool m_useWideViewport : 1; | 181 bool m_useWideViewport : 1; |
| 174 bool m_loadWithOverviewMode : 1; | 182 bool m_loadWithOverviewMode : 1; |
| 183 unsigned m_textAutosizingOverride : 2; // TextAutosizingOverride | |
|
skobes
2013/10/16 19:38:09
Why is the type unsigned int instead of TextAutosi
pdr.
2013/10/18 01:28:44
This is a c++ issue where enum types can't be in b
| |
| 175 | 184 |
| 176 SETTINGS_MEMBER_VARIABLES | 185 SETTINGS_MEMBER_VARIABLES |
| 177 | 186 |
| 178 bool m_isJavaEnabled : 1; | 187 bool m_isJavaEnabled : 1; |
| 179 bool m_loadsImagesAutomatically : 1; | 188 bool m_loadsImagesAutomatically : 1; |
| 180 bool m_areImagesEnabled : 1; | 189 bool m_areImagesEnabled : 1; |
| 181 bool m_arePluginsEnabled : 1; | 190 bool m_arePluginsEnabled : 1; |
| 182 bool m_isScriptEnabled : 1; | 191 bool m_isScriptEnabled : 1; |
| 183 bool m_dnsPrefetchingEnabled : 1; | 192 bool m_dnsPrefetchingEnabled : 1; |
| 184 | 193 |
| 185 bool m_touchEventEmulationEnabled : 1; | 194 bool m_touchEventEmulationEnabled : 1; |
| 186 bool m_openGLMultisamplingEnabled : 1; | 195 bool m_openGLMultisamplingEnabled : 1; |
| 187 bool m_viewportEnabled : 1; | 196 bool m_viewportEnabled : 1; |
| 188 | 197 |
| 189 // FIXME: This is a temporary flag and should be removed once accelerated | 198 // FIXME: This is a temporary flag and should be removed once accelerated |
| 190 // overflow scroll is ready (crbug.com/254111). | 199 // overflow scroll is ready (crbug.com/254111). |
| 191 bool m_compositorDrivenAcceleratedScrollingEnabled : 1; | 200 bool m_compositorDrivenAcceleratedScrollingEnabled : 1; |
| 192 | 201 |
| 193 Timer<Settings> m_setImageLoadingSettingsTimer; | 202 Timer<Settings> m_setImageLoadingSettingsTimer; |
| 194 void imageLoadingSettingsTimerFired(Timer<Settings>*); | 203 void imageLoadingSettingsTimerFired(Timer<Settings>*); |
| 195 }; | 204 }; |
| 196 | 205 |
| 197 } // namespace WebCore | 206 } // namespace WebCore |
| 198 | 207 |
| 199 #endif // Settings_h | 208 #endif // Settings_h |
| OLD | NEW |