bf8854067996922309a40f7a0728329ad3b1ddf3
[WebKit-https.git] / Source / WebCore / testing / InternalSettings.idl
1 /*
2  * Copyright (C) 2012 Google Inc. All rights reserved.
3  * Copyright (C) 2015 Apple Inc. All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * 1.  Redistributions of source code must retain the above copyright
10  *     notice, this list of conditions and the following disclaimer.
11  * 2.  Redistributions in binary form must reproduce the above copyright
12  *     notice, this list of conditions and the following disclaimer in the
13  *     documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
16  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18  * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
19  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  */
26
27 enum ForcedAccessibilityValue { "system", "on", "off" };
28 enum FrameFlatteningValue { "Disabled", "EnabledForNonFullScreenIFrames", "FullyEnabled" };
29 enum FontLoadTimingOverride { "Block", "Swap", "Failure" };
30
31 [
32     NoInterfaceObject,
33     JSGenerateToJSObject,
34     ExportMacro=WEBCORE_TESTSUPPORT_EXPORT,
35 ] interface InternalSettings : InternalSettingsGenerated {
36     [MayThrowException] void setTouchEventEmulationEnabled(boolean enabled);
37
38     // Fonts, text
39     [MayThrowException] void setStandardFontFamily(DOMString family, DOMString script);
40     [MayThrowException] void setSerifFontFamily(DOMString family, DOMString script);
41     [MayThrowException] void setSansSerifFontFamily(DOMString family, DOMString script);
42     [MayThrowException] void setFixedFontFamily(DOMString family, DOMString script);
43     [MayThrowException] void setCursiveFontFamily(DOMString family, DOMString script);
44     [MayThrowException] void setFantasyFontFamily(DOMString family, DOMString script);
45     [MayThrowException] void setPictographFontFamily(DOMString family, DOMString script);
46     [MayThrowException] void setFontFallbackPrefersPictographs(boolean preferPictographs);
47     [MayThrowException] void setFontLoadTimingOverride(FontLoadTimingOverride override);
48     [MayThrowException] void setShouldIgnoreFontLoadCompletions(boolean ignore);
49
50     [MayThrowException] void setTextAutosizingEnabled(boolean enabled);
51     [MayThrowException] void setTextAutosizingWindowSizeOverride(long width, long height);
52
53     // Media
54     [MayThrowException] void setCanStartMedia(boolean enabled);
55     [Conditional=VIDEO_TRACK, MayThrowException] void setShouldDisplayTrackKind(DOMString kind, boolean enabled);
56     [Conditional=VIDEO_TRACK, MayThrowException] boolean shouldDisplayTrackKind(DOMString trackKind);
57     [MayThrowException] void setDefaultVideoPosterURL(DOMString poster);
58     [MayThrowException] void setTimeWithoutMouseMovementBeforeHidingControls(unrestricted double time);
59     [MayThrowException] void setMediaTypeOverride(DOMString mediaTypeOverride);
60     void setAllowsAirPlayForMediaPlayback(boolean available);
61     [Conditional=MEDIA_STREAM, MayThrowException] void setMediaCaptureRequiresSecureConnection(boolean enable);
62
63     [MayThrowException] void setForcePendingWebGLPolicy(boolean forced);
64
65     [MayThrowException] void setQuickTimePluginReplacementEnabled(boolean enabled);
66     [MayThrowException] void setYouTubeFlashPluginReplacementEnabled(boolean enabled);
67
68     // Editing, forms
69     [MayThrowException] void setEditingBehavior(DOMString behavior);
70     [MayThrowException] void setShouldConvertPositionStyleOnCopy(boolean convertPosition);
71     [MayThrowException] void setPreferMIMETypeForImages(boolean preferMimeTypeForImage);
72
73     // Other switches
74     [MayThrowException] void setStorageBlockingPolicy(DOMString policy);
75     [MayThrowException] void setImagesEnabled(boolean enabled);
76     [MayThrowException] void setPDFImageCachingPolicy(DOMString policy);
77     [MayThrowException] void setUseLegacyBackgroundSizeShorthandBehavior(boolean enabled);
78     [MayThrowException] void setAutoscrollForDragAndDropEnabled(boolean enabled);
79     [MayThrowException] void setBackgroundShouldExtendBeyondPage(boolean hasExtendedBackground);
80     [MayThrowException] void setScrollingTreeIncludesFrames(boolean enabled);
81     [MayThrowException] void setAllowUnclampedScrollPosition(boolean allowUnclamped);
82
83     [MayThrowException] void setMinimumTimerInterval(unrestricted double intervalInSeconds);
84     [MayThrowException] void setAllowsInlineMediaPlayback(boolean allows);
85     [MayThrowException] void setAllowsInlineMediaPlaybackAfterFullscreen(boolean allows);
86     [MayThrowException] void setInlineMediaPlaybackRequiresPlaysInlineAttribute(boolean requires);
87     [MayThrowException] void setFrameFlattening(FrameFlatteningValue frameFlattening);
88
89     // RuntimeEnabledFeatures.
90     void setIndexedDBWorkersEnabled(boolean enabled);
91     void setWebGL2Enabled(boolean enabled);
92     void setWebGPUEnabled(boolean enabled);
93     void setWebVREnabled(boolean enabled);
94     void setScreenCaptureEnabled(boolean enabled);
95     void setStorageAccessPromptsEnabled(boolean enabled);
96
97     [MayThrowException] DOMString userInterfaceDirectionPolicy();
98     [MayThrowException] void setUserInterfaceDirectionPolicy(DOMString policy);
99     [MayThrowException] DOMString systemLayoutDirection();
100     [MayThrowException] void setSystemLayoutDirection(DOMString direction);
101
102     [MayThrowException] boolean deferredCSSParserEnabled();
103     [MayThrowException] void setDeferredCSSParserEnabled(boolean enabled);
104
105     [MayThrowException] void setShouldMockBoldSystemFontForAccessibility(boolean shouldMock);
106
107     attribute ForcedAccessibilityValue forcedColorsAreInvertedAccessibilityValue;
108     attribute ForcedAccessibilityValue forcedDisplayIsMonochromeAccessibilityValue;
109     attribute ForcedAccessibilityValue forcedPrefersReducedMotionAccessibilityValue;
110
111     [MayThrowException] void setShouldManageAudioSessionCategory(boolean should);
112     [MayThrowException] void setCustomPasteboardDataEnabled(boolean enabled);
113
114     [EnabledAtRuntime=WebAnimations] boolean cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled();
115
116     [MayThrowException] void setAccessibilityEventsEnabled(boolean enabled);
117 };
118