[iOS] Video occasionally mixes with other system audio instead of interrupting
[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
29 [
30     NoInterfaceObject,
31     JSGenerateToJSObject,
32     ExportMacro=WEBCORE_TESTSUPPORT_EXPORT,
33 ] interface InternalSettings : InternalSettingsGenerated {
34     [MayThrowException] void setTouchEventEmulationEnabled(boolean enabled);
35
36     // Fonts, text
37     [MayThrowException] void setStandardFontFamily(DOMString family, DOMString script);
38     [MayThrowException] void setSerifFontFamily(DOMString family, DOMString script);
39     [MayThrowException] void setSansSerifFontFamily(DOMString family, DOMString script);
40     [MayThrowException] void setFixedFontFamily(DOMString family, DOMString script);
41     [MayThrowException] void setCursiveFontFamily(DOMString family, DOMString script);
42     [MayThrowException] void setFantasyFontFamily(DOMString family, DOMString script);
43     [MayThrowException] void setPictographFontFamily(DOMString family, DOMString script);
44     [MayThrowException] void setFontFallbackPrefersPictographs(boolean preferPictographs);
45     [MayThrowException] void setWebFontsAlwaysFallBack(boolean enable);
46
47     [MayThrowException] void setTextAutosizingEnabled(boolean enabled);
48     [MayThrowException] void setTextAutosizingWindowSizeOverride(long width, long height);
49
50     // Media
51     [MayThrowException] void setCanStartMedia(boolean enabled);
52     [Conditional=VIDEO_TRACK, MayThrowException] void setShouldDisplayTrackKind(DOMString kind, boolean enabled);
53     [Conditional=VIDEO_TRACK, MayThrowException] boolean shouldDisplayTrackKind(DOMString trackKind);
54     [MayThrowException] void setDefaultVideoPosterURL(DOMString poster);
55     [MayThrowException] void setTimeWithoutMouseMovementBeforeHidingControls(unrestricted double time);
56     [MayThrowException] void setMediaTypeOverride(DOMString mediaTypeOverride);
57     void setAllowsAirPlayForMediaPlayback(boolean available);
58     [Conditional=MEDIA_STREAM, MayThrowException] void setMediaCaptureRequiresSecureConnection(boolean enable);
59
60     [MayThrowException] void setForcePendingWebGLPolicy(boolean forced);
61
62     [MayThrowException] void setQuickTimePluginReplacementEnabled(boolean enabled);
63     [MayThrowException] void setYouTubeFlashPluginReplacementEnabled(boolean enabled);
64
65     // Editing, forms
66     [MayThrowException] void setEditingBehavior(DOMString behavior);
67     [MayThrowException] void setShouldConvertPositionStyleOnCopy(boolean convertPosition);
68     [MayThrowException] void setPreferMIMETypeForImages(boolean preferMimeTypeForImage);
69
70     // Other switches
71     [MayThrowException] void setStorageBlockingPolicy(DOMString policy);
72     [MayThrowException] void setImagesEnabled(boolean enabled);
73     [MayThrowException] void setPDFImageCachingPolicy(DOMString policy);
74     [MayThrowException] void setUseLegacyBackgroundSizeShorthandBehavior(boolean enabled);
75     [MayThrowException] void setAutoscrollForDragAndDropEnabled(boolean enabled);
76     [MayThrowException] void setBackgroundShouldExtendBeyondPage(boolean hasExtendedBackground);
77     [MayThrowException] void setScrollingTreeIncludesFrames(boolean enabled);
78     [MayThrowException] void setAllowUnclampedScrollPosition(boolean allowUnclamped);
79
80     [MayThrowException] void setMinimumTimerInterval(unrestricted double intervalInSeconds);
81     [MayThrowException] void setAllowsInlineMediaPlayback(boolean allows);
82     [MayThrowException] void setAllowsInlineMediaPlaybackAfterFullscreen(boolean allows);
83     [MayThrowException] void setInlineMediaPlaybackRequiresPlaysInlineAttribute(boolean requires);
84
85     // RuntimeEnabledFeatures.
86     void setIndexedDBWorkersEnabled(boolean enabled);
87     void setCSSGridLayoutEnabled(boolean enabled);
88     void setWebGL2Enabled(boolean enabled);
89     void setWebGPUEnabled(boolean enabled);
90
91     [MayThrowException] DOMString userInterfaceDirectionPolicy();
92     [MayThrowException] void setUserInterfaceDirectionPolicy(DOMString policy);
93     [MayThrowException] DOMString systemLayoutDirection();
94     [MayThrowException] void setSystemLayoutDirection(DOMString direction);
95
96     [MayThrowException] boolean deferredCSSParserEnabled();
97     [MayThrowException] void setDeferredCSSParserEnabled(boolean enabled);
98     
99     [MayThrowException] void setShouldMockBoldSystemFontForAccessibility(boolean shouldMock);
100
101     attribute ForcedAccessibilityValue forcedColorsAreInvertedAccessibilityValue;
102     attribute ForcedAccessibilityValue forcedDisplayIsMonochromeAccessibilityValue;
103     attribute ForcedAccessibilityValue forcedPrefersReducedMotionAccessibilityValue;
104
105     [MayThrowException] void setShouldManageAudioSessionCategory(boolean should);
106 };
107