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