1 | /* |
2 | * Copyright (C) 2010-2019 Apple Inc. All rights reserved. |
3 | * |
4 | * Redistribution and use in source and binary forms, with or without |
5 | * modification, are permitted provided that the following conditions |
6 | * are met: |
7 | * 1. Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. |
9 | * 2. Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. |
12 | * |
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
23 | * THE POSSIBILITY OF SUCH DAMAGE. |
24 | */ |
25 | |
26 | #pragma once |
27 | |
28 | #if PLATFORM(GTK) |
29 | #define DEFAULT_WEBKIT_TABSTOLINKS_ENABLED true |
30 | #else |
31 | #define DEFAULT_WEBKIT_TABSTOLINKS_ENABLED false |
32 | #endif |
33 | |
34 | #if PLATFORM(GTK) || PLATFORM(WPE) |
35 | #define DEFAULT_CORE_MATHML_ENABLED true |
36 | #else |
37 | #define DEFAULT_CORE_MATHML_ENABLED false |
38 | #endif |
39 | |
40 | #if ENABLE(SMOOTH_SCROLLING) |
41 | #define DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED true |
42 | #else |
43 | #define DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED false |
44 | #endif |
45 | |
46 | #if PLATFORM(COCOA) || PLATFORM(GTK) |
47 | #define DEFAULT_HIDDEN_PAGE_DOM_TIMER_THROTTLING_ENABLED true |
48 | #define DEFAULT_HIDDEN_PAGE_CSS_ANIMATION_SUSPENSION_ENABLED true |
49 | #else |
50 | #define DEFAULT_HIDDEN_PAGE_DOM_TIMER_THROTTLING_ENABLED false |
51 | #define DEFAULT_HIDDEN_PAGE_CSS_ANIMATION_SUSPENSION_ENABLED false |
52 | #endif |
53 | |
54 | #if ENABLE(SERVER_PRECONNECT) |
55 | #define DEFAULT_LINK_PRECONNECT_ENABLED true |
56 | #else |
57 | #define DEFAULT_LINK_PRECONNECT_ENABLED false |
58 | #endif |
59 | |
60 | #if PLATFORM(COCOA) |
61 | #define DEFAULT_PDFPLUGIN_ENABLED true |
62 | #else |
63 | #define DEFAULT_PDFPLUGIN_ENABLED false |
64 | #endif |
65 | |
66 | #if PLATFORM(IOS_FAMILY) |
67 | #define DEFAULT_ALLOWS_PICTURE_IN_PICTURE_MEDIA_PLAYBACK true |
68 | #define DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED false |
69 | #define DEFAULT_FRAME_FLATTENING true |
70 | #define DEFAULT_SHOULD_PRINT_BACKGROUNDS true |
71 | #define DEFAULT_TEXT_AREAS_ARE_RESIZABLE false |
72 | #define DEFAULT_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY false |
73 | #define DEFAULT_SHOULD_RESPECT_IMAGE_ORIENTATION true |
74 | #define DEFAULT_PASSWORD_ECHO_ENABLED true |
75 | #define DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK false |
76 | #define DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK_AFTER_FULLSCREEN true |
77 | #define DEFAULT_INLINE_MEDIA_PLAYBACK_REQUIRES_PLAYS_INLINE_ATTRIBUTE true |
78 | #define DEFAULT_INVISIBLE_AUTOPLAY_NOT_PERMITTED true |
79 | #define DEFAULT_MEDIA_DATA_LOADS_AUTOMATICALLY false |
80 | #define DEFAULT_MEDIA_CONTROLS_SCALE_WITH_PAGE_ZOOM false |
81 | #define DEFAULT_TEMPORARY_TILE_COHORT_RETENTION_ENABLED false |
82 | #define DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK true |
83 | #define DEFAULT_INTERACTIVE_MEDIA_CAPTURE_STREAM_REPROMPT_INTERVAL_IN_MINUTES 1 |
84 | #define DEFAULT_ASYNC_FRAME_SCROLLING_ENABLED true |
85 | #define DEFAULT_ASYNC_OVERFLOW_SCROLLING_ENABLED true |
86 | #define EXPERIMENTAL_FULLSCREEN_API_HIDDEN false |
87 | #else |
88 | #define DEFAULT_ALLOWS_PICTURE_IN_PICTURE_MEDIA_PLAYBACK false |
89 | #define DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED true |
90 | #define DEFAULT_FRAME_FLATTENING false |
91 | #define DEFAULT_SHOULD_PRINT_BACKGROUNDS false |
92 | #define DEFAULT_TEXT_AREAS_ARE_RESIZABLE true |
93 | #define DEFAULT_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY true |
94 | #define DEFAULT_SHOULD_RESPECT_IMAGE_ORIENTATION false |
95 | #define DEFAULT_PASSWORD_ECHO_ENABLED false |
96 | #define DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK true |
97 | #define DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK_AFTER_FULLSCREEN false |
98 | #define DEFAULT_INLINE_MEDIA_PLAYBACK_REQUIRES_PLAYS_INLINE_ATTRIBUTE false |
99 | #define DEFAULT_INVISIBLE_AUTOPLAY_NOT_PERMITTED false |
100 | #define DEFAULT_MEDIA_DATA_LOADS_AUTOMATICALLY true |
101 | #define DEFAULT_MEDIA_CONTROLS_SCALE_WITH_PAGE_ZOOM true |
102 | #define DEFAULT_TEMPORARY_TILE_COHORT_RETENTION_ENABLED true |
103 | #define DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK false |
104 | #define DEFAULT_INTERACTIVE_MEDIA_CAPTURE_STREAM_REPROMPT_INTERVAL_IN_MINUTES 10 |
105 | #define DEFAULT_ASYNC_FRAME_SCROLLING_ENABLED false |
106 | #define DEFAULT_ASYNC_OVERFLOW_SCROLLING_ENABLED false |
107 | #define EXPERIMENTAL_FULLSCREEN_API_HIDDEN true |
108 | #endif |
109 | |
110 | #if PLATFORM(COCOA) |
111 | #define DEFAULT_ALLOW_MEDIA_CONTENT_TYPES_REQUIRING_HARDWARE_SUPPORT_AS_FALLBACK true |
112 | #else |
113 | #define DEFAULT_ALLOW_MEDIA_CONTENT_TYPES_REQUIRING_HARDWARE_SUPPORT_AS_FALLBACK false |
114 | #endif |
115 | |
116 | #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 |
117 | #define DEFAULT_SUBPIXEL_ANTIALIASED_LAYER_TEXT_ENABLED true |
118 | #else |
119 | #define DEFAULT_SUBPIXEL_ANTIALIASED_LAYER_TEXT_ENABLED false |
120 | #endif |
121 | |
122 | #if PLATFORM(IOS_FAMILY_SIMULATOR) |
123 | #define DEFAULT_ACCELERATED_DRAWING_ENABLED false |
124 | #define DEFAULT_CANVAS_USES_ACCELERATED_DRAWING false |
125 | #define DEFAULT_MOCK_CAPTURE_DEVICES_ENABLED true |
126 | #else |
127 | #define DEFAULT_ACCELERATED_DRAWING_ENABLED true |
128 | #define DEFAULT_CANVAS_USES_ACCELERATED_DRAWING true |
129 | #define DEFAULT_MOCK_CAPTURE_DEVICES_ENABLED false |
130 | #endif |
131 | |
132 | #if PLATFORM(COCOA) |
133 | #define DEFAULT_SHOULD_CAPTURE_AUDIO_IN_UIPROCESS true |
134 | #else |
135 | #define DEFAULT_SHOULD_CAPTURE_AUDIO_IN_UIPROCESS false |
136 | #endif |
137 | |
138 | #if PLATFORM(COCOA) |
139 | #define DEFAULT_MODERN_MEDIA_CONTROLS_ENABLED true |
140 | #else |
141 | #define DEFAULT_MODERN_MEDIA_CONTROLS_ENABLED false |
142 | #endif |
143 | |
144 | #if PLATFORM(COCOA) |
145 | #define DEFAULT_DATA_TRANSFER_ITEMS_ENABLED true |
146 | #define DEFAULT_DIRECTORY_UPLOAD_ENABLED true |
147 | #else |
148 | #define DEFAULT_DATA_TRANSFER_ITEMS_ENABLED false |
149 | #define DEFAULT_DIRECTORY_UPLOAD_ENABLED false |
150 | #endif |
151 | |
152 | #if PLATFORM(COCOA) |
153 | |
154 | #if PLATFORM(WATCHOS) |
155 | #define DEFAULT_STANDARD_FONT_FAMILY "system-ui" |
156 | #else |
157 | #define DEFAULT_STANDARD_FONT_FAMILY "Times" |
158 | #endif |
159 | |
160 | #define DEFAULT_FANTASY_FONT_FAMILY "Papyrus" |
161 | #define DEFAULT_FIXED_FONT_FAMILY "Courier" |
162 | #define DEFAULT_SANS_SERIF_FONT_FAMILY "Helvetica" |
163 | #define DEFAULT_SERIF_FONT_FAMILY "Times" |
164 | |
165 | #if PLATFORM(IOS_FAMILY) |
166 | #define DEFAULT_CURSIVE_FONT_FAMILY "Snell Roundhand" |
167 | #define DEFAULT_PICTOGRAPH_FONT_FAMILY "AppleColorEmoji" |
168 | #else |
169 | #define DEFAULT_CURSIVE_FONT_FAMILY "Apple Chancery" |
170 | #define DEFAULT_PICTOGRAPH_FONT_FAMILY "Apple Color Emoji" |
171 | #endif |
172 | |
173 | #else |
174 | |
175 | #define DEFAULT_STANDARD_FONT_FAMILY "Times" |
176 | #define DEFAULT_CURSIVE_FONT_FAMILY "Comic Sans MS" |
177 | #define DEFAULT_FANTASY_FONT_FAMILY "Impact" |
178 | #define DEFAULT_FIXED_FONT_FAMILY "Courier New" |
179 | #define DEFAULT_SANS_SERIF_FONT_FAMILY "Helvetica" |
180 | #define DEFAULT_SERIF_FONT_FAMILY "Times" |
181 | #define DEFAULT_PICTOGRAPH_FONT_FAMILY "Times" |
182 | |
183 | #endif |
184 | |
185 | #if PLATFORM(COCOA) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) |
186 | #define DEFAULT_WEB_SHARE_ENABLED true |
187 | #else |
188 | #define DEFAULT_WEB_SHARE_ENABLED false |
189 | #endif |
190 | |
191 | #if !PLATFORM(WATCHOS) |
192 | #define DEFAULT_AVFOUNDATION_ENABLED true |
193 | #else |
194 | #define DEFAULT_AVFOUNDATION_ENABLED false |
195 | #endif |
196 | |
197 | #if PLATFORM(WATCHOS) |
198 | #define DEFAULT_VISUAL_VIEWPORT_HEIGHT_EXPANSION_FACTOR 1 |
199 | #else |
200 | #define DEFAULT_VISUAL_VIEWPORT_HEIGHT_EXPANSION_FACTOR 0 |
201 | #endif |
202 | |
203 | #if PLATFORM(WATCHOS) |
204 | #define DISABLED_ADAPTATIONS_META_TAG_ENABLED true |
205 | #else |
206 | #define DISABLED_ADAPTATIONS_META_TAG_ENABLED false |
207 | #endif |
208 | |
209 | #if ENABLE(EXPERIMENTAL_FEATURES) |
210 | #define DEFAULT_EXPERIMENTAL_FEATURES_ENABLED true |
211 | #else |
212 | #define DEFAULT_EXPERIMENTAL_FEATURES_ENABLED false |
213 | #endif |
214 | |
215 | #if ENABLE(EXPERIMENTAL_FEATURES) || PLATFORM(COCOA) |
216 | #define DEFAULT_SERVICE_WORKERS_ENABLED true |
217 | #else |
218 | #define DEFAULT_SERVICE_WORKERS_ENABLED false |
219 | #endif |
220 | |
221 | #if PLATFORM(IOS_FAMILY) |
222 | #define DEFAULT_POINTER_EVENTS_ENABLED true |
223 | #else |
224 | #define DEFAULT_POINTER_EVENTS_ENABLED false |
225 | #endif |
226 | |
227 | #if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(GTK) || PLATFORM(WPE) |
228 | #define DEFAULT_PROCESS_SWAP_ON_CROSS_SITE_NAVIGATION_ENABLED true |
229 | #else |
230 | #define DEFAULT_PROCESS_SWAP_ON_CROSS_SITE_NAVIGATION_ENABLED false |
231 | #endif |
232 | |
233 | #if (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || PLATFORM(WATCHOS) |
234 | #define DEFAULT_CONIC_GRADIENT_ENABLED true |
235 | #else |
236 | #define DEFAULT_CONIC_GRADIENT_ENABLED false |
237 | #endif |
238 | |
239 | #if PLATFORM(MAC) |
240 | #define DEFAULT_CAPTURE_AUDIO_IN_UIPROCESS true |
241 | #else |
242 | #define DEFAULT_CAPTURE_AUDIO_IN_UIPROCESS false |
243 | #endif |
244 | |
245 | #if PLATFORM(WATCHOS) |
246 | #define DEFAULT_INPUT_TYPE_COLOR_ENABLED false |
247 | #define DEFAULT_DATALIST_ELEMENT_ENABLED false |
248 | #else |
249 | #define DEFAULT_INPUT_TYPE_COLOR_ENABLED true |
250 | #define DEFAULT_DATALIST_ELEMENT_ENABLED true |
251 | #endif |
252 | |
253 | #if PLATFORM(IOS) |
254 | #define DEFAULT_DOM_PASTE_ACCESS_REQUESTS_ENABLED true |
255 | #else |
256 | #define DEFAULT_DOM_PASTE_ACCESS_REQUESTS_ENABLED false |
257 | #endif |
258 | |
259 | #if PLATFORM(IOS_FAMILY) |
260 | #if PLATFORM(WATCHOS) |
261 | #define DEFAULT_FAST_CLICKS_EVERYWHERE false |
262 | #else |
263 | #define DEFAULT_FAST_CLICKS_EVERYWHERE true |
264 | #endif |
265 | #endif |
266 | |
267 | #if ENABLE(APPLE_PAY_REMOTE_UI) |
268 | #define DEFAULT_APPLE_PAY_ENABLED true |
269 | #else |
270 | #define DEFAULT_APPLE_PAY_ENABLED false |
271 | #endif |
272 | |
273 | #if PLATFORM(MAC) |
274 | #define DEFAULT_WEB_AUTHENTICATION_ENABLED true |
275 | #else |
276 | #define DEFAULT_WEB_AUTHENTICATION_ENABLED false |
277 | #endif |
278 | |
279 | namespace WebKit { |
280 | |
281 | bool defaultPassiveTouchListenersAsDefaultOnDocument(); |
282 | bool defaultCustomPasteboardDataEnabled(); |
283 | |
284 | #if ENABLE(TEXT_AUTOSIZING) |
285 | bool defaultTextAutosizingUsesIdempotentMode(); |
286 | #endif |
287 | |
288 | } // namespace WebKit |
289 | |