2 * Copyright (C) 2003, 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 #include "AtomicString.h"
31 #include "FontDescription.h"
38 enum EditableLinkBehavior {
39 EditableLinkDefaultBehavior = 0,
40 EditableLinkAlwaysLive,
41 EditableLinkOnlyLiveWithShiftKey,
42 EditableLinkLiveWhenNotFocused,
50 void setStandardFontFamily(const AtomicString&);
51 const AtomicString& standardFontFamily() const { return m_standardFontFamily; }
53 void setFixedFontFamily(const AtomicString&);
54 const AtomicString& fixedFontFamily() const { return m_fixedFontFamily; }
56 void setSerifFontFamily(const AtomicString&);
57 const AtomicString& serifFontFamily() const { return m_serifFontFamily; }
59 void setSansSerifFontFamily(const AtomicString&);
60 const AtomicString& sansSerifFontFamily() const { return m_sansSerifFontFamily; }
62 void setCursiveFontFamily(const AtomicString&);
63 const AtomicString& cursiveFontFamily() const { return m_cursiveFontFamily; }
65 void setFantasyFontFamily(const AtomicString&);
66 const AtomicString& fantasyFontFamily() const { return m_fantasyFontFamily; }
68 void setMinimumFontSize(int);
69 int minimumFontSize() const { return m_minimumFontSize; }
71 void setMinimumLogicalFontSize(int);
72 int minimumLogicalFontSize() const { return m_minimumLogicalFontSize; }
74 void setDefaultFontSize(int);
75 int defaultFontSize() const { return m_defaultFontSize; }
77 void setDefaultFixedFontSize(int);
78 int defaultFixedFontSize() const { return m_defaultFixedFontSize; }
80 void setLoadsImagesAutomatically(bool);
81 bool loadsImagesAutomatically() const { return m_loadsImagesAutomatically; }
83 void setJavaScriptEnabled(bool);
84 bool isJavaScriptEnabled() const { return m_isJavaScriptEnabled; }
86 void setJavaScriptCanOpenWindowsAutomatically(bool);
87 bool JavaScriptCanOpenWindowsAutomatically() const { return m_javaScriptCanOpenWindowsAutomatically; }
89 void setJavaEnabled(bool);
90 bool isJavaEnabled() const { return m_isJavaEnabled; }
92 void setPluginsEnabled(bool);
93 bool arePluginsEnabled() const { return m_arePluginsEnabled; }
95 void setPrivateBrowsingEnabled(bool);
96 bool privateBrowsingEnabled() const { return m_privateBrowsingEnabled; }
98 void setDefaultTextEncodingName(const String&);
99 const String& defaultTextEncodingName() const { return m_defaultTextEncodingName; }
101 void setUserStyleSheetLocation(const KURL&);
102 const KURL& userStyleSheetLocation() const { return m_userStyleSheetLocation; }
104 void setShouldPrintBackgrounds(bool);
105 bool shouldPrintBackgrounds() const { return m_shouldPrintBackgrounds; }
107 void setTextAreasAreResizable(bool);
108 bool textAreasAreResizable() const { return m_textAreasAreResizable; }
110 void setEditableLinkBehavior(EditableLinkBehavior);
111 EditableLinkBehavior editableLinkBehavior() const { return m_editableLinkBehavior; }
113 #if ENABLE(DASHBOARD_SUPPORT)
114 void setUsesDashboardBackwardCompatibilityMode(bool);
115 bool usesDashboardBackwardCompatibilityMode() const { return m_usesDashboardBackwardCompatibilityMode; }
118 void setNeedsAdobeFrameReloadingQuirk(bool);
119 bool needsAcrobatFrameReloadingQuirk() const { return m_needsAdobeFrameReloadingQuirk; }
121 void setNeedsKeyboardEventDisambiguationQuirks(bool);
122 bool needsKeyboardEventDisambiguationQuirks() const { return m_needsKeyboardEventDisambiguationQuirks; }
124 void setDOMPasteAllowed(bool);
125 bool isDOMPasteAllowed() const { return m_isDOMPasteAllowed; }
127 void setUsesPageCache(bool);
128 bool usesPageCache() const { return m_usesPageCache; }
130 void setShrinksStandaloneImagesToFit(bool);
131 bool shrinksStandaloneImagesToFit() const { return m_shrinksStandaloneImagesToFit; }
133 void setShowsURLsInToolTips(bool);
134 bool showsURLsInToolTips() const { return m_showsURLsInToolTips; }
136 void setFTPDirectoryTemplatePath(const String&);
137 const String& ftpDirectoryTemplatePath() const { return m_ftpDirectoryTemplatePath; }
139 void setForceFTPDirectoryListings(bool);
140 bool forceFTPDirectoryListings() const { return m_forceFTPDirectoryListings; }
142 void setDeveloperExtrasEnabled(bool);
143 bool developerExtrasEnabled() const { return m_developerExtrasEnabled; }
145 void setAuthorAndUserStylesEnabled(bool);
146 bool authorAndUserStylesEnabled() const { return m_authorAndUserStylesEnabled; }
148 void setFontRenderingMode(FontRenderingMode mode);
149 FontRenderingMode fontRenderingMode() const;
151 void setNeedsSiteSpecificQuirks(bool);
152 bool needsSiteSpecificQuirks() const { return m_needsSiteSpecificQuirks; }
154 void setWebArchiveDebugModeEnabled(bool);
155 bool webArchiveDebugModeEnabled() const { return m_webArchiveDebugModeEnabled; }
157 void setLocalStorageDatabasePath(const String&);
158 const String& localStorageDatabasePath() const { return m_localStorageDatabasePath; }
160 void disableRangeMutationForOldAppleMail(bool);
161 bool rangeMutationDisabledForOldAppleMail() const { return m_rangeMutationDisabledForOldAppleMail; }
163 void setApplicationChromeMode(bool);
164 bool inApplicationChromeMode() const { return m_inApplicationChromeMode; }
166 void setOfflineWebApplicationCacheEnabled(bool);
167 bool offlineWebApplicationCacheEnabled() const { return m_offlineWebApplicationCacheEnabled; }
169 void setShouldPaintCustomScrollbars(bool);
170 bool shouldPaintCustomScrollbars() const { return m_shouldPaintCustomScrollbars; }
172 void setZoomsTextOnly(bool);
173 bool zoomsTextOnly() const { return m_zoomsTextOnly; }
175 void setEnforceCSSMIMETypeInStrictMode(bool);
176 bool enforceCSSMIMETypeInStrictMode() { return m_enforceCSSMIMETypeInStrictMode; }
178 #if USE(SAFARI_THEME)
179 // Windows debugging pref (global) for switching between the Aqua look and a native windows look.
180 static void setShouldPaintNativeControls(bool);
181 static bool shouldPaintNativeControls() { return gShouldPaintNativeControls; }
187 String m_defaultTextEncodingName;
188 String m_ftpDirectoryTemplatePath;
189 String m_localStorageDatabasePath;
190 KURL m_userStyleSheetLocation;
191 AtomicString m_standardFontFamily;
192 AtomicString m_fixedFontFamily;
193 AtomicString m_serifFontFamily;
194 AtomicString m_sansSerifFontFamily;
195 AtomicString m_cursiveFontFamily;
196 AtomicString m_fantasyFontFamily;
197 EditableLinkBehavior m_editableLinkBehavior;
198 int m_minimumFontSize;
199 int m_minimumLogicalFontSize;
200 int m_defaultFontSize;
201 int m_defaultFixedFontSize;
202 bool m_isJavaEnabled : 1;
203 bool m_loadsImagesAutomatically : 1;
204 bool m_privateBrowsingEnabled : 1;
205 bool m_arePluginsEnabled : 1;
206 bool m_isJavaScriptEnabled : 1;
207 bool m_javaScriptCanOpenWindowsAutomatically : 1;
208 bool m_shouldPrintBackgrounds : 1;
209 bool m_textAreasAreResizable : 1;
210 #if ENABLE(DASHBOARD_SUPPORT)
211 bool m_usesDashboardBackwardCompatibilityMode : 1;
213 bool m_needsAdobeFrameReloadingQuirk : 1;
214 bool m_needsKeyboardEventDisambiguationQuirks : 1;
215 bool m_isDOMPasteAllowed : 1;
216 bool m_shrinksStandaloneImagesToFit : 1;
217 bool m_usesPageCache: 1;
218 bool m_showsURLsInToolTips : 1;
219 bool m_forceFTPDirectoryListings : 1;
220 bool m_developerExtrasEnabled : 1;
221 bool m_didInitializeDeveloperExtrasEnabled : 1;
222 bool m_authorAndUserStylesEnabled : 1;
223 bool m_needsSiteSpecificQuirks : 1;
224 unsigned m_fontRenderingMode : 1;
225 bool m_webArchiveDebugModeEnabled : 1;
226 bool m_inApplicationChromeMode : 1;
227 bool m_offlineWebApplicationCacheEnabled : 1;
228 bool m_rangeMutationDisabledForOldAppleMail : 1;
229 bool m_shouldPaintCustomScrollbars : 1;
230 bool m_zoomsTextOnly : 1;
231 bool m_enforceCSSMIMETypeInStrictMode : 1;
233 #if USE(SAFARI_THEME)
234 static bool gShouldPaintNativeControls;
238 } // namespace WebCore