| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 EditableLinkLiveWhenNotFocused, | 48 EditableLinkLiveWhenNotFocused, |
| 49 EditableLinkNeverLive | 49 EditableLinkNeverLive |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 class Settings { | 52 class Settings { |
| 53 WTF_MAKE_NONCOPYABLE(Settings); WTF_MAKE_FAST_ALLOCATED; | 53 WTF_MAKE_NONCOPYABLE(Settings); WTF_MAKE_FAST_ALLOCATED; |
| 54 public: | 54 public: |
| 55 static PassOwnPtr<Settings> create(); | 55 static PassOwnPtr<Settings> create(); |
| 56 | 56 |
| 57 GenericFontFamilySettings& genericFontFamilySettings() { return m_genericFon
tFamilySettings; } | 57 GenericFontFamilySettings& genericFontFamilySettings() { return m_genericFon
tFamilySettings; } |
| 58 void setCursiveFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON)
; | |
| 59 void setFantasyFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON)
; | |
| 60 void setFixedFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON); | |
| 61 void setPictographFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMM
ON); | |
| 62 void setSansSerifFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMO
N); | |
| 63 void setSerifFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON); | |
| 64 void setStandardFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON
); | |
| 65 | 58 |
| 66 void setTextAutosizingEnabled(bool); | 59 void setTextAutosizingEnabled(bool); |
| 67 bool textAutosizingEnabled() const; | 60 bool textAutosizingEnabled() const; |
| 68 | 61 |
| 69 // Compensates for poor text legibility on mobile devices. This value is | 62 // Compensates for poor text legibility on mobile devices. This value is |
| 70 // multiplied by the font scale factor when performing text autosizing of | 63 // multiplied by the font scale factor when performing text autosizing of |
| 71 // websites that do not set an explicit viewport description. | 64 // websites that do not set an explicit viewport description. |
| 72 void setDeviceScaleAdjustment(float); | 65 void setDeviceScaleAdjustment(float); |
| 73 float deviceScaleAdjustment() const; | 66 float deviceScaleAdjustment() const; |
| 74 | 67 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 92 // It could handle "GL", but that seems a bit overly broad. | 85 // It could handle "GL", but that seems a bit overly broad. |
| 93 void setOpenGLMultisamplingEnabled(bool flag); | 86 void setOpenGLMultisamplingEnabled(bool flag); |
| 94 bool openGLMultisamplingEnabled() { return m_openGLMultisamplingEnabled; } | 87 bool openGLMultisamplingEnabled() { return m_openGLMultisamplingEnabled; } |
| 95 | 88 |
| 96 void setDelegate(SettingsDelegate*); | 89 void setDelegate(SettingsDelegate*); |
| 97 | 90 |
| 98 private: | 91 private: |
| 99 Settings(); | 92 Settings(); |
| 100 | 93 |
| 101 void invalidate(SettingsDelegate::ChangeType); | 94 void invalidate(SettingsDelegate::ChangeType); |
| 102 void notifyFontFamilySettingsChanged(); | |
| 103 | 95 |
| 104 // FIXME: pageOfShame() is a hack for the inspector code: | 96 // FIXME: pageOfShame() is a hack for the inspector code: |
| 105 // http://crbug.com/327476 | 97 // http://crbug.com/327476 |
| 106 Page* pageOfShame() const; | 98 Page* pageOfShame() const; |
| 107 | 99 |
| 108 SettingsDelegate* m_delegate; | 100 SettingsDelegate* m_delegate; |
| 109 | 101 |
| 110 GenericFontFamilySettings m_genericFontFamilySettings; | 102 GenericFontFamilySettings m_genericFontFamilySettings; |
| 111 float m_deviceScaleAdjustment; | 103 float m_deviceScaleAdjustment; |
| 112 IntSize m_textAutosizingWindowSizeOverride; | 104 IntSize m_textAutosizingWindowSizeOverride; |
| 113 bool m_textAutosizingEnabled : 1; | 105 bool m_textAutosizingEnabled : 1; |
| 114 | 106 |
| 115 SETTINGS_MEMBER_VARIABLES | 107 SETTINGS_MEMBER_VARIABLES |
| 116 | 108 |
| 117 bool m_isScriptEnabled : 1; | 109 bool m_isScriptEnabled : 1; |
| 118 bool m_openGLMultisamplingEnabled : 1; | 110 bool m_openGLMultisamplingEnabled : 1; |
| 119 }; | 111 }; |
| 120 | 112 |
| 121 } // namespace WebCore | 113 } // namespace WebCore |
| 122 | 114 |
| 123 #endif // Settings_h | 115 #endif // Settings_h |
| OLD | NEW |