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