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