Add preference to disable all http-equiv.
[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 WKPreferencesSetCSSRegionsEnabled(WKPreferencesRef preferencesRef, bool flag)
493 {
494     toImpl(preferencesRef)->setCSSRegionsEnabled(flag);
495 }
496
497 bool WKPreferencesGetCSSRegionsEnabled(WKPreferencesRef preferencesRef)
498 {
499     return toImpl(preferencesRef)->cssRegionsEnabled();
500 }
501
502 void WKPreferencesSetNeedsSiteSpecificQuirks(WKPreferencesRef preferencesRef, bool flag)
503 {
504     toImpl(preferencesRef)->setNeedsSiteSpecificQuirks(flag);
505 }
506
507 bool WKPreferencesUseLegacyTextAlignPositionedElementBehavior(WKPreferencesRef preferencesRef)
508 {
509     return toImpl(preferencesRef)->useLegacyTextAlignPositionedElementBehavior();
510 }
511
512 void WKPreferencesSetUseLegacyTextAlignPositionedElementBehavior(WKPreferencesRef preferencesRef, bool flag)
513 {
514     toImpl(preferencesRef)->setUseLegacyTextAlignPositionedElementBehavior(flag);
515 }
516
517 bool WKPreferencesGetNeedsSiteSpecificQuirks(WKPreferencesRef preferencesRef)
518 {
519     return toImpl(preferencesRef)->needsSiteSpecificQuirks();
520 }
521
522 void WKPreferencesSetForceFTPDirectoryListings(WKPreferencesRef preferencesRef, bool flag)
523 {
524     toImpl(preferencesRef)->setForceFTPDirectoryListings(flag);
525 }
526
527 bool WKPreferencesGetForceFTPDirectoryListings(WKPreferencesRef preferencesRef)
528 {
529     return toImpl(preferencesRef)->forceFTPDirectoryListings();
530 }
531
532 void WKPreferencesSetFTPDirectoryTemplatePath(WKPreferencesRef preferencesRef, WKStringRef pathRef)
533 {
534     toImpl(preferencesRef)->setFTPDirectoryTemplatePath(toWTFString(pathRef));
535 }
536
537 WKStringRef WKPreferencesCopyFTPDirectoryTemplatePath(WKPreferencesRef preferencesRef)
538 {
539     return toCopiedAPI(toImpl(preferencesRef)->ftpDirectoryTemplatePath());
540 }
541
542 void WKPreferencesSetTabsToLinks(WKPreferencesRef preferencesRef, bool tabsToLinks)
543 {
544     toImpl(preferencesRef)->setTabsToLinks(tabsToLinks);
545 }
546
547 bool WKPreferencesGetTabsToLinks(WKPreferencesRef preferencesRef)
548 {
549     return toImpl(preferencesRef)->tabsToLinks();
550 }
551
552 void WKPreferencesSetDNSPrefetchingEnabled(WKPreferencesRef preferencesRef, bool enabled)
553 {
554     toImpl(preferencesRef)->setDNSPrefetchingEnabled(enabled);
555 }
556
557 bool WKPreferencesGetDNSPrefetchingEnabled(WKPreferencesRef preferencesRef)
558 {
559     return toImpl(preferencesRef)->dnsPrefetchingEnabled();
560 }
561
562 void WKPreferencesSetAuthorAndUserStylesEnabled(WKPreferencesRef preferencesRef, bool enabled)
563 {
564     toImpl(preferencesRef)->setAuthorAndUserStylesEnabled(enabled);
565 }
566
567 bool WKPreferencesGetAuthorAndUserStylesEnabled(WKPreferencesRef preferencesRef)
568 {
569     return toImpl(preferencesRef)->authorAndUserStylesEnabled();
570 }
571
572 void WKPreferencesSetShouldPrintBackgrounds(WKPreferencesRef preferencesRef, bool flag)
573 {
574     toImpl(preferencesRef)->setShouldPrintBackgrounds(flag);
575 }
576
577 bool WKPreferencesGetShouldPrintBackgrounds(WKPreferencesRef preferencesRef)
578 {
579     return toImpl(preferencesRef)->shouldPrintBackgrounds();
580 }
581
582 void WKPreferencesSetDOMTimersThrottlingEnabled(WKPreferencesRef preferencesRef, bool enabled)
583 {
584     toImpl(preferencesRef)->setDOMTimersThrottlingEnabled(enabled);
585 }
586
587 bool WKPreferencesGetDOMTimersThrottlingEnabled(WKPreferencesRef preferencesRef)
588 {
589     return toImpl(preferencesRef)->domTimersThrottlingEnabled();
590 }
591
592 void WKPreferencesSetWebArchiveDebugModeEnabled(WKPreferencesRef preferencesRef, bool enabled)
593 {
594     toImpl(preferencesRef)->setWebArchiveDebugModeEnabled(enabled);
595 }
596
597 bool WKPreferencesGetWebArchiveDebugModeEnabled(WKPreferencesRef preferencesRef)
598 {
599     return toImpl(preferencesRef)->webArchiveDebugModeEnabled();
600 }
601
602 void WKPreferencesSetLocalFileContentSniffingEnabled(WKPreferencesRef preferencesRef, bool enabled)
603 {
604     toImpl(preferencesRef)->setLocalFileContentSniffingEnabled(enabled);
605 }
606
607 bool WKPreferencesGetLocalFileContentSniffingEnabled(WKPreferencesRef preferencesRef)
608 {
609     return toImpl(preferencesRef)->localFileContentSniffingEnabled();
610 }
611
612 void WKPreferencesSetPageCacheEnabled(WKPreferencesRef preferencesRef, bool enabled)
613 {
614     toImpl(preferencesRef)->setUsesPageCache(enabled);
615 }
616
617 bool WKPreferencesGetPageCacheEnabled(WKPreferencesRef preferencesRef)
618 {
619     return toImpl(preferencesRef)->usesPageCache();
620 }
621
622 void WKPreferencesSetPageCacheSupportsPlugins(WKPreferencesRef preferencesRef, bool pageCacheSupportsPlugins)
623 {
624     toImpl(preferencesRef)->setPageCacheSupportsPlugins(pageCacheSupportsPlugins);
625 }
626
627 bool WKPreferencesGetPageCacheSupportsPlugins(WKPreferencesRef preferencesRef)
628 {
629     return toImpl(preferencesRef)->pageCacheSupportsPlugins();
630 }
631
632 void WKPreferencesSetPaginateDuringLayoutEnabled(WKPreferencesRef preferencesRef, bool enabled)
633 {
634     toImpl(preferencesRef)->setPaginateDuringLayoutEnabled(enabled);
635 }
636
637 bool WKPreferencesGetPaginateDuringLayoutEnabled(WKPreferencesRef preferencesRef)
638 {
639     return toImpl(preferencesRef)->paginateDuringLayoutEnabled();
640 }
641
642 void WKPreferencesSetDOMPasteAllowed(WKPreferencesRef preferencesRef, bool enabled)
643 {
644     toImpl(preferencesRef)->setDOMPasteAllowed(enabled);
645 }
646
647 bool WKPreferencesGetDOMPasteAllowed(WKPreferencesRef preferencesRef)
648 {
649     return toImpl(preferencesRef)->domPasteAllowed();
650 }
651
652 void WKPreferencesSetJavaScriptCanAccessClipboard(WKPreferencesRef preferencesRef, bool enabled)
653 {
654     toImpl(preferencesRef)->setJavaScriptCanAccessClipboard(enabled);
655 }
656
657 bool WKPreferencesGetJavaScriptCanAccessClipboard(WKPreferencesRef preferencesRef)
658 {
659     return toImpl(preferencesRef)->javaScriptCanAccessClipboard();
660 }
661
662 void WKPreferencesSetFullScreenEnabled(WKPreferencesRef preferencesRef, bool enabled)
663 {
664     toImpl(preferencesRef)->setFullScreenEnabled(enabled);
665 }
666
667 bool WKPreferencesGetFullScreenEnabled(WKPreferencesRef preferencesRef)
668 {
669     return toImpl(preferencesRef)->fullScreenEnabled();
670 }
671
672 void WKPreferencesSetAsynchronousSpellCheckingEnabled(WKPreferencesRef preferencesRef, bool enabled)
673 {
674     toImpl(preferencesRef)->setAsynchronousSpellCheckingEnabled(enabled);
675 }
676
677 bool WKPreferencesGetAsynchronousSpellCheckingEnabled(WKPreferencesRef preferencesRef)
678 {
679     return toImpl(preferencesRef)->asynchronousSpellCheckingEnabled();
680 }
681
682 void WKPreferencesSetAVFoundationEnabled(WKPreferencesRef preferencesRef, bool enabled)
683 {
684     toImpl(preferencesRef)->setAVFoundationEnabled(enabled);
685 }
686
687 bool WKPreferencesGetAVFoundationEnabled(WKPreferencesRef preferencesRef)
688 {
689     return toImpl(preferencesRef)->isAVFoundationEnabled();
690 }
691
692 void WKPreferencesSetWebSecurityEnabled(WKPreferencesRef preferencesRef, bool enabled)
693 {
694     toImpl(preferencesRef)->setWebSecurityEnabled(enabled);
695 }
696
697 bool WKPreferencesGetWebSecurityEnabled(WKPreferencesRef preferencesRef)
698 {
699     return toImpl(preferencesRef)->webSecurityEnabled();
700 }
701
702 void WKPreferencesSetUniversalAccessFromFileURLsAllowed(WKPreferencesRef preferencesRef, bool allowed)
703 {
704     toImpl(preferencesRef)->setAllowUniversalAccessFromFileURLs(allowed);
705 }
706
707 bool WKPreferencesGetUniversalAccessFromFileURLsAllowed(WKPreferencesRef preferencesRef)
708 {
709     return toImpl(preferencesRef)->allowUniversalAccessFromFileURLs();
710 }
711
712 void WKPreferencesSetFileAccessFromFileURLsAllowed(WKPreferencesRef preferencesRef, bool allowed)
713 {
714     toImpl(preferencesRef)->setAllowFileAccessFromFileURLs(allowed);
715 }
716
717 bool WKPreferencesGetFileAccessFromFileURLsAllowed(WKPreferencesRef preferencesRef)
718 {
719     return toImpl(preferencesRef)->allowFileAccessFromFileURLs();
720 }
721
722 void WKPreferencesSetHixie76WebSocketProtocolEnabled(WKPreferencesRef, bool /*enabled*/)
723 {
724 }
725
726 bool WKPreferencesGetHixie76WebSocketProtocolEnabled(WKPreferencesRef)
727 {
728     return false;
729 }
730
731 void WKPreferencesSetMediaPlaybackRequiresUserGesture(WKPreferencesRef preferencesRef, bool flag)
732 {
733     toImpl(preferencesRef)->setRequiresUserGestureForMediaPlayback(flag);
734 }
735
736 bool WKPreferencesGetMediaPlaybackRequiresUserGesture(WKPreferencesRef preferencesRef)
737 {
738     return toImpl(preferencesRef)->requiresUserGestureForMediaPlayback();
739 }
740
741 void WKPreferencesSetMediaPlaybackAllowsInline(WKPreferencesRef preferencesRef, bool flag)
742 {
743     toImpl(preferencesRef)->setAllowsInlineMediaPlayback(flag);
744 }
745
746 bool WKPreferencesGetMediaPlaybackAllowsInline(WKPreferencesRef preferencesRef)
747 {
748     return toImpl(preferencesRef)->allowsInlineMediaPlayback();
749 }
750
751 void WKPreferencesSetMediaControlsScaleWithPageZoom(WKPreferencesRef preferencesRef, bool flag)
752 {
753     toImpl(preferencesRef)->setMediaControlsScaleWithPageZoom(flag);
754 }
755
756 bool WKPreferencesGetMediaControlsScaleWithPageZoom(WKPreferencesRef preferencesRef)
757 {
758     return toImpl(preferencesRef)->mediaControlsScaleWithPageZoom();
759 }
760
761 void WKPreferencesSetShowsToolTipOverTruncatedText(WKPreferencesRef preferencesRef, bool flag)
762 {
763     toImpl(preferencesRef)->setShowsToolTipOverTruncatedText(flag);
764 }
765
766 bool WKPreferencesGetShowsToolTipOverTruncatedText(WKPreferencesRef preferencesRef)
767 {
768     return toImpl(preferencesRef)->showsToolTipOverTruncatedText();
769 }
770
771 void WKPreferencesSetMockScrollbarsEnabled(WKPreferencesRef preferencesRef, bool flag)
772 {
773     toImpl(preferencesRef)->setMockScrollbarsEnabled(flag);
774 }
775
776 bool WKPreferencesGetMockScrollbarsEnabled(WKPreferencesRef preferencesRef)
777 {
778     return toImpl(preferencesRef)->mockScrollbarsEnabled();
779 }
780
781 void WKPreferencesSetWebAudioEnabled(WKPreferencesRef preferencesRef, bool enabled)
782 {
783     toImpl(preferencesRef)->setWebAudioEnabled(enabled);
784 }
785
786 bool WKPreferencesGetWebAudioEnabled(WKPreferencesRef preferencesRef)
787 {
788     return toImpl(preferencesRef)->webAudioEnabled();
789 }
790
791 void WKPreferencesSetApplicationChromeModeEnabled(WKPreferencesRef, bool)
792 {
793     // FIXME: Remove once WebKit nightlies don't need to support Safari 8.
794 }
795
796 bool WKPreferencesGetApplicationChromeModeEnabled(WKPreferencesRef)
797 {
798     // FIXME: Remove once WebKit nightlies don't need to support Safari 8.
799     return false;
800 }
801
802 void WKPreferencesSetInspectorUsesWebKitUserInterface(WKPreferencesRef, bool)
803 {
804     // FIXME: Remove once WebKit nightlies don't need to support Safari 6 thru 7.
805 }
806
807 bool WKPreferencesGetInspectorUsesWebKitUserInterface(WKPreferencesRef)
808 {
809     // FIXME: Remove once WebKit nightlies don't need to support Safari 6 thru 7.
810     return false;
811 }
812
813 void WKPreferencesSetSuppressesIncrementalRendering(WKPreferencesRef preferencesRef, bool enabled)
814 {
815     toImpl(preferencesRef)->setSuppressesIncrementalRendering(enabled);
816 }
817
818 bool WKPreferencesGetSuppressesIncrementalRendering(WKPreferencesRef preferencesRef)
819 {
820     return toImpl(preferencesRef)->suppressesIncrementalRendering();
821 }
822
823 void WKPreferencesSetBackspaceKeyNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled)
824 {
825     toImpl(preferencesRef)->setBackspaceKeyNavigationEnabled(enabled);
826 }
827
828 bool WKPreferencesGetBackspaceKeyNavigationEnabled(WKPreferencesRef preferencesRef)
829 {
830     return toImpl(preferencesRef)->backspaceKeyNavigationEnabled();
831 }
832
833 void WKPreferencesSetCaretBrowsingEnabled(WKPreferencesRef preferencesRef, bool enabled)
834 {
835     toImpl(preferencesRef)->setCaretBrowsingEnabled(enabled);
836 }
837
838 bool WKPreferencesGetCaretBrowsingEnabled(WKPreferencesRef preferencesRef)
839 {
840     return toImpl(preferencesRef)->caretBrowsingEnabled();
841 }
842
843 void WKPreferencesSetShouldDisplaySubtitles(WKPreferencesRef preferencesRef, bool enabled)
844 {
845     toImpl(preferencesRef)->setShouldDisplaySubtitles(enabled);
846 }
847
848 bool WKPreferencesGetShouldDisplaySubtitles(WKPreferencesRef preferencesRef)
849 {
850     return toImpl(preferencesRef)->shouldDisplaySubtitles();
851 }
852
853 void WKPreferencesSetShouldDisplayCaptions(WKPreferencesRef preferencesRef, bool enabled)
854 {
855     toImpl(preferencesRef)->setShouldDisplayCaptions(enabled);
856 }
857
858 bool WKPreferencesGetShouldDisplayCaptions(WKPreferencesRef preferencesRef)
859 {
860     return toImpl(preferencesRef)->shouldDisplayCaptions();
861 }
862
863 void WKPreferencesSetShouldDisplayTextDescriptions(WKPreferencesRef preferencesRef, bool enabled)
864 {
865     toImpl(preferencesRef)->setShouldDisplayTextDescriptions(enabled);
866 }
867
868 bool WKPreferencesGetShouldDisplayTextDescriptions(WKPreferencesRef preferencesRef)
869 {
870     return toImpl(preferencesRef)->shouldDisplayTextDescriptions();
871 }
872
873 void WKPreferencesSetNotificationsEnabled(WKPreferencesRef preferencesRef, bool enabled)
874 {
875     toImpl(preferencesRef)->setNotificationsEnabled(enabled);
876 }
877
878 bool WKPreferencesGetNotificationsEnabled(WKPreferencesRef preferencesRef)
879 {
880     return toImpl(preferencesRef)->notificationsEnabled();
881 }
882
883 void WKPreferencesSetShouldRespectImageOrientation(WKPreferencesRef preferencesRef, bool enabled)
884 {
885     toImpl(preferencesRef)->setShouldRespectImageOrientation(enabled);
886 }
887
888 bool WKPreferencesGetShouldRespectImageOrientation(WKPreferencesRef preferencesRef)
889 {
890     return toImpl(preferencesRef)->shouldRespectImageOrientation();
891 }
892
893 void WKPreferencesSetRequestAnimationFrameEnabled(WKPreferencesRef preferencesRef, bool flag)
894 {
895     toImpl(preferencesRef)->setRequestAnimationFrameEnabled(flag);
896 }
897
898 bool WKPreferencesGetRequestAnimationFrameEnabled(WKPreferencesRef preferencesRef)
899 {
900     return toImpl(preferencesRef)->requestAnimationFrameEnabled();
901 }
902
903 void WKPreferencesSetStorageBlockingPolicy(WKPreferencesRef preferencesRef, WKStorageBlockingPolicy policy)
904 {
905     toImpl(preferencesRef)->setStorageBlockingPolicy(toStorageBlockingPolicy(policy));
906 }
907
908 WKStorageBlockingPolicy WKPreferencesGetStorageBlockingPolicy(WKPreferencesRef preferencesRef)
909 {
910     return toAPI(static_cast<WebCore::SecurityOrigin::StorageBlockingPolicy>(toImpl(preferencesRef)->storageBlockingPolicy()));
911 }
912
913 void WKPreferencesResetTestRunnerOverrides(WKPreferencesRef preferencesRef)
914 {
915     // Currently we reset the overrides on the web process when preferencesDidChange() is called. Since WTR preferences
916     // are usually always the same (in the UI process), they are not sent to web process, not triggering the reset.
917     toImpl(preferencesRef)->forceUpdate();
918 }
919
920 void WKPreferencesSetDiagnosticLoggingEnabled(WKPreferencesRef preferencesRef, bool enabled)
921 {
922     toImpl(preferencesRef)->setDiagnosticLoggingEnabled(enabled);
923 }
924
925 bool WKPreferencesGetDiagnosticLoggingEnabled(WKPreferencesRef preferencesRef)
926 {
927     return toImpl(preferencesRef)->diagnosticLoggingEnabled();
928 }
929
930 void WKPreferencesSetAsynchronousPluginInitializationEnabled(WKPreferencesRef preferencesRef, bool enabled)
931 {
932     toImpl(preferencesRef)->setAsynchronousPluginInitializationEnabled(enabled);
933 }
934
935 bool WKPreferencesGetAsynchronousPluginInitializationEnabled(WKPreferencesRef preferencesRef)
936 {
937     return toImpl(preferencesRef)->asynchronousPluginInitializationEnabled();
938 }
939
940 void WKPreferencesSetAsynchronousPluginInitializationEnabledForAllPlugins(WKPreferencesRef preferencesRef, bool enabled)
941 {
942     toImpl(preferencesRef)->setAsynchronousPluginInitializationEnabledForAllPlugins(enabled);
943 }
944
945 bool WKPreferencesGetAsynchronousPluginInitializationEnabledForAllPlugins(WKPreferencesRef preferencesRef)
946 {
947     return toImpl(preferencesRef)->asynchronousPluginInitializationEnabledForAllPlugins();
948 }
949
950 void WKPreferencesSetArtificialPluginInitializationDelayEnabled(WKPreferencesRef preferencesRef, bool enabled)
951 {
952     toImpl(preferencesRef)->setArtificialPluginInitializationDelayEnabled(enabled);
953 }
954
955 bool WKPreferencesGetArtificialPluginInitializationDelayEnabled(WKPreferencesRef preferencesRef)
956 {
957     return toImpl(preferencesRef)->artificialPluginInitializationDelayEnabled();
958 }
959
960 void WKPreferencesSetTabToLinksEnabled(WKPreferencesRef preferencesRef, bool enabled)
961 {
962     toImpl(preferencesRef)->setTabToLinksEnabled(enabled);
963 }
964
965 bool WKPreferencesGetTabToLinksEnabled(WKPreferencesRef preferencesRef)
966 {
967     return toImpl(preferencesRef)->tabToLinksEnabled();
968 }
969
970 void WKPreferencesSetInteractiveFormValidationEnabled(WKPreferencesRef preferencesRef, bool enabled)
971 {
972     toImpl(preferencesRef)->setInteractiveFormValidationEnabled(enabled);
973 }
974
975 bool WKPreferencesGetInteractiveFormValidationEnabled(WKPreferencesRef preferencesRef)
976 {
977     return toImpl(preferencesRef)->interactiveFormValidationEnabled();
978 }
979
980 void WKPreferencesSetScrollingPerformanceLoggingEnabled(WKPreferencesRef preferencesRef, bool enabled)
981 {
982     toImpl(preferencesRef)->setScrollingPerformanceLoggingEnabled(enabled);
983 }
984
985 bool WKPreferencesGetScrollingPerformanceLoggingEnabled(WKPreferencesRef preferencesRef)
986 {
987     return toImpl(preferencesRef)->scrollingPerformanceLoggingEnabled();
988 }
989
990 void WKPreferencesSetPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef, bool enabled)
991 {
992     toImpl(preferencesRef)->setPlugInSnapshottingEnabled(enabled);
993 }
994
995 bool WKPreferencesGetPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef)
996 {
997     return toImpl(preferencesRef)->plugInSnapshottingEnabled();
998 }
999
1000 void WKPreferencesSetSnapshotAllPlugIns(WKPreferencesRef preferencesRef, bool enabled)
1001 {
1002     toImpl(preferencesRef)->setSnapshotAllPlugIns(enabled);
1003 }
1004
1005 bool WKPreferencesGetSnapshotAllPlugIns(WKPreferencesRef preferencesRef)
1006 {
1007     return toImpl(preferencesRef)->snapshotAllPlugIns();
1008 }
1009
1010 void WKPreferencesSetAutostartOriginPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1011 {
1012     toImpl(preferencesRef)->setAutostartOriginPlugInSnapshottingEnabled(enabled);
1013 }
1014
1015 bool WKPreferencesGetAutostartOriginPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef)
1016 {
1017     return toImpl(preferencesRef)->autostartOriginPlugInSnapshottingEnabled();
1018 }
1019
1020 void WKPreferencesSetPrimaryPlugInSnapshotDetectionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1021 {
1022     toImpl(preferencesRef)->setPrimaryPlugInSnapshotDetectionEnabled(enabled);
1023 }
1024
1025 bool WKPreferencesGetPrimaryPlugInSnapshotDetectionEnabled(WKPreferencesRef preferencesRef)
1026 {
1027     return toImpl(preferencesRef)->primaryPlugInSnapshotDetectionEnabled();
1028 }
1029
1030 void WKPreferencesSetPDFPluginEnabled(WKPreferencesRef preferencesRef, bool enabled)
1031 {
1032     toImpl(preferencesRef)->setPDFPluginEnabled(enabled);
1033 }
1034
1035 bool WKPreferencesGetPDFPluginEnabled(WKPreferencesRef preferencesRef)
1036 {
1037     return toImpl(preferencesRef)->pdfPluginEnabled();
1038 }
1039
1040 void WKPreferencesSetEncodingDetectorEnabled(WKPreferencesRef preferencesRef, bool enabled)
1041 {
1042     toImpl(preferencesRef)->setUsesEncodingDetector(enabled);
1043 }
1044
1045 bool WKPreferencesGetEncodingDetectorEnabled(WKPreferencesRef preferencesRef)
1046 {
1047     return toImpl(preferencesRef)->usesEncodingDetector();
1048 }
1049
1050 void WKPreferencesSetTextAutosizingEnabled(WKPreferencesRef preferencesRef, bool textAutosizingEnabled)
1051 {
1052     toImpl(preferencesRef)->setTextAutosizingEnabled(textAutosizingEnabled);
1053 }
1054
1055 bool WKPreferencesGetTextAutosizingEnabled(WKPreferencesRef preferencesRef)
1056 {
1057     return toImpl(preferencesRef)->textAutosizingEnabled();
1058 }
1059
1060 void WKPreferencesSetAggressiveTileRetentionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1061 {
1062     toImpl(preferencesRef)->setAggressiveTileRetentionEnabled(enabled);
1063 }
1064
1065 bool WKPreferencesGetAggressiveTileRetentionEnabled(WKPreferencesRef preferencesRef)
1066 {
1067     return toImpl(preferencesRef)->aggressiveTileRetentionEnabled();
1068 }
1069
1070 void WKPreferencesSetQTKitEnabled(WKPreferencesRef preferencesRef, bool enabled)
1071 {
1072     toImpl(preferencesRef)->setQTKitEnabled(enabled);
1073 }
1074
1075 bool WKPreferencesGetQTKitEnabled(WKPreferencesRef preferencesRef)
1076 {
1077     return toImpl(preferencesRef)->isQTKitEnabled();
1078 }
1079
1080 void WKPreferencesSetLogsPageMessagesToSystemConsoleEnabled(WKPreferencesRef preferencesRef, bool enabled)
1081 {
1082     toImpl(preferencesRef)->setLogsPageMessagesToSystemConsoleEnabled(enabled);
1083 }
1084
1085 bool WKPreferencesGetLogsPageMessagesToSystemConsoleEnabled(WKPreferencesRef preferencesRef)
1086 {
1087     return toImpl(preferencesRef)->logsPageMessagesToSystemConsoleEnabled();
1088 }
1089
1090 void WKPreferencesSetPageVisibilityBasedProcessSuppressionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1091 {
1092     toImpl(preferencesRef)->setPageVisibilityBasedProcessSuppressionEnabled(enabled);
1093 }
1094
1095 bool WKPreferencesGetPageVisibilityBasedProcessSuppressionEnabled(WKPreferencesRef preferencesRef)
1096 {
1097     return toImpl(preferencesRef)->pageVisibilityBasedProcessSuppressionEnabled();
1098 }
1099
1100 void WKPreferencesSetSmartInsertDeleteEnabled(WKPreferencesRef preferencesRef, bool enabled)
1101 {
1102     toImpl(preferencesRef)->setSmartInsertDeleteEnabled(enabled);
1103 }
1104
1105 bool WKPreferencesGetSmartInsertDeleteEnabled(WKPreferencesRef preferencesRef)
1106 {
1107     return toImpl(preferencesRef)->smartInsertDeleteEnabled();
1108 }
1109
1110 void WKPreferencesSetSelectTrailingWhitespaceEnabled(WKPreferencesRef preferencesRef, bool enabled)
1111 {
1112     toImpl(preferencesRef)->setSelectTrailingWhitespaceEnabled(enabled);
1113 }
1114
1115 bool WKPreferencesGetSelectTrailingWhitespaceEnabled(WKPreferencesRef preferencesRef)
1116 {
1117     return toImpl(preferencesRef)->selectTrailingWhitespaceEnabled();
1118 }
1119
1120 void WKPreferencesSetShowsURLsInToolTipsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1121 {
1122     toImpl(preferencesRef)->setShowsURLsInToolTipsEnabled(enabled);
1123 }
1124
1125 bool WKPreferencesGetShowsURLsInToolTipsEnabled(WKPreferencesRef preferencesRef)
1126 {
1127     return toImpl(preferencesRef)->showsURLsInToolTipsEnabled();
1128 }
1129
1130 void WKPreferencesSetHiddenPageDOMTimerThrottlingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1131 {
1132     toImpl(preferencesRef)->setHiddenPageDOMTimerThrottlingEnabled(enabled);
1133 }
1134
1135 bool WKPreferencesGetHiddenPageDOMTimerThrottlingEnabled(WKPreferencesRef preferencesRef)
1136 {
1137     return toImpl(preferencesRef)->hiddenPageDOMTimerThrottlingEnabled();
1138 }
1139
1140 void WKPreferencesSetHiddenPageCSSAnimationSuspensionEnabled(WKPreferencesRef preferencesRef, bool enabled)
1141 {
1142     toImpl(preferencesRef)->setHiddenPageCSSAnimationSuspensionEnabled(enabled);
1143 }
1144
1145 bool WKPreferencesGetHiddenPageCSSAnimationSuspensionEnabled(WKPreferencesRef preferencesRef)
1146 {
1147     return toImpl(preferencesRef)->hiddenPageCSSAnimationSuspensionEnabled();
1148 }
1149
1150 void WKPreferencesSetIncrementalRenderingSuppressionTimeout(WKPreferencesRef preferencesRef, double timeout)
1151 {
1152     toImpl(preferencesRef)->setIncrementalRenderingSuppressionTimeout(timeout);
1153 }
1154
1155 double WKPreferencesGetIncrementalRenderingSuppressionTimeout(WKPreferencesRef preferencesRef)
1156 {
1157     return toAPI(toImpl(preferencesRef)->incrementalRenderingSuppressionTimeout());
1158 }
1159
1160 void WKPreferencesSetThreadedScrollingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1161 {
1162     toImpl(preferencesRef)->setThreadedScrollingEnabled(enabled);
1163 }
1164
1165 bool WKPreferencesGetThreadedScrollingEnabled(WKPreferencesRef preferencesRef)
1166 {
1167     return toImpl(preferencesRef)->threadedScrollingEnabled();
1168 }
1169
1170 void WKPreferencesSetSimpleLineLayoutEnabled(WKPreferencesRef preferencesRef, bool flag)
1171 {
1172     toImpl(preferencesRef)->setSimpleLineLayoutEnabled(flag);
1173 }
1174
1175 bool WKPreferencesGetSimpleLineLayoutEnabled(WKPreferencesRef preferencesRef)
1176 {
1177     return toImpl(preferencesRef)->simpleLineLayoutEnabled();
1178 }
1179
1180 void WKPreferencesSetSimpleLineLayoutDebugBordersEnabled(WKPreferencesRef preferencesRef, bool flag)
1181 {
1182     toImpl(preferencesRef)->setSimpleLineLayoutDebugBordersEnabled(flag);
1183 }
1184
1185 bool WKPreferencesGetSimpleLineLayoutDebugBordersEnabled(WKPreferencesRef preferencesRef)
1186 {
1187     return toImpl(preferencesRef)->simpleLineLayoutDebugBordersEnabled();
1188 }
1189
1190 void WKPreferencesSetNewBlockInsideInlineModelEnabled(WKPreferencesRef preferencesRef, bool flag)
1191 {
1192     toImpl(preferencesRef)->setNewBlockInsideInlineModelEnabled(flag);
1193 }
1194
1195 bool WKPreferencesGetNewBlockInsideInlineModelEnabled(WKPreferencesRef preferencesRef)
1196 {
1197     return toImpl(preferencesRef)->newBlockInsideInlineModelEnabled();
1198 }
1199
1200 void WKPreferencesSetSubpixelCSSOMElementMetricsEnabled(WKPreferencesRef preferencesRef, bool flag)
1201 {
1202     toImpl(preferencesRef)->setSubpixelCSSOMElementMetricsEnabled(flag);
1203 }
1204
1205 bool WKPreferencesGetSubpixelCSSOMElementMetricsEnabled(WKPreferencesRef preferencesRef)
1206 {
1207     return toImpl(preferencesRef)->subpixelCSSOMElementMetricsEnabled();
1208 }
1209
1210 void WKPreferencesSetMediaStreamEnabled(WKPreferencesRef preferencesRef, bool enabled)
1211 {
1212     toImpl(preferencesRef)->setMediaStreamEnabled(enabled);
1213 }
1214
1215 bool WKPreferencesGetMediaStreamEnabled(WKPreferencesRef preferencesRef)
1216 {
1217     return toImpl(preferencesRef)->mediaStreamEnabled();
1218 }
1219
1220 void WKPreferencesSetSpatialNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled)
1221 {
1222     toImpl(preferencesRef)->setSpatialNavigationEnabled(enabled);
1223 }
1224
1225 bool WKPreferencesGetSpatialNavigationEnabled(WKPreferencesRef preferencesRef)
1226 {
1227     return toImpl(preferencesRef)->spatialNavigationEnabled();
1228 }
1229
1230 void WKPreferencesSetMediaSourceEnabled(WKPreferencesRef preferencesRef, bool enabled)
1231 {
1232     toImpl(preferencesRef)->setMediaSourceEnabled(enabled);
1233 }
1234
1235 bool WKPreferencesGetMediaSourceEnabled(WKPreferencesRef preferencesRef)
1236 {
1237     return toImpl(preferencesRef)->mediaSourceEnabled();
1238 }
1239
1240 void WKPreferencesSetViewGestureDebuggingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1241 {
1242     toImpl(preferencesRef)->setViewGestureDebuggingEnabled(enabled);
1243 }
1244
1245 bool WKPreferencesGetViewGestureDebuggingEnabled(WKPreferencesRef preferencesRef)
1246 {
1247     return toImpl(preferencesRef)->viewGestureDebuggingEnabled();
1248 }
1249
1250 void WKPreferencesSetShouldConvertPositionStyleOnCopy(WKPreferencesRef preferencesRef, bool convert)
1251 {
1252     toImpl(preferencesRef)->setShouldConvertPositionStyleOnCopy(convert);
1253 }
1254
1255 bool WKPreferencesGetShouldConvertPositionStyleOnCopy(WKPreferencesRef preferencesRef)
1256 {
1257     return toImpl(preferencesRef)->shouldConvertPositionStyleOnCopy();
1258 }
1259
1260 void WKPreferencesSetTelephoneNumberParsingEnabled(WKPreferencesRef preferencesRef, bool enabled)
1261 {
1262     toImpl(preferencesRef)->setTelephoneNumberParsingEnabled(enabled);
1263 }
1264
1265 bool WKPreferencesGetTelephoneNumberParsingEnabled(WKPreferencesRef preferencesRef)
1266 {
1267     return toImpl(preferencesRef)->telephoneNumberParsingEnabled();
1268 }
1269
1270 void WKPreferencesSetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef, bool enabled)
1271 {
1272     toImpl(preferencesRef)->setEnableInheritURIQueryComponent(enabled);
1273 }
1274
1275 bool WKPreferencesGetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef)
1276 {
1277     return toImpl(preferencesRef)->enableInheritURIQueryComponent();
1278 }
1279
1280 void WKPreferencesSetServiceControlsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1281 {
1282     toImpl(preferencesRef)->setServiceControlsEnabled(enabled);
1283 }
1284
1285 bool WKPreferencesGetServiceControlsEnabled(WKPreferencesRef preferencesRef)
1286 {
1287     return toImpl(preferencesRef)->serviceControlsEnabled();
1288 }
1289
1290 void WKPreferencesSetImageControlsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1291 {
1292     toImpl(preferencesRef)->setImageControlsEnabled(enabled);
1293 }
1294
1295 bool WKPreferencesGetImageControlsEnabled(WKPreferencesRef preferencesRef)
1296 {
1297     return toImpl(preferencesRef)->imageControlsEnabled();
1298 }
1299
1300 void WKPreferencesSetGamepadsEnabled(WKPreferencesRef preferencesRef, bool enabled)
1301 {
1302     toImpl(preferencesRef)->setGamepadsEnabled(enabled);
1303 }
1304
1305 bool WKPreferencesGetGamepadsEnabled(WKPreferencesRef preferencesRef)
1306 {
1307     return toImpl(preferencesRef)->gamepadsEnabled();
1308 }
1309
1310 void WKPreferencesSetLongMousePressEnabled(WKPreferencesRef preferencesRef, bool enabled)
1311 {
1312     toImpl(preferencesRef)->setLongMousePressEnabled(enabled);
1313 }
1314
1315 bool WKPreferencesGetLongMousePressEnabled(WKPreferencesRef preferencesRef)
1316 {
1317     return toImpl(preferencesRef)->longMousePressEnabled();
1318 }
1319
1320 void WKPreferencesSetMinimumZoomFontSize(WKPreferencesRef preferencesRef, double size)
1321 {
1322     toImpl(preferencesRef)->setMinimumZoomFontSize(size);
1323 }
1324
1325 double WKPreferencesGetMinimumZoomFontSize(WKPreferencesRef preferencesRef)
1326 {
1327     return toImpl(preferencesRef)->minimumZoomFontSize();
1328 }
1329
1330 void WKPreferencesSetAntialiasedFontDilationEnabled(WKPreferencesRef preferencesRef, bool enabled)
1331 {
1332     toImpl(preferencesRef)->setAntialiasedFontDilationEnabled(enabled);
1333 }
1334
1335 bool WKPreferencesGetAntialiasedFontDilationEnabled(WKPreferencesRef preferencesRef)
1336 {
1337     return toImpl(preferencesRef)->antialiasedFontDilationEnabled();
1338 }
1339
1340 void WKPreferencesSetVisibleDebugOverlayRegions(WKPreferencesRef preferencesRef, WKDebugOverlayRegions visibleRegions)
1341 {
1342     toImpl(preferencesRef)->setVisibleDebugOverlayRegions(visibleRegions);
1343 }
1344
1345 WKDebugOverlayRegions WKPreferencesGetVisibleDebugOverlayRegions(WKPreferencesRef preferencesRef)
1346 {
1347     return toImpl(preferencesRef)->visibleDebugOverlayRegions();
1348 }
1349
1350 void WKPreferencesSetIgnoreViewportScalingConstraints(WKPreferencesRef preferencesRef, bool enabled)
1351 {
1352     toImpl(preferencesRef)->setIgnoreViewportScalingConstraints(enabled);
1353 }
1354
1355 bool WKPreferencesGetIgnoreViewportScalingConstraints(WKPreferencesRef preferencesRef)
1356 {
1357     return toImpl(preferencesRef)->ignoreViewportScalingConstraints();
1358 }
1359
1360 void WKPreferencesSetMetaRefreshEnabled(WKPreferencesRef preferencesRef, bool enabled)
1361 {
1362     toImpl(preferencesRef)->setHTTPEquivEnabled(enabled);
1363 }
1364
1365 bool WKPreferencesGetMetaRefreshEnabled(WKPreferencesRef preferencesRef)
1366 {
1367     return toImpl(preferencesRef)->httpEquivEnabled();
1368 }
1369
1370 void WKPreferencesSetHTTPEquivEnabled(WKPreferencesRef preferencesRef, bool enabled)
1371 {
1372     toImpl(preferencesRef)->setHTTPEquivEnabled(enabled);
1373 }
1374
1375 bool WKPreferencesGetHTTPEquivEnabled(WKPreferencesRef preferencesRef)
1376 {
1377     return toImpl(preferencesRef)->httpEquivEnabled();
1378 }
1379
1380 void WKPreferencesSetAllowsAirPlayForMediaPlayback(WKPreferencesRef preferencesRef, bool enabled)
1381 {
1382     toImpl(preferencesRef)->setAllowsAirPlayForMediaPlayback(enabled);
1383 }
1384
1385 bool WKPreferencesGetAllowsAirPlayForMediaPlayback(WKPreferencesRef preferencesRef)
1386 {
1387     return toImpl(preferencesRef)->allowsAirPlayForMediaPlayback();
1388 }