Disable Beacon API on WK1 DRT and WK2 when not using NETWORK_SESSION
[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 WKPreferencesSetMediaControlsScaleWithPageZoom(WKPreferencesRef preferencesRef, bool flag)
844 {
845     toImpl(preferencesRef)->setMediaControlsScaleWithPageZoom(flag);
846 }
847
848 bool WKPreferencesGetMediaControlsScaleWithPageZoom(WKPreferencesRef preferencesRef)
849 {
850     return toImpl(preferencesRef)->mediaControlsScaleWithPageZoom();
851 }
852
853 void WKPreferencesSetModernMediaControlsEnabled(WKPreferencesRef preferencesRef, bool flag)
854 {
855     toImpl(preferencesRef)->setModernMediaControlsEnabled(flag);
856 }
857
858 bool WKPreferencesGetModernMediaControlsEnabled(WKPreferencesRef preferencesRef)
859 {
860     return toImpl(preferencesRef)->modernMediaControlsEnabled();
861 }
862
863 void WKPreferencesSetCredentialManagementEnabled(WKPreferencesRef preferencesRef, bool flag)
864 {
865     toImpl(preferencesRef)->setCredentialManagementEnabled(flag);
866 }
867
868 bool WKPreferencesGetCredentialManagementEnabled(WKPreferencesRef preferencesRef)
869 {
870     return toImpl(preferencesRef)->credentialManagementEnabled();
871 }
872
873 void WKPreferencesSetInvisibleMediaAutoplayPermitted(WKPreferencesRef preferencesRef, bool flag)
874 {
875     toImpl(preferencesRef)->setInvisibleAutoplayNotPermitted(!flag);
876 }
877
878 bool WKPreferencesGetInvisibleMediaAutoplayPermitted(WKPreferencesRef preferencesRef)
879 {
880     return !toImpl(preferencesRef)->invisibleAutoplayNotPermitted();
881 }
882
883 void WKPreferencesSetShowsToolTipOverTruncatedText(WKPreferencesRef preferencesRef, bool flag)
884 {
885     toImpl(preferencesRef)->setShowsToolTipOverTruncatedText(flag);
886 }
887
888 bool WKPreferencesGetShowsToolTipOverTruncatedText(WKPreferencesRef preferencesRef)
889 {
890     return toImpl(preferencesRef)->showsToolTipOverTruncatedText();
891 }
892
893 void WKPreferencesSetMockScrollbarsEnabled(WKPreferencesRef preferencesRef, bool flag)
894 {
895     toImpl(preferencesRef)->setMockScrollbarsEnabled(flag);
896 }
897
898 bool WKPreferencesGetMockScrollbarsEnabled(WKPreferencesRef preferencesRef)
899 {
900     return toImpl(preferencesRef)->mockScrollbarsEnabled();
901 }
902
903 void WKPreferencesSetWebAudioEnabled(WKPreferencesRef preferencesRef, bool enabled)
904 {
905     toImpl(preferencesRef)->setWebAudioEnabled(enabled);
906 }
907
908 bool WKPreferencesGetWebAudioEnabled(WKPreferencesRef preferencesRef)
909 {
910     return toImpl(preferencesRef)->webAudioEnabled();
911 }
912
913 void WKPreferencesSetApplicationChromeModeEnabled(WKPreferencesRef, bool)
914 {
915     // FIXME: Remove once WebKit nightlies don't need to support Safari 8.
916 }
917
918 bool WKPreferencesGetApplicationChromeModeEnabled(WKPreferencesRef)
919 {
920     // FIXME: Remove once WebKit nightlies don't need to support Safari 8.
921     return false;
922 }
923
924 void WKPreferencesSetInspectorUsesWebKitUserInterface(WKPreferencesRef, bool)
925 {
926     // FIXME: Remove once WebKit nightlies don't need to support Safari 6 thru 7.
927 }
928
929 bool WKPreferencesGetInspectorUsesWebKitUserInterface(WKPreferencesRef)
930 {
931     // FIXME: Remove once WebKit nightlies don't need to support Safari 6 thru 7.
932     return false;
933 }
934
935 void WKPreferencesSetSuppressesIncrementalRendering(WKPreferencesRef preferencesRef, bool enabled)
936 {
937     toImpl(preferencesRef)->setSuppressesIncrementalRendering(enabled);
938 }
939
940 bool WKPreferencesGetSuppressesIncrementalRendering(WKPreferencesRef preferencesRef)
941 {
942     return toImpl(preferencesRef)->suppressesIncrementalRendering();
943 }
944
945 void WKPreferencesSetBackspaceKeyNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled)
946 {
947     toImpl(preferencesRef)->setBackspaceKeyNavigationEnabled(enabled);
948 }
949
950 bool WKPreferencesGetBackspaceKeyNavigationEnabled(WKPreferencesRef preferencesRef)
951 {
952     return toImpl(preferencesRef)->backspaceKeyNavigationEnabled();
953 }
954
955 void WKPreferencesSetCaretBrowsingEnabled(WKPreferencesRef preferencesRef, bool enabled)
956 {
957     toImpl(preferencesRef)->setCaretBrowsingEnabled(enabled);
958 }
959
960 bool WKPreferencesGetCaretBrowsingEnabled(WKPreferencesRef preferencesRef)
961 {
962     return toImpl(preferencesRef)->caretBrowsingEnabled();
963 }
964
965 void WKPreferencesSetShouldDisplaySubtitles(WKPreferencesRef preferencesRef, bool enabled)
966 {
967     toImpl(preferencesRef)->setShouldDisplaySubtitles(enabled);
968 }
969
970 bool WKPreferencesGetShouldDisplaySubtitles(WKPreferencesRef preferencesRef)
971 {
972     return toImpl(preferencesRef)->shouldDisplaySubtitles();
973 }
974
975 void WKPreferencesSetShouldDisplayCaptions(WKPreferencesRef preferencesRef, bool enabled)
976 {
977     toImpl(preferencesRef)->setShouldDisplayCaptions(enabled);
978 }
979
980 bool WKPreferencesGetShouldDisplayCaptions(WKPreferencesRef preferencesRef)
981 {
982     return toImpl(preferencesRef)->shouldDisplayCaptions();
983 }
984
985 void WKPreferencesSetShouldDisplayTextDescriptions(WKPreferencesRef preferencesRef, bool enabled)
986 {
987     toImpl(preferencesRef)->setShouldDisplayTextDescriptions(enabled);
988 }
989
990 bool WKPreferencesGetShouldDisplayTextDescriptions(WKPreferencesRef preferencesRef)
991 {
992     return toImpl(preferencesRef)->shouldDisplayTextDescriptions();
993 }
994
995 void WKPreferencesSetNotificationsEnabled(WKPreferencesRef preferencesRef, bool enabled)
996 {
997     toImpl(preferencesRef)->setNotificationsEnabled(enabled);
998 }
999
1000 bool WKPreferencesGetNotificationsEnabled(WKPreferencesRef preferencesRef)
1001 {
1002     return toImpl(preferencesRef)->notificationsEnabled();
1003 }
1004
1005 void WKPreferencesSetShouldRespectImageOrientation(WKPreferencesRef preferencesRef, bool enabled)
1006 {
1007     toImpl(preferencesRef)->setShouldRespectImageOrientation(enabled);
1008 }
1009
1010 bool WKPreferencesGetShouldRespectImageOrientation(WKPreferencesRef preferencesRef)
1011 {
1012     return toImpl(preferencesRef)->shouldRespectImageOrientation();
1013 }
1014
1015 void WKPreferencesSetRequestAnimationFrameEnabled(WKPreferencesRef preferencesRef, bool flag)
1016 {
1017     toImpl(preferencesRef)->setRequestAnimationFrameEnabled(flag);
1018 }
1019
1020 bool WKPreferencesGetRequestAnimationFrameEnabled(WKPreferencesRef preferencesRef)
1021 {
1022     return toImpl(preferencesRef)->requestAnimationFrameEnabled();
1023 }
1024
1025 void WKPreferencesSetStorageBlockingPolicy(WKPreferencesRef preferencesRef, WKStorageBlockingPolicy policy)
1026 {
1027     toImpl(preferencesRef)->setStorageBlockingPolicy(toStorageBlockingPolicy(policy));
1028 }
1029
1030 WKStorageBlockingPolicy WKPreferencesGetStorageBlockingPolicy(WKPreferencesRef preferencesRef)
1031 {
1032     return toAPI(static_cast<WebCore::SecurityOrigin::StorageBlockingPolicy>(toImpl(preferencesRef)->storageBlockingPolicy()));
1033 }
1034
1035 void WKPreferencesResetTestRunnerOverrides(WKPreferencesRef preferencesRef)
1036 {
1037     // Currently we reset the overrides on the web process when preferencesDidChange() is called. Since WTR preferences
1038     // are usually always the same (in the UI process), they are not sent to web process, not triggering the reset.
1039     toImpl(preferencesRef)->forceUpdate();
1040 }
1041
1042 void WKPreferencesSetDiagnosticLoggingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1043 {
1044     toImpl(preferencesRef)->setDiagnosticLoggingEnabled(enabled);
1045 }
1046
1047 bool WKPreferencesGetDiagnosticLoggingEnabled(WKPreferencesRef preferencesRef)
1048 {
1049     return toImpl(preferencesRef)->diagnosticLoggingEnabled();
1050 }
1051
1052 void WKPreferencesSetAsynchronousPluginInitializationEnabled(WKPreferencesRef preferencesRef, bool enabled)
1053 {
1054     toImpl(preferencesRef)->setAsynchronousPluginInitializationEnabled(enabled);
1055 }
1056
1057 bool WKPreferencesGetAsynchronousPluginInitializationEnabled(WKPreferencesRef preferencesRef)
1058 {
1059     return toImpl(preferencesRef)->asynchronousPluginInitializationEnabled();
1060 }
1061
1062 void WKPreferencesSetAsynchronousPluginInitializationEnabledForAllPlugins(WKPreferencesRef preferencesRef, bool enabled)
1063 {
1064     toImpl(preferencesRef)->setAsynchronousPluginInitializationEnabledForAllPlugins(enabled);
1065 }
1066
1067 bool WKPreferencesGetAsynchronousPluginInitializationEnabledForAllPlugins(WKPreferencesRef preferencesRef)
1068 {
1069     return toImpl(preferencesRef)->asynchronousPluginInitializationEnabledForAllPlugins();
1070 }
1071
1072 void WKPreferencesSetArtificialPluginInitializationDelayEnabled(WKPreferencesRef preferencesRef, bool enabled)
1073 {
1074     toImpl(preferencesRef)->setArtificialPluginInitializationDelayEnabled(enabled);
1075 }
1076
1077 bool WKPreferencesGetArtificialPluginInitializationDelayEnabled(WKPreferencesRef preferencesRef)
1078 {
1079     return toImpl(preferencesRef)->artificialPluginInitializationDelayEnabled();
1080 }
1081
1082 void WKPreferencesSetTabToLinksEnabled(WKPreferencesRef preferencesRef, bool enabled)
1083 {
1084     toImpl(preferencesRef)->setTabToLinksEnabled(enabled);
1085 }
1086
1087 bool WKPreferencesGetTabToLinksEnabled(WKPreferencesRef preferencesRef)
1088 {
1089     return toImpl(preferencesRef)->tabToLinksEnabled();
1090 }
1091
1092 void WKPreferencesSetInteractiveFormValidationEnabled(WKPreferencesRef preferencesRef, bool enabled)
1093 {
1094     toImpl(preferencesRef)->setInteractiveFormValidationEnabled(enabled);
1095 }
1096
1097 bool WKPreferencesGetInteractiveFormValidationEnabled(WKPreferencesRef preferencesRef)
1098 {
1099     return toImpl(preferencesRef)->interactiveFormValidationEnabled();
1100 }
1101
1102 void WKPreferencesSetScrollingPerformanceLoggingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1103 {
1104     toImpl(preferencesRef)->setScrollingPerformanceLoggingEnabled(enabled);
1105 }
1106
1107 bool WKPreferencesGetScrollingPerformanceLoggingEnabled(WKPreferencesRef preferencesRef)
1108 {
1109     return toImpl(preferencesRef)->scrollingPerformanceLoggingEnabled();
1110 }
1111
1112 void WKPreferencesSetPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1113 {
1114     toImpl(preferencesRef)->setPlugInSnapshottingEnabled(enabled);
1115 }
1116
1117 bool WKPreferencesGetPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef)
1118 {
1119     return toImpl(preferencesRef)->plugInSnapshottingEnabled();
1120 }
1121
1122 void WKPreferencesSetSnapshotAllPlugIns(WKPreferencesRef preferencesRef, bool enabled)
1123 {
1124     toImpl(preferencesRef)->setSnapshotAllPlugIns(enabled);
1125 }
1126
1127 bool WKPreferencesGetSnapshotAllPlugIns(WKPreferencesRef preferencesRef)
1128 {
1129     return toImpl(preferencesRef)->snapshotAllPlugIns();
1130 }
1131
1132 void WKPreferencesSetAutostartOriginPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1133 {
1134     toImpl(preferencesRef)->setAutostartOriginPlugInSnapshottingEnabled(enabled);
1135 }
1136
1137 bool WKPreferencesGetAutostartOriginPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef)
1138 {
1139     return toImpl(preferencesRef)->autostartOriginPlugInSnapshottingEnabled();
1140 }
1141
1142 void WKPreferencesSetPrimaryPlugInSnapshotDetectionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1143 {
1144     toImpl(preferencesRef)->setPrimaryPlugInSnapshotDetectionEnabled(enabled);
1145 }
1146
1147 bool WKPreferencesGetPrimaryPlugInSnapshotDetectionEnabled(WKPreferencesRef preferencesRef)
1148 {
1149     return toImpl(preferencesRef)->primaryPlugInSnapshotDetectionEnabled();
1150 }
1151
1152 void WKPreferencesSetPDFPluginEnabled(WKPreferencesRef preferencesRef, bool enabled)
1153 {
1154     toImpl(preferencesRef)->setPDFPluginEnabled(enabled);
1155 }
1156
1157 bool WKPreferencesGetPDFPluginEnabled(WKPreferencesRef preferencesRef)
1158 {
1159     return toImpl(preferencesRef)->pdfPluginEnabled();
1160 }
1161
1162 void WKPreferencesSetEncodingDetectorEnabled(WKPreferencesRef preferencesRef, bool enabled)
1163 {
1164     toImpl(preferencesRef)->setUsesEncodingDetector(enabled);
1165 }
1166
1167 bool WKPreferencesGetEncodingDetectorEnabled(WKPreferencesRef preferencesRef)
1168 {
1169     return toImpl(preferencesRef)->usesEncodingDetector();
1170 }
1171
1172 void WKPreferencesSetTextAutosizingEnabled(WKPreferencesRef preferencesRef, bool textAutosizingEnabled)
1173 {
1174     toImpl(preferencesRef)->setTextAutosizingEnabled(textAutosizingEnabled);
1175 }
1176
1177 bool WKPreferencesGetTextAutosizingEnabled(WKPreferencesRef preferencesRef)
1178 {
1179     return toImpl(preferencesRef)->textAutosizingEnabled();
1180 }
1181
1182 void WKPreferencesSetAggressiveTileRetentionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1183 {
1184     toImpl(preferencesRef)->setAggressiveTileRetentionEnabled(enabled);
1185 }
1186
1187 bool WKPreferencesGetAggressiveTileRetentionEnabled(WKPreferencesRef preferencesRef)
1188 {
1189     return toImpl(preferencesRef)->aggressiveTileRetentionEnabled();
1190 }
1191
1192 void WKPreferencesSetQTKitEnabled(WKPreferencesRef preferencesRef, bool enabled)
1193 {
1194     toImpl(preferencesRef)->setQTKitEnabled(enabled);
1195 }
1196
1197 bool WKPreferencesGetQTKitEnabled(WKPreferencesRef preferencesRef)
1198 {
1199     return toImpl(preferencesRef)->isQTKitEnabled();
1200 }
1201
1202 void WKPreferencesSetLogsPageMessagesToSystemConsoleEnabled(WKPreferencesRef preferencesRef, bool enabled)
1203 {
1204     toImpl(preferencesRef)->setLogsPageMessagesToSystemConsoleEnabled(enabled);
1205 }
1206
1207 bool WKPreferencesGetLogsPageMessagesToSystemConsoleEnabled(WKPreferencesRef preferencesRef)
1208 {
1209     return toImpl(preferencesRef)->logsPageMessagesToSystemConsoleEnabled();
1210 }
1211
1212 void WKPreferencesSetPageVisibilityBasedProcessSuppressionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1213 {
1214     toImpl(preferencesRef)->setPageVisibilityBasedProcessSuppressionEnabled(enabled);
1215 }
1216
1217 bool WKPreferencesGetPageVisibilityBasedProcessSuppressionEnabled(WKPreferencesRef preferencesRef)
1218 {
1219     return toImpl(preferencesRef)->pageVisibilityBasedProcessSuppressionEnabled();
1220 }
1221
1222 void WKPreferencesSetSmartInsertDeleteEnabled(WKPreferencesRef preferencesRef, bool enabled)
1223 {
1224     toImpl(preferencesRef)->setSmartInsertDeleteEnabled(enabled);
1225 }
1226
1227 bool WKPreferencesGetSmartInsertDeleteEnabled(WKPreferencesRef preferencesRef)
1228 {
1229     return toImpl(preferencesRef)->smartInsertDeleteEnabled();
1230 }
1231
1232 void WKPreferencesSetSelectTrailingWhitespaceEnabled(WKPreferencesRef preferencesRef, bool enabled)
1233 {
1234     toImpl(preferencesRef)->setSelectTrailingWhitespaceEnabled(enabled);
1235 }
1236
1237 bool WKPreferencesGetSelectTrailingWhitespaceEnabled(WKPreferencesRef preferencesRef)
1238 {
1239     return toImpl(preferencesRef)->selectTrailingWhitespaceEnabled();
1240 }
1241
1242 void WKPreferencesSetShowsURLsInToolTipsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1243 {
1244     toImpl(preferencesRef)->setShowsURLsInToolTipsEnabled(enabled);
1245 }
1246
1247 bool WKPreferencesGetShowsURLsInToolTipsEnabled(WKPreferencesRef preferencesRef)
1248 {
1249     return toImpl(preferencesRef)->showsURLsInToolTipsEnabled();
1250 }
1251
1252 void WKPreferencesSetHiddenPageDOMTimerThrottlingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1253 {
1254     toImpl(preferencesRef)->setHiddenPageDOMTimerThrottlingEnabled(enabled);
1255 }
1256
1257 void WKPreferencesSetHiddenPageDOMTimerThrottlingAutoIncreases(WKPreferencesRef preferencesRef, bool enabled)
1258 {
1259     toImpl(preferencesRef)->setHiddenPageDOMTimerThrottlingAutoIncreases(enabled);
1260 }
1261
1262 bool WKPreferencesGetHiddenPageDOMTimerThrottlingEnabled(WKPreferencesRef preferencesRef)
1263 {
1264     return toImpl(preferencesRef)->hiddenPageDOMTimerThrottlingEnabled();
1265 }
1266
1267 bool WKPreferencesGetHiddenPageDOMTimerThrottlingAutoIncreases(WKPreferencesRef preferencesRef)
1268 {
1269     return toImpl(preferencesRef)->hiddenPageDOMTimerThrottlingAutoIncreases();
1270 }
1271
1272 void WKPreferencesSetHiddenPageCSSAnimationSuspensionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1273 {
1274     toImpl(preferencesRef)->setHiddenPageCSSAnimationSuspensionEnabled(enabled);
1275 }
1276
1277 bool WKPreferencesGetHiddenPageCSSAnimationSuspensionEnabled(WKPreferencesRef preferencesRef)
1278 {
1279     return toImpl(preferencesRef)->hiddenPageCSSAnimationSuspensionEnabled();
1280 }
1281
1282 void WKPreferencesSetIncrementalRenderingSuppressionTimeout(WKPreferencesRef preferencesRef, double timeout)
1283 {
1284     toImpl(preferencesRef)->setIncrementalRenderingSuppressionTimeout(timeout);
1285 }
1286
1287 double WKPreferencesGetIncrementalRenderingSuppressionTimeout(WKPreferencesRef preferencesRef)
1288 {
1289     return toAPI(toImpl(preferencesRef)->incrementalRenderingSuppressionTimeout());
1290 }
1291
1292 void WKPreferencesSetThreadedScrollingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1293 {
1294     toImpl(preferencesRef)->setThreadedScrollingEnabled(enabled);
1295 }
1296
1297 bool WKPreferencesGetThreadedScrollingEnabled(WKPreferencesRef preferencesRef)
1298 {
1299     return toImpl(preferencesRef)->threadedScrollingEnabled();
1300 }
1301
1302 void WKPreferencesSetSimpleLineLayoutEnabled(WKPreferencesRef preferencesRef, bool flag)
1303 {
1304     toImpl(preferencesRef)->setSimpleLineLayoutEnabled(flag);
1305 }
1306
1307 bool WKPreferencesGetSimpleLineLayoutEnabled(WKPreferencesRef preferencesRef)
1308 {
1309     return toImpl(preferencesRef)->simpleLineLayoutEnabled();
1310 }
1311
1312 void WKPreferencesSetSimpleLineLayoutDebugBordersEnabled(WKPreferencesRef preferencesRef, bool flag)
1313 {
1314     toImpl(preferencesRef)->setSimpleLineLayoutDebugBordersEnabled(flag);
1315 }
1316
1317 bool WKPreferencesGetSimpleLineLayoutDebugBordersEnabled(WKPreferencesRef preferencesRef)
1318 {
1319     return toImpl(preferencesRef)->simpleLineLayoutDebugBordersEnabled();
1320 }
1321
1322 void WKPreferencesSetNewBlockInsideInlineModelEnabled(WKPreferencesRef preferencesRef, bool flag)
1323 {
1324     toImpl(preferencesRef)->setNewBlockInsideInlineModelEnabled(flag);
1325 }
1326
1327 bool WKPreferencesGetNewBlockInsideInlineModelEnabled(WKPreferencesRef preferencesRef)
1328 {
1329     return toImpl(preferencesRef)->newBlockInsideInlineModelEnabled();
1330 }
1331
1332 void WKPreferencesSetDeferredCSSParserEnabled(WKPreferencesRef preferencesRef, bool flag)
1333 {
1334     toImpl(preferencesRef)->setDeferredCSSParserEnabled(flag);
1335 }
1336
1337 bool WKPreferencesGetDeferredCSSParserEnabled(WKPreferencesRef preferencesRef)
1338 {
1339     return toImpl(preferencesRef)->deferredCSSParserEnabled();
1340 }
1341
1342 void WKPreferencesSetSubpixelCSSOMElementMetricsEnabled(WKPreferencesRef preferencesRef, bool flag)
1343 {
1344     toImpl(preferencesRef)->setSubpixelCSSOMElementMetricsEnabled(flag);
1345 }
1346
1347 bool WKPreferencesGetSubpixelCSSOMElementMetricsEnabled(WKPreferencesRef preferencesRef)
1348 {
1349     return toImpl(preferencesRef)->subpixelCSSOMElementMetricsEnabled();
1350 }
1351
1352 void WKPreferencesSetUseGiantTiles(WKPreferencesRef preferencesRef, bool flag)
1353 {
1354     toImpl(preferencesRef)->setUseGiantTiles(flag);
1355 }
1356
1357 bool WKPreferencesGetUseGiantTiles(WKPreferencesRef preferencesRef)
1358 {
1359     return toImpl(preferencesRef)->useGiantTiles();
1360 }
1361
1362 void WKPreferencesSetMediaDevicesEnabled(WKPreferencesRef preferencesRef, bool enabled)
1363 {
1364     toImpl(preferencesRef)->setMediaDevicesEnabled(enabled);
1365 }
1366
1367 bool WKPreferencesGetMediaDevicesEnabled(WKPreferencesRef preferencesRef)
1368 {
1369     return toImpl(preferencesRef)->mediaDevicesEnabled();
1370 }
1371
1372 void WKPreferencesSetMediaStreamEnabled(WKPreferencesRef preferencesRef, bool enabled)
1373 {
1374     toImpl(preferencesRef)->setMediaStreamEnabled(enabled);
1375 }
1376
1377 bool WKPreferencesGetMediaStreamEnabled(WKPreferencesRef preferencesRef)
1378 {
1379     return toImpl(preferencesRef)->mediaStreamEnabled();
1380 }
1381
1382 void WKPreferencesSetPeerConnectionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1383 {
1384     toImpl(preferencesRef)->setPeerConnectionEnabled(enabled);
1385 }
1386
1387 bool WKPreferencesGetPeerConnectionEnabled(WKPreferencesRef preferencesRef)
1388 {
1389     return toImpl(preferencesRef)->peerConnectionEnabled();
1390 }
1391
1392 void WKPreferencesSetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef, bool enabled)
1393 {
1394     toImpl(preferencesRef)->setWebRTCLegacyAPIDisabled(!enabled);
1395 }
1396
1397 bool WKPreferencesGetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef)
1398 {
1399     return !toImpl(preferencesRef)->webRTCLegacyAPIDisabled();
1400 }
1401
1402 void WKPreferencesSetSpatialNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled)
1403 {
1404     toImpl(preferencesRef)->setSpatialNavigationEnabled(enabled);
1405 }
1406
1407 bool WKPreferencesGetSpatialNavigationEnabled(WKPreferencesRef preferencesRef)
1408 {
1409     return toImpl(preferencesRef)->spatialNavigationEnabled();
1410 }
1411
1412 void WKPreferencesSetMediaSourceEnabled(WKPreferencesRef preferencesRef, bool enabled)
1413 {
1414     toImpl(preferencesRef)->setMediaSourceEnabled(enabled);
1415 }
1416
1417 bool WKPreferencesGetMediaSourceEnabled(WKPreferencesRef preferencesRef)
1418 {
1419     return toImpl(preferencesRef)->mediaSourceEnabled();
1420 }
1421
1422 void WKPreferencesSetViewGestureDebuggingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1423 {
1424     toImpl(preferencesRef)->setViewGestureDebuggingEnabled(enabled);
1425 }
1426
1427 bool WKPreferencesGetViewGestureDebuggingEnabled(WKPreferencesRef preferencesRef)
1428 {
1429     return toImpl(preferencesRef)->viewGestureDebuggingEnabled();
1430 }
1431
1432 void WKPreferencesSetShouldConvertPositionStyleOnCopy(WKPreferencesRef preferencesRef, bool convert)
1433 {
1434     toImpl(preferencesRef)->setShouldConvertPositionStyleOnCopy(convert);
1435 }
1436
1437 bool WKPreferencesGetShouldConvertPositionStyleOnCopy(WKPreferencesRef preferencesRef)
1438 {
1439     return toImpl(preferencesRef)->shouldConvertPositionStyleOnCopy();
1440 }
1441
1442 void WKPreferencesSetTelephoneNumberParsingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1443 {
1444     toImpl(preferencesRef)->setTelephoneNumberParsingEnabled(enabled);
1445 }
1446
1447 bool WKPreferencesGetTelephoneNumberParsingEnabled(WKPreferencesRef preferencesRef)
1448 {
1449     return toImpl(preferencesRef)->telephoneNumberParsingEnabled();
1450 }
1451
1452 void WKPreferencesSetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef, bool enabled)
1453 {
1454     toImpl(preferencesRef)->setEnableInheritURIQueryComponent(enabled);
1455 }
1456
1457 bool WKPreferencesGetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef)
1458 {
1459     return toImpl(preferencesRef)->enableInheritURIQueryComponent();
1460 }
1461
1462 void WKPreferencesSetServiceControlsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1463 {
1464     toImpl(preferencesRef)->setServiceControlsEnabled(enabled);
1465 }
1466
1467 bool WKPreferencesGetServiceControlsEnabled(WKPreferencesRef preferencesRef)
1468 {
1469     return toImpl(preferencesRef)->serviceControlsEnabled();
1470 }
1471
1472 void WKPreferencesSetImageControlsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1473 {
1474     toImpl(preferencesRef)->setImageControlsEnabled(enabled);
1475 }
1476
1477 bool WKPreferencesGetImageControlsEnabled(WKPreferencesRef preferencesRef)
1478 {
1479     return toImpl(preferencesRef)->imageControlsEnabled();
1480 }
1481
1482 void WKPreferencesSetGamepadsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1483 {
1484     toImpl(preferencesRef)->setGamepadsEnabled(enabled);
1485 }
1486
1487 bool WKPreferencesGetGamepadsEnabled(WKPreferencesRef preferencesRef)
1488 {
1489     return toImpl(preferencesRef)->gamepadsEnabled();
1490 }
1491
1492 // FIXME: Remove these when possible.
1493 void WKPreferencesSetLongMousePressEnabled(WKPreferencesRef preferencesRef, bool enabled)
1494 {
1495 }
1496
1497 bool WKPreferencesGetLongMousePressEnabled(WKPreferencesRef preferencesRef)
1498 {
1499     return false;
1500 }
1501
1502 void WKPreferencesSetMinimumZoomFontSize(WKPreferencesRef preferencesRef, double size)
1503 {
1504     toImpl(preferencesRef)->setMinimumZoomFontSize(size);
1505 }
1506
1507 double WKPreferencesGetMinimumZoomFontSize(WKPreferencesRef preferencesRef)
1508 {
1509     return toImpl(preferencesRef)->minimumZoomFontSize();
1510 }
1511
1512 void WKPreferencesSetAntialiasedFontDilationEnabled(WKPreferencesRef, bool)
1513 {
1514     // Feature removed.
1515 }
1516
1517 bool WKPreferencesGetAntialiasedFontDilationEnabled(WKPreferencesRef)
1518 {
1519     return false; // Feature removed.
1520 }
1521
1522 void WKPreferencesSetVisibleDebugOverlayRegions(WKPreferencesRef preferencesRef, WKDebugOverlayRegions visibleRegions)
1523 {
1524     toImpl(preferencesRef)->setVisibleDebugOverlayRegions(visibleRegions);
1525 }
1526
1527 WKDebugOverlayRegions WKPreferencesGetVisibleDebugOverlayRegions(WKPreferencesRef preferencesRef)
1528 {
1529     return toImpl(preferencesRef)->visibleDebugOverlayRegions();
1530 }
1531
1532 void WKPreferencesSetIgnoreViewportScalingConstraints(WKPreferencesRef preferencesRef, bool enabled)
1533 {
1534     toImpl(preferencesRef)->setIgnoreViewportScalingConstraints(enabled);
1535 }
1536
1537 bool WKPreferencesGetIgnoreViewportScalingConstraints(WKPreferencesRef preferencesRef)
1538 {
1539     return toImpl(preferencesRef)->ignoreViewportScalingConstraints();
1540 }
1541
1542 void WKPreferencesSetMetaRefreshEnabled(WKPreferencesRef preferencesRef, bool enabled)
1543 {
1544     toImpl(preferencesRef)->setHTTPEquivEnabled(enabled);
1545 }
1546
1547 bool WKPreferencesGetMetaRefreshEnabled(WKPreferencesRef preferencesRef)
1548 {
1549     return toImpl(preferencesRef)->httpEquivEnabled();
1550 }
1551
1552 void WKPreferencesSetHTTPEquivEnabled(WKPreferencesRef preferencesRef, bool enabled)
1553 {
1554     toImpl(preferencesRef)->setHTTPEquivEnabled(enabled);
1555 }
1556
1557 bool WKPreferencesGetHTTPEquivEnabled(WKPreferencesRef preferencesRef)
1558 {
1559     return toImpl(preferencesRef)->httpEquivEnabled();
1560 }
1561
1562 void WKPreferencesSetAllowsAirPlayForMediaPlayback(WKPreferencesRef preferencesRef, bool enabled)
1563 {
1564     toImpl(preferencesRef)->setAllowsAirPlayForMediaPlayback(enabled);
1565 }
1566
1567 bool WKPreferencesGetAllowsAirPlayForMediaPlayback(WKPreferencesRef preferencesRef)
1568 {
1569     return toImpl(preferencesRef)->allowsAirPlayForMediaPlayback();
1570 }
1571
1572 void WKPreferencesSetUserInterfaceDirectionPolicy(WKPreferencesRef preferencesRef, _WKUserInterfaceDirectionPolicy userInterfaceDirectionPolicy)
1573 {
1574     toImpl(preferencesRef)->setUserInterfaceDirectionPolicy(userInterfaceDirectionPolicy);
1575 }
1576
1577 _WKUserInterfaceDirectionPolicy WKPreferencesGetUserInterfaceDirectionPolicy(WKPreferencesRef preferencesRef)
1578 {
1579     return static_cast<_WKUserInterfaceDirectionPolicy>(toImpl(preferencesRef)->userInterfaceDirectionPolicy());
1580 }
1581
1582 void WKPreferencesSetResourceUsageOverlayVisible(WKPreferencesRef preferencesRef, bool enabled)
1583 {
1584     toImpl(preferencesRef)->setResourceUsageOverlayVisible(enabled);
1585 }
1586
1587 bool WKPreferencesGetResourceUsageOverlayVisible(WKPreferencesRef preferencesRef)
1588 {
1589     return toImpl(preferencesRef)->resourceUsageOverlayVisible();
1590 }
1591
1592 void WKPreferencesSetMockCaptureDevicesEnabled(WKPreferencesRef preferencesRef, bool enabled)
1593 {
1594     toImpl(preferencesRef)->setMockCaptureDevicesEnabled(enabled);
1595 }
1596
1597 bool WKPreferencesGetMockCaptureDevicesEnabled(WKPreferencesRef preferencesRef)
1598 {
1599     return toImpl(preferencesRef)->mockCaptureDevicesEnabled();
1600 }
1601
1602 void WKPreferencesSetICECandidateFilteringEnabled(WKPreferencesRef preferencesRef, bool enabled)
1603 {
1604     toImpl(preferencesRef)->setICECandidateFilteringEnabled(enabled);
1605 }
1606
1607 bool WKPreferencesGetICECandidateFilteringEnabled(WKPreferencesRef preferencesRef)
1608 {
1609     return toImpl(preferencesRef)->iceCandidateFilteringEnabled();
1610 }
1611
1612 void WKPreferencesSetEnumeratingAllNetworkInterfacesEnabled(WKPreferencesRef preferencesRef, bool enabled)
1613 {
1614     toImpl(preferencesRef)->setEnumeratingAllNetworkInterfacesEnabled(enabled);
1615 }
1616
1617 bool WKPreferencesGetEnumeratingAllNetworkInterfacesEnabled(WKPreferencesRef preferencesRef)
1618 {
1619     return toImpl(preferencesRef)->enumeratingAllNetworkInterfacesEnabled();
1620 }
1621
1622 void WKPreferencesSetMediaCaptureRequiresSecureConnection(WKPreferencesRef preferencesRef, bool enabled)
1623 {
1624     toImpl(preferencesRef)->setMediaCaptureRequiresSecureConnection(enabled);
1625 }
1626
1627 bool WKPreferencesGetMediaCaptureRequiresSecureConnection(WKPreferencesRef preferencesRef)
1628 {
1629     return toImpl(preferencesRef)->mediaCaptureRequiresSecureConnection();
1630 }
1631
1632 void WKPreferencesSetFetchAPIEnabled(WKPreferencesRef preferencesRef, bool flag)
1633 {
1634     toImpl(preferencesRef)->setFetchAPIEnabled(flag);
1635 }
1636
1637 bool WKPreferencesGetFetchAPIEnabled(WKPreferencesRef preferencesRef)
1638 {
1639     return toImpl(preferencesRef)->fetchAPIEnabled();
1640 }
1641
1642 void WKPreferencesSetDisplayContentsEnabled(WKPreferencesRef preferencesRef, bool flag)
1643 {
1644     toImpl(preferencesRef)->setDisplayContentsEnabled(flag);
1645 }
1646
1647 bool WKPreferencesGetDisplayContentsEnabled(WKPreferencesRef preferencesRef)
1648 {
1649     return toImpl(preferencesRef)->displayContentsEnabled();
1650 }
1651
1652 void WKPreferencesSetDownloadAttributeEnabled(WKPreferencesRef preferencesRef, bool flag)
1653 {
1654     toImpl(preferencesRef)->setDownloadAttributeEnabled(flag);
1655 }
1656
1657 bool WKPreferencesGetDownloadAttributeEnabled(WKPreferencesRef preferencesRef)
1658 {
1659     return toImpl(preferencesRef)->downloadAttributeEnabled();
1660 }
1661
1662 void WKPreferencesSetIntersectionObserverEnabled(WKPreferencesRef preferencesRef, bool flag)
1663 {
1664     toImpl(preferencesRef)->setIntersectionObserverEnabled(flag);
1665 }
1666
1667 bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef preferencesRef)
1668 {
1669     return toImpl(preferencesRef)->intersectionObserverEnabled();
1670 }
1671
1672 void WKPreferencesSetUserTimingEnabled(WKPreferencesRef preferencesRef, bool flag)
1673 {
1674     toImpl(preferencesRef)->setUserTimingEnabled(flag);
1675 }
1676
1677 bool WKPreferencesGetUserTimingEnabled(WKPreferencesRef preferencesRef)
1678 {
1679     return toImpl(preferencesRef)->userTimingEnabled();
1680 }
1681
1682 void WKPreferencesSetResourceTimingEnabled(WKPreferencesRef preferencesRef, bool flag)
1683 {
1684     toImpl(preferencesRef)->setResourceTimingEnabled(flag);
1685 }
1686
1687 bool WKPreferencesGetResourceTimingEnabled(WKPreferencesRef preferencesRef)
1688 {
1689     return toImpl(preferencesRef)->resourceTimingEnabled();
1690 }
1691
1692 void WKPreferencesSetSelectionPaintingWithoutSelectionGapsEnabled(WKPreferencesRef preferencesRef, bool flag)
1693 {
1694     toImpl(preferencesRef)->setSelectionPaintingWithoutSelectionGapsEnabled(flag);
1695 }
1696
1697 bool WKPreferencesGetSelectionPaintingWithoutSelectionGapsEnabled(WKPreferencesRef preferencesRef)
1698 {
1699     return toImpl(preferencesRef)->selectionPaintingWithoutSelectionGapsEnabled();
1700 }
1701
1702 void WKPreferencesSetAllowsPictureInPictureMediaPlayback(WKPreferencesRef preferencesRef, bool enabled)
1703 {
1704     toImpl(preferencesRef)->setAllowsPictureInPictureMediaPlayback(enabled);
1705 }
1706
1707 bool WKPreferencesGetAllowsPictureInPictureMediaPlayback(WKPreferencesRef preferencesRef)
1708 {
1709     return toImpl(preferencesRef)->allowsPictureInPictureMediaPlayback();
1710 }
1711
1712 WK_EXPORT bool WKPreferencesGetApplePayEnabled(WKPreferencesRef preferencesRef)
1713 {
1714     return WebKit::toImpl(preferencesRef)->applePayEnabled();
1715 }
1716
1717 void WKPreferencesSetApplePayEnabled(WKPreferencesRef preferencesRef, bool enabled)
1718 {
1719     WebKit::toImpl(preferencesRef)->setApplePayEnabled(enabled);
1720 }
1721
1722 bool WKPreferencesGetApplePayCapabilityDisclosureAllowed(WKPreferencesRef preferencesRef)
1723 {
1724     return WebKit::toImpl(preferencesRef)->applePayCapabilityDisclosureAllowed();
1725 }
1726
1727 void WKPreferencesSetApplePayCapabilityDisclosureAllowed(WKPreferencesRef preferencesRef, bool allowed)
1728 {
1729     WebKit::toImpl(preferencesRef)->setApplePayCapabilityDisclosureAllowed(allowed);
1730 }
1731
1732 void WKPreferencesSetLinkPreloadEnabled(WKPreferencesRef preferencesRef, bool flag)
1733 {
1734     toImpl(preferencesRef)->setLinkPreloadEnabled(flag);
1735 }
1736
1737 bool WKPreferencesGetLinkPreloadEnabled(WKPreferencesRef preferencesRef)
1738 {
1739     return toImpl(preferencesRef)->linkPreloadEnabled();
1740 }
1741
1742 void WKPreferencesSetMediaPreloadingEnabled(WKPreferencesRef preferencesRef, bool flag)
1743 {
1744     toImpl(preferencesRef)->setMediaPreloadingEnabled(flag);
1745 }
1746
1747 bool WKPreferencesGetMediaPreloadingEnabled(WKPreferencesRef preferencesRef)
1748 {
1749     return toImpl(preferencesRef)->mediaPreloadingEnabled();
1750 }
1751
1752 void WKPreferencesSetLargeImageAsyncDecodingEnabled(WKPreferencesRef preferencesRef, bool flag)
1753 {
1754     toImpl(preferencesRef)->setLargeImageAsyncDecodingEnabled(flag);
1755 }
1756
1757 bool WKPreferencesGetLargeImageAsyncDecodingEnabled(WKPreferencesRef preferencesRef)
1758 {
1759     return toImpl(preferencesRef)->largeImageAsyncDecodingEnabled();
1760 }
1761
1762 void WKPreferencesSetAnimatedImageAsyncDecodingEnabled(WKPreferencesRef preferencesRef, bool flag)
1763 {
1764     toImpl(preferencesRef)->setAnimatedImageAsyncDecodingEnabled(flag);
1765 }
1766
1767 bool WKPreferencesGetAnimatedImageAsyncDecodingEnabled(WKPreferencesRef preferencesRef)
1768 {
1769     return toImpl(preferencesRef)->animatedImageAsyncDecodingEnabled();
1770 }
1771
1772 void WKPreferencesSetShouldSuppressKeyboardInputDuringProvisionalNavigation(WKPreferencesRef preferencesRef, bool flag)
1773 {
1774     toImpl(preferencesRef)->setShouldSuppressKeyboardInputDuringProvisionalNavigation(flag);
1775 }
1776
1777 bool WKPreferencesGetShouldSuppressKeyboardInputDuringProvisionalNavigation(WKPreferencesRef preferencesRef)
1778 {
1779     return toImpl(preferencesRef)->shouldSuppressKeyboardInputDuringProvisionalNavigation();
1780 }
1781
1782 void WKPreferencesSetMediaUserGestureInheritsFromDocument(WKPreferencesRef preferencesRef, bool flag)
1783 {
1784     toImpl(preferencesRef)->setMediaUserGestureInheritsFromDocument(flag);
1785 }
1786
1787 bool WKPreferencesGetMediaUserGestureInheritsFromDocument(WKPreferencesRef preferencesRef)
1788 {
1789     return toImpl(preferencesRef)->mediaUserGestureInheritsFromDocument();
1790 }
1791
1792 void WKPreferencesSetMediaContentTypesRequiringHardwareSupport(WKPreferencesRef preferencesRef, WKStringRef codecs)
1793 {
1794     toImpl(preferencesRef)->setMediaContentTypesRequiringHardwareSupport(toWTFString(codecs));
1795 }
1796
1797 WKStringRef WKPreferencesCopyMediaContentTypesRequiringHardwareSupport(WKPreferencesRef preferencesRef)
1798 {
1799     return toCopiedAPI(toImpl(preferencesRef)->mediaContentTypesRequiringHardwareSupport());
1800 }
1801
1802 void WKPreferencesSetIsSecureContextAttributeEnabled(WKPreferencesRef preferencesRef, bool flag)
1803 {
1804     toImpl(preferencesRef)->setIsSecureContextAttributeEnabled(flag);
1805 }
1806
1807 bool WKPreferencesGetIsSecureContextAttributeEnabled(WKPreferencesRef preferencesRef)
1808 {
1809     return toImpl(preferencesRef)->isSecureContextAttributeEnabled();
1810 }
1811
1812 bool WKPreferencesGetLegacyEncryptedMediaAPIEnabled(WKPreferencesRef preferencesRef)
1813 {
1814     return toImpl(preferencesRef)->legacyEncryptedMediaAPIEnabled();
1815 }
1816
1817 void WKPreferencesSetLegacyEncryptedMediaAPIEnabled(WKPreferencesRef preferencesRef, bool enabled)
1818 {
1819     return toImpl(preferencesRef)->setLegacyEncryptedMediaAPIEnabled(enabled);
1820 }
1821
1822 bool WKPreferencesGetAllowMediaContentTypesRequiringHardwareSupportAsFallback(WKPreferencesRef preferencesRef)
1823 {
1824     return toImpl(preferencesRef)->allowMediaContentTypesRequiringHardwareSupportAsFallback();
1825 }
1826
1827 void WKPreferencesSetAllowMediaContentTypesRequiringHardwareSupportAsFallback(WKPreferencesRef preferencesRef, bool allow)
1828 {
1829     return toImpl(preferencesRef)->setAllowMediaContentTypesRequiringHardwareSupportAsFallback(allow);
1830 }
1831
1832 void WKPreferencesSetInspectorAdditionsEnabled(WKPreferencesRef preferencesRef, bool flag)
1833 {
1834     toImpl(preferencesRef)->setInspectorAdditionsEnabled(flag);
1835 }
1836
1837 bool WKPreferencesGetInspectorAdditionsEnabled(WKPreferencesRef preferencesRef)
1838 {
1839     return toImpl(preferencesRef)->inspectorAdditionsEnabled();
1840 }