REGRESSION(r235484) _WKPreferencesGetWebRTCLegacyAPIEnabled symbol not found when...
[WebKit-https.git] / Source / WebKit / UIProcess / API / C / WKPreferences.cpp
1 /*
2  * Copyright (C) 2010-2018 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 #include "config.h"
27
28 #include "PluginProcessManager.h"
29 #include "WKPreferencesRef.h"
30 #include "WKPreferencesRefPrivate.h"
31 #include "WKAPICast.h"
32 #include "WebPreferences.h"
33 #include <WebCore/Settings.h>
34 #include <wtf/RefPtr.h>
35
36 using namespace WebKit;
37
38 WKTypeID WKPreferencesGetTypeID()
39 {
40     return toAPI(WebPreferences::APIType);
41 }
42
43 WKPreferencesRef WKPreferencesCreate()
44 {
45     auto preferences = WebPreferences::createWithLegacyDefaults(String(), "WebKit2.", "WebKit2.");
46     return toAPI(&preferences.leakRef());
47 }
48
49 WKPreferencesRef WKPreferencesCreateWithIdentifier(WKStringRef identifierRef)
50 {
51     auto preferences = WebPreferences::createWithLegacyDefaults(toWTFString(identifierRef), "WebKit2.", "WebKit2.");
52     return toAPI(&preferences.leakRef());
53 }
54
55 WKPreferencesRef WKPreferencesCreateCopy(WKPreferencesRef preferencesRef)
56 {
57     auto preferences = toImpl(preferencesRef)->copy();
58     return toAPI(&preferences.leakRef());
59 }
60
61 void WKPreferencesEnableAllExperimentalFeatures(WKPreferencesRef preferencesRef)
62 {
63     toImpl(preferencesRef)->enableAllExperimentalFeatures();
64 }
65
66 void WKPreferencesSetJavaScriptEnabled(WKPreferencesRef preferencesRef, bool javaScriptEnabled)
67 {
68     toImpl(preferencesRef)->setJavaScriptEnabled(javaScriptEnabled);
69 }
70
71 bool WKPreferencesGetJavaScriptEnabled(WKPreferencesRef preferencesRef)
72 {
73     return toImpl(preferencesRef)->javaScriptEnabled();
74 }
75
76 void WKPreferencesSetJavaScriptMarkupEnabled(WKPreferencesRef preferencesRef, bool javaScriptMarkupEnabled)
77 {
78     toImpl(preferencesRef)->setJavaScriptMarkupEnabled(javaScriptMarkupEnabled);
79 }
80
81 bool WKPreferencesGetJavaScriptMarkupEnabled(WKPreferencesRef preferencesRef)
82 {
83     return toImpl(preferencesRef)->javaScriptMarkupEnabled();
84 }
85
86 void WKPreferencesSetLoadsImagesAutomatically(WKPreferencesRef preferencesRef, bool loadsImagesAutomatically)
87 {
88     toImpl(preferencesRef)->setLoadsImagesAutomatically(loadsImagesAutomatically);
89 }
90
91 bool WKPreferencesGetLoadsImagesAutomatically(WKPreferencesRef preferencesRef)
92 {
93     return toImpl(preferencesRef)->loadsImagesAutomatically();
94 }
95
96 void WKPreferencesSetLoadsSiteIconsIgnoringImageLoadingPreference(WKPreferencesRef preferencesRef, bool loadsSiteIconsIgnoringImageLoadingPreference)
97 {
98     toImpl(preferencesRef)->setLoadsSiteIconsIgnoringImageLoadingPreference(loadsSiteIconsIgnoringImageLoadingPreference);
99 }
100
101 bool WKPreferencesGetLoadsSiteIconsIgnoringImageLoadingPreference(WKPreferencesRef preferencesRef)
102 {
103     return toImpl(preferencesRef)->loadsSiteIconsIgnoringImageLoadingPreference();
104 }
105
106 void WKPreferencesSetOfflineWebApplicationCacheEnabled(WKPreferencesRef preferencesRef, bool offlineWebApplicationCacheEnabled)
107 {
108     toImpl(preferencesRef)->setOfflineWebApplicationCacheEnabled(offlineWebApplicationCacheEnabled);
109 }
110
111 bool WKPreferencesGetOfflineWebApplicationCacheEnabled(WKPreferencesRef preferencesRef)
112 {
113     return toImpl(preferencesRef)->offlineWebApplicationCacheEnabled();
114 }
115
116 void WKPreferencesSetLocalStorageEnabled(WKPreferencesRef preferencesRef, bool localStorageEnabled)
117 {
118     toImpl(preferencesRef)->setLocalStorageEnabled(localStorageEnabled);
119 }
120
121 bool WKPreferencesGetLocalStorageEnabled(WKPreferencesRef preferencesRef)
122 {
123     return toImpl(preferencesRef)->localStorageEnabled();
124 }
125
126 void WKPreferencesSetDatabasesEnabled(WKPreferencesRef preferencesRef, bool databasesEnabled)
127 {
128     toImpl(preferencesRef)->setDatabasesEnabled(databasesEnabled);
129 }
130
131 bool WKPreferencesGetDatabasesEnabled(WKPreferencesRef preferencesRef)
132 {
133     return toImpl(preferencesRef)->databasesEnabled();
134 }
135
136 void WKPreferencesSetXSSAuditorEnabled(WKPreferencesRef preferencesRef, bool xssAuditorEnabled)
137 {
138     toImpl(preferencesRef)->setXSSAuditorEnabled(xssAuditorEnabled);
139 }
140
141 bool WKPreferencesGetXSSAuditorEnabled(WKPreferencesRef preferencesRef)
142 {
143     return toImpl(preferencesRef)->xssAuditorEnabled();
144 }
145
146 void WKPreferencesSetFrameFlatteningEnabled(WKPreferencesRef preferencesRef, bool frameFlatteningEnabled)
147 {
148     // FIXME: Expose more frame flattening values.
149     toImpl(preferencesRef)->setFrameFlattening(frameFlatteningEnabled ? static_cast<uint32_t>(WebCore::FrameFlattening::FullyEnabled) : static_cast<uint32_t>(WebCore::FrameFlattening::Disabled));
150 }
151
152 bool WKPreferencesGetFrameFlatteningEnabled(WKPreferencesRef preferencesRef)
153 {
154     // FIXME: Expose more frame flattening values.
155     return toImpl(preferencesRef)->frameFlattening() != static_cast<uint32_t>(WebCore::FrameFlattening::Disabled);
156 }
157
158 void WKPreferencesSetPluginsEnabled(WKPreferencesRef preferencesRef, bool pluginsEnabled)
159 {
160     toImpl(preferencesRef)->setPluginsEnabled(pluginsEnabled);
161 }
162
163 bool WKPreferencesGetPluginsEnabled(WKPreferencesRef preferencesRef)
164 {
165     return toImpl(preferencesRef)->pluginsEnabled();
166 }
167
168 void WKPreferencesSetJavaEnabled(WKPreferencesRef preferencesRef, bool javaEnabled)
169 {
170     toImpl(preferencesRef)->setJavaEnabled(javaEnabled);
171 }
172
173 bool WKPreferencesGetJavaEnabled(WKPreferencesRef preferencesRef)
174 {
175     return toImpl(preferencesRef)->javaEnabled();
176 }
177
178 void WKPreferencesSetJavaEnabledForLocalFiles(WKPreferencesRef preferencesRef, bool javaEnabledForLocalFiles)
179 {
180     toImpl(preferencesRef)->setJavaEnabledForLocalFiles(javaEnabledForLocalFiles);
181 }
182
183 bool WKPreferencesGetJavaEnabledForLocalFiles(WKPreferencesRef preferencesRef)
184 {
185     return toImpl(preferencesRef)->javaEnabledForLocalFiles();
186 }
187
188 void WKPreferencesSetJavaScriptCanOpenWindowsAutomatically(WKPreferencesRef preferencesRef, bool javaScriptCanOpenWindowsAutomatically)
189 {
190     toImpl(preferencesRef)->setJavaScriptCanOpenWindowsAutomatically(javaScriptCanOpenWindowsAutomatically);
191 }
192
193 bool WKPreferencesGetJavaScriptCanOpenWindowsAutomatically(WKPreferencesRef preferencesRef)
194 {
195     return toImpl(preferencesRef)->javaScriptCanOpenWindowsAutomatically();
196 }
197
198 void WKPreferencesSetStorageAccessPromptsEnabled(WKPreferencesRef preferencesRef, bool enabled)
199 {
200     toImpl(preferencesRef)->setStorageAccessPromptsEnabled(enabled);
201 }
202
203 bool WKPreferencesGetStorageAccessPromptsEnabled(WKPreferencesRef preferencesRef)
204 {
205     return toImpl(preferencesRef)->storageAccessPromptsEnabled();
206 }
207
208 void WKPreferencesSetHyperlinkAuditingEnabled(WKPreferencesRef preferencesRef, bool hyperlinkAuditingEnabled)
209 {
210     toImpl(preferencesRef)->setHyperlinkAuditingEnabled(hyperlinkAuditingEnabled);
211 }
212
213 bool WKPreferencesGetHyperlinkAuditingEnabled(WKPreferencesRef preferencesRef)
214 {
215     return toImpl(preferencesRef)->hyperlinkAuditingEnabled();
216 }
217
218 void WKPreferencesSetStandardFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
219 {
220     toImpl(preferencesRef)->setStandardFontFamily(toWTFString(family));
221 }
222
223 WKStringRef WKPreferencesCopyStandardFontFamily(WKPreferencesRef preferencesRef)
224 {
225     return toCopiedAPI(toImpl(preferencesRef)->standardFontFamily());
226 }
227
228 void WKPreferencesSetFixedFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
229 {
230     toImpl(preferencesRef)->setFixedFontFamily(toWTFString(family));
231 }
232
233 WKStringRef WKPreferencesCopyFixedFontFamily(WKPreferencesRef preferencesRef)
234 {
235     return toCopiedAPI(toImpl(preferencesRef)->fixedFontFamily());
236 }
237
238 void WKPreferencesSetSerifFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
239 {
240     toImpl(preferencesRef)->setSerifFontFamily(toWTFString(family));
241 }
242
243 WKStringRef WKPreferencesCopySerifFontFamily(WKPreferencesRef preferencesRef)
244 {
245     return toCopiedAPI(toImpl(preferencesRef)->serifFontFamily());
246 }
247
248 void WKPreferencesSetSansSerifFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
249 {
250     toImpl(preferencesRef)->setSansSerifFontFamily(toWTFString(family));
251 }
252
253 WKStringRef WKPreferencesCopySansSerifFontFamily(WKPreferencesRef preferencesRef)
254 {
255     return toCopiedAPI(toImpl(preferencesRef)->sansSerifFontFamily());
256 }
257
258 void WKPreferencesSetCursiveFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
259 {
260     toImpl(preferencesRef)->setCursiveFontFamily(toWTFString(family));
261 }
262
263 WKStringRef WKPreferencesCopyCursiveFontFamily(WKPreferencesRef preferencesRef)
264 {
265     return toCopiedAPI(toImpl(preferencesRef)->cursiveFontFamily());
266 }
267
268 void WKPreferencesSetFantasyFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
269 {
270     toImpl(preferencesRef)->setFantasyFontFamily(toWTFString(family));
271 }
272
273 WKStringRef WKPreferencesCopyFantasyFontFamily(WKPreferencesRef preferencesRef)
274 {
275     return toCopiedAPI(toImpl(preferencesRef)->fantasyFontFamily());
276 }
277
278 void WKPreferencesSetPictographFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
279 {
280     toImpl(preferencesRef)->setPictographFontFamily(toWTFString(family));
281 }
282
283 WKStringRef WKPreferencesCopyPictographFontFamily(WKPreferencesRef preferencesRef)
284 {
285     return toCopiedAPI(toImpl(preferencesRef)->pictographFontFamily());
286 }
287
288 void WKPreferencesSetDefaultFontSize(WKPreferencesRef preferencesRef, uint32_t size)
289 {
290     toImpl(preferencesRef)->setDefaultFontSize(size);
291 }
292
293 uint32_t WKPreferencesGetDefaultFontSize(WKPreferencesRef preferencesRef)
294 {
295     return toImpl(preferencesRef)->defaultFontSize();
296 }
297
298 void WKPreferencesSetDefaultFixedFontSize(WKPreferencesRef preferencesRef, uint32_t size)
299 {
300     toImpl(preferencesRef)->setDefaultFixedFontSize(size);
301 }
302
303 uint32_t WKPreferencesGetDefaultFixedFontSize(WKPreferencesRef preferencesRef)
304 {
305     return toImpl(preferencesRef)->defaultFixedFontSize();
306 }
307
308 void WKPreferencesSetMinimumFontSize(WKPreferencesRef preferencesRef, uint32_t size)
309 {
310     toImpl(preferencesRef)->setMinimumFontSize(size);
311 }
312
313 uint32_t WKPreferencesGetMinimumFontSize(WKPreferencesRef preferencesRef)
314 {
315     return toImpl(preferencesRef)->minimumFontSize();
316 }
317
318
319 void WKPreferencesSetCookieEnabled(WKPreferencesRef preferencesRef, bool enabled)
320 {
321     toImpl(preferencesRef)->setCookieEnabled(enabled);
322 }
323
324 bool WKPreferencesGetCookieEnabled(WKPreferencesRef preferencesRef)
325 {
326     return toImpl(preferencesRef)->cookieEnabled();
327 }
328
329 void WKPreferencesSetEditableLinkBehavior(WKPreferencesRef preferencesRef, WKEditableLinkBehavior wkBehavior)
330 {
331     toImpl(preferencesRef)->setEditableLinkBehavior(toEditableLinkBehavior(wkBehavior));
332 }
333
334 WKEditableLinkBehavior WKPreferencesGetEditableLinkBehavior(WKPreferencesRef preferencesRef)
335 {
336     return toAPI(static_cast<WebCore::EditableLinkBehavior>(toImpl(preferencesRef)->editableLinkBehavior()));
337 }
338
339 void WKPreferencesSetDefaultTextEncodingName(WKPreferencesRef preferencesRef, WKStringRef name)
340 {
341     toImpl(preferencesRef)->setDefaultTextEncodingName(toWTFString(name));
342 }
343
344 WKStringRef WKPreferencesCopyDefaultTextEncodingName(WKPreferencesRef preferencesRef)
345 {
346     return toCopiedAPI(toImpl(preferencesRef)->defaultTextEncodingName());
347 }
348
349 void WKPreferencesSetPrivateBrowsingEnabled(WKPreferencesRef preferencesRef, bool enabled)
350 {
351     toImpl(preferencesRef)->setPrivateBrowsingEnabled(enabled);
352 }
353
354 bool WKPreferencesGetPrivateBrowsingEnabled(WKPreferencesRef preferencesRef)
355 {
356     return toImpl(preferencesRef)->privateBrowsingEnabled();
357 }
358
359 void WKPreferencesSetDeveloperExtrasEnabled(WKPreferencesRef preferencesRef, bool enabled)
360 {
361     toImpl(preferencesRef)->setDeveloperExtrasEnabled(enabled);
362 }
363
364 bool WKPreferencesGetDeveloperExtrasEnabled(WKPreferencesRef preferencesRef)
365 {
366     return toImpl(preferencesRef)->developerExtrasEnabled();
367 }
368
369 void WKPreferencesSetJavaScriptRuntimeFlags(WKPreferencesRef preferencesRef, WKJavaScriptRuntimeFlagSet javaScriptRuntimeFlagSet)
370 {
371     toImpl(preferencesRef)->setJavaScriptRuntimeFlags(javaScriptRuntimeFlagSet);
372 }
373
374 WKJavaScriptRuntimeFlagSet WKPreferencesGetJavaScriptRuntimeFlags(WKPreferencesRef preferencesRef)
375 {
376     return toImpl(preferencesRef)->javaScriptRuntimeFlags();
377 }
378
379 void WKPreferencesSetTextAreasAreResizable(WKPreferencesRef preferencesRef, bool resizable)
380 {
381     toImpl(preferencesRef)->setTextAreasAreResizable(resizable);
382 }
383
384 bool WKPreferencesGetTextAreasAreResizable(WKPreferencesRef preferencesRef)
385 {
386     return toImpl(preferencesRef)->textAreasAreResizable();
387 }
388
389 void WKPreferencesSetFontSmoothingLevel(WKPreferencesRef preferencesRef, WKFontSmoothingLevel wkLevel)
390 {
391     toImpl(preferencesRef)->setFontSmoothingLevel(toFontSmoothingLevel(wkLevel));
392 }
393
394 WKFontSmoothingLevel WKPreferencesGetFontSmoothingLevel(WKPreferencesRef preferencesRef)
395 {
396     return toAPI(static_cast<FontSmoothingLevel>(toImpl(preferencesRef)->fontSmoothingLevel()));
397 }
398
399 void WKPreferencesSetSubpixelAntialiasedLayerTextEnabled(WKPreferencesRef preferencesRef, bool flag)
400 {
401     toImpl(preferencesRef)->setSubpixelAntialiasedLayerTextEnabled(flag);
402 }
403
404 bool WKPreferencesGetSubpixelAntialiasedLayerTextEnabled(WKPreferencesRef preferencesRef)
405 {
406     return toImpl(preferencesRef)->subpixelAntialiasedLayerTextEnabled();
407 }
408
409 void WKPreferencesSetAcceleratedDrawingEnabled(WKPreferencesRef preferencesRef, bool flag)
410 {
411     toImpl(preferencesRef)->setAcceleratedDrawingEnabled(flag);
412 }
413
414 bool WKPreferencesGetAcceleratedDrawingEnabled(WKPreferencesRef preferencesRef)
415 {
416     return toImpl(preferencesRef)->acceleratedDrawingEnabled();
417 }
418
419 void WKPreferencesSetCanvasUsesAcceleratedDrawing(WKPreferencesRef preferencesRef, bool flag)
420 {
421     toImpl(preferencesRef)->setCanvasUsesAcceleratedDrawing(flag);
422 }
423
424 bool WKPreferencesGetCanvasUsesAcceleratedDrawing(WKPreferencesRef preferencesRef)
425 {
426     return toImpl(preferencesRef)->canvasUsesAcceleratedDrawing();
427 }
428
429 void WKPreferencesSetAcceleratedCompositingEnabled(WKPreferencesRef preferencesRef, bool flag)
430 {
431     toImpl(preferencesRef)->setAcceleratedCompositingEnabled(flag);
432 }
433
434 bool WKPreferencesGetAcceleratedCompositingEnabled(WKPreferencesRef preferencesRef)
435 {
436     return toImpl(preferencesRef)->acceleratedCompositingEnabled();
437 }
438
439 void WKPreferencesSetAcceleratedCompositingForOverflowScrollEnabled(WKPreferencesRef preferencesRef, bool flag)
440 {
441     toImpl(preferencesRef)->setAcceleratedCompositingForOverflowScrollEnabled(flag);
442 }
443
444 bool WKPreferencesGetAcceleratedCompositingForOverflowScrollEnabled(WKPreferencesRef preferencesRef)
445 {
446     return toImpl(preferencesRef)->acceleratedCompositingForOverflowScrollEnabled();
447 }
448
449 void WKPreferencesSetCompositingBordersVisible(WKPreferencesRef preferencesRef, bool flag)
450 {
451     toImpl(preferencesRef)->setCompositingBordersVisible(flag);
452 }
453
454 bool WKPreferencesGetCompositingBordersVisible(WKPreferencesRef preferencesRef)
455 {
456     return toImpl(preferencesRef)->compositingBordersVisible();
457 }
458
459 void WKPreferencesSetCompositingRepaintCountersVisible(WKPreferencesRef preferencesRef, bool flag)
460 {
461     toImpl(preferencesRef)->setCompositingRepaintCountersVisible(flag);
462 }
463
464 bool WKPreferencesGetCompositingRepaintCountersVisible(WKPreferencesRef preferencesRef)
465 {
466     return toImpl(preferencesRef)->compositingRepaintCountersVisible();
467 }
468
469 void WKPreferencesSetTiledScrollingIndicatorVisible(WKPreferencesRef preferencesRef, bool flag)
470 {
471     toImpl(preferencesRef)->setTiledScrollingIndicatorVisible(flag);
472 }
473
474 bool WKPreferencesGetTiledScrollingIndicatorVisible(WKPreferencesRef preferencesRef)
475 {
476     return toImpl(preferencesRef)->tiledScrollingIndicatorVisible();
477 }
478
479 void WKPreferencesSetWebGLEnabled(WKPreferencesRef preferencesRef, bool flag)
480 {
481     toImpl(preferencesRef)->setWebGLEnabled(flag);
482 }
483
484 bool WKPreferencesGetWebGLEnabled(WKPreferencesRef preferencesRef)
485 {
486     return toImpl(preferencesRef)->webGLEnabled();
487 }
488
489 void WKPreferencesSetForceSoftwareWebGLRendering(WKPreferencesRef preferencesRef, bool flag)
490 {
491     toImpl(preferencesRef)->setForceSoftwareWebGLRendering(flag);
492 }
493
494 bool WKPreferencesGetForceSoftwareWebGLRendering(WKPreferencesRef preferencesRef)
495 {
496     return toImpl(preferencesRef)->forceSoftwareWebGLRendering();
497 }
498
499 void WKPreferencesSetAccelerated2DCanvasEnabled(WKPreferencesRef preferencesRef, bool flag)
500 {
501     toImpl(preferencesRef)->setAccelerated2dCanvasEnabled(flag);
502 }
503
504 bool WKPreferencesGetAccelerated2DCanvasEnabled(WKPreferencesRef preferencesRef)
505 {
506     return toImpl(preferencesRef)->accelerated2dCanvasEnabled();
507 }
508
509 void WKPreferencesSetCSSAnimationTriggersEnabled(WKPreferencesRef preferencesRef, bool flag)
510 {
511     toImpl(preferencesRef)->setCSSAnimationTriggersEnabled(flag);
512 }
513
514 bool WKPreferencesGetCSSAnimationTriggersEnabled(WKPreferencesRef preferencesRef)
515 {
516     return toImpl(preferencesRef)->cssAnimationTriggersEnabled();
517 }
518
519 void WKPreferencesSetWebAnimationsEnabled(WKPreferencesRef preferencesRef, bool flag)
520 {
521     toImpl(preferencesRef)->setWebAnimationsEnabled(flag);
522 }
523
524 bool WKPreferencesGetWebAnimationsEnabled(WKPreferencesRef preferencesRef)
525 {
526     return toImpl(preferencesRef)->webAnimationsEnabled();
527 }
528
529 void WKPreferencesSetWebAnimationsCSSIntegrationEnabled(WKPreferencesRef preferencesRef, bool flag)
530 {
531     toImpl(preferencesRef)->setWebAnimationsCSSIntegrationEnabled(flag);
532 }
533
534 bool WKPreferencesGetWebAnimationsCSSIntegrationEnabled(WKPreferencesRef preferencesRef)
535 {
536     return toImpl(preferencesRef)->webAnimationsCSSIntegrationEnabled();
537 }
538
539 void WKPreferencesSetNeedsSiteSpecificQuirks(WKPreferencesRef preferencesRef, bool flag)
540 {
541     toImpl(preferencesRef)->setNeedsSiteSpecificQuirks(flag);
542 }
543
544 bool WKPreferencesUseLegacyTextAlignPositionedElementBehavior(WKPreferencesRef preferencesRef)
545 {
546     return toImpl(preferencesRef)->useLegacyTextAlignPositionedElementBehavior();
547 }
548
549 void WKPreferencesSetUseLegacyTextAlignPositionedElementBehavior(WKPreferencesRef preferencesRef, bool flag)
550 {
551     toImpl(preferencesRef)->setUseLegacyTextAlignPositionedElementBehavior(flag);
552 }
553
554 bool WKPreferencesGetNeedsSiteSpecificQuirks(WKPreferencesRef preferencesRef)
555 {
556     return toImpl(preferencesRef)->needsSiteSpecificQuirks();
557 }
558
559 void WKPreferencesSetForceFTPDirectoryListings(WKPreferencesRef preferencesRef, bool flag)
560 {
561     toImpl(preferencesRef)->setForceFTPDirectoryListings(flag);
562 }
563
564 bool WKPreferencesGetForceFTPDirectoryListings(WKPreferencesRef preferencesRef)
565 {
566     return toImpl(preferencesRef)->forceFTPDirectoryListings();
567 }
568
569 void WKPreferencesSetFTPDirectoryTemplatePath(WKPreferencesRef preferencesRef, WKStringRef pathRef)
570 {
571     toImpl(preferencesRef)->setFTPDirectoryTemplatePath(toWTFString(pathRef));
572 }
573
574 WKStringRef WKPreferencesCopyFTPDirectoryTemplatePath(WKPreferencesRef preferencesRef)
575 {
576     return toCopiedAPI(toImpl(preferencesRef)->ftpDirectoryTemplatePath());
577 }
578
579 void WKPreferencesSetTabsToLinks(WKPreferencesRef preferencesRef, bool tabsToLinks)
580 {
581     toImpl(preferencesRef)->setTabsToLinks(tabsToLinks);
582 }
583
584 bool WKPreferencesGetTabsToLinks(WKPreferencesRef preferencesRef)
585 {
586     return toImpl(preferencesRef)->tabsToLinks();
587 }
588
589 void WKPreferencesSetDNSPrefetchingEnabled(WKPreferencesRef preferencesRef, bool enabled)
590 {
591     toImpl(preferencesRef)->setDNSPrefetchingEnabled(enabled);
592 }
593
594 bool WKPreferencesGetDNSPrefetchingEnabled(WKPreferencesRef preferencesRef)
595 {
596     return toImpl(preferencesRef)->dnsPrefetchingEnabled();
597 }
598
599 void WKPreferencesSetAuthorAndUserStylesEnabled(WKPreferencesRef preferencesRef, bool enabled)
600 {
601     toImpl(preferencesRef)->setAuthorAndUserStylesEnabled(enabled);
602 }
603
604 bool WKPreferencesGetAuthorAndUserStylesEnabled(WKPreferencesRef preferencesRef)
605 {
606     return toImpl(preferencesRef)->authorAndUserStylesEnabled();
607 }
608
609 void WKPreferencesSetShouldPrintBackgrounds(WKPreferencesRef preferencesRef, bool flag)
610 {
611     toImpl(preferencesRef)->setShouldPrintBackgrounds(flag);
612 }
613
614 bool WKPreferencesGetShouldPrintBackgrounds(WKPreferencesRef preferencesRef)
615 {
616     return toImpl(preferencesRef)->shouldPrintBackgrounds();
617 }
618
619 void WKPreferencesSetDOMTimersThrottlingEnabled(WKPreferencesRef preferencesRef, bool enabled)
620 {
621     toImpl(preferencesRef)->setDOMTimersThrottlingEnabled(enabled);
622 }
623
624 bool WKPreferencesGetDOMTimersThrottlingEnabled(WKPreferencesRef preferencesRef)
625 {
626     return toImpl(preferencesRef)->domTimersThrottlingEnabled();
627 }
628
629 void WKPreferencesSetWebArchiveDebugModeEnabled(WKPreferencesRef preferencesRef, bool enabled)
630 {
631     toImpl(preferencesRef)->setWebArchiveDebugModeEnabled(enabled);
632 }
633
634 bool WKPreferencesGetWebArchiveDebugModeEnabled(WKPreferencesRef preferencesRef)
635 {
636     return toImpl(preferencesRef)->webArchiveDebugModeEnabled();
637 }
638
639 void WKPreferencesSetLocalFileContentSniffingEnabled(WKPreferencesRef preferencesRef, bool enabled)
640 {
641     toImpl(preferencesRef)->setLocalFileContentSniffingEnabled(enabled);
642 }
643
644 bool WKPreferencesGetLocalFileContentSniffingEnabled(WKPreferencesRef preferencesRef)
645 {
646     return toImpl(preferencesRef)->localFileContentSniffingEnabled();
647 }
648
649 void WKPreferencesSetPageCacheEnabled(WKPreferencesRef preferencesRef, bool enabled)
650 {
651     toImpl(preferencesRef)->setUsesPageCache(enabled);
652 }
653
654 bool WKPreferencesGetPageCacheEnabled(WKPreferencesRef preferencesRef)
655 {
656     return toImpl(preferencesRef)->usesPageCache();
657 }
658
659 void WKPreferencesSetPageCacheSupportsPlugins(WKPreferencesRef preferencesRef, bool pageCacheSupportsPlugins)
660 {
661     toImpl(preferencesRef)->setPageCacheSupportsPlugins(pageCacheSupportsPlugins);
662 }
663
664 bool WKPreferencesGetPageCacheSupportsPlugins(WKPreferencesRef preferencesRef)
665 {
666     return toImpl(preferencesRef)->pageCacheSupportsPlugins();
667 }
668
669 void WKPreferencesSetPaginateDuringLayoutEnabled(WKPreferencesRef preferencesRef, bool enabled)
670 {
671     toImpl(preferencesRef)->setPaginateDuringLayoutEnabled(enabled);
672 }
673
674 bool WKPreferencesGetPaginateDuringLayoutEnabled(WKPreferencesRef preferencesRef)
675 {
676     return toImpl(preferencesRef)->paginateDuringLayoutEnabled();
677 }
678
679 void WKPreferencesSetDOMPasteAllowed(WKPreferencesRef preferencesRef, bool enabled)
680 {
681     toImpl(preferencesRef)->setDOMPasteAllowed(enabled);
682 }
683
684 bool WKPreferencesGetDOMPasteAllowed(WKPreferencesRef preferencesRef)
685 {
686     return toImpl(preferencesRef)->domPasteAllowed();
687 }
688
689 void WKPreferencesSetJavaScriptCanAccessClipboard(WKPreferencesRef preferencesRef, bool enabled)
690 {
691     toImpl(preferencesRef)->setJavaScriptCanAccessClipboard(enabled);
692 }
693
694 bool WKPreferencesGetJavaScriptCanAccessClipboard(WKPreferencesRef preferencesRef)
695 {
696     return toImpl(preferencesRef)->javaScriptCanAccessClipboard();
697 }
698
699 void WKPreferencesSetFullScreenEnabled(WKPreferencesRef preferencesRef, bool enabled)
700 {
701     toImpl(preferencesRef)->setFullScreenEnabled(enabled);
702 }
703
704 bool WKPreferencesGetFullScreenEnabled(WKPreferencesRef preferencesRef)
705 {
706     return toImpl(preferencesRef)->fullScreenEnabled();
707 }
708
709 void WKPreferencesSetAsynchronousSpellCheckingEnabled(WKPreferencesRef preferencesRef, bool enabled)
710 {
711     toImpl(preferencesRef)->setAsynchronousSpellCheckingEnabled(enabled);
712 }
713
714 bool WKPreferencesGetAsynchronousSpellCheckingEnabled(WKPreferencesRef preferencesRef)
715 {
716     return toImpl(preferencesRef)->asynchronousSpellCheckingEnabled();
717 }
718
719 void WKPreferencesSetAVFoundationEnabled(WKPreferencesRef preferencesRef, bool enabled)
720 {
721     toImpl(preferencesRef)->setAVFoundationEnabled(enabled);
722 }
723
724 bool WKPreferencesGetAVFoundationEnabled(WKPreferencesRef preferencesRef)
725 {
726     return toImpl(preferencesRef)->isAVFoundationEnabled();
727 }
728
729 void WKPreferencesSetAVFoundationNSURLSessionEnabled(WKPreferencesRef preferencesRef, bool enabled)
730 {
731     toImpl(preferencesRef)->setAVFoundationNSURLSessionEnabled(enabled);
732 }
733
734 bool WKPreferencesGetAVFoundationNSURLSessionEnabled(WKPreferencesRef preferencesRef)
735 {
736     return toImpl(preferencesRef)->isAVFoundationNSURLSessionEnabled();
737 }
738
739 void WKPreferencesSetWebSecurityEnabled(WKPreferencesRef preferencesRef, bool enabled)
740 {
741     toImpl(preferencesRef)->setWebSecurityEnabled(enabled);
742 }
743
744 bool WKPreferencesGetWebSecurityEnabled(WKPreferencesRef preferencesRef)
745 {
746     return toImpl(preferencesRef)->webSecurityEnabled();
747 }
748
749 void WKPreferencesSetUniversalAccessFromFileURLsAllowed(WKPreferencesRef preferencesRef, bool allowed)
750 {
751     toImpl(preferencesRef)->setAllowUniversalAccessFromFileURLs(allowed);
752 }
753
754 bool WKPreferencesGetUniversalAccessFromFileURLsAllowed(WKPreferencesRef preferencesRef)
755 {
756     return toImpl(preferencesRef)->allowUniversalAccessFromFileURLs();
757 }
758
759 void WKPreferencesSetFileAccessFromFileURLsAllowed(WKPreferencesRef preferencesRef, bool allowed)
760 {
761     toImpl(preferencesRef)->setAllowFileAccessFromFileURLs(allowed);
762 }
763
764 bool WKPreferencesGetFileAccessFromFileURLsAllowed(WKPreferencesRef preferencesRef)
765 {
766     return toImpl(preferencesRef)->allowFileAccessFromFileURLs();
767 }
768
769 void WKPreferencesSetNeedsStorageAccessFromFileURLsQuirk(WKPreferencesRef preferencesRef, bool needsQuirk)
770 {
771     toImpl(preferencesRef)->setNeedsStorageAccessFromFileURLsQuirk(needsQuirk);
772 }
773
774 bool WKPreferencesGetNeedsStorageAccessFromFileURLsQuirk(WKPreferencesRef preferencesRef)
775 {
776     return toImpl(preferencesRef)->needsStorageAccessFromFileURLsQuirk();
777 }
778
779 void WKPreferencesSetHixie76WebSocketProtocolEnabled(WKPreferencesRef, bool /*enabled*/)
780 {
781 }
782
783 bool WKPreferencesGetHixie76WebSocketProtocolEnabled(WKPreferencesRef)
784 {
785     return false;
786 }
787
788 void WKPreferencesSetMediaPlaybackRequiresUserGesture(WKPreferencesRef preferencesRef, bool flag)
789 {
790     toImpl(preferencesRef)->setRequiresUserGestureForMediaPlayback(flag);
791 }
792
793 bool WKPreferencesGetMediaPlaybackRequiresUserGesture(WKPreferencesRef preferencesRef)
794 {
795     return toImpl(preferencesRef)->requiresUserGestureForMediaPlayback();
796 }
797
798 void WKPreferencesSetVideoPlaybackRequiresUserGesture(WKPreferencesRef preferencesRef, bool flag)
799 {
800     toImpl(preferencesRef)->setRequiresUserGestureForVideoPlayback(flag);
801 }
802
803 bool WKPreferencesGetVideoPlaybackRequiresUserGesture(WKPreferencesRef preferencesRef)
804 {
805     return toImpl(preferencesRef)->requiresUserGestureForVideoPlayback();
806 }
807
808 void WKPreferencesSetAudioPlaybackRequiresUserGesture(WKPreferencesRef preferencesRef, bool flag)
809 {
810     toImpl(preferencesRef)->setRequiresUserGestureForAudioPlayback(flag);
811 }
812
813 bool WKPreferencesGetAudioPlaybackRequiresUserGesture(WKPreferencesRef preferencesRef)
814 {
815     return toImpl(preferencesRef)->requiresUserGestureForAudioPlayback();
816 }
817
818 void WKPreferencesSetMainContentUserGestureOverrideEnabled(WKPreferencesRef preferencesRef, bool flag)
819 {
820     toImpl(preferencesRef)->setMainContentUserGestureOverrideEnabled(flag);
821 }
822
823 bool WKPreferencesGetMainContentUserGestureOverrideEnabled(WKPreferencesRef preferencesRef)
824 {
825     return toImpl(preferencesRef)->mainContentUserGestureOverrideEnabled();
826 }
827
828 void WKPreferencesSetMediaPlaybackAllowsInline(WKPreferencesRef preferencesRef, bool flag)
829 {
830     toImpl(preferencesRef)->setAllowsInlineMediaPlayback(flag);
831 }
832
833 bool WKPreferencesGetMediaPlaybackAllowsInline(WKPreferencesRef preferencesRef)
834 {
835     return toImpl(preferencesRef)->allowsInlineMediaPlayback();
836 }
837
838 void WKPreferencesSetInlineMediaPlaybackRequiresPlaysInlineAttribute(WKPreferencesRef preferencesRef, bool flag)
839 {
840     toImpl(preferencesRef)->setInlineMediaPlaybackRequiresPlaysInlineAttribute(flag);
841 }
842
843 bool WKPreferencesGetInlineMediaPlaybackRequiresPlaysInlineAttribute(WKPreferencesRef preferencesRef)
844 {
845     return toImpl(preferencesRef)->inlineMediaPlaybackRequiresPlaysInlineAttribute();
846 }
847
848 void WKPreferencesSetBeaconAPIEnabled(WKPreferencesRef preferencesRef, bool flag)
849 {
850     toImpl(preferencesRef)->setBeaconAPIEnabled(flag);
851 }
852
853 bool WKPreferencesGetBeaconAPIEnabled(WKPreferencesRef preferencesRef)
854 {
855     return toImpl(preferencesRef)->beaconAPIEnabled();
856 }
857
858 void WKPreferencesSetDirectoryUploadEnabled(WKPreferencesRef preferencesRef, bool flag)
859 {
860     toImpl(preferencesRef)->setDirectoryUploadEnabled(flag);
861 }
862
863 bool WKPreferencesGetDirectoryUploadEnabled(WKPreferencesRef preferencesRef)
864 {
865     return toImpl(preferencesRef)->directoryUploadEnabled();
866 }
867
868 void WKPreferencesSetMediaControlsScaleWithPageZoom(WKPreferencesRef preferencesRef, bool flag)
869 {
870     toImpl(preferencesRef)->setMediaControlsScaleWithPageZoom(flag);
871 }
872
873 bool WKPreferencesGetMediaControlsScaleWithPageZoom(WKPreferencesRef preferencesRef)
874 {
875     return toImpl(preferencesRef)->mediaControlsScaleWithPageZoom();
876 }
877
878 void WKPreferencesSetModernMediaControlsEnabled(WKPreferencesRef preferencesRef, bool flag)
879 {
880     toImpl(preferencesRef)->setModernMediaControlsEnabled(flag);
881 }
882
883 bool WKPreferencesGetModernMediaControlsEnabled(WKPreferencesRef preferencesRef)
884 {
885     return toImpl(preferencesRef)->modernMediaControlsEnabled();
886 }
887
888 void WKPreferencesSetWebAuthenticationEnabled(WKPreferencesRef preferencesRef, bool flag)
889 {
890     toImpl(preferencesRef)->setWebAuthenticationEnabled(flag);
891 }
892
893 bool WKPreferencesGetWebAuthenticationEnabled(WKPreferencesRef preferencesRef)
894 {
895     return toImpl(preferencesRef)->webAuthenticationEnabled();
896 }
897
898 void WKPreferencesSetInvisibleMediaAutoplayPermitted(WKPreferencesRef preferencesRef, bool flag)
899 {
900     toImpl(preferencesRef)->setInvisibleAutoplayNotPermitted(!flag);
901 }
902
903 bool WKPreferencesGetInvisibleMediaAutoplayPermitted(WKPreferencesRef preferencesRef)
904 {
905     return !toImpl(preferencesRef)->invisibleAutoplayNotPermitted();
906 }
907
908 void WKPreferencesSetShowsToolTipOverTruncatedText(WKPreferencesRef preferencesRef, bool flag)
909 {
910     toImpl(preferencesRef)->setShowsToolTipOverTruncatedText(flag);
911 }
912
913 bool WKPreferencesGetShowsToolTipOverTruncatedText(WKPreferencesRef preferencesRef)
914 {
915     return toImpl(preferencesRef)->showsToolTipOverTruncatedText();
916 }
917
918 void WKPreferencesSetMockScrollbarsEnabled(WKPreferencesRef preferencesRef, bool flag)
919 {
920     toImpl(preferencesRef)->setMockScrollbarsEnabled(flag);
921 }
922
923 bool WKPreferencesGetMockScrollbarsEnabled(WKPreferencesRef preferencesRef)
924 {
925     return toImpl(preferencesRef)->mockScrollbarsEnabled();
926 }
927
928 void WKPreferencesSetAttachmentElementEnabled(WKPreferencesRef preferencesRef, bool flag)
929 {
930     toImpl(preferencesRef)->setAttachmentElementEnabled(flag);
931 }
932
933 bool WKPreferencesGetAttachmentElementEnabled(WKPreferencesRef preferencesRef)
934 {
935     return toImpl(preferencesRef)->attachmentElementEnabled();
936 }
937
938 void WKPreferencesSetWebAudioEnabled(WKPreferencesRef preferencesRef, bool enabled)
939 {
940     toImpl(preferencesRef)->setWebAudioEnabled(enabled);
941 }
942
943 bool WKPreferencesGetWebAudioEnabled(WKPreferencesRef preferencesRef)
944 {
945     return toImpl(preferencesRef)->webAudioEnabled();
946 }
947
948 void WKPreferencesSetApplicationChromeModeEnabled(WKPreferencesRef, bool)
949 {
950     // FIXME: Remove once WebKit nightlies don't need to support Safari 8.
951 }
952
953 bool WKPreferencesGetApplicationChromeModeEnabled(WKPreferencesRef)
954 {
955     // FIXME: Remove once WebKit nightlies don't need to support Safari 8.
956     return false;
957 }
958
959 void WKPreferencesSetInspectorUsesWebKitUserInterface(WKPreferencesRef, bool)
960 {
961     // FIXME: Remove once WebKit nightlies don't need to support Safari 6 thru 7.
962 }
963
964 bool WKPreferencesGetInspectorUsesWebKitUserInterface(WKPreferencesRef)
965 {
966     // FIXME: Remove once WebKit nightlies don't need to support Safari 6 thru 7.
967     return false;
968 }
969
970 void WKPreferencesSetSuppressesIncrementalRendering(WKPreferencesRef preferencesRef, bool enabled)
971 {
972     toImpl(preferencesRef)->setSuppressesIncrementalRendering(enabled);
973 }
974
975 bool WKPreferencesGetSuppressesIncrementalRendering(WKPreferencesRef preferencesRef)
976 {
977     return toImpl(preferencesRef)->suppressesIncrementalRendering();
978 }
979
980 void WKPreferencesSetBackspaceKeyNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled)
981 {
982     toImpl(preferencesRef)->setBackspaceKeyNavigationEnabled(enabled);
983 }
984
985 bool WKPreferencesGetBackspaceKeyNavigationEnabled(WKPreferencesRef preferencesRef)
986 {
987     return toImpl(preferencesRef)->backspaceKeyNavigationEnabled();
988 }
989
990 void WKPreferencesSetCaretBrowsingEnabled(WKPreferencesRef preferencesRef, bool enabled)
991 {
992     toImpl(preferencesRef)->setCaretBrowsingEnabled(enabled);
993 }
994
995 bool WKPreferencesGetCaretBrowsingEnabled(WKPreferencesRef preferencesRef)
996 {
997     return toImpl(preferencesRef)->caretBrowsingEnabled();
998 }
999
1000 void WKPreferencesSetShouldDisplaySubtitles(WKPreferencesRef preferencesRef, bool enabled)
1001 {
1002     toImpl(preferencesRef)->setShouldDisplaySubtitles(enabled);
1003 }
1004
1005 bool WKPreferencesGetShouldDisplaySubtitles(WKPreferencesRef preferencesRef)
1006 {
1007     return toImpl(preferencesRef)->shouldDisplaySubtitles();
1008 }
1009
1010 void WKPreferencesSetShouldDisplayCaptions(WKPreferencesRef preferencesRef, bool enabled)
1011 {
1012     toImpl(preferencesRef)->setShouldDisplayCaptions(enabled);
1013 }
1014
1015 bool WKPreferencesGetShouldDisplayCaptions(WKPreferencesRef preferencesRef)
1016 {
1017     return toImpl(preferencesRef)->shouldDisplayCaptions();
1018 }
1019
1020 void WKPreferencesSetShouldDisplayTextDescriptions(WKPreferencesRef preferencesRef, bool enabled)
1021 {
1022     toImpl(preferencesRef)->setShouldDisplayTextDescriptions(enabled);
1023 }
1024
1025 bool WKPreferencesGetShouldDisplayTextDescriptions(WKPreferencesRef preferencesRef)
1026 {
1027     return toImpl(preferencesRef)->shouldDisplayTextDescriptions();
1028 }
1029
1030 void WKPreferencesSetNotificationsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1031 {
1032     toImpl(preferencesRef)->setNotificationsEnabled(enabled);
1033 }
1034
1035 bool WKPreferencesGetNotificationsEnabled(WKPreferencesRef preferencesRef)
1036 {
1037     return toImpl(preferencesRef)->notificationsEnabled();
1038 }
1039
1040 void WKPreferencesSetShouldRespectImageOrientation(WKPreferencesRef preferencesRef, bool enabled)
1041 {
1042     toImpl(preferencesRef)->setShouldRespectImageOrientation(enabled);
1043 }
1044
1045 bool WKPreferencesGetShouldRespectImageOrientation(WKPreferencesRef preferencesRef)
1046 {
1047     return toImpl(preferencesRef)->shouldRespectImageOrientation();
1048 }
1049
1050 void WKPreferencesSetRequestAnimationFrameEnabled(WKPreferencesRef preferencesRef, bool flag)
1051 {
1052     toImpl(preferencesRef)->setRequestAnimationFrameEnabled(flag);
1053 }
1054
1055 bool WKPreferencesGetRequestAnimationFrameEnabled(WKPreferencesRef preferencesRef)
1056 {
1057     return toImpl(preferencesRef)->requestAnimationFrameEnabled();
1058 }
1059
1060 void WKPreferencesSetStorageBlockingPolicy(WKPreferencesRef preferencesRef, WKStorageBlockingPolicy policy)
1061 {
1062     toImpl(preferencesRef)->setStorageBlockingPolicy(toStorageBlockingPolicy(policy));
1063 }
1064
1065 WKStorageBlockingPolicy WKPreferencesGetStorageBlockingPolicy(WKPreferencesRef preferencesRef)
1066 {
1067     return toAPI(static_cast<WebCore::SecurityOrigin::StorageBlockingPolicy>(toImpl(preferencesRef)->storageBlockingPolicy()));
1068 }
1069
1070 void WKPreferencesResetTestRunnerOverrides(WKPreferencesRef preferencesRef)
1071 {
1072     // Currently we reset the overrides on the web process when preferencesDidChange() is called. Since WTR preferences
1073     // are usually always the same (in the UI process), they are not sent to web process, not triggering the reset.
1074     toImpl(preferencesRef)->forceUpdate();
1075 }
1076
1077 void WKPreferencesSetDiagnosticLoggingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1078 {
1079     toImpl(preferencesRef)->setDiagnosticLoggingEnabled(enabled);
1080 }
1081
1082 bool WKPreferencesGetDiagnosticLoggingEnabled(WKPreferencesRef preferencesRef)
1083 {
1084     return toImpl(preferencesRef)->diagnosticLoggingEnabled();
1085 }
1086
1087 void WKPreferencesSetAsynchronousPluginInitializationEnabled(WKPreferencesRef preferencesRef, bool enabled)
1088 {
1089     toImpl(preferencesRef)->setAsynchronousPluginInitializationEnabled(enabled);
1090 }
1091
1092 bool WKPreferencesGetAsynchronousPluginInitializationEnabled(WKPreferencesRef preferencesRef)
1093 {
1094     return toImpl(preferencesRef)->asynchronousPluginInitializationEnabled();
1095 }
1096
1097 void WKPreferencesSetAsynchronousPluginInitializationEnabledForAllPlugins(WKPreferencesRef preferencesRef, bool enabled)
1098 {
1099     toImpl(preferencesRef)->setAsynchronousPluginInitializationEnabledForAllPlugins(enabled);
1100 }
1101
1102 bool WKPreferencesGetAsynchronousPluginInitializationEnabledForAllPlugins(WKPreferencesRef preferencesRef)
1103 {
1104     return toImpl(preferencesRef)->asynchronousPluginInitializationEnabledForAllPlugins();
1105 }
1106
1107 void WKPreferencesSetArtificialPluginInitializationDelayEnabled(WKPreferencesRef preferencesRef, bool enabled)
1108 {
1109     toImpl(preferencesRef)->setArtificialPluginInitializationDelayEnabled(enabled);
1110 }
1111
1112 bool WKPreferencesGetArtificialPluginInitializationDelayEnabled(WKPreferencesRef preferencesRef)
1113 {
1114     return toImpl(preferencesRef)->artificialPluginInitializationDelayEnabled();
1115 }
1116
1117 void WKPreferencesSetTabToLinksEnabled(WKPreferencesRef preferencesRef, bool enabled)
1118 {
1119     toImpl(preferencesRef)->setTabToLinksEnabled(enabled);
1120 }
1121
1122 bool WKPreferencesGetTabToLinksEnabled(WKPreferencesRef preferencesRef)
1123 {
1124     return toImpl(preferencesRef)->tabToLinksEnabled();
1125 }
1126
1127 void WKPreferencesSetInteractiveFormValidationEnabled(WKPreferencesRef preferencesRef, bool enabled)
1128 {
1129     toImpl(preferencesRef)->setInteractiveFormValidationEnabled(enabled);
1130 }
1131
1132 bool WKPreferencesGetInteractiveFormValidationEnabled(WKPreferencesRef preferencesRef)
1133 {
1134     return toImpl(preferencesRef)->interactiveFormValidationEnabled();
1135 }
1136
1137 void WKPreferencesSetScrollingPerformanceLoggingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1138 {
1139     toImpl(preferencesRef)->setScrollingPerformanceLoggingEnabled(enabled);
1140 }
1141
1142 bool WKPreferencesGetScrollingPerformanceLoggingEnabled(WKPreferencesRef preferencesRef)
1143 {
1144     return toImpl(preferencesRef)->scrollingPerformanceLoggingEnabled();
1145 }
1146
1147 void WKPreferencesSetPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1148 {
1149     toImpl(preferencesRef)->setPlugInSnapshottingEnabled(enabled);
1150 }
1151
1152 bool WKPreferencesGetPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef)
1153 {
1154     return toImpl(preferencesRef)->plugInSnapshottingEnabled();
1155 }
1156
1157 void WKPreferencesSetPluginSandboxProfilesEnabledForAllPlugins(WKPreferencesRef preferencesRef, bool enabled)
1158 {
1159 #if ENABLE(NETSCAPE_PLUGIN_API) && PLATFORM(MAC)
1160     WebKit::PluginProcessManager::singleton().setExperimentalPlugInSandboxProfilesEnabled(enabled);
1161 #endif
1162     toImpl(preferencesRef)->setExperimentalPlugInSandboxProfilesEnabled(enabled);
1163 }
1164
1165 bool WKPreferencesGetPluginSandboxProfilesEnabledForAllPlugins(WKPreferencesRef preferencesRef)
1166 {
1167     return toImpl(preferencesRef)->experimentalPlugInSandboxProfilesEnabled();
1168 }
1169
1170 void WKPreferencesSetSnapshotAllPlugIns(WKPreferencesRef preferencesRef, bool enabled)
1171 {
1172     toImpl(preferencesRef)->setSnapshotAllPlugIns(enabled);
1173 }
1174
1175 bool WKPreferencesGetSnapshotAllPlugIns(WKPreferencesRef preferencesRef)
1176 {
1177     return toImpl(preferencesRef)->snapshotAllPlugIns();
1178 }
1179
1180 void WKPreferencesSetAutostartOriginPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1181 {
1182     toImpl(preferencesRef)->setAutostartOriginPlugInSnapshottingEnabled(enabled);
1183 }
1184
1185 bool WKPreferencesGetAutostartOriginPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef)
1186 {
1187     return toImpl(preferencesRef)->autostartOriginPlugInSnapshottingEnabled();
1188 }
1189
1190 void WKPreferencesSetPrimaryPlugInSnapshotDetectionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1191 {
1192     toImpl(preferencesRef)->setPrimaryPlugInSnapshotDetectionEnabled(enabled);
1193 }
1194
1195 bool WKPreferencesGetPrimaryPlugInSnapshotDetectionEnabled(WKPreferencesRef preferencesRef)
1196 {
1197     return toImpl(preferencesRef)->primaryPlugInSnapshotDetectionEnabled();
1198 }
1199
1200 void WKPreferencesSetPDFPluginEnabled(WKPreferencesRef preferencesRef, bool enabled)
1201 {
1202     toImpl(preferencesRef)->setPDFPluginEnabled(enabled);
1203 }
1204
1205 bool WKPreferencesGetPDFPluginEnabled(WKPreferencesRef preferencesRef)
1206 {
1207     return toImpl(preferencesRef)->pdfPluginEnabled();
1208 }
1209
1210 void WKPreferencesSetEncodingDetectorEnabled(WKPreferencesRef preferencesRef, bool enabled)
1211 {
1212     toImpl(preferencesRef)->setUsesEncodingDetector(enabled);
1213 }
1214
1215 bool WKPreferencesGetEncodingDetectorEnabled(WKPreferencesRef preferencesRef)
1216 {
1217     return toImpl(preferencesRef)->usesEncodingDetector();
1218 }
1219
1220 void WKPreferencesSetTextAutosizingEnabled(WKPreferencesRef preferencesRef, bool textAutosizingEnabled)
1221 {
1222     toImpl(preferencesRef)->setTextAutosizingEnabled(textAutosizingEnabled);
1223 }
1224
1225 bool WKPreferencesGetTextAutosizingEnabled(WKPreferencesRef preferencesRef)
1226 {
1227     return toImpl(preferencesRef)->textAutosizingEnabled();
1228 }
1229
1230 void WKPreferencesSetAggressiveTileRetentionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1231 {
1232     toImpl(preferencesRef)->setAggressiveTileRetentionEnabled(enabled);
1233 }
1234
1235 bool WKPreferencesGetAggressiveTileRetentionEnabled(WKPreferencesRef preferencesRef)
1236 {
1237     return toImpl(preferencesRef)->aggressiveTileRetentionEnabled();
1238 }
1239
1240 void WKPreferencesSetLogsPageMessagesToSystemConsoleEnabled(WKPreferencesRef preferencesRef, bool enabled)
1241 {
1242     toImpl(preferencesRef)->setLogsPageMessagesToSystemConsoleEnabled(enabled);
1243 }
1244
1245 bool WKPreferencesGetLogsPageMessagesToSystemConsoleEnabled(WKPreferencesRef preferencesRef)
1246 {
1247     return toImpl(preferencesRef)->logsPageMessagesToSystemConsoleEnabled();
1248 }
1249
1250 void WKPreferencesSetPageVisibilityBasedProcessSuppressionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1251 {
1252     toImpl(preferencesRef)->setPageVisibilityBasedProcessSuppressionEnabled(enabled);
1253 }
1254
1255 bool WKPreferencesGetPageVisibilityBasedProcessSuppressionEnabled(WKPreferencesRef preferencesRef)
1256 {
1257     return toImpl(preferencesRef)->pageVisibilityBasedProcessSuppressionEnabled();
1258 }
1259
1260 void WKPreferencesSetSmartInsertDeleteEnabled(WKPreferencesRef preferencesRef, bool enabled)
1261 {
1262     toImpl(preferencesRef)->setSmartInsertDeleteEnabled(enabled);
1263 }
1264
1265 bool WKPreferencesGetSmartInsertDeleteEnabled(WKPreferencesRef preferencesRef)
1266 {
1267     return toImpl(preferencesRef)->smartInsertDeleteEnabled();
1268 }
1269
1270 void WKPreferencesSetSelectTrailingWhitespaceEnabled(WKPreferencesRef preferencesRef, bool enabled)
1271 {
1272     toImpl(preferencesRef)->setSelectTrailingWhitespaceEnabled(enabled);
1273 }
1274
1275 bool WKPreferencesGetSelectTrailingWhitespaceEnabled(WKPreferencesRef preferencesRef)
1276 {
1277     return toImpl(preferencesRef)->selectTrailingWhitespaceEnabled();
1278 }
1279
1280 void WKPreferencesSetShowsURLsInToolTipsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1281 {
1282     toImpl(preferencesRef)->setShowsURLsInToolTipsEnabled(enabled);
1283 }
1284
1285 bool WKPreferencesGetShowsURLsInToolTipsEnabled(WKPreferencesRef preferencesRef)
1286 {
1287     return toImpl(preferencesRef)->showsURLsInToolTipsEnabled();
1288 }
1289
1290 void WKPreferencesSetHiddenPageDOMTimerThrottlingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1291 {
1292     toImpl(preferencesRef)->setHiddenPageDOMTimerThrottlingEnabled(enabled);
1293 }
1294
1295 void WKPreferencesSetHiddenPageDOMTimerThrottlingAutoIncreases(WKPreferencesRef preferencesRef, bool enabled)
1296 {
1297     toImpl(preferencesRef)->setHiddenPageDOMTimerThrottlingAutoIncreases(enabled);
1298 }
1299
1300 bool WKPreferencesGetHiddenPageDOMTimerThrottlingEnabled(WKPreferencesRef preferencesRef)
1301 {
1302     return toImpl(preferencesRef)->hiddenPageDOMTimerThrottlingEnabled();
1303 }
1304
1305 bool WKPreferencesGetHiddenPageDOMTimerThrottlingAutoIncreases(WKPreferencesRef preferencesRef)
1306 {
1307     return toImpl(preferencesRef)->hiddenPageDOMTimerThrottlingAutoIncreases();
1308 }
1309
1310 void WKPreferencesSetHiddenPageCSSAnimationSuspensionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1311 {
1312     toImpl(preferencesRef)->setHiddenPageCSSAnimationSuspensionEnabled(enabled);
1313 }
1314
1315 bool WKPreferencesGetHiddenPageCSSAnimationSuspensionEnabled(WKPreferencesRef preferencesRef)
1316 {
1317     return toImpl(preferencesRef)->hiddenPageCSSAnimationSuspensionEnabled();
1318 }
1319
1320 void WKPreferencesSetIncrementalRenderingSuppressionTimeout(WKPreferencesRef preferencesRef, double timeout)
1321 {
1322     toImpl(preferencesRef)->setIncrementalRenderingSuppressionTimeout(timeout);
1323 }
1324
1325 double WKPreferencesGetIncrementalRenderingSuppressionTimeout(WKPreferencesRef preferencesRef)
1326 {
1327     return toAPI(toImpl(preferencesRef)->incrementalRenderingSuppressionTimeout());
1328 }
1329
1330 void WKPreferencesSetThreadedScrollingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1331 {
1332     toImpl(preferencesRef)->setThreadedScrollingEnabled(enabled);
1333 }
1334
1335 bool WKPreferencesGetThreadedScrollingEnabled(WKPreferencesRef preferencesRef)
1336 {
1337     return toImpl(preferencesRef)->threadedScrollingEnabled();
1338 }
1339
1340 void WKPreferencesSetSimpleLineLayoutEnabled(WKPreferencesRef preferencesRef, bool flag)
1341 {
1342     toImpl(preferencesRef)->setSimpleLineLayoutEnabled(flag);
1343 }
1344
1345 bool WKPreferencesGetSimpleLineLayoutEnabled(WKPreferencesRef preferencesRef)
1346 {
1347     return toImpl(preferencesRef)->simpleLineLayoutEnabled();
1348 }
1349
1350 void WKPreferencesSetSimpleLineLayoutDebugBordersEnabled(WKPreferencesRef preferencesRef, bool flag)
1351 {
1352     toImpl(preferencesRef)->setSimpleLineLayoutDebugBordersEnabled(flag);
1353 }
1354
1355 bool WKPreferencesGetSimpleLineLayoutDebugBordersEnabled(WKPreferencesRef preferencesRef)
1356 {
1357     return toImpl(preferencesRef)->simpleLineLayoutDebugBordersEnabled();
1358 }
1359
1360 void WKPreferencesSetNewBlockInsideInlineModelEnabled(WKPreferencesRef, bool)
1361 {
1362     // FIXME: Remove Safari call to this.
1363 }
1364
1365 bool WKPreferencesGetNewBlockInsideInlineModelEnabled(WKPreferencesRef)
1366 {
1367     // FIXME: Remove Safari call for this.
1368     return false;
1369 }
1370
1371 void WKPreferencesSetDeferredCSSParserEnabled(WKPreferencesRef preferencesRef, bool flag)
1372 {
1373     toImpl(preferencesRef)->setDeferredCSSParserEnabled(flag);
1374 }
1375
1376 bool WKPreferencesGetDeferredCSSParserEnabled(WKPreferencesRef preferencesRef)
1377 {
1378     return toImpl(preferencesRef)->deferredCSSParserEnabled();
1379 }
1380
1381 void WKPreferencesSetSubpixelCSSOMElementMetricsEnabled(WKPreferencesRef preferencesRef, bool flag)
1382 {
1383     toImpl(preferencesRef)->setSubpixelCSSOMElementMetricsEnabled(flag);
1384 }
1385
1386 bool WKPreferencesGetSubpixelCSSOMElementMetricsEnabled(WKPreferencesRef preferencesRef)
1387 {
1388     return toImpl(preferencesRef)->subpixelCSSOMElementMetricsEnabled();
1389 }
1390
1391 void WKPreferencesSetUseGiantTiles(WKPreferencesRef preferencesRef, bool flag)
1392 {
1393     toImpl(preferencesRef)->setUseGiantTiles(flag);
1394 }
1395
1396 bool WKPreferencesGetUseGiantTiles(WKPreferencesRef preferencesRef)
1397 {
1398     return toImpl(preferencesRef)->useGiantTiles();
1399 }
1400
1401 void WKPreferencesSetMediaDevicesEnabled(WKPreferencesRef preferencesRef, bool enabled)
1402 {
1403     toImpl(preferencesRef)->setMediaDevicesEnabled(enabled);
1404 }
1405
1406 bool WKPreferencesGetMediaDevicesEnabled(WKPreferencesRef preferencesRef)
1407 {
1408     return toImpl(preferencesRef)->mediaDevicesEnabled();
1409 }
1410
1411 void WKPreferencesSetMediaStreamEnabled(WKPreferencesRef preferencesRef, bool enabled)
1412 {
1413     toImpl(preferencesRef)->setMediaStreamEnabled(enabled);
1414 }
1415
1416 bool WKPreferencesGetMediaStreamEnabled(WKPreferencesRef preferencesRef)
1417 {
1418     return toImpl(preferencesRef)->mediaStreamEnabled();
1419 }
1420
1421 void WKPreferencesSetPeerConnectionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1422 {
1423     toImpl(preferencesRef)->setPeerConnectionEnabled(enabled);
1424 }
1425
1426 bool WKPreferencesGetPeerConnectionEnabled(WKPreferencesRef preferencesRef)
1427 {
1428     return toImpl(preferencesRef)->peerConnectionEnabled();
1429 }
1430
1431 void WKPreferencesSetWebRTCLegacyAPIEnabled(WKPreferencesRef, bool)
1432 {
1433 }
1434
1435 bool WKPreferencesGetWebRTCLegacyAPIEnabled(WKPreferencesRef)
1436 {
1437     return false;
1438 }
1439
1440 void WKPreferencesSetWebRTCMDNSICECandidatesEnabled(WKPreferencesRef preferencesRef, bool enabled)
1441 {
1442     toImpl(preferencesRef)->setMDNSICECandidatesEnabled(enabled);
1443 }
1444
1445 bool WKPreferencesGetWebRTCMDNSICECandidatesEnabled(WKPreferencesRef preferencesRef)
1446 {
1447     return toImpl(preferencesRef)->mDNSICECandidatesEnabled();
1448 }
1449
1450 void WKPreferencesSetSpatialNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled)
1451 {
1452     toImpl(preferencesRef)->setSpatialNavigationEnabled(enabled);
1453 }
1454
1455 bool WKPreferencesGetSpatialNavigationEnabled(WKPreferencesRef preferencesRef)
1456 {
1457     return toImpl(preferencesRef)->spatialNavigationEnabled();
1458 }
1459
1460 void WKPreferencesSetMediaSourceEnabled(WKPreferencesRef preferencesRef, bool enabled)
1461 {
1462     toImpl(preferencesRef)->setMediaSourceEnabled(enabled);
1463 }
1464
1465 bool WKPreferencesGetMediaSourceEnabled(WKPreferencesRef preferencesRef)
1466 {
1467     return toImpl(preferencesRef)->mediaSourceEnabled();
1468 }
1469
1470 void WKPreferencesSetSourceBufferChangeTypeEnabled(WKPreferencesRef preferencesRef, bool enabled)
1471 {
1472     toImpl(preferencesRef)->setSourceBufferChangeTypeEnabled(enabled);
1473 }
1474
1475 bool WKPreferencesGetSourceBufferChangeTypeEnabled(WKPreferencesRef preferencesRef)
1476 {
1477     return toImpl(preferencesRef)->sourceBufferChangeTypeEnabled();
1478 }
1479
1480 void WKPreferencesSetViewGestureDebuggingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1481 {
1482     toImpl(preferencesRef)->setViewGestureDebuggingEnabled(enabled);
1483 }
1484
1485 bool WKPreferencesGetViewGestureDebuggingEnabled(WKPreferencesRef preferencesRef)
1486 {
1487     return toImpl(preferencesRef)->viewGestureDebuggingEnabled();
1488 }
1489
1490 void WKPreferencesSetShouldConvertPositionStyleOnCopy(WKPreferencesRef preferencesRef, bool convert)
1491 {
1492     toImpl(preferencesRef)->setShouldConvertPositionStyleOnCopy(convert);
1493 }
1494
1495 bool WKPreferencesGetShouldConvertPositionStyleOnCopy(WKPreferencesRef preferencesRef)
1496 {
1497     return toImpl(preferencesRef)->shouldConvertPositionStyleOnCopy();
1498 }
1499
1500 void WKPreferencesSetTelephoneNumberParsingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1501 {
1502     toImpl(preferencesRef)->setTelephoneNumberParsingEnabled(enabled);
1503 }
1504
1505 bool WKPreferencesGetTelephoneNumberParsingEnabled(WKPreferencesRef preferencesRef)
1506 {
1507     return toImpl(preferencesRef)->telephoneNumberParsingEnabled();
1508 }
1509
1510 void WKPreferencesSetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef, bool enabled)
1511 {
1512     toImpl(preferencesRef)->setEnableInheritURIQueryComponent(enabled);
1513 }
1514
1515 bool WKPreferencesGetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef)
1516 {
1517     return toImpl(preferencesRef)->enableInheritURIQueryComponent();
1518 }
1519
1520 void WKPreferencesSetServiceControlsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1521 {
1522     toImpl(preferencesRef)->setServiceControlsEnabled(enabled);
1523 }
1524
1525 bool WKPreferencesGetServiceControlsEnabled(WKPreferencesRef preferencesRef)
1526 {
1527     return toImpl(preferencesRef)->serviceControlsEnabled();
1528 }
1529
1530 void WKPreferencesSetImageControlsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1531 {
1532     toImpl(preferencesRef)->setImageControlsEnabled(enabled);
1533 }
1534
1535 bool WKPreferencesGetImageControlsEnabled(WKPreferencesRef preferencesRef)
1536 {
1537     return toImpl(preferencesRef)->imageControlsEnabled();
1538 }
1539
1540 void WKPreferencesSetGamepadsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1541 {
1542     toImpl(preferencesRef)->setGamepadsEnabled(enabled);
1543 }
1544
1545 bool WKPreferencesGetGamepadsEnabled(WKPreferencesRef preferencesRef)
1546 {
1547     return toImpl(preferencesRef)->gamepadsEnabled();
1548 }
1549
1550 // FIXME: Remove these when possible.
1551 void WKPreferencesSetLongMousePressEnabled(WKPreferencesRef preferencesRef, bool enabled)
1552 {
1553 }
1554
1555 bool WKPreferencesGetLongMousePressEnabled(WKPreferencesRef preferencesRef)
1556 {
1557     return false;
1558 }
1559
1560 void WKPreferencesSetMinimumZoomFontSize(WKPreferencesRef preferencesRef, double size)
1561 {
1562     toImpl(preferencesRef)->setMinimumZoomFontSize(size);
1563 }
1564
1565 double WKPreferencesGetMinimumZoomFontSize(WKPreferencesRef preferencesRef)
1566 {
1567     return toImpl(preferencesRef)->minimumZoomFontSize();
1568 }
1569
1570 void WKPreferencesSetAntialiasedFontDilationEnabled(WKPreferencesRef, bool)
1571 {
1572     // Feature removed.
1573 }
1574
1575 bool WKPreferencesGetAntialiasedFontDilationEnabled(WKPreferencesRef)
1576 {
1577     return false; // Feature removed.
1578 }
1579
1580 void WKPreferencesSetVisibleDebugOverlayRegions(WKPreferencesRef preferencesRef, WKDebugOverlayRegions visibleRegions)
1581 {
1582     toImpl(preferencesRef)->setVisibleDebugOverlayRegions(visibleRegions);
1583 }
1584
1585 WKDebugOverlayRegions WKPreferencesGetVisibleDebugOverlayRegions(WKPreferencesRef preferencesRef)
1586 {
1587     return toImpl(preferencesRef)->visibleDebugOverlayRegions();
1588 }
1589
1590 void WKPreferencesSetIgnoreViewportScalingConstraints(WKPreferencesRef preferencesRef, bool enabled)
1591 {
1592     toImpl(preferencesRef)->setIgnoreViewportScalingConstraints(enabled);
1593 }
1594
1595 bool WKPreferencesGetIgnoreViewportScalingConstraints(WKPreferencesRef preferencesRef)
1596 {
1597     return toImpl(preferencesRef)->ignoreViewportScalingConstraints();
1598 }
1599
1600 void WKPreferencesSetMetaRefreshEnabled(WKPreferencesRef preferencesRef, bool enabled)
1601 {
1602     toImpl(preferencesRef)->setHTTPEquivEnabled(enabled);
1603 }
1604
1605 bool WKPreferencesGetMetaRefreshEnabled(WKPreferencesRef preferencesRef)
1606 {
1607     return toImpl(preferencesRef)->httpEquivEnabled();
1608 }
1609
1610 void WKPreferencesSetHTTPEquivEnabled(WKPreferencesRef preferencesRef, bool enabled)
1611 {
1612     toImpl(preferencesRef)->setHTTPEquivEnabled(enabled);
1613 }
1614
1615 bool WKPreferencesGetHTTPEquivEnabled(WKPreferencesRef preferencesRef)
1616 {
1617     return toImpl(preferencesRef)->httpEquivEnabled();
1618 }
1619
1620 void WKPreferencesSetAllowsAirPlayForMediaPlayback(WKPreferencesRef preferencesRef, bool enabled)
1621 {
1622     toImpl(preferencesRef)->setAllowsAirPlayForMediaPlayback(enabled);
1623 }
1624
1625 bool WKPreferencesGetAllowsAirPlayForMediaPlayback(WKPreferencesRef preferencesRef)
1626 {
1627     return toImpl(preferencesRef)->allowsAirPlayForMediaPlayback();
1628 }
1629
1630 void WKPreferencesSetUserInterfaceDirectionPolicy(WKPreferencesRef preferencesRef, _WKUserInterfaceDirectionPolicy userInterfaceDirectionPolicy)
1631 {
1632     toImpl(preferencesRef)->setUserInterfaceDirectionPolicy(userInterfaceDirectionPolicy);
1633 }
1634
1635 _WKUserInterfaceDirectionPolicy WKPreferencesGetUserInterfaceDirectionPolicy(WKPreferencesRef preferencesRef)
1636 {
1637     return static_cast<_WKUserInterfaceDirectionPolicy>(toImpl(preferencesRef)->userInterfaceDirectionPolicy());
1638 }
1639
1640 void WKPreferencesSetResourceUsageOverlayVisible(WKPreferencesRef preferencesRef, bool enabled)
1641 {
1642     toImpl(preferencesRef)->setResourceUsageOverlayVisible(enabled);
1643 }
1644
1645 bool WKPreferencesGetResourceUsageOverlayVisible(WKPreferencesRef preferencesRef)
1646 {
1647     return toImpl(preferencesRef)->resourceUsageOverlayVisible();
1648 }
1649
1650 void WKPreferencesSetMockCaptureDevicesEnabled(WKPreferencesRef preferencesRef, bool enabled)
1651 {
1652     toImpl(preferencesRef)->setMockCaptureDevicesEnabled(enabled);
1653 }
1654
1655 bool WKPreferencesGetMockCaptureDevicesEnabled(WKPreferencesRef preferencesRef)
1656 {
1657     return toImpl(preferencesRef)->mockCaptureDevicesEnabled();
1658 }
1659
1660 void WKPreferencesSetICECandidateFilteringEnabled(WKPreferencesRef preferencesRef, bool enabled)
1661 {
1662     toImpl(preferencesRef)->setICECandidateFilteringEnabled(enabled);
1663 }
1664
1665 bool WKPreferencesGetICECandidateFilteringEnabled(WKPreferencesRef preferencesRef)
1666 {
1667     return toImpl(preferencesRef)->iceCandidateFilteringEnabled();
1668 }
1669
1670 void WKPreferencesSetEnumeratingAllNetworkInterfacesEnabled(WKPreferencesRef preferencesRef, bool enabled)
1671 {
1672     toImpl(preferencesRef)->setEnumeratingAllNetworkInterfacesEnabled(enabled);
1673 }
1674
1675 bool WKPreferencesGetEnumeratingAllNetworkInterfacesEnabled(WKPreferencesRef preferencesRef)
1676 {
1677     return toImpl(preferencesRef)->enumeratingAllNetworkInterfacesEnabled();
1678 }
1679
1680 void WKPreferencesSetMediaCaptureRequiresSecureConnection(WKPreferencesRef preferencesRef, bool enabled)
1681 {
1682     toImpl(preferencesRef)->setMediaCaptureRequiresSecureConnection(enabled);
1683 }
1684
1685 bool WKPreferencesGetMediaCaptureRequiresSecureConnection(WKPreferencesRef preferencesRef)
1686 {
1687     return toImpl(preferencesRef)->mediaCaptureRequiresSecureConnection();
1688 }
1689
1690 void WKPreferencesSetInactiveMediaCaptureSteamRepromptIntervalInMinutes(WKPreferencesRef preferencesRef, double interval)
1691 {
1692     toImpl(preferencesRef)->setInactiveMediaCaptureSteamRepromptIntervalInMinutes(interval);
1693 }
1694
1695 double WKPreferencesGetInactiveMediaCaptureSteamRepromptIntervalInMinutes(WKPreferencesRef preferencesRef)
1696 {
1697     return toImpl(preferencesRef)->inactiveMediaCaptureSteamRepromptIntervalInMinutes();
1698 }
1699
1700 void WKPreferencesSetFetchAPIEnabled(WKPreferencesRef preferencesRef, bool flag)
1701 {
1702     toImpl(preferencesRef)->setFetchAPIEnabled(flag);
1703 }
1704
1705 bool WKPreferencesGetFetchAPIEnabled(WKPreferencesRef preferencesRef)
1706 {
1707     return toImpl(preferencesRef)->fetchAPIEnabled();
1708 }
1709
1710 void WKPreferencesSetDisplayContentsEnabled(WKPreferencesRef preferencesRef, bool flag)
1711 {
1712     toImpl(preferencesRef)->setDisplayContentsEnabled(flag);
1713 }
1714
1715 bool WKPreferencesGetDisplayContentsEnabled(WKPreferencesRef preferencesRef)
1716 {
1717     return toImpl(preferencesRef)->displayContentsEnabled();
1718 }
1719
1720 void WKPreferencesSetDataTransferItemsEnabled(WKPreferencesRef preferencesRef, bool flag)
1721 {
1722     toImpl(preferencesRef)->setDataTransferItemsEnabled(flag);
1723 }
1724
1725 bool WKPreferencesGetDataTransferItemsEnabled(WKPreferencesRef preferencesRef)
1726 {
1727     return toImpl(preferencesRef)->dataTransferItemsEnabled();
1728 }
1729
1730 void WKPreferencesSetCustomPasteboardDataEnabled(WKPreferencesRef preferencesRef, bool flag)
1731 {
1732     toImpl(preferencesRef)->setCustomPasteboardDataEnabled(flag);
1733 }
1734
1735 bool WKPreferencesGetCustomPasteboardDataEnabled(WKPreferencesRef preferencesRef)
1736 {
1737     return toImpl(preferencesRef)->customPasteboardDataEnabled();
1738 }
1739
1740 void WKPreferencesSetWebShareEnabled(WKPreferencesRef preferencesRef, bool flag)
1741 {
1742     toImpl(preferencesRef)->setWebShareEnabled(flag);
1743 }
1744
1745 bool WKPreferencesGetWebShareEnabled(WKPreferencesRef preferencesRef)
1746 {
1747     return toImpl(preferencesRef)->webShareEnabled();
1748 }
1749
1750 void WKPreferencesSetDownloadAttributeEnabled(WKPreferencesRef preferencesRef, bool flag)
1751 {
1752     toImpl(preferencesRef)->setDownloadAttributeEnabled(flag);
1753 }
1754
1755 bool WKPreferencesGetDownloadAttributeEnabled(WKPreferencesRef preferencesRef)
1756 {
1757     return toImpl(preferencesRef)->downloadAttributeEnabled();
1758 }
1759
1760 void WKPreferencesSetIntersectionObserverEnabled(WKPreferencesRef preferencesRef, bool flag)
1761 {
1762     toImpl(preferencesRef)->setIntersectionObserverEnabled(flag);
1763 }
1764
1765 bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef preferencesRef)
1766 {
1767     return toImpl(preferencesRef)->intersectionObserverEnabled();
1768 }
1769
1770 void WKPreferencesSetMenuItemElementEnabled(WKPreferencesRef preferencesRef, bool flag)
1771 {
1772     return toImpl(preferencesRef)->setMenuItemElementEnabled(flag);
1773 }
1774
1775 bool WKPreferencesGetMenuItemElementEnabled(WKPreferencesRef preferencesRef)
1776 {
1777     return toImpl(preferencesRef)->menuItemElementEnabled();
1778 }
1779
1780 void WKPreferencesSetUserTimingEnabled(WKPreferencesRef preferencesRef, bool flag)
1781 {
1782     toImpl(preferencesRef)->setUserTimingEnabled(flag);
1783 }
1784
1785 bool WKPreferencesGetUserTimingEnabled(WKPreferencesRef preferencesRef)
1786 {
1787     return toImpl(preferencesRef)->userTimingEnabled();
1788 }
1789
1790 void WKPreferencesSetResourceTimingEnabled(WKPreferencesRef preferencesRef, bool flag)
1791 {
1792     toImpl(preferencesRef)->setResourceTimingEnabled(flag);
1793 }
1794
1795 bool WKPreferencesGetResourceTimingEnabled(WKPreferencesRef preferencesRef)
1796 {
1797     return toImpl(preferencesRef)->resourceTimingEnabled();
1798 }
1799
1800 void WKPreferencesSetFetchAPIKeepAliveEnabled(WKPreferencesRef preferencesRef, bool flag)
1801 {
1802     toImpl(preferencesRef)->setFetchAPIKeepAliveEnabled(flag);
1803 }
1804
1805 bool WKPreferencesGetFetchAPIKeepAliveEnabled(WKPreferencesRef preferencesRef)
1806 {
1807     return toImpl(preferencesRef)->fetchAPIKeepAliveEnabled();
1808 }
1809
1810 void WKPreferencesSetSelectionPaintingWithoutSelectionGapsEnabled(WKPreferencesRef preferencesRef, bool flag)
1811 {
1812     toImpl(preferencesRef)->setSelectionPaintingWithoutSelectionGapsEnabled(flag);
1813 }
1814
1815 bool WKPreferencesGetSelectionPaintingWithoutSelectionGapsEnabled(WKPreferencesRef preferencesRef)
1816 {
1817     return toImpl(preferencesRef)->selectionPaintingWithoutSelectionGapsEnabled();
1818 }
1819
1820 void WKPreferencesSetAllowsPictureInPictureMediaPlayback(WKPreferencesRef preferencesRef, bool enabled)
1821 {
1822     toImpl(preferencesRef)->setAllowsPictureInPictureMediaPlayback(enabled);
1823 }
1824
1825 bool WKPreferencesGetAllowsPictureInPictureMediaPlayback(WKPreferencesRef preferencesRef)
1826 {
1827     return toImpl(preferencesRef)->allowsPictureInPictureMediaPlayback();
1828 }
1829
1830 WK_EXPORT bool WKPreferencesGetApplePayEnabled(WKPreferencesRef preferencesRef)
1831 {
1832     return WebKit::toImpl(preferencesRef)->applePayEnabled();
1833 }
1834
1835 void WKPreferencesSetApplePayEnabled(WKPreferencesRef preferencesRef, bool enabled)
1836 {
1837     WebKit::toImpl(preferencesRef)->setApplePayEnabled(enabled);
1838 }
1839
1840 bool WKPreferencesGetApplePayCapabilityDisclosureAllowed(WKPreferencesRef preferencesRef)
1841 {
1842     return WebKit::toImpl(preferencesRef)->applePayCapabilityDisclosureAllowed();
1843 }
1844
1845 void WKPreferencesSetApplePayCapabilityDisclosureAllowed(WKPreferencesRef preferencesRef, bool allowed)
1846 {
1847     WebKit::toImpl(preferencesRef)->setApplePayCapabilityDisclosureAllowed(allowed);
1848 }
1849
1850 void WKPreferencesSetLinkPreloadEnabled(WKPreferencesRef preferencesRef, bool flag)
1851 {
1852     toImpl(preferencesRef)->setLinkPreloadEnabled(flag);
1853 }
1854
1855 bool WKPreferencesGetLinkPreloadEnabled(WKPreferencesRef preferencesRef)
1856 {
1857     return toImpl(preferencesRef)->linkPreloadEnabled();
1858 }
1859
1860 void WKPreferencesSetMediaPreloadingEnabled(WKPreferencesRef preferencesRef, bool flag)
1861 {
1862     toImpl(preferencesRef)->setMediaPreloadingEnabled(flag);
1863 }
1864
1865 bool WKPreferencesGetMediaPreloadingEnabled(WKPreferencesRef preferencesRef)
1866 {
1867     return toImpl(preferencesRef)->mediaPreloadingEnabled();
1868 }
1869
1870 void WKPreferencesSetLargeImageAsyncDecodingEnabled(WKPreferencesRef preferencesRef, bool flag)
1871 {
1872     toImpl(preferencesRef)->setLargeImageAsyncDecodingEnabled(flag);
1873 }
1874
1875 bool WKPreferencesGetLargeImageAsyncDecodingEnabled(WKPreferencesRef preferencesRef)
1876 {
1877     return toImpl(preferencesRef)->largeImageAsyncDecodingEnabled();
1878 }
1879
1880 void WKPreferencesSetAnimatedImageAsyncDecodingEnabled(WKPreferencesRef preferencesRef, bool flag)
1881 {
1882     toImpl(preferencesRef)->setAnimatedImageAsyncDecodingEnabled(flag);
1883 }
1884
1885 bool WKPreferencesGetAnimatedImageAsyncDecodingEnabled(WKPreferencesRef preferencesRef)
1886 {
1887     return toImpl(preferencesRef)->animatedImageAsyncDecodingEnabled();
1888 }
1889
1890 void WKPreferencesSetShouldSuppressKeyboardInputDuringProvisionalNavigation(WKPreferencesRef preferencesRef, bool flag)
1891 {
1892     toImpl(preferencesRef)->setShouldSuppressTextInputFromEditingDuringProvisionalNavigation(flag);
1893 }
1894
1895 bool WKPreferencesGetShouldSuppressKeyboardInputDuringProvisionalNavigation(WKPreferencesRef preferencesRef)
1896 {
1897     return toImpl(preferencesRef)->shouldSuppressTextInputFromEditingDuringProvisionalNavigation();
1898 }
1899
1900 void WKPreferencesSetMediaUserGestureInheritsFromDocument(WKPreferencesRef preferencesRef, bool flag)
1901 {
1902     toImpl(preferencesRef)->setMediaUserGestureInheritsFromDocument(flag);
1903 }
1904
1905 bool WKPreferencesGetMediaUserGestureInheritsFromDocument(WKPreferencesRef preferencesRef)
1906 {
1907     return toImpl(preferencesRef)->mediaUserGestureInheritsFromDocument();
1908 }
1909
1910 void WKPreferencesSetMediaContentTypesRequiringHardwareSupport(WKPreferencesRef preferencesRef, WKStringRef codecs)
1911 {
1912     toImpl(preferencesRef)->setMediaContentTypesRequiringHardwareSupport(toWTFString(codecs));
1913 }
1914
1915 WKStringRef WKPreferencesCopyMediaContentTypesRequiringHardwareSupport(WKPreferencesRef preferencesRef)
1916 {
1917     return toCopiedAPI(toImpl(preferencesRef)->mediaContentTypesRequiringHardwareSupport());
1918 }
1919
1920 void WKPreferencesSetIsSecureContextAttributeEnabled(WKPreferencesRef preferencesRef, bool flag)
1921 {
1922     toImpl(preferencesRef)->setIsSecureContextAttributeEnabled(flag);
1923 }
1924
1925 bool WKPreferencesGetIsSecureContextAttributeEnabled(WKPreferencesRef preferencesRef)
1926 {
1927     return toImpl(preferencesRef)->isSecureContextAttributeEnabled();
1928 }
1929
1930 bool WKPreferencesGetLegacyEncryptedMediaAPIEnabled(WKPreferencesRef preferencesRef)
1931 {
1932     return toImpl(preferencesRef)->legacyEncryptedMediaAPIEnabled();
1933 }
1934
1935 void WKPreferencesSetLegacyEncryptedMediaAPIEnabled(WKPreferencesRef preferencesRef, bool enabled)
1936 {
1937     return toImpl(preferencesRef)->setLegacyEncryptedMediaAPIEnabled(enabled);
1938 }
1939
1940 bool WKPreferencesGetAllowMediaContentTypesRequiringHardwareSupportAsFallback(WKPreferencesRef preferencesRef)
1941 {
1942     return toImpl(preferencesRef)->allowMediaContentTypesRequiringHardwareSupportAsFallback();
1943 }
1944
1945 void WKPreferencesSetAllowMediaContentTypesRequiringHardwareSupportAsFallback(WKPreferencesRef preferencesRef, bool allow)
1946 {
1947     return toImpl(preferencesRef)->setAllowMediaContentTypesRequiringHardwareSupportAsFallback(allow);
1948 }
1949
1950 void WKPreferencesSetInspectorAdditionsEnabled(WKPreferencesRef preferencesRef, bool flag)
1951 {
1952     toImpl(preferencesRef)->setInspectorAdditionsEnabled(flag);
1953 }
1954
1955 bool WKPreferencesGetInspectorAdditionsEnabled(WKPreferencesRef preferencesRef)
1956 {
1957     return toImpl(preferencesRef)->inspectorAdditionsEnabled();
1958 }
1959
1960 void WKPreferencesSetStorageAccessAPIEnabled(WKPreferencesRef preferencesRef, bool flag)
1961 {
1962     toImpl(preferencesRef)->setStorageAccessAPIEnabled(flag);
1963 }
1964
1965 bool WKPreferencesGetStorageAccessAPIEnabled(WKPreferencesRef preferencesRef)
1966 {
1967     return toImpl(preferencesRef)->storageAccessAPIEnabled();
1968 }
1969
1970 void WKPreferencesSetAccessibilityObjectModelEnabled(WKPreferencesRef preferencesRef, bool flag)
1971 {
1972     toImpl(preferencesRef)->setAccessibilityObjectModelEnabled(flag);
1973 }
1974
1975 bool WKPreferencesGetAccessibilityObjectModelEnabled(WKPreferencesRef preferencesRef)
1976 {
1977     return toImpl(preferencesRef)->accessibilityObjectModelEnabled();
1978 }
1979
1980 void WKPreferencesSetAriaReflectionEnabled(WKPreferencesRef preferencesRef, bool flag)
1981 {
1982     toImpl(preferencesRef)->setAriaReflectionEnabled(flag);
1983 }
1984
1985 bool WKPreferencesGetAriaReflectionEnabled(WKPreferencesRef preferencesRef)
1986 {
1987     return toImpl(preferencesRef)->ariaReflectionEnabled();
1988 }
1989
1990 void WKPreferencesSetCSSOMViewScrollingAPIEnabled(WKPreferencesRef preferencesRef, bool flag)
1991 {
1992     toImpl(preferencesRef)->setCSSOMViewScrollingAPIEnabled(flag);
1993 }
1994
1995 bool WKPreferencesGetCSSOMViewScrollingAPIEnabled(WKPreferencesRef preferencesRef)
1996 {
1997     return toImpl(preferencesRef)->cssOMViewScrollingAPIEnabled();
1998 }
1999
2000 void WKPreferencesSetShouldAllowUserInstalledFonts(WKPreferencesRef preferencesRef, bool flag)
2001 {
2002     toImpl(preferencesRef)->setShouldAllowUserInstalledFonts(flag);
2003 }
2004
2005 bool WKPreferencesGetShouldAllowUserInstalledFonts(WKPreferencesRef preferencesRef)
2006 {
2007     return toImpl(preferencesRef)->shouldAllowUserInstalledFonts();
2008 }
2009
2010 void WKPreferencesSetMediaCapabilitiesEnabled(WKPreferencesRef preferencesRef, bool enabled)
2011 {
2012     toImpl(preferencesRef)->setMediaCapabilitiesEnabled(enabled);
2013 }
2014
2015 bool WKPreferencesGetMediaCapabilitiesEnabled(WKPreferencesRef preferencesRef)
2016 {
2017     return toImpl(preferencesRef)->mediaCapabilitiesEnabled();
2018 }
2019
2020 void WKPreferencesSetAllowCrossOriginSubresourcesToAskForCredentials(WKPreferencesRef preferencesRef, bool flag)
2021 {
2022     toImpl(preferencesRef)->setAllowCrossOriginSubresourcesToAskForCredentials(flag);
2023 }
2024
2025 bool WKPreferencesGetAllowCrossOriginSubresourcesToAskForCredentials(WKPreferencesRef preferencesRef)
2026 {
2027     return toImpl(preferencesRef)->allowCrossOriginSubresourcesToAskForCredentials();
2028 }
2029
2030 void WKPreferencesSetCrossOriginResourcePolicyEnabled(WKPreferencesRef preferencesRef, bool flag)
2031 {
2032     toImpl(preferencesRef)->setCrossOriginResourcePolicyEnabled(flag);
2033 }
2034
2035 bool WKPreferencesGetCrossOriginResourcePolicyEnabled(WKPreferencesRef preferencesRef)
2036 {
2037     return toImpl(preferencesRef)->crossOriginResourcePolicyEnabled();
2038 }
2039
2040 void WKPreferencesSetCrossOriginWindowPolicyEnabled(WKPreferencesRef preferencesRef, bool enabled)
2041 {
2042     toImpl(preferencesRef)->setCrossOriginWindowPolicySupportEnabled(enabled);
2043 }
2044
2045 bool WKPreferencesGetCrossOriginWindowPolicyEnabled(WKPreferencesRef preferencesRef)
2046 {
2047     return toImpl(preferencesRef)->crossOriginWindowPolicySupportEnabled();
2048 }
2049
2050 void WKPreferencesSetRestrictedHTTPResponseAccess(WKPreferencesRef preferencesRef, bool flag)
2051 {
2052     toImpl(preferencesRef)->setRestrictedHTTPResponseAccess(flag);
2053 }
2054
2055 bool WKPreferencesGetRestrictedHTTPResponseAccess(WKPreferencesRef preferencesRef)
2056 {
2057     return toImpl(preferencesRef)->restrictedHTTPResponseAccess();
2058 }
2059
2060 void WKPreferencesSetServerTimingEnabled(WKPreferencesRef preferencesRef, bool flag)
2061 {
2062     toImpl(preferencesRef)->setServerTimingEnabled(flag);
2063 }
2064
2065 bool WKPreferencesGetServerTimingEnabled(WKPreferencesRef preferencesRef)
2066 {
2067     return toImpl(preferencesRef)->serverTimingEnabled();
2068 }
2069
2070 void WKPreferencesSetColorFilterEnabled(WKPreferencesRef preferencesRef, bool flag)
2071 {
2072     toImpl(preferencesRef)->setColorFilterEnabled(flag);
2073 }
2074
2075 bool WKPreferencesGetColorFilterEnabled(WKPreferencesRef preferencesRef)
2076 {
2077     return toImpl(preferencesRef)->colorFilterEnabled();
2078 }
2079
2080 void WKPreferencesSetProcessSwapOnNavigationEnabled(WKPreferencesRef preferencesRef, bool flag)
2081 {
2082     toImpl(preferencesRef)->setProcessSwapOnNavigationEnabled(flag);
2083 }
2084
2085 bool WKPreferencesGetProcessSwapOnNavigationEnabled(WKPreferencesRef preferencesRef)
2086 {
2087     return toImpl(preferencesRef)->processSwapOnNavigationEnabled();
2088 }
2089
2090 void WKPreferencesSetPunchOutWhiteBackgroundsInDarkMode(WKPreferencesRef preferencesRef, bool flag)
2091 {
2092     toImpl(preferencesRef)->setPunchOutWhiteBackgroundsInDarkMode(flag);
2093 }
2094
2095 bool WKPreferencesGetPunchOutWhiteBackgroundsInDarkMode(WKPreferencesRef preferencesRef)
2096 {
2097     return toImpl(preferencesRef)->punchOutWhiteBackgroundsInDarkMode();
2098 }