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