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