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