155b70b4abf75645b152d8651d08f48a953da451
[WebKit-https.git] / Source / WebCore / testing / Internals.idl
1 /*
2  * Copyright (C) 2012 Google Inc. All rights reserved.
3  * Copyright (C) 2013-2017 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 PageOverlayType {
28     "view",
29     "document"
30 };
31
32 // These map to ResourceRequestCachePolicy.
33 enum CachePolicy {
34     "UseProtocolCachePolicy",
35     "ReloadIgnoringCacheData",
36     "ReturnCacheDataElseLoad",
37     "ReturnCacheDataDontLoad"
38 };
39
40 // FIXME: Strings in an enum should not have the name of the enum as a prefix.
41 enum ResourceLoadPriority {
42     "ResourceLoadPriorityVeryLow",
43     "ResourceLoadPriorityLow",
44     "ResourceLoadPriorityMedium",
45     "ResourceLoadPriorityHigh",
46     "ResourceLoadPriorityVeryHigh"
47 };
48
49 [Conditional=MEDIA_SESSION] enum MediaSessionInterruptingCategory {
50     "content",
51     "transient",
52     "transient-solo"
53 };
54
55 [Conditional=MEDIA_SESSION] enum MediaControlEvent {
56     "play-pause",
57     "next-track",
58     "previous-track"
59 };
60
61 // FIXME: Strings in an enum should not have the name of the enum as a prefix.
62 enum AutoFillButtonType {
63     "AutoFillButtonTypeNone",
64     "AutoFillButtonTypeContacts",
65     "AutoFillButtonTypeCredentials"
66 };
67
68 enum UserInterfaceLayoutDirection {
69     "LTR",
70     "RTL"
71 };
72
73 enum BaseWritingDirection {
74     "Natural",
75     "Ltr",
76     "Rtl"
77 };
78
79 enum EventThrottlingBehavior {
80     "responsive",
81     "unresponsive"
82 };
83
84 [
85     ExportMacro=WEBCORE_TESTSUPPORT_EXPORT,
86     NoInterfaceObject,
87 ] interface Internals {
88     DOMString address(Node node);
89     boolean nodeNeedsStyleRecalc(Node node);
90     DOMString styleChangeType(Node node);
91     DOMString description(any value);
92
93     // Animated image pausing testing.
94     boolean hasPausedImageAnimations(Element element);
95
96     [MayThrowException] DOMString elementRenderTreeAsText(Element element);
97     boolean isPreloaded(DOMString url);
98     boolean isLoadingFromMemoryCache(DOMString url);
99     DOMString xhrResponseSource(XMLHttpRequest xhr);
100     boolean isSharingStyleSheetContents(HTMLLinkElement a, HTMLLinkElement b);
101     boolean isStyleSheetLoadingSubresources(HTMLLinkElement link);
102     void clearMemoryCache();
103     void pruneMemoryCacheToSize(long size);
104     long memoryCacheSize();
105     void setOverrideCachePolicy(CachePolicy policy);
106     void setOverrideResourceLoadPriority(ResourceLoadPriority priority);
107     void setStrictRawResourceValidationPolicyDisabled(boolean disabled);
108
109     void clearPageCache();
110     unsigned long pageCacheSize();
111
112     CSSStyleDeclaration computedStyleIncludingVisitedInfo(Element element);
113
114     Node ensureUserAgentShadowRoot(Element host);
115     Node shadowRoot(Element host);
116
117     // CSS Deferred Parsing Testing.
118     long deferredStyleRulesCount(StyleSheet sheet);
119     long deferredGroupRulesCount(StyleSheet sheet);
120     long deferredKeyframesRulesCount(StyleSheet sheet);
121
122     [MayThrowException] DOMString shadowRootType(Node root);
123     DOMString shadowPseudoId(Element element);
124     void setShadowPseudoId(Element element, DOMString id);
125     Node treeScopeRootNode(Node node);
126     Node parentTreeScope(Node node);
127
128     // Spatial Navigation testing
129     [MayThrowException] unsigned long lastSpatialNavigationCandidateCount();
130
131     // CSS Animation testing.
132     unsigned long numberOfActiveAnimations();
133     [MayThrowException] void suspendAnimations();
134     [MayThrowException] void resumeAnimations();
135     [MayThrowException] boolean animationsAreSuspended();
136     [MayThrowException] boolean pauseAnimationAtTimeOnElement(DOMString animationName, unrestricted double pauseTime, Element element);
137     [MayThrowException] boolean pauseAnimationAtTimeOnPseudoElement(DOMString animationName, unrestricted double pauseTime, Element element, DOMString pseudoId);
138
139     // CSS Transition testing.
140     [MayThrowException] boolean pauseTransitionAtTimeOnElement(DOMString propertyName, unrestricted double pauseTime, Element element);
141     [MayThrowException] boolean pauseTransitionAtTimeOnPseudoElement(DOMString property, unrestricted double pauseTime, Element element, DOMString pseudoId);
142
143     DOMString visiblePlaceholder(Element element);
144     void selectColorInColorChooser(HTMLInputElement element, DOMString colorValue);
145     [MayThrowException] sequence<DOMString> formControlStateOfPreviousHistoryItem();
146     [MayThrowException] void setFormControlStateOfPreviousHistoryItem(sequence<DOMString> values);
147
148     [MayThrowException] ClientRect absoluteCaretBounds();
149
150     ClientRect boundingBox(Element element);
151
152     [MayThrowException] ClientRectList inspectorHighlightRects();
153     [MayThrowException] DOMString inspectorHighlightObject();
154
155     [MayThrowException] unsigned long markerCountForNode(Node node, DOMString markerType);
156     [MayThrowException] Range? markerRangeForNode(Node node, DOMString markerType, unsigned long index);
157     [MayThrowException] DOMString markerDescriptionForNode(Node node, DOMString markerType, unsigned long index);
158     [MayThrowException] DOMString dumpMarkerRects(DOMString markerType);
159     void addTextMatchMarker(Range range, boolean isActive);
160     [MayThrowException] void setMarkedTextMatchesAreHighlighted(boolean flag);
161
162     void invalidateFontCache();
163
164     [MayThrowException] void setScrollViewPosition(long x, long y);
165
166     [MayThrowException] ClientRect layoutViewportRect();
167     [MayThrowException] ClientRect visualViewportRect();
168
169     [MayThrowException] void setViewBaseBackgroundColor(DOMString colorValue);
170
171     [MayThrowException] void setPagination(DOMString mode, long gap, optional long pageLength = 0);
172     [MayThrowException] void setPaginationLineGridEnabled(boolean enabled);
173
174     [MayThrowException] DOMString configurationForViewport(unrestricted float devicePixelRatio, long deviceWidth, long deviceHeight, long availableWidth, long availableHeight);
175
176     [MayThrowException] boolean wasLastChangeUserEdit(Element textField);
177     boolean elementShouldAutoComplete(HTMLInputElement inputElement);
178     void setEditingValue(HTMLInputElement inputElement, DOMString value);
179     void setAutofilled(HTMLInputElement inputElement, boolean enabled);
180     void setShowAutoFillButton(HTMLInputElement inputElement, AutoFillButtonType autoFillButtonType);
181
182     [MayThrowException] Range? rangeOfString(DOMString text, Range? referenceRange, sequence<DOMString> findOptions);
183     [MayThrowException] unsigned long countMatchesForText(DOMString text, sequence<DOMString> findOptions, DOMString markMatches);
184     [MayThrowException] unsigned long countFindMatches(DOMString text, sequence<DOMString> findOptions);
185
186     [MayThrowException] DOMString autofillFieldName(Element formControlElement);
187
188     [MayThrowException] void paintControlTints();
189
190     [MayThrowException] void scrollElementToRect(Element element, long x, long y, long w, long h);
191
192     Range? rangeFromLocationAndLength(Element scope, long rangeLocation, long rangeLength);
193     unsigned long locationFromRange(Element scope, Range range);
194     unsigned long lengthFromRange(Element scope, Range range);
195     DOMString rangeAsText(Range range);
196     Range subrange(Range range, long rangeLocation, long rangeLength);
197     [MayThrowException] Range? rangeForDictionaryLookupAtLocation(long x, long y);
198     Range? rangeOfStringNearLocation(Range range, DOMString text, long targetOffset);
199
200     [MayThrowException] void setDelegatesScrolling(boolean enabled);
201
202     [MayThrowException] long lastSpellCheckRequestSequence();
203     [MayThrowException] long lastSpellCheckProcessedSequence();
204
205     sequence<DOMString> userPreferredLanguages();
206     void setUserPreferredLanguages(sequence<DOMString> languages);
207
208     sequence<DOMString> userPreferredAudioCharacteristics();
209     void setUserPreferredAudioCharacteristic(DOMString characteristic);
210
211     [MayThrowException] unsigned long wheelEventHandlerCount();
212     [MayThrowException] unsigned long touchEventHandlerCount();
213
214     [MayThrowException] NodeList? nodesFromRect(Document document, long x, long y,
215         unsigned long topPadding, unsigned long rightPadding, unsigned long bottomPadding, unsigned long leftPadding,
216         boolean ignoreClipping, boolean allowShadowContent, boolean allowChildFrameContent);
217
218     // Calling parserMetaData() with no arguments gets the metadata for the script of the current scope.
219     DOMString parserMetaData(optional any func);
220
221     void updateEditorUINowIfScheduled();
222
223     boolean hasSpellingMarker(long from, long length);
224     boolean hasGrammarMarker(long from, long length);
225     boolean hasAutocorrectedMarker(long from, long length);
226     void setContinuousSpellCheckingEnabled(boolean enabled);
227     void setAutomaticQuoteSubstitutionEnabled(boolean enabled);
228     void setAutomaticLinkDetectionEnabled(boolean enabled);
229     void setAutomaticDashSubstitutionEnabled(boolean enabled);
230     void setAutomaticTextReplacementEnabled(boolean enabled);
231     void setAutomaticSpellingCorrectionEnabled(boolean enabled);
232
233     void handleAcceptedCandidate(DOMString candidate, unsigned long location, unsigned long length);
234
235     boolean isOverwriteModeEnabled();
236     void toggleOverwriteModeEnabled();
237
238     unsigned long numberOfScrollableAreas();
239
240     [MayThrowException] boolean isPageBoxVisible(long pageNumber);
241
242     unsigned long imageFrameIndex(HTMLImageElement element);
243     void setImageFrameDecodingDuration(HTMLImageElement element, unrestricted float duration);
244     void resetImageAnimation(HTMLImageElement element);
245
246     readonly attribute InternalSettings settings;
247     readonly attribute unsigned long workerThreadCount;
248
249     readonly attribute boolean areSVGAnimationsPaused;
250
251     // Flags for layerTreeAsText.
252     const unsigned short LAYER_TREE_INCLUDES_VISIBLE_RECTS = 1;
253     const unsigned short LAYER_TREE_INCLUDES_TILE_CACHES = 2;
254     const unsigned short LAYER_TREE_INCLUDES_REPAINT_RECTS = 4;
255     const unsigned short LAYER_TREE_INCLUDES_PAINTING_PHASES = 8;
256     const unsigned short LAYER_TREE_INCLUDES_CONTENT_LAYERS = 16;
257     const unsigned short LAYER_TREE_INCLUDES_ACCELERATES_DRAWING = 32;
258     [MayThrowException] DOMString layerTreeAsText(Document document, optional unsigned short flags = 0);
259
260     [MayThrowException] DOMString scrollingStateTreeAsText();
261     [MayThrowException] DOMString mainThreadScrollingReasons(); // FIXME: rename to synchronousScrollingReasons().
262     [MayThrowException] ClientRectList? nonFastScrollableRects();
263
264     [MayThrowException] DOMString repaintRectsAsText();
265
266     // These throw if the element does not have a compositing layer.
267     [MayThrowException] void setElementUsesDisplayListDrawing(Element element, boolean usesDisplayListDrawing);
268     [MayThrowException] void setElementTracksDisplayListReplay(Element element, boolean trackReplay);
269
270     // Flags for displayListForElement.
271     const unsigned short DISPLAY_LIST_INCLUDES_PLATFORM_OPERATIONS = 1;
272     // Returns the recorded display list.
273     [MayThrowException] DOMString displayListForElement(Element element, optional unsigned short flags = 0);
274     // Returns the display list that was actually painted.
275     [MayThrowException] DOMString replayDisplayListForElement(Element element, optional unsigned short flags = 0);
276
277     [MayThrowException] void garbageCollectDocumentResources();
278
279     [MayThrowException] void insertAuthorCSS(DOMString css);
280     [MayThrowException] void insertUserCSS(DOMString css);
281
282     readonly attribute boolean isUnderMemoryPressure;
283     void beginSimulatedMemoryPressure();
284     void endSimulatedMemoryPressure();
285
286 #if defined(ENABLE_PROXIMITY_EVENTS) && ENABLE_PROXIMITY_EVENTS
287     [MayThrowException] void setDeviceProximity(DOMString eventType, unrestricted double value, unrestricted double min, unrestricted double max);
288 #endif
289
290     unsigned long numberOfLiveNodes();
291     unsigned long numberOfLiveDocuments();
292     DOMWindow? openDummyInspectorFrontend(DOMString url);
293     void closeDummyInspectorFrontend();
294     [MayThrowException] void setInspectorIsUnderTest(boolean isUnderTest);
295
296     DOMString counterValue(Element element);
297     long pageNumber(Element element, optional unrestricted float pageWidth = 800, optional unrestricted float pageHeight = 600);
298     sequence<DOMString> shortcutIconURLs();
299     long numberOfPages(optional unrestricted double pageWidthInPixels = 800, optional unrestricted double pageHeightInPixels = 600);
300     [MayThrowException] DOMString pageProperty(DOMString propertyName, long pageNumber);
301     [MayThrowException] DOMString pageSizeAndMarginsInPixels(long pageIndex, long width, long height, long marginTop, long marginRight, long marginBottom, long marginLeft);
302
303     [MayThrowException] void setPageScaleFactor(unrestricted float scaleFactor, long x, long y);
304     [MayThrowException] float pageScaleFactor();
305
306     [MayThrowException] void setPageZoomFactor(unrestricted float zoomFactor);
307     [MayThrowException] void setTextZoomFactor(unrestricted float zoomFactor);
308
309     [MayThrowException] void setUseFixedLayout(boolean useFixedLayout);
310     [MayThrowException] void setFixedLayoutSize(long width, long height);
311
312     [MayThrowException] void setViewExposedRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
313
314     void setHeaderHeight(unrestricted float height);
315     void setFooterHeight(unrestricted float height);
316
317     void setTopContentInset(unrestricted float contentInset);
318
319 #if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API
320     void webkitWillEnterFullScreenForElement(Element element);
321     void webkitDidEnterFullScreenForElement(Element element);
322     void webkitWillExitFullScreenForElement(Element element);
323     void webkitDidExitFullScreenForElement(Element element);
324 #endif
325
326     void setApplicationCacheOriginQuota(unsigned long long quota);
327
328     void registerURLSchemeAsBypassingContentSecurityPolicy(DOMString scheme);
329     void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(DOMString scheme);
330
331     void registerDefaultPortForProtocol(unsigned short port, DOMString scheme);
332
333     MallocStatistics mallocStatistics();
334     TypeConversions typeConversions();
335     MemoryInfo memoryInfo();
336
337     sequence<DOMString> getReferencedFilePaths();
338
339     // These functions both reset the tracked repaint rects. They are intended to be used in the following order:
340     //  startTrackingRepaints, repaintRectsAsText, stopTrackingRepaints.
341     [MayThrowException] void startTrackingRepaints();
342     [MayThrowException] void stopTrackingRepaints();
343
344     [MayThrowException] void startTrackingLayerFlushes();
345     [MayThrowException] unsigned long layerFlushCount();
346
347     // Query if a timer is currently throttled, to debug timer throttling.
348     [MayThrowException] boolean isTimerThrottled(long timerHandle);
349
350     boolean isRequestAnimationFrameThrottled();
351     boolean areTimersThrottled();
352
353     // Override the behavior of WebPage::eventThrottlingDelay(), which only affects iOS.
354     attribute EventThrottlingBehavior? eventThrottlingBehaviorOverride;
355
356     [MayThrowException] void startTrackingStyleRecalcs();
357     [MayThrowException] unsigned long styleRecalcCount();
358     readonly attribute unsigned long lastStyleUpdateSize;
359
360     [MayThrowException] void startTrackingCompositingUpdates();
361     [MayThrowException] unsigned long compositingUpdateCount();
362
363     // |node| should be Document, HTMLIFrameElement, or unspecified.
364     // If |node| is an HTMLIFrameElement, it assumes node.contentDocument is
365     // specified without security checks. Unspecified or null means this document.
366     [MayThrowException] void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(optional Node? node = null);
367
368     readonly attribute unsigned long layoutCount;
369
370     // Returns a string with information about the mouse cursor used at the specified client location.
371     [MayThrowException] DOMString getCurrentCursorInfo();
372
373     DOMString markerTextForListItem(Element element);
374
375     DOMString toolTipFromElement(Element element);
376
377     SerializedScriptValue deserializeBuffer(ArrayBuffer buffer);
378     ArrayBuffer serializeObject(SerializedScriptValue object);
379
380     boolean isFromCurrentWorld(any obj);
381
382     void setUsesOverlayScrollbars(boolean enabled);
383     void setUsesMockScrollAnimator(boolean enabled);
384
385     void forceReload(boolean endToEnd);
386
387     void enableAutoSizeMode(boolean enabled, long minimumWidth, long minimumHeight, long maximumWidth, long maximumHeight);
388
389     [Conditional=VIDEO] void simulateAudioInterruption(HTMLMediaElement element);
390     [Conditional=VIDEO, MayThrowException] boolean mediaElementHasCharacteristic(HTMLMediaElement element, DOMString characteristic);
391
392     [Conditional=LEGACY_ENCRYPTED_MEDIA] void initializeMockCDM();
393     [Conditional=ENCRYPTED_MEDIA] MockCDMFactory registerMockCDM();
394
395     [Conditional=SPEECH_SYNTHESIS] void enableMockSpeechSynthesizer();
396
397     DOMString getImageSourceURL(Element element);
398
399     [Conditional=VIDEO_TRACK, MayThrowException] DOMString captionsStyleSheetOverride();
400     [Conditional=VIDEO_TRACK, MayThrowException] void setCaptionsStyleSheetOverride(DOMString override);
401     [Conditional=VIDEO_TRACK, MayThrowException] void setPrimaryAudioTrackLanguageOverride(DOMString language);
402     [Conditional=VIDEO_TRACK, MayThrowException] void setCaptionDisplayMode(DOMString mode);
403
404     [Conditional=VIDEO] TimeRanges createTimeRanges(Float32Array startTimes, Float32Array
405      endTimes);
406     [Conditional=VIDEO] unrestricted double closestTimeToTimeRanges(unrestricted double time, TimeRanges ranges);
407
408     boolean isSelectPopupVisible(HTMLSelectElement element);
409
410 #if defined(ENABLE_VIBRATION) && ENABLE_VIBRATION
411     boolean isVibrating();
412 #endif
413
414     [MayThrowException] boolean isPluginUnavailabilityIndicatorObscured(Element element);
415     boolean isPluginSnapshotted(Element element);
416
417     [MayThrowException] ClientRect selectionBounds();
418
419     [Conditional=MEDIA_SOURCE] void initializeMockMediaSource();
420     [Conditional=MEDIA_SOURCE] sequence<DOMString> bufferedSamplesForTrackID(SourceBuffer buffer, DOMString trackID);
421     [Conditional=MEDIA_SOURCE] sequence<DOMString> enqueuedSamplesForTrackID(SourceBuffer buffer, DOMString trackID);
422     [Conditional=MEDIA_SOURCE] void setShouldGenerateTimestamps(SourceBuffer buffer, boolean flag);
423
424     [Conditional=VIDEO, MayThrowException] void beginMediaSessionInterruption(DOMString interruptionType);
425     [Conditional=VIDEO] void endMediaSessionInterruption(DOMString flags);
426     [Conditional=MEDIA_SESSION] void sendMediaSessionStartOfInterruptionNotification(MediaSessionInterruptingCategory category);
427     [Conditional=MEDIA_SESSION] void sendMediaSessionEndOfInterruptionNotification(MediaSessionInterruptingCategory category);
428     [Conditional=MEDIA_SESSION] DOMString mediaSessionCurrentState(MediaSession session);
429     [Conditional=MEDIA_SESSION] double mediaElementPlayerVolume(HTMLMediaElement element);
430     [Conditional=MEDIA_SESSION] void sendMediaControlEvent(MediaControlEvent event);
431     [Conditional=VIDEO] void applicationDidEnterForeground();
432     [Conditional=VIDEO] void applicationWillEnterBackground();
433     [Conditional=VIDEO, MayThrowException] void setMediaSessionRestrictions(DOMString mediaType, DOMString restrictions);
434     [Conditional=VIDEO, MayThrowException] DOMString mediaSessionRestrictions(DOMString mediaType);
435     [Conditional=VIDEO] void setMediaElementRestrictions(HTMLMediaElement element, DOMString restrictions);
436     [Conditional=WEB_AUDIO] void setAudioContextRestrictions(AudioContext context, DOMString restrictions);
437     [Conditional=VIDEO, MayThrowException] void postRemoteControlCommand(DOMString command, optional unrestricted float argument = 0);
438     [Conditional=WIRELESS_PLAYBACK_TARGET] void setMockMediaPlaybackTargetPickerEnabled(boolean enabled);
439     [Conditional=WIRELESS_PLAYBACK_TARGET, MayThrowException] void setMockMediaPlaybackTargetPickerState(DOMString deviceName, DOMString deviceState);
440     [Conditional=MEDIA_STREAM] void setMockMediaCaptureDevicesEnabled(boolean enabled);
441     [Conditional=WEB_RTC] void emulateRTCPeerConnectionPlatformEvent(RTCPeerConnection connection, DOMString action);
442     [Conditional=WEB_RTC] void useMockRTCPeerConnectionFactory(DOMString testCase);
443
444     [Conditional=VIDEO] void simulateSystemSleep();
445     [Conditional=VIDEO] void simulateSystemWake();
446     [Conditional=VIDEO] boolean elementIsBlockingDisplaySleep(HTMLMediaElement element);
447
448     [MayThrowException] MockPageOverlay installMockPageOverlay(PageOverlayType type);
449     [MayThrowException] DOMString pageOverlayLayerTreeAsText(optional unsigned short flags = 0);
450
451     void setPageMuted(DOMString mutedState);
452     DOMString pageMediaState();
453
454     void setPageDefersLoading(boolean defersLoading);
455
456     File? createFile(DOMString url);
457     void queueMicroTask(long testNumber);
458     boolean testPreloaderSettingViewport();
459
460     [Conditional=CONTENT_FILTERING] readonly attribute MockContentFilterSettings mockContentFilterSettings;
461
462 #if defined(ENABLE_CSS_SCROLL_SNAP) && ENABLE_CSS_SCROLL_SNAP
463     [MayThrowException] DOMString scrollSnapOffsets(Element element);
464     void setPlatformMomentumScrollingPredictionEnabled(boolean enabled);
465 #endif
466
467     [MayThrowException] DOMString pathStringWithShrinkWrappedRects(sequence<double> rectComponents, double radius);
468
469     [Conditional=VIDEO] DOMString getCurrentMediaControlsStatusForElement(HTMLMediaElement element);
470
471     DOMString userVisibleString(DOMURL url);
472
473     void setShowAllPlugins(boolean showAll);
474
475     [Conditional=READABLE_STREAM_API, CallWith=ScriptState] boolean isReadableStreamDisturbed(any stream);
476
477     DOMString resourceLoadStatisticsForOrigin(DOMString domain);
478     void setResourceLoadStatisticsEnabled(boolean enable);
479
480     [MayThrowException] void setCanShowModalDialogOverride(boolean allow);
481
482     DOMString composedTreeAsText(Node parent);
483
484     boolean isProcessingUserGesture();
485
486     GCObservation? observeGC(any observed);
487
488     void setUserInterfaceLayoutDirection(UserInterfaceLayoutDirection userInterfaceLayoutDirection);
489     void setBaseWritingDirection(BaseWritingDirection direction);
490
491     boolean userPrefersReducedMotion();
492     
493     void reportBacktrace();
494
495     [Conditional=POINTER_LOCK] boolean pageHasPendingPointerLock();
496     [Conditional=POINTER_LOCK] boolean pageHasPointerLock();
497
498     sequence<DOMString> accessKeyModifiers();
499
500 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
501     void setQuickLookPassword(DOMString password);
502 #endif
503
504     [CallWith=Document] void setAsRunningUserScripts();
505
506     void disableTileSizeUpdateDelay();
507 };