Add runtime and compile time flags for enabling Web Animations API and model.
[WebKit-https.git] / Source / WebKit2 / UIProcess / API / C / WKPreferences.cpp
1 /*
2  * Copyright (C) 2010, 2012 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/PassRefPtr.h>
34 #include <wtf/RefPtr.h>
35
36 using namespace WebKit;
37
38 WKTypeID WKPreferencesGetTypeID()
39 {
40     return toAPI(WebPreferences::APIType);
41 }
42
43 WKPreferencesRef WKPreferencesCreate()
44 {
45     RefPtr<WebPreferences> preferences = WebPreferences::createWithLegacyDefaults(String(), "WebKit2.", "WebKit2.");
46     return toAPI(preferences.release().leakRef());
47 }
48
49 WKPreferencesRef WKPreferencesCreateWithIdentifier(WKStringRef identifierRef)
50 {
51     RefPtr<WebPreferences> preferences = WebPreferences::createWithLegacyDefaults(toWTFString(identifierRef), "WebKit2.", "WebKit2.");
52     return toAPI(preferences.release().leakRef());
53 }
54
55 WKPreferencesRef WKPreferencesCreateCopy(WKPreferencesRef preferencesRef)
56 {
57     RefPtr<WebPreferences> preferences = toImpl(preferencesRef)->copy();
58     return toAPI(preferences.release().leakRef());
59 }
60
61 void WKPreferencesSetJavaScriptEnabled(WKPreferencesRef preferencesRef, bool javaScriptEnabled)
62 {
63     toImpl(preferencesRef)->setJavaScriptEnabled(javaScriptEnabled);
64 }
65
66 bool WKPreferencesGetJavaScriptEnabled(WKPreferencesRef preferencesRef)
67 {
68     return toImpl(preferencesRef)->javaScriptEnabled();
69 }
70
71 void WKPreferencesSetJavaScriptMarkupEnabled(WKPreferencesRef preferencesRef, bool javaScriptMarkupEnabled)
72 {
73     toImpl(preferencesRef)->setJavaScriptMarkupEnabled(javaScriptMarkupEnabled);
74 }
75
76 bool WKPreferencesGetJavaScriptMarkupEnabled(WKPreferencesRef preferencesRef)
77 {
78     return toImpl(preferencesRef)->javaScriptMarkupEnabled();
79 }
80
81 void WKPreferencesSetLoadsImagesAutomatically(WKPreferencesRef preferencesRef, bool loadsImagesAutomatically)
82 {
83     toImpl(preferencesRef)->setLoadsImagesAutomatically(loadsImagesAutomatically);
84 }
85
86 bool WKPreferencesGetLoadsImagesAutomatically(WKPreferencesRef preferencesRef)
87 {
88     return toImpl(preferencesRef)->loadsImagesAutomatically();
89 }
90
91 void WKPreferencesSetLoadsSiteIconsIgnoringImageLoadingPreference(WKPreferencesRef preferencesRef, bool loadsSiteIconsIgnoringImageLoadingPreference)
92 {
93     toImpl(preferencesRef)->setLoadsSiteIconsIgnoringImageLoadingPreference(loadsSiteIconsIgnoringImageLoadingPreference);
94 }
95
96 bool WKPreferencesGetLoadsSiteIconsIgnoringImageLoadingPreference(WKPreferencesRef preferencesRef)
97 {
98     return toImpl(preferencesRef)->loadsSiteIconsIgnoringImageLoadingPreference();
99 }
100
101 void WKPreferencesSetOfflineWebApplicationCacheEnabled(WKPreferencesRef preferencesRef, bool offlineWebApplicationCacheEnabled)
102 {
103     toImpl(preferencesRef)->setOfflineWebApplicationCacheEnabled(offlineWebApplicationCacheEnabled);
104 }
105
106 bool WKPreferencesGetOfflineWebApplicationCacheEnabled(WKPreferencesRef preferencesRef)
107 {
108     return toImpl(preferencesRef)->offlineWebApplicationCacheEnabled();
109 }
110
111 void WKPreferencesSetLocalStorageEnabled(WKPreferencesRef preferencesRef, bool localStorageEnabled)
112 {
113     toImpl(preferencesRef)->setLocalStorageEnabled(localStorageEnabled);
114 }
115
116 bool WKPreferencesGetLocalStorageEnabled(WKPreferencesRef preferencesRef)
117 {
118     return toImpl(preferencesRef)->localStorageEnabled();
119 }
120
121 void WKPreferencesSetDatabasesEnabled(WKPreferencesRef preferencesRef, bool databasesEnabled)
122 {
123     toImpl(preferencesRef)->setDatabasesEnabled(databasesEnabled);
124 }
125
126 bool WKPreferencesGetDatabasesEnabled(WKPreferencesRef preferencesRef)
127 {
128     return toImpl(preferencesRef)->databasesEnabled();
129 }
130
131 void WKPreferencesSetXSSAuditorEnabled(WKPreferencesRef preferencesRef, bool xssAuditorEnabled)
132 {
133     toImpl(preferencesRef)->setXSSAuditorEnabled(xssAuditorEnabled);
134 }
135
136 bool WKPreferencesGetXSSAuditorEnabled(WKPreferencesRef preferencesRef)
137 {
138     return toImpl(preferencesRef)->xssAuditorEnabled();
139 }
140
141 void WKPreferencesSetFrameFlatteningEnabled(WKPreferencesRef preferencesRef, bool frameFlatteningEnabled)
142 {
143     toImpl(preferencesRef)->setFrameFlatteningEnabled(frameFlatteningEnabled);
144 }
145
146 bool WKPreferencesGetFrameFlatteningEnabled(WKPreferencesRef preferencesRef)
147 {
148     return toImpl(preferencesRef)->frameFlatteningEnabled();
149 }
150
151 void WKPreferencesSetPluginsEnabled(WKPreferencesRef preferencesRef, bool pluginsEnabled)
152 {
153     toImpl(preferencesRef)->setPluginsEnabled(pluginsEnabled);
154 }
155
156 bool WKPreferencesGetPluginsEnabled(WKPreferencesRef preferencesRef)
157 {
158     return toImpl(preferencesRef)->pluginsEnabled();
159 }
160
161 void WKPreferencesSetJavaEnabled(WKPreferencesRef preferencesRef, bool javaEnabled)
162 {
163     toImpl(preferencesRef)->setJavaEnabled(javaEnabled);
164 }
165
166 bool WKPreferencesGetJavaEnabled(WKPreferencesRef preferencesRef)
167 {
168     return toImpl(preferencesRef)->javaEnabled();
169 }
170
171 void WKPreferencesSetJavaEnabledForLocalFiles(WKPreferencesRef preferencesRef, bool javaEnabledForLocalFiles)
172 {
173     toImpl(preferencesRef)->setJavaEnabledForLocalFiles(javaEnabledForLocalFiles);
174 }
175
176 bool WKPreferencesGetJavaEnabledForLocalFiles(WKPreferencesRef preferencesRef)
177 {
178     return toImpl(preferencesRef)->javaEnabledForLocalFiles();
179 }
180
181 void WKPreferencesSetJavaScriptCanOpenWindowsAutomatically(WKPreferencesRef preferencesRef, bool javaScriptCanOpenWindowsAutomatically)
182 {
183     toImpl(preferencesRef)->setJavaScriptCanOpenWindowsAutomatically(javaScriptCanOpenWindowsAutomatically);
184 }
185
186 bool WKPreferencesGetJavaScriptCanOpenWindowsAutomatically(WKPreferencesRef preferencesRef)
187 {
188     return toImpl(preferencesRef)->javaScriptCanOpenWindowsAutomatically();
189 }
190
191 void WKPreferencesSetHyperlinkAuditingEnabled(WKPreferencesRef preferencesRef, bool hyperlinkAuditingEnabled)
192 {
193     toImpl(preferencesRef)->setHyperlinkAuditingEnabled(hyperlinkAuditingEnabled);
194 }
195
196 bool WKPreferencesGetHyperlinkAuditingEnabled(WKPreferencesRef preferencesRef)
197 {
198     return toImpl(preferencesRef)->hyperlinkAuditingEnabled();
199 }
200
201 void WKPreferencesSetStandardFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
202 {
203     toImpl(preferencesRef)->setStandardFontFamily(toWTFString(family));
204 }
205
206 WKStringRef WKPreferencesCopyStandardFontFamily(WKPreferencesRef preferencesRef)
207 {
208     return toCopiedAPI(toImpl(preferencesRef)->standardFontFamily());
209 }
210
211 void WKPreferencesSetFixedFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
212 {
213     toImpl(preferencesRef)->setFixedFontFamily(toWTFString(family));
214 }
215
216 WKStringRef WKPreferencesCopyFixedFontFamily(WKPreferencesRef preferencesRef)
217 {
218     return toCopiedAPI(toImpl(preferencesRef)->fixedFontFamily());
219 }
220
221 void WKPreferencesSetSerifFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
222 {
223     toImpl(preferencesRef)->setSerifFontFamily(toWTFString(family));
224 }
225
226 WKStringRef WKPreferencesCopySerifFontFamily(WKPreferencesRef preferencesRef)
227 {
228     return toCopiedAPI(toImpl(preferencesRef)->serifFontFamily());
229 }
230
231 void WKPreferencesSetSansSerifFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
232 {
233     toImpl(preferencesRef)->setSansSerifFontFamily(toWTFString(family));
234 }
235
236 WKStringRef WKPreferencesCopySansSerifFontFamily(WKPreferencesRef preferencesRef)
237 {
238     return toCopiedAPI(toImpl(preferencesRef)->sansSerifFontFamily());
239 }
240
241 void WKPreferencesSetCursiveFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
242 {
243     toImpl(preferencesRef)->setCursiveFontFamily(toWTFString(family));
244 }
245
246 WKStringRef WKPreferencesCopyCursiveFontFamily(WKPreferencesRef preferencesRef)
247 {
248     return toCopiedAPI(toImpl(preferencesRef)->cursiveFontFamily());
249 }
250
251 void WKPreferencesSetFantasyFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
252 {
253     toImpl(preferencesRef)->setFantasyFontFamily(toWTFString(family));
254 }
255
256 WKStringRef WKPreferencesCopyFantasyFontFamily(WKPreferencesRef preferencesRef)
257 {
258     return toCopiedAPI(toImpl(preferencesRef)->fantasyFontFamily());
259 }
260
261 void WKPreferencesSetPictographFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
262 {
263     toImpl(preferencesRef)->setPictographFontFamily(toWTFString(family));
264 }
265
266 WKStringRef WKPreferencesCopyPictographFontFamily(WKPreferencesRef preferencesRef)
267 {
268     return toCopiedAPI(toImpl(preferencesRef)->pictographFontFamily());
269 }
270
271 void WKPreferencesSetDefaultFontSize(WKPreferencesRef preferencesRef, uint32_t size)
272 {
273     toImpl(preferencesRef)->setDefaultFontSize(size);
274 }
275
276 uint32_t WKPreferencesGetDefaultFontSize(WKPreferencesRef preferencesRef)
277 {
278     return toImpl(preferencesRef)->defaultFontSize();
279 }
280
281 void WKPreferencesSetDefaultFixedFontSize(WKPreferencesRef preferencesRef, uint32_t size)
282 {
283     toImpl(preferencesRef)->setDefaultFixedFontSize(size);
284 }
285
286 uint32_t WKPreferencesGetDefaultFixedFontSize(WKPreferencesRef preferencesRef)
287 {
288     return toImpl(preferencesRef)->defaultFixedFontSize();
289 }
290
291 void WKPreferencesSetMinimumFontSize(WKPreferencesRef preferencesRef, uint32_t size)
292 {
293     toImpl(preferencesRef)->setMinimumFontSize(size);
294 }
295
296 uint32_t WKPreferencesGetMinimumFontSize(WKPreferencesRef preferencesRef)
297 {
298     return toImpl(preferencesRef)->minimumFontSize();
299 }
300
301
302 void WKPreferencesSetCookieEnabled(WKPreferencesRef preferencesRef, bool enabled)
303 {
304     toImpl(preferencesRef)->setCookieEnabled(enabled);
305 }
306
307 bool WKPreferencesGetCookieEnabled(WKPreferencesRef preferencesRef)
308 {
309     return toImpl(preferencesRef)->cookieEnabled();
310 }
311
312 void WKPreferencesSetEditableLinkBehavior(WKPreferencesRef preferencesRef, WKEditableLinkBehavior wkBehavior)
313 {
314     toImpl(preferencesRef)->setEditableLinkBehavior(toEditableLinkBehavior(wkBehavior));
315 }
316
317 WKEditableLinkBehavior WKPreferencesGetEditableLinkBehavior(WKPreferencesRef preferencesRef)
318 {
319     return toAPI(static_cast<WebCore::EditableLinkBehavior>(toImpl(preferencesRef)->editableLinkBehavior()));
320 }
321
322 void WKPreferencesSetDefaultTextEncodingName(WKPreferencesRef preferencesRef, WKStringRef name)
323 {
324     toImpl(preferencesRef)->setDefaultTextEncodingName(toWTFString(name));
325 }
326
327 WKStringRef WKPreferencesCopyDefaultTextEncodingName(WKPreferencesRef preferencesRef)
328 {
329     return toCopiedAPI(toImpl(preferencesRef)->defaultTextEncodingName());
330 }
331
332 void WKPreferencesSetPrivateBrowsingEnabled(WKPreferencesRef preferencesRef, bool enabled)
333 {
334     toImpl(preferencesRef)->setPrivateBrowsingEnabled(enabled);
335 }
336
337 bool WKPreferencesGetPrivateBrowsingEnabled(WKPreferencesRef preferencesRef)
338 {
339     return toImpl(preferencesRef)->privateBrowsingEnabled();
340 }
341
342 void WKPreferencesSetDeveloperExtrasEnabled(WKPreferencesRef preferencesRef, bool enabled)
343 {
344     toImpl(preferencesRef)->setDeveloperExtrasEnabled(enabled);
345 }
346
347 bool WKPreferencesGetDeveloperExtrasEnabled(WKPreferencesRef preferencesRef)
348 {
349     return toImpl(preferencesRef)->developerExtrasEnabled();
350 }
351
352 void WKPreferencesSetJavaScriptRuntimeFlags(WKPreferencesRef preferencesRef, WKJavaScriptRuntimeFlagSet javaScriptRuntimeFlagSet)
353 {
354     toImpl(preferencesRef)->setJavaScriptRuntimeFlags(javaScriptRuntimeFlagSet);
355 }
356
357 WKJavaScriptRuntimeFlagSet WKPreferencesGetJavaScriptRuntimeFlags(WKPreferencesRef preferencesRef)
358 {
359     return toImpl(preferencesRef)->javaScriptRuntimeFlags();
360 }
361
362 void WKPreferencesSetTextAreasAreResizable(WKPreferencesRef preferencesRef, bool resizable)
363 {
364     toImpl(preferencesRef)->setTextAreasAreResizable(resizable);
365 }
366
367 bool WKPreferencesGetTextAreasAreResizable(WKPreferencesRef preferencesRef)
368 {
369     return toImpl(preferencesRef)->textAreasAreResizable();
370 }
371
372 void WKPreferencesSetFontSmoothingLevel(WKPreferencesRef preferencesRef, WKFontSmoothingLevel wkLevel)
373 {
374     toImpl(preferencesRef)->setFontSmoothingLevel(toFontSmoothingLevel(wkLevel));
375 }
376
377 WKFontSmoothingLevel WKPreferencesGetFontSmoothingLevel(WKPreferencesRef preferencesRef)
378 {
379     return toAPI(static_cast<FontSmoothingLevel>(toImpl(preferencesRef)->fontSmoothingLevel()));
380 }
381
382 void WKPreferencesSetAcceleratedDrawingEnabled(WKPreferencesRef preferencesRef, bool flag)
383 {
384     toImpl(preferencesRef)->setAcceleratedDrawingEnabled(flag);
385 }
386
387 bool WKPreferencesGetAcceleratedDrawingEnabled(WKPreferencesRef preferencesRef)
388 {
389     return toImpl(preferencesRef)->acceleratedDrawingEnabled();
390 }
391
392 void WKPreferencesSetCanvasUsesAcceleratedDrawing(WKPreferencesRef preferencesRef, bool flag)
393 {
394     toImpl(preferencesRef)->setCanvasUsesAcceleratedDrawing(flag);
395 }
396
397 bool WKPreferencesGetCanvasUsesAcceleratedDrawing(WKPreferencesRef preferencesRef)
398 {
399     return toImpl(preferencesRef)->canvasUsesAcceleratedDrawing();
400 }
401
402 void WKPreferencesSetAcceleratedCompositingEnabled(WKPreferencesRef preferencesRef, bool flag)
403 {
404     toImpl(preferencesRef)->setAcceleratedCompositingEnabled(flag);
405 }
406
407 bool WKPreferencesGetAcceleratedCompositingEnabled(WKPreferencesRef preferencesRef)
408 {
409     return toImpl(preferencesRef)->acceleratedCompositingEnabled();
410 }
411
412 void WKPreferencesSetAcceleratedCompositingForOverflowScrollEnabled(WKPreferencesRef preferencesRef, bool flag)
413 {
414     toImpl(preferencesRef)->setAcceleratedCompositingForOverflowScrollEnabled(flag);
415 }
416
417 bool WKPreferencesGetAcceleratedCompositingForOverflowScrollEnabled(WKPreferencesRef preferencesRef)
418 {
419     return toImpl(preferencesRef)->acceleratedCompositingForOverflowScrollEnabled();
420 }
421
422 void WKPreferencesSetCompositingBordersVisible(WKPreferencesRef preferencesRef, bool flag)
423 {
424     toImpl(preferencesRef)->setCompositingBordersVisible(flag);
425 }
426
427 bool WKPreferencesGetCompositingBordersVisible(WKPreferencesRef preferencesRef)
428 {
429     return toImpl(preferencesRef)->compositingBordersVisible();
430 }
431
432 void WKPreferencesSetCompositingRepaintCountersVisible(WKPreferencesRef preferencesRef, bool flag)
433 {
434     toImpl(preferencesRef)->setCompositingRepaintCountersVisible(flag);
435 }
436
437 bool WKPreferencesGetCompositingRepaintCountersVisible(WKPreferencesRef preferencesRef)
438 {
439     return toImpl(preferencesRef)->compositingRepaintCountersVisible();
440 }
441
442 void WKPreferencesSetTiledScrollingIndicatorVisible(WKPreferencesRef preferencesRef, bool flag)
443 {
444     toImpl(preferencesRef)->setTiledScrollingIndicatorVisible(flag);
445 }
446
447 bool WKPreferencesGetTiledScrollingIndicatorVisible(WKPreferencesRef preferencesRef)
448 {
449     return toImpl(preferencesRef)->tiledScrollingIndicatorVisible();
450 }
451
452 void WKPreferencesSetWebGLEnabled(WKPreferencesRef preferencesRef, bool flag)
453 {
454     toImpl(preferencesRef)->setWebGLEnabled(flag);
455 }
456
457 bool WKPreferencesGetWebGLEnabled(WKPreferencesRef preferencesRef)
458 {
459     return toImpl(preferencesRef)->webGLEnabled();
460 }
461
462 void WKPreferencesSetForceSoftwareWebGLRendering(WKPreferencesRef preferencesRef, bool flag)
463 {
464     toImpl(preferencesRef)->setForceSoftwareWebGLRendering(flag);
465 }
466
467 bool WKPreferencesGetForceSoftwareWebGLRendering(WKPreferencesRef preferencesRef)
468 {
469     return toImpl(preferencesRef)->forceSoftwareWebGLRendering();
470 }
471
472 void WKPreferencesSetAccelerated2DCanvasEnabled(WKPreferencesRef preferencesRef, bool flag)
473 {
474     toImpl(preferencesRef)->setAccelerated2dCanvasEnabled(flag);
475 }
476
477 bool WKPreferencesGetAccelerated2DCanvasEnabled(WKPreferencesRef preferencesRef)
478 {
479     return toImpl(preferencesRef)->accelerated2dCanvasEnabled();
480 }
481
482 void WKPreferencesSetCSSAnimationTriggersEnabled(WKPreferencesRef preferencesRef, bool flag)
483 {
484     toImpl(preferencesRef)->setCSSAnimationTriggersEnabled(flag);
485 }
486
487 bool WKPreferencesGetCSSAnimationTriggersEnabled(WKPreferencesRef preferencesRef)
488 {
489     return toImpl(preferencesRef)->cssAnimationTriggersEnabled();
490 }
491
492 void WKPreferencesSetWebAnimationsEnabled(WKPreferencesRef preferencesRef, bool flag)
493 {
494     toImpl(preferencesRef)->setWebAnimationsEnabled(flag);
495 }
496
497 bool WKPreferencesGetWebAnimationsEnabled(WKPreferencesRef preferencesRef)
498 {
499     return toImpl(preferencesRef)->webAnimationsEnabled();
500 }
501
502 void WKPreferencesSetCSSRegionsEnabled(WKPreferencesRef preferencesRef, bool flag)
503 {
504     toImpl(preferencesRef)->setCSSRegionsEnabled(flag);
505 }
506
507 bool WKPreferencesGetCSSRegionsEnabled(WKPreferencesRef preferencesRef)
508 {
509     return toImpl(preferencesRef)->cssRegionsEnabled();
510 }
511
512 void WKPreferencesSetNeedsSiteSpecificQuirks(WKPreferencesRef preferencesRef, bool flag)
513 {
514     toImpl(preferencesRef)->setNeedsSiteSpecificQuirks(flag);
515 }
516
517 bool WKPreferencesUseLegacyTextAlignPositionedElementBehavior(WKPreferencesRef preferencesRef)
518 {
519     return toImpl(preferencesRef)->useLegacyTextAlignPositionedElementBehavior();
520 }
521
522 void WKPreferencesSetUseLegacyTextAlignPositionedElementBehavior(WKPreferencesRef preferencesRef, bool flag)
523 {
524     toImpl(preferencesRef)->setUseLegacyTextAlignPositionedElementBehavior(flag);
525 }
526
527 bool WKPreferencesGetNeedsSiteSpecificQuirks(WKPreferencesRef preferencesRef)
528 {
529     return toImpl(preferencesRef)->needsSiteSpecificQuirks();
530 }
531
532 void WKPreferencesSetForceFTPDirectoryListings(WKPreferencesRef preferencesRef, bool flag)
533 {
534     toImpl(preferencesRef)->setForceFTPDirectoryListings(flag);
535 }
536
537 bool WKPreferencesGetForceFTPDirectoryListings(WKPreferencesRef preferencesRef)
538 {
539     return toImpl(preferencesRef)->forceFTPDirectoryListings();
540 }
541
542 void WKPreferencesSetFTPDirectoryTemplatePath(WKPreferencesRef preferencesRef, WKStringRef pathRef)
543 {
544     toImpl(preferencesRef)->setFTPDirectoryTemplatePath(toWTFString(pathRef));
545 }
546
547 WKStringRef WKPreferencesCopyFTPDirectoryTemplatePath(WKPreferencesRef preferencesRef)
548 {
549     return toCopiedAPI(toImpl(preferencesRef)->ftpDirectoryTemplatePath());
550 }
551
552 void WKPreferencesSetTabsToLinks(WKPreferencesRef preferencesRef, bool tabsToLinks)
553 {
554     toImpl(preferencesRef)->setTabsToLinks(tabsToLinks);
555 }
556
557 bool WKPreferencesGetTabsToLinks(WKPreferencesRef preferencesRef)
558 {
559     return toImpl(preferencesRef)->tabsToLinks();
560 }
561
562 void WKPreferencesSetDNSPrefetchingEnabled(WKPreferencesRef preferencesRef, bool enabled)
563 {
564     toImpl(preferencesRef)->setDNSPrefetchingEnabled(enabled);
565 }
566
567 bool WKPreferencesGetDNSPrefetchingEnabled(WKPreferencesRef preferencesRef)
568 {
569     return toImpl(preferencesRef)->dnsPrefetchingEnabled();
570 }
571
572 void WKPreferencesSetAuthorAndUserStylesEnabled(WKPreferencesRef preferencesRef, bool enabled)
573 {
574     toImpl(preferencesRef)->setAuthorAndUserStylesEnabled(enabled);
575 }
576
577 bool WKPreferencesGetAuthorAndUserStylesEnabled(WKPreferencesRef preferencesRef)
578 {
579     return toImpl(preferencesRef)->authorAndUserStylesEnabled();
580 }
581
582 void WKPreferencesSetShouldPrintBackgrounds(WKPreferencesRef preferencesRef, bool flag)
583 {
584     toImpl(preferencesRef)->setShouldPrintBackgrounds(flag);
585 }
586
587 bool WKPreferencesGetShouldPrintBackgrounds(WKPreferencesRef preferencesRef)
588 {
589     return toImpl(preferencesRef)->shouldPrintBackgrounds();
590 }
591
592 void WKPreferencesSetDOMTimersThrottlingEnabled(WKPreferencesRef preferencesRef, bool enabled)
593 {
594     toImpl(preferencesRef)->setDOMTimersThrottlingEnabled(enabled);
595 }
596
597 bool WKPreferencesGetDOMTimersThrottlingEnabled(WKPreferencesRef preferencesRef)
598 {
599     return toImpl(preferencesRef)->domTimersThrottlingEnabled();
600 }
601
602 void WKPreferencesSetWebArchiveDebugModeEnabled(WKPreferencesRef preferencesRef, bool enabled)
603 {
604     toImpl(preferencesRef)->setWebArchiveDebugModeEnabled(enabled);
605 }
606
607 bool WKPreferencesGetWebArchiveDebugModeEnabled(WKPreferencesRef preferencesRef)
608 {
609     return toImpl(preferencesRef)->webArchiveDebugModeEnabled();
610 }
611
612 void WKPreferencesSetLocalFileContentSniffingEnabled(WKPreferencesRef preferencesRef, bool enabled)
613 {
614     toImpl(preferencesRef)->setLocalFileContentSniffingEnabled(enabled);
615 }
616
617 bool WKPreferencesGetLocalFileContentSniffingEnabled(WKPreferencesRef preferencesRef)
618 {
619     return toImpl(preferencesRef)->localFileContentSniffingEnabled();
620 }
621
622 void WKPreferencesSetPageCacheEnabled(WKPreferencesRef preferencesRef, bool enabled)
623 {
624     toImpl(preferencesRef)->setUsesPageCache(enabled);
625 }
626
627 bool WKPreferencesGetPageCacheEnabled(WKPreferencesRef preferencesRef)
628 {
629     return toImpl(preferencesRef)->usesPageCache();
630 }
631
632 void WKPreferencesSetPageCacheSupportsPlugins(WKPreferencesRef preferencesRef, bool pageCacheSupportsPlugins)
633 {
634     toImpl(preferencesRef)->setPageCacheSupportsPlugins(pageCacheSupportsPlugins);
635 }
636
637 bool WKPreferencesGetPageCacheSupportsPlugins(WKPreferencesRef preferencesRef)
638 {
639     return toImpl(preferencesRef)->pageCacheSupportsPlugins();
640 }
641
642 void WKPreferencesSetPaginateDuringLayoutEnabled(WKPreferencesRef preferencesRef, bool enabled)
643 {
644     toImpl(preferencesRef)->setPaginateDuringLayoutEnabled(enabled);
645 }
646
647 bool WKPreferencesGetPaginateDuringLayoutEnabled(WKPreferencesRef preferencesRef)
648 {
649     return toImpl(preferencesRef)->paginateDuringLayoutEnabled();
650 }
651
652 void WKPreferencesSetDOMPasteAllowed(WKPreferencesRef preferencesRef, bool enabled)
653 {
654     toImpl(preferencesRef)->setDOMPasteAllowed(enabled);
655 }
656
657 bool WKPreferencesGetDOMPasteAllowed(WKPreferencesRef preferencesRef)
658 {
659     return toImpl(preferencesRef)->domPasteAllowed();
660 }
661
662 void WKPreferencesSetJavaScriptCanAccessClipboard(WKPreferencesRef preferencesRef, bool enabled)
663 {
664     toImpl(preferencesRef)->setJavaScriptCanAccessClipboard(enabled);
665 }
666
667 bool WKPreferencesGetJavaScriptCanAccessClipboard(WKPreferencesRef preferencesRef)
668 {
669     return toImpl(preferencesRef)->javaScriptCanAccessClipboard();
670 }
671
672 void WKPreferencesSetFullScreenEnabled(WKPreferencesRef preferencesRef, bool enabled)
673 {
674     toImpl(preferencesRef)->setFullScreenEnabled(enabled);
675 }
676
677 bool WKPreferencesGetFullScreenEnabled(WKPreferencesRef preferencesRef)
678 {
679     return toImpl(preferencesRef)->fullScreenEnabled();
680 }
681
682 void WKPreferencesSetAsynchronousSpellCheckingEnabled(WKPreferencesRef preferencesRef, bool enabled)
683 {
684     toImpl(preferencesRef)->setAsynchronousSpellCheckingEnabled(enabled);
685 }
686
687 bool WKPreferencesGetAsynchronousSpellCheckingEnabled(WKPreferencesRef preferencesRef)
688 {
689     return toImpl(preferencesRef)->asynchronousSpellCheckingEnabled();
690 }
691
692 void WKPreferencesSetAVFoundationEnabled(WKPreferencesRef preferencesRef, bool enabled)
693 {
694     toImpl(preferencesRef)->setAVFoundationEnabled(enabled);
695 }
696
697 bool WKPreferencesGetAVFoundationEnabled(WKPreferencesRef preferencesRef)
698 {
699     return toImpl(preferencesRef)->isAVFoundationEnabled();
700 }
701
702 void WKPreferencesSetWebSecurityEnabled(WKPreferencesRef preferencesRef, bool enabled)
703 {
704     toImpl(preferencesRef)->setWebSecurityEnabled(enabled);
705 }
706
707 bool WKPreferencesGetWebSecurityEnabled(WKPreferencesRef preferencesRef)
708 {
709     return toImpl(preferencesRef)->webSecurityEnabled();
710 }
711
712 void WKPreferencesSetUniversalAccessFromFileURLsAllowed(WKPreferencesRef preferencesRef, bool allowed)
713 {
714     toImpl(preferencesRef)->setAllowUniversalAccessFromFileURLs(allowed);
715 }
716
717 bool WKPreferencesGetUniversalAccessFromFileURLsAllowed(WKPreferencesRef preferencesRef)
718 {
719     return toImpl(preferencesRef)->allowUniversalAccessFromFileURLs();
720 }
721
722 void WKPreferencesSetFileAccessFromFileURLsAllowed(WKPreferencesRef preferencesRef, bool allowed)
723 {
724     toImpl(preferencesRef)->setAllowFileAccessFromFileURLs(allowed);
725 }
726
727 bool WKPreferencesGetFileAccessFromFileURLsAllowed(WKPreferencesRef preferencesRef)
728 {
729     return toImpl(preferencesRef)->allowFileAccessFromFileURLs();
730 }
731
732 void WKPreferencesSetHixie76WebSocketProtocolEnabled(WKPreferencesRef, bool /*enabled*/)
733 {
734 }
735
736 bool WKPreferencesGetHixie76WebSocketProtocolEnabled(WKPreferencesRef)
737 {
738     return false;
739 }
740
741 void WKPreferencesSetMediaPlaybackRequiresUserGesture(WKPreferencesRef preferencesRef, bool flag)
742 {
743     toImpl(preferencesRef)->setRequiresUserGestureForMediaPlayback(flag);
744 }
745
746 bool WKPreferencesGetMediaPlaybackRequiresUserGesture(WKPreferencesRef preferencesRef)
747 {
748     return toImpl(preferencesRef)->requiresUserGestureForMediaPlayback();
749 }
750
751 void WKPreferencesSetMediaPlaybackAllowsInline(WKPreferencesRef preferencesRef, bool flag)
752 {
753     toImpl(preferencesRef)->setAllowsInlineMediaPlayback(flag);
754 }
755
756 bool WKPreferencesGetMediaPlaybackAllowsInline(WKPreferencesRef preferencesRef)
757 {
758     return toImpl(preferencesRef)->allowsInlineMediaPlayback();
759 }
760
761 void WKPreferencesSetInlineMediaPlaybackRequiresPlaysInlineAttribute(WKPreferencesRef preferencesRef, bool flag)
762 {
763     toImpl(preferencesRef)->setInlineMediaPlaybackRequiresPlaysInlineAttribute(flag);
764 }
765
766 bool WKPreferencesGetInlineMediaPlaybackRequiresPlaysInlineAttribute(WKPreferencesRef preferencesRef)
767 {
768     return toImpl(preferencesRef)->inlineMediaPlaybackRequiresPlaysInlineAttribute();
769 }
770
771 void WKPreferencesSetMediaControlsScaleWithPageZoom(WKPreferencesRef preferencesRef, bool flag)
772 {
773     toImpl(preferencesRef)->setMediaControlsScaleWithPageZoom(flag);
774 }
775
776 bool WKPreferencesGetMediaControlsScaleWithPageZoom(WKPreferencesRef preferencesRef)
777 {
778     return toImpl(preferencesRef)->mediaControlsScaleWithPageZoom();
779 }
780
781 void WKPreferencesSetShowsToolTipOverTruncatedText(WKPreferencesRef preferencesRef, bool flag)
782 {
783     toImpl(preferencesRef)->setShowsToolTipOverTruncatedText(flag);
784 }
785
786 bool WKPreferencesGetShowsToolTipOverTruncatedText(WKPreferencesRef preferencesRef)
787 {
788     return toImpl(preferencesRef)->showsToolTipOverTruncatedText();
789 }
790
791 void WKPreferencesSetMockScrollbarsEnabled(WKPreferencesRef preferencesRef, bool flag)
792 {
793     toImpl(preferencesRef)->setMockScrollbarsEnabled(flag);
794 }
795
796 bool WKPreferencesGetMockScrollbarsEnabled(WKPreferencesRef preferencesRef)
797 {
798     return toImpl(preferencesRef)->mockScrollbarsEnabled();
799 }
800
801 void WKPreferencesSetWebAudioEnabled(WKPreferencesRef preferencesRef, bool enabled)
802 {
803     toImpl(preferencesRef)->setWebAudioEnabled(enabled);
804 }
805
806 bool WKPreferencesGetWebAudioEnabled(WKPreferencesRef preferencesRef)
807 {
808     return toImpl(preferencesRef)->webAudioEnabled();
809 }
810
811 void WKPreferencesSetApplicationChromeModeEnabled(WKPreferencesRef, bool)
812 {
813     // FIXME: Remove once WebKit nightlies don't need to support Safari 8.
814 }
815
816 bool WKPreferencesGetApplicationChromeModeEnabled(WKPreferencesRef)
817 {
818     // FIXME: Remove once WebKit nightlies don't need to support Safari 8.
819     return false;
820 }
821
822 void WKPreferencesSetInspectorUsesWebKitUserInterface(WKPreferencesRef, bool)
823 {
824     // FIXME: Remove once WebKit nightlies don't need to support Safari 6 thru 7.
825 }
826
827 bool WKPreferencesGetInspectorUsesWebKitUserInterface(WKPreferencesRef)
828 {
829     // FIXME: Remove once WebKit nightlies don't need to support Safari 6 thru 7.
830     return false;
831 }
832
833 void WKPreferencesSetSuppressesIncrementalRendering(WKPreferencesRef preferencesRef, bool enabled)
834 {
835     toImpl(preferencesRef)->setSuppressesIncrementalRendering(enabled);
836 }
837
838 bool WKPreferencesGetSuppressesIncrementalRendering(WKPreferencesRef preferencesRef)
839 {
840     return toImpl(preferencesRef)->suppressesIncrementalRendering();
841 }
842
843 void WKPreferencesSetBackspaceKeyNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled)
844 {
845     toImpl(preferencesRef)->setBackspaceKeyNavigationEnabled(enabled);
846 }
847
848 bool WKPreferencesGetBackspaceKeyNavigationEnabled(WKPreferencesRef preferencesRef)
849 {
850     return toImpl(preferencesRef)->backspaceKeyNavigationEnabled();
851 }
852
853 void WKPreferencesSetCaretBrowsingEnabled(WKPreferencesRef preferencesRef, bool enabled)
854 {
855     toImpl(preferencesRef)->setCaretBrowsingEnabled(enabled);
856 }
857
858 bool WKPreferencesGetCaretBrowsingEnabled(WKPreferencesRef preferencesRef)
859 {
860     return toImpl(preferencesRef)->caretBrowsingEnabled();
861 }
862
863 void WKPreferencesSetShouldDisplaySubtitles(WKPreferencesRef preferencesRef, bool enabled)
864 {
865     toImpl(preferencesRef)->setShouldDisplaySubtitles(enabled);
866 }
867
868 bool WKPreferencesGetShouldDisplaySubtitles(WKPreferencesRef preferencesRef)
869 {
870     return toImpl(preferencesRef)->shouldDisplaySubtitles();
871 }
872
873 void WKPreferencesSetShouldDisplayCaptions(WKPreferencesRef preferencesRef, bool enabled)
874 {
875     toImpl(preferencesRef)->setShouldDisplayCaptions(enabled);
876 }
877
878 bool WKPreferencesGetShouldDisplayCaptions(WKPreferencesRef preferencesRef)
879 {
880     return toImpl(preferencesRef)->shouldDisplayCaptions();
881 }
882
883 void WKPreferencesSetShouldDisplayTextDescriptions(WKPreferencesRef preferencesRef, bool enabled)
884 {
885     toImpl(preferencesRef)->setShouldDisplayTextDescriptions(enabled);
886 }
887
888 bool WKPreferencesGetShouldDisplayTextDescriptions(WKPreferencesRef preferencesRef)
889 {
890     return toImpl(preferencesRef)->shouldDisplayTextDescriptions();
891 }
892
893 void WKPreferencesSetNotificationsEnabled(WKPreferencesRef preferencesRef, bool enabled)
894 {
895     toImpl(preferencesRef)->setNotificationsEnabled(enabled);
896 }
897
898 bool WKPreferencesGetNotificationsEnabled(WKPreferencesRef preferencesRef)
899 {
900     return toImpl(preferencesRef)->notificationsEnabled();
901 }
902
903 void WKPreferencesSetShouldRespectImageOrientation(WKPreferencesRef preferencesRef, bool enabled)
904 {
905     toImpl(preferencesRef)->setShouldRespectImageOrientation(enabled);
906 }
907
908 bool WKPreferencesGetShouldRespectImageOrientation(WKPreferencesRef preferencesRef)
909 {
910     return toImpl(preferencesRef)->shouldRespectImageOrientation();
911 }
912
913 void WKPreferencesSetRequestAnimationFrameEnabled(WKPreferencesRef preferencesRef, bool flag)
914 {
915     toImpl(preferencesRef)->setRequestAnimationFrameEnabled(flag);
916 }
917
918 bool WKPreferencesGetRequestAnimationFrameEnabled(WKPreferencesRef preferencesRef)
919 {
920     return toImpl(preferencesRef)->requestAnimationFrameEnabled();
921 }
922
923 void WKPreferencesSetStorageBlockingPolicy(WKPreferencesRef preferencesRef, WKStorageBlockingPolicy policy)
924 {
925     toImpl(preferencesRef)->setStorageBlockingPolicy(toStorageBlockingPolicy(policy));
926 }
927
928 WKStorageBlockingPolicy WKPreferencesGetStorageBlockingPolicy(WKPreferencesRef preferencesRef)
929 {
930     return toAPI(static_cast<WebCore::SecurityOrigin::StorageBlockingPolicy>(toImpl(preferencesRef)->storageBlockingPolicy()));
931 }
932
933 void WKPreferencesResetTestRunnerOverrides(WKPreferencesRef preferencesRef)
934 {
935     // Currently we reset the overrides on the web process when preferencesDidChange() is called. Since WTR preferences
936     // are usually always the same (in the UI process), they are not sent to web process, not triggering the reset.
937     toImpl(preferencesRef)->forceUpdate();
938 }
939
940 void WKPreferencesSetDiagnosticLoggingEnabled(WKPreferencesRef preferencesRef, bool enabled)
941 {
942     toImpl(preferencesRef)->setDiagnosticLoggingEnabled(enabled);
943 }
944
945 bool WKPreferencesGetDiagnosticLoggingEnabled(WKPreferencesRef preferencesRef)
946 {
947     return toImpl(preferencesRef)->diagnosticLoggingEnabled();
948 }
949
950 void WKPreferencesSetAsynchronousPluginInitializationEnabled(WKPreferencesRef preferencesRef, bool enabled)
951 {
952     toImpl(preferencesRef)->setAsynchronousPluginInitializationEnabled(enabled);
953 }
954
955 bool WKPreferencesGetAsynchronousPluginInitializationEnabled(WKPreferencesRef preferencesRef)
956 {
957     return toImpl(preferencesRef)->asynchronousPluginInitializationEnabled();
958 }
959
960 void WKPreferencesSetAsynchronousPluginInitializationEnabledForAllPlugins(WKPreferencesRef preferencesRef, bool enabled)
961 {
962     toImpl(preferencesRef)->setAsynchronousPluginInitializationEnabledForAllPlugins(enabled);
963 }
964
965 bool WKPreferencesGetAsynchronousPluginInitializationEnabledForAllPlugins(WKPreferencesRef preferencesRef)
966 {
967     return toImpl(preferencesRef)->asynchronousPluginInitializationEnabledForAllPlugins();
968 }
969
970 void WKPreferencesSetArtificialPluginInitializationDelayEnabled(WKPreferencesRef preferencesRef, bool enabled)
971 {
972     toImpl(preferencesRef)->setArtificialPluginInitializationDelayEnabled(enabled);
973 }
974
975 bool WKPreferencesGetArtificialPluginInitializationDelayEnabled(WKPreferencesRef preferencesRef)
976 {
977     return toImpl(preferencesRef)->artificialPluginInitializationDelayEnabled();
978 }
979
980 void WKPreferencesSetTabToLinksEnabled(WKPreferencesRef preferencesRef, bool enabled)
981 {
982     toImpl(preferencesRef)->setTabToLinksEnabled(enabled);
983 }
984
985 bool WKPreferencesGetTabToLinksEnabled(WKPreferencesRef preferencesRef)
986 {
987     return toImpl(preferencesRef)->tabToLinksEnabled();
988 }
989
990 void WKPreferencesSetInteractiveFormValidationEnabled(WKPreferencesRef preferencesRef, bool enabled)
991 {
992     toImpl(preferencesRef)->setInteractiveFormValidationEnabled(enabled);
993 }
994
995 bool WKPreferencesGetInteractiveFormValidationEnabled(WKPreferencesRef preferencesRef)
996 {
997     return toImpl(preferencesRef)->interactiveFormValidationEnabled();
998 }
999
1000 void WKPreferencesSetScrollingPerformanceLoggingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1001 {
1002     toImpl(preferencesRef)->setScrollingPerformanceLoggingEnabled(enabled);
1003 }
1004
1005 bool WKPreferencesGetScrollingPerformanceLoggingEnabled(WKPreferencesRef preferencesRef)
1006 {
1007     return toImpl(preferencesRef)->scrollingPerformanceLoggingEnabled();
1008 }
1009
1010 void WKPreferencesSetPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1011 {
1012     toImpl(preferencesRef)->setPlugInSnapshottingEnabled(enabled);
1013 }
1014
1015 bool WKPreferencesGetPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef)
1016 {
1017     return toImpl(preferencesRef)->plugInSnapshottingEnabled();
1018 }
1019
1020 void WKPreferencesSetSnapshotAllPlugIns(WKPreferencesRef preferencesRef, bool enabled)
1021 {
1022     toImpl(preferencesRef)->setSnapshotAllPlugIns(enabled);
1023 }
1024
1025 bool WKPreferencesGetSnapshotAllPlugIns(WKPreferencesRef preferencesRef)
1026 {
1027     return toImpl(preferencesRef)->snapshotAllPlugIns();
1028 }
1029
1030 void WKPreferencesSetAutostartOriginPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1031 {
1032     toImpl(preferencesRef)->setAutostartOriginPlugInSnapshottingEnabled(enabled);
1033 }
1034
1035 bool WKPreferencesGetAutostartOriginPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef)
1036 {
1037     return toImpl(preferencesRef)->autostartOriginPlugInSnapshottingEnabled();
1038 }
1039
1040 void WKPreferencesSetPrimaryPlugInSnapshotDetectionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1041 {
1042     toImpl(preferencesRef)->setPrimaryPlugInSnapshotDetectionEnabled(enabled);
1043 }
1044
1045 bool WKPreferencesGetPrimaryPlugInSnapshotDetectionEnabled(WKPreferencesRef preferencesRef)
1046 {
1047     return toImpl(preferencesRef)->primaryPlugInSnapshotDetectionEnabled();
1048 }
1049
1050 void WKPreferencesSetPDFPluginEnabled(WKPreferencesRef preferencesRef, bool enabled)
1051 {
1052     toImpl(preferencesRef)->setPDFPluginEnabled(enabled);
1053 }
1054
1055 bool WKPreferencesGetPDFPluginEnabled(WKPreferencesRef preferencesRef)
1056 {
1057     return toImpl(preferencesRef)->pdfPluginEnabled();
1058 }
1059
1060 void WKPreferencesSetEncodingDetectorEnabled(WKPreferencesRef preferencesRef, bool enabled)
1061 {
1062     toImpl(preferencesRef)->setUsesEncodingDetector(enabled);
1063 }
1064
1065 bool WKPreferencesGetEncodingDetectorEnabled(WKPreferencesRef preferencesRef)
1066 {
1067     return toImpl(preferencesRef)->usesEncodingDetector();
1068 }
1069
1070 void WKPreferencesSetTextAutosizingEnabled(WKPreferencesRef preferencesRef, bool textAutosizingEnabled)
1071 {
1072     toImpl(preferencesRef)->setTextAutosizingEnabled(textAutosizingEnabled);
1073 }
1074
1075 bool WKPreferencesGetTextAutosizingEnabled(WKPreferencesRef preferencesRef)
1076 {
1077     return toImpl(preferencesRef)->textAutosizingEnabled();
1078 }
1079
1080 void WKPreferencesSetAggressiveTileRetentionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1081 {
1082     toImpl(preferencesRef)->setAggressiveTileRetentionEnabled(enabled);
1083 }
1084
1085 bool WKPreferencesGetAggressiveTileRetentionEnabled(WKPreferencesRef preferencesRef)
1086 {
1087     return toImpl(preferencesRef)->aggressiveTileRetentionEnabled();
1088 }
1089
1090 void WKPreferencesSetQTKitEnabled(WKPreferencesRef preferencesRef, bool enabled)
1091 {
1092     toImpl(preferencesRef)->setQTKitEnabled(enabled);
1093 }
1094
1095 bool WKPreferencesGetQTKitEnabled(WKPreferencesRef preferencesRef)
1096 {
1097     return toImpl(preferencesRef)->isQTKitEnabled();
1098 }
1099
1100 void WKPreferencesSetLogsPageMessagesToSystemConsoleEnabled(WKPreferencesRef preferencesRef, bool enabled)
1101 {
1102     toImpl(preferencesRef)->setLogsPageMessagesToSystemConsoleEnabled(enabled);
1103 }
1104
1105 bool WKPreferencesGetLogsPageMessagesToSystemConsoleEnabled(WKPreferencesRef preferencesRef)
1106 {
1107     return toImpl(preferencesRef)->logsPageMessagesToSystemConsoleEnabled();
1108 }
1109
1110 void WKPreferencesSetPageVisibilityBasedProcessSuppressionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1111 {
1112     toImpl(preferencesRef)->setPageVisibilityBasedProcessSuppressionEnabled(enabled);
1113 }
1114
1115 bool WKPreferencesGetPageVisibilityBasedProcessSuppressionEnabled(WKPreferencesRef preferencesRef)
1116 {
1117     return toImpl(preferencesRef)->pageVisibilityBasedProcessSuppressionEnabled();
1118 }
1119
1120 void WKPreferencesSetSmartInsertDeleteEnabled(WKPreferencesRef preferencesRef, bool enabled)
1121 {
1122     toImpl(preferencesRef)->setSmartInsertDeleteEnabled(enabled);
1123 }
1124
1125 bool WKPreferencesGetSmartInsertDeleteEnabled(WKPreferencesRef preferencesRef)
1126 {
1127     return toImpl(preferencesRef)->smartInsertDeleteEnabled();
1128 }
1129
1130 void WKPreferencesSetSelectTrailingWhitespaceEnabled(WKPreferencesRef preferencesRef, bool enabled)
1131 {
1132     toImpl(preferencesRef)->setSelectTrailingWhitespaceEnabled(enabled);
1133 }
1134
1135 bool WKPreferencesGetSelectTrailingWhitespaceEnabled(WKPreferencesRef preferencesRef)
1136 {
1137     return toImpl(preferencesRef)->selectTrailingWhitespaceEnabled();
1138 }
1139
1140 void WKPreferencesSetShowsURLsInToolTipsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1141 {
1142     toImpl(preferencesRef)->setShowsURLsInToolTipsEnabled(enabled);
1143 }
1144
1145 bool WKPreferencesGetShowsURLsInToolTipsEnabled(WKPreferencesRef preferencesRef)
1146 {
1147     return toImpl(preferencesRef)->showsURLsInToolTipsEnabled();
1148 }
1149
1150 void WKPreferencesSetHiddenPageDOMTimerThrottlingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1151 {
1152     toImpl(preferencesRef)->setHiddenPageDOMTimerThrottlingEnabled(enabled);
1153 }
1154
1155 bool WKPreferencesGetHiddenPageDOMTimerThrottlingEnabled(WKPreferencesRef preferencesRef)
1156 {
1157     return toImpl(preferencesRef)->hiddenPageDOMTimerThrottlingEnabled();
1158 }
1159
1160 void WKPreferencesSetHiddenPageCSSAnimationSuspensionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1161 {
1162     toImpl(preferencesRef)->setHiddenPageCSSAnimationSuspensionEnabled(enabled);
1163 }
1164
1165 bool WKPreferencesGetHiddenPageCSSAnimationSuspensionEnabled(WKPreferencesRef preferencesRef)
1166 {
1167     return toImpl(preferencesRef)->hiddenPageCSSAnimationSuspensionEnabled();
1168 }
1169
1170 void WKPreferencesSetIncrementalRenderingSuppressionTimeout(WKPreferencesRef preferencesRef, double timeout)
1171 {
1172     toImpl(preferencesRef)->setIncrementalRenderingSuppressionTimeout(timeout);
1173 }
1174
1175 double WKPreferencesGetIncrementalRenderingSuppressionTimeout(WKPreferencesRef preferencesRef)
1176 {
1177     return toAPI(toImpl(preferencesRef)->incrementalRenderingSuppressionTimeout());
1178 }
1179
1180 void WKPreferencesSetThreadedScrollingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1181 {
1182     toImpl(preferencesRef)->setThreadedScrollingEnabled(enabled);
1183 }
1184
1185 bool WKPreferencesGetThreadedScrollingEnabled(WKPreferencesRef preferencesRef)
1186 {
1187     return toImpl(preferencesRef)->threadedScrollingEnabled();
1188 }
1189
1190 void WKPreferencesSetSimpleLineLayoutEnabled(WKPreferencesRef preferencesRef, bool flag)
1191 {
1192     toImpl(preferencesRef)->setSimpleLineLayoutEnabled(flag);
1193 }
1194
1195 bool WKPreferencesGetSimpleLineLayoutEnabled(WKPreferencesRef preferencesRef)
1196 {
1197     return toImpl(preferencesRef)->simpleLineLayoutEnabled();
1198 }
1199
1200 void WKPreferencesSetSimpleLineLayoutDebugBordersEnabled(WKPreferencesRef preferencesRef, bool flag)
1201 {
1202     toImpl(preferencesRef)->setSimpleLineLayoutDebugBordersEnabled(flag);
1203 }
1204
1205 bool WKPreferencesGetSimpleLineLayoutDebugBordersEnabled(WKPreferencesRef preferencesRef)
1206 {
1207     return toImpl(preferencesRef)->simpleLineLayoutDebugBordersEnabled();
1208 }
1209
1210 void WKPreferencesSetNewBlockInsideInlineModelEnabled(WKPreferencesRef preferencesRef, bool flag)
1211 {
1212     toImpl(preferencesRef)->setNewBlockInsideInlineModelEnabled(flag);
1213 }
1214
1215 bool WKPreferencesGetNewBlockInsideInlineModelEnabled(WKPreferencesRef preferencesRef)
1216 {
1217     return toImpl(preferencesRef)->newBlockInsideInlineModelEnabled();
1218 }
1219
1220 void WKPreferencesSetSubpixelCSSOMElementMetricsEnabled(WKPreferencesRef preferencesRef, bool flag)
1221 {
1222     toImpl(preferencesRef)->setSubpixelCSSOMElementMetricsEnabled(flag);
1223 }
1224
1225 bool WKPreferencesGetSubpixelCSSOMElementMetricsEnabled(WKPreferencesRef preferencesRef)
1226 {
1227     return toImpl(preferencesRef)->subpixelCSSOMElementMetricsEnabled();
1228 }
1229
1230 void WKPreferencesSetUseGiantTiles(WKPreferencesRef preferencesRef, bool flag)
1231 {
1232     toImpl(preferencesRef)->setUseGiantTiles(flag);
1233 }
1234
1235 bool WKPreferencesGetUseGiantTiles(WKPreferencesRef preferencesRef)
1236 {
1237     return toImpl(preferencesRef)->useGiantTiles();
1238 }
1239
1240 void WKPreferencesSetMediaStreamEnabled(WKPreferencesRef preferencesRef, bool enabled)
1241 {
1242     toImpl(preferencesRef)->setMediaStreamEnabled(enabled);
1243 }
1244
1245 bool WKPreferencesGetMediaStreamEnabled(WKPreferencesRef preferencesRef)
1246 {
1247     return toImpl(preferencesRef)->mediaStreamEnabled();
1248 }
1249
1250 void WKPreferencesSetSpatialNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled)
1251 {
1252     toImpl(preferencesRef)->setSpatialNavigationEnabled(enabled);
1253 }
1254
1255 bool WKPreferencesGetSpatialNavigationEnabled(WKPreferencesRef preferencesRef)
1256 {
1257     return toImpl(preferencesRef)->spatialNavigationEnabled();
1258 }
1259
1260 void WKPreferencesSetMediaSourceEnabled(WKPreferencesRef preferencesRef, bool enabled)
1261 {
1262     toImpl(preferencesRef)->setMediaSourceEnabled(enabled);
1263 }
1264
1265 bool WKPreferencesGetMediaSourceEnabled(WKPreferencesRef preferencesRef)
1266 {
1267     return toImpl(preferencesRef)->mediaSourceEnabled();
1268 }
1269
1270 void WKPreferencesSetViewGestureDebuggingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1271 {
1272     toImpl(preferencesRef)->setViewGestureDebuggingEnabled(enabled);
1273 }
1274
1275 bool WKPreferencesGetViewGestureDebuggingEnabled(WKPreferencesRef preferencesRef)
1276 {
1277     return toImpl(preferencesRef)->viewGestureDebuggingEnabled();
1278 }
1279
1280 void WKPreferencesSetShouldConvertPositionStyleOnCopy(WKPreferencesRef preferencesRef, bool convert)
1281 {
1282     toImpl(preferencesRef)->setShouldConvertPositionStyleOnCopy(convert);
1283 }
1284
1285 bool WKPreferencesGetShouldConvertPositionStyleOnCopy(WKPreferencesRef preferencesRef)
1286 {
1287     return toImpl(preferencesRef)->shouldConvertPositionStyleOnCopy();
1288 }
1289
1290 void WKPreferencesSetTelephoneNumberParsingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1291 {
1292     toImpl(preferencesRef)->setTelephoneNumberParsingEnabled(enabled);
1293 }
1294
1295 bool WKPreferencesGetTelephoneNumberParsingEnabled(WKPreferencesRef preferencesRef)
1296 {
1297     return toImpl(preferencesRef)->telephoneNumberParsingEnabled();
1298 }
1299
1300 void WKPreferencesSetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef, bool enabled)
1301 {
1302     toImpl(preferencesRef)->setEnableInheritURIQueryComponent(enabled);
1303 }
1304
1305 bool WKPreferencesGetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef)
1306 {
1307     return toImpl(preferencesRef)->enableInheritURIQueryComponent();
1308 }
1309
1310 void WKPreferencesSetServiceControlsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1311 {
1312     toImpl(preferencesRef)->setServiceControlsEnabled(enabled);
1313 }
1314
1315 bool WKPreferencesGetServiceControlsEnabled(WKPreferencesRef preferencesRef)
1316 {
1317     return toImpl(preferencesRef)->serviceControlsEnabled();
1318 }
1319
1320 void WKPreferencesSetImageControlsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1321 {
1322     toImpl(preferencesRef)->setImageControlsEnabled(enabled);
1323 }
1324
1325 bool WKPreferencesGetImageControlsEnabled(WKPreferencesRef preferencesRef)
1326 {
1327     return toImpl(preferencesRef)->imageControlsEnabled();
1328 }
1329
1330 void WKPreferencesSetGamepadsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1331 {
1332     toImpl(preferencesRef)->setGamepadsEnabled(enabled);
1333 }
1334
1335 bool WKPreferencesGetGamepadsEnabled(WKPreferencesRef preferencesRef)
1336 {
1337     return toImpl(preferencesRef)->gamepadsEnabled();
1338 }
1339
1340 // FIXME: Remove these when possible.
1341 void WKPreferencesSetLongMousePressEnabled(WKPreferencesRef preferencesRef, bool enabled)
1342 {
1343 }
1344
1345 bool WKPreferencesGetLongMousePressEnabled(WKPreferencesRef preferencesRef)
1346 {
1347     return false;
1348 }
1349
1350 void WKPreferencesSetMinimumZoomFontSize(WKPreferencesRef preferencesRef, double size)
1351 {
1352     toImpl(preferencesRef)->setMinimumZoomFontSize(size);
1353 }
1354
1355 double WKPreferencesGetMinimumZoomFontSize(WKPreferencesRef preferencesRef)
1356 {
1357     return toImpl(preferencesRef)->minimumZoomFontSize();
1358 }
1359
1360 void WKPreferencesSetAntialiasedFontDilationEnabled(WKPreferencesRef preferencesRef, bool enabled)
1361 {
1362     toImpl(preferencesRef)->setAntialiasedFontDilationEnabled(enabled);
1363 }
1364
1365 bool WKPreferencesGetAntialiasedFontDilationEnabled(WKPreferencesRef preferencesRef)
1366 {
1367     return toImpl(preferencesRef)->antialiasedFontDilationEnabled();
1368 }
1369
1370 void WKPreferencesSetVisibleDebugOverlayRegions(WKPreferencesRef preferencesRef, WKDebugOverlayRegions visibleRegions)
1371 {
1372     toImpl(preferencesRef)->setVisibleDebugOverlayRegions(visibleRegions);
1373 }
1374
1375 WKDebugOverlayRegions WKPreferencesGetVisibleDebugOverlayRegions(WKPreferencesRef preferencesRef)
1376 {
1377     return toImpl(preferencesRef)->visibleDebugOverlayRegions();
1378 }
1379
1380 void WKPreferencesSetIgnoreViewportScalingConstraints(WKPreferencesRef preferencesRef, bool enabled)
1381 {
1382     toImpl(preferencesRef)->setIgnoreViewportScalingConstraints(enabled);
1383 }
1384
1385 bool WKPreferencesGetIgnoreViewportScalingConstraints(WKPreferencesRef preferencesRef)
1386 {
1387     return toImpl(preferencesRef)->ignoreViewportScalingConstraints();
1388 }
1389
1390 void WKPreferencesSetMetaRefreshEnabled(WKPreferencesRef preferencesRef, bool enabled)
1391 {
1392     toImpl(preferencesRef)->setHTTPEquivEnabled(enabled);
1393 }
1394
1395 bool WKPreferencesGetMetaRefreshEnabled(WKPreferencesRef preferencesRef)
1396 {
1397     return toImpl(preferencesRef)->httpEquivEnabled();
1398 }
1399
1400 void WKPreferencesSetHTTPEquivEnabled(WKPreferencesRef preferencesRef, bool enabled)
1401 {
1402     toImpl(preferencesRef)->setHTTPEquivEnabled(enabled);
1403 }
1404
1405 bool WKPreferencesGetHTTPEquivEnabled(WKPreferencesRef preferencesRef)
1406 {
1407     return toImpl(preferencesRef)->httpEquivEnabled();
1408 }
1409
1410 void WKPreferencesSetAllowsAirPlayForMediaPlayback(WKPreferencesRef preferencesRef, bool enabled)
1411 {
1412     toImpl(preferencesRef)->setAllowsAirPlayForMediaPlayback(enabled);
1413 }
1414
1415 bool WKPreferencesGetAllowsAirPlayForMediaPlayback(WKPreferencesRef preferencesRef)
1416 {
1417     return toImpl(preferencesRef)->allowsAirPlayForMediaPlayback();
1418 }
1419
1420 void WKPreferencesSetResourceUsageOverlayVisible(WKPreferencesRef preferencesRef, bool javaEnabled)
1421 {
1422     toImpl(preferencesRef)->setResourceUsageOverlayVisible(javaEnabled);
1423 }
1424
1425 bool WKPreferencesGetResourceUsageOverlayVisible(WKPreferencesRef preferencesRef)
1426 {
1427     return toImpl(preferencesRef)->resourceUsageOverlayVisible();
1428 }
1429