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 void setUsesDashboardBackwardCompatibilityMode(bool);
114 bool usesDashboardBackwardCompatibilityMode() const { return m_usesDashboardBackwardCompatibilityMode; }
116 void setNeedsAdobeFrameReloadingQuirk(bool);
117 bool needsAcrobatFrameReloadingQuirk() const { return m_needsAdobeFrameReloadingQuirk; }
119 void setNeedsKeyboardEventDisambiguationQuirks(bool);
120 bool needsKeyboardEventDisambiguationQuirks() const { return m_needsKeyboardEventDisambiguationQuirks; }
122 void setDOMPasteAllowed(bool);
123 bool isDOMPasteAllowed() const { return m_isDOMPasteAllowed; }
125 void setUsesPageCache(bool);
126 bool usesPageCache() const { return m_usesPageCache; }
128 void setShrinksStandaloneImagesToFit(bool);
129 bool shrinksStandaloneImagesToFit() const { return m_shrinksStandaloneImagesToFit; }
131 void setShowsURLsInToolTips(bool);
132 bool showsURLsInToolTips() const { return m_showsURLsInToolTips; }
134 void setFTPDirectoryTemplatePath(const String&);
135 const String& ftpDirectoryTemplatePath() const { return m_ftpDirectoryTemplatePath; }
137 void setForceFTPDirectoryListings(bool);
138 bool forceFTPDirectoryListings() const { return m_forceFTPDirectoryListings; }
140 void setDeveloperExtrasEnabled(bool);
141 bool developerExtrasEnabled() const { return m_developerExtrasEnabled; }
143 void setAuthorAndUserStylesEnabled(bool);
144 bool authorAndUserStylesEnabled() const { return m_authorAndUserStylesEnabled; }
146 void setFontRenderingMode(FontRenderingMode mode);
147 FontRenderingMode fontRenderingMode() const;
149 void setNeedsXcodeVisibilityQuirk(bool);
150 bool needsXcodeVisibilityQuirk() const { return m_needsXcodeVisibilityQuirk; }
155 String m_defaultTextEncodingName;
156 String m_ftpDirectoryTemplatePath;
157 KURL m_userStyleSheetLocation;
158 AtomicString m_standardFontFamily;
159 AtomicString m_fixedFontFamily;
160 AtomicString m_serifFontFamily;
161 AtomicString m_sansSerifFontFamily;
162 AtomicString m_cursiveFontFamily;
163 AtomicString m_fantasyFontFamily;
164 EditableLinkBehavior m_editableLinkBehavior;
165 int m_minimumFontSize;
166 int m_minimumLogicalFontSize;
167 int m_defaultFontSize;
168 int m_defaultFixedFontSize;
169 bool m_isJavaEnabled : 1;
170 bool m_loadsImagesAutomatically : 1;
171 bool m_privateBrowsingEnabled : 1;
172 bool m_arePluginsEnabled : 1;
173 bool m_isJavaScriptEnabled : 1;
174 bool m_javaScriptCanOpenWindowsAutomatically : 1;
175 bool m_shouldPrintBackgrounds : 1;
176 bool m_textAreasAreResizable : 1;
177 bool m_usesDashboardBackwardCompatibilityMode : 1;
178 bool m_needsAdobeFrameReloadingQuirk : 1;
179 bool m_needsKeyboardEventDisambiguationQuirks : 1;
180 bool m_isDOMPasteAllowed : 1;
181 bool m_shrinksStandaloneImagesToFit : 1;
182 bool m_usesPageCache: 1;
183 bool m_showsURLsInToolTips : 1;
184 bool m_forceFTPDirectoryListings : 1;
185 bool m_developerExtrasEnabled : 1;
186 bool m_authorAndUserStylesEnabled : 1;
187 unsigned m_fontRenderingMode : 1;
188 bool m_needsXcodeVisibilityQuirk : 1;
191 } // namespace WebCore