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