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