summaryrefslogtreecommitdiff
path: root/Source/WebCore/testing/Internals.idl
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/testing/Internals.idl')
-rw-r--r--Source/WebCore/testing/Internals.idl502
1 files changed, 363 insertions, 139 deletions
diff --git a/Source/WebCore/testing/Internals.idl b/Source/WebCore/testing/Internals.idl
index 6b0c22795..155b70b4a 100644
--- a/Source/WebCore/testing/Internals.idl
+++ b/Source/WebCore/testing/Internals.idl
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -24,189 +24,297 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+enum PageOverlayType {
+ "view",
+ "document"
+};
+
+// These map to ResourceRequestCachePolicy.
+enum CachePolicy {
+ "UseProtocolCachePolicy",
+ "ReloadIgnoringCacheData",
+ "ReturnCacheDataElseLoad",
+ "ReturnCacheDataDontLoad"
+};
+
+// FIXME: Strings in an enum should not have the name of the enum as a prefix.
+enum ResourceLoadPriority {
+ "ResourceLoadPriorityVeryLow",
+ "ResourceLoadPriorityLow",
+ "ResourceLoadPriorityMedium",
+ "ResourceLoadPriorityHigh",
+ "ResourceLoadPriorityVeryHigh"
+};
+
+[Conditional=MEDIA_SESSION] enum MediaSessionInterruptingCategory {
+ "content",
+ "transient",
+ "transient-solo"
+};
+
+[Conditional=MEDIA_SESSION] enum MediaControlEvent {
+ "play-pause",
+ "next-track",
+ "previous-track"
+};
+
+// FIXME: Strings in an enum should not have the name of the enum as a prefix.
+enum AutoFillButtonType {
+ "AutoFillButtonTypeNone",
+ "AutoFillButtonTypeContacts",
+ "AutoFillButtonTypeCredentials"
+};
+
+enum UserInterfaceLayoutDirection {
+ "LTR",
+ "RTL"
+};
+
+enum BaseWritingDirection {
+ "Natural",
+ "Ltr",
+ "Rtl"
+};
+
+enum EventThrottlingBehavior {
+ "responsive",
+ "unresponsive"
+};
+
[
+ ExportMacro=WEBCORE_TESTSUPPORT_EXPORT,
NoInterfaceObject,
] interface Internals {
DOMString address(Node node);
+ boolean nodeNeedsStyleRecalc(Node node);
+ DOMString styleChangeType(Node node);
+ DOMString description(any value);
+
+ // Animated image pausing testing.
+ boolean hasPausedImageAnimations(Element element);
- [RaisesException] DOMString elementRenderTreeAsText(Element element);
+ [MayThrowException] DOMString elementRenderTreeAsText(Element element);
boolean isPreloaded(DOMString url);
boolean isLoadingFromMemoryCache(DOMString url);
-
- [RaisesException] CSSStyleDeclaration computedStyleIncludingVisitedInfo(Node node);
-
-#if defined(ENABLE_SHADOW_DOM) && ENABLE_SHADOW_DOM
- [RaisesException] ShadowRoot ensureShadowRoot(Element host);
- [RaisesException] ShadowRoot createShadowRoot(Element host);
- [RaisesException] ShadowRoot shadowRoot(Element host);
-#else
- [RaisesException] Node ensureShadowRoot(Element host);
- [RaisesException] Node createShadowRoot(Element host);
- [RaisesException] Node shadowRoot(Element host);
-#endif
- [RaisesException] DOMString shadowRootType(Node root);
- [RaisesException] Element includerFor(Node node);
- [RaisesException] DOMString shadowPseudoId(Element element);
- [RaisesException] void setShadowPseudoId(Element element, DOMString id);
- [RaisesException] Node treeScopeRootNode(Node node);
- [RaisesException] Node parentTreeScope(Node node);
+ DOMString xhrResponseSource(XMLHttpRequest xhr);
+ boolean isSharingStyleSheetContents(HTMLLinkElement a, HTMLLinkElement b);
+ boolean isStyleSheetLoadingSubresources(HTMLLinkElement link);
+ void clearMemoryCache();
+ void pruneMemoryCacheToSize(long size);
+ long memoryCacheSize();
+ void setOverrideCachePolicy(CachePolicy policy);
+ void setOverrideResourceLoadPriority(ResourceLoadPriority priority);
+ void setStrictRawResourceValidationPolicyDisabled(boolean disabled);
+
+ void clearPageCache();
+ unsigned long pageCacheSize();
+
+ CSSStyleDeclaration computedStyleIncludingVisitedInfo(Element element);
+
+ Node ensureUserAgentShadowRoot(Element host);
+ Node shadowRoot(Element host);
+
+ // CSS Deferred Parsing Testing.
+ long deferredStyleRulesCount(StyleSheet sheet);
+ long deferredGroupRulesCount(StyleSheet sheet);
+ long deferredKeyframesRulesCount(StyleSheet sheet);
+
+ [MayThrowException] DOMString shadowRootType(Node root);
+ DOMString shadowPseudoId(Element element);
+ void setShadowPseudoId(Element element, DOMString id);
+ Node treeScopeRootNode(Node node);
+ Node parentTreeScope(Node node);
// Spatial Navigation testing
- [RaisesException] unsigned long lastSpatialNavigationCandidateCount();
+ [MayThrowException] unsigned long lastSpatialNavigationCandidateCount();
// CSS Animation testing.
unsigned long numberOfActiveAnimations();
- [RaisesException] void suspendAnimations();
- [RaisesException] void resumeAnimations();
- [RaisesException] boolean animationsAreSuspended();
- [RaisesException] boolean pauseAnimationAtTimeOnElement(DOMString animationName, double pauseTime, Element element);
- [RaisesException] boolean pauseAnimationAtTimeOnPseudoElement(DOMString animationName, double pauseTime, Element element, DOMString pseudoId);
+ [MayThrowException] void suspendAnimations();
+ [MayThrowException] void resumeAnimations();
+ [MayThrowException] boolean animationsAreSuspended();
+ [MayThrowException] boolean pauseAnimationAtTimeOnElement(DOMString animationName, unrestricted double pauseTime, Element element);
+ [MayThrowException] boolean pauseAnimationAtTimeOnPseudoElement(DOMString animationName, unrestricted double pauseTime, Element element, DOMString pseudoId);
// CSS Transition testing.
- [RaisesException] boolean pauseTransitionAtTimeOnElement(DOMString propertyName, double pauseTime, Element element);
- [RaisesException] boolean pauseTransitionAtTimeOnPseudoElement(DOMString property, double pauseTime, Element element, DOMString pseudoId);
-
- [RaisesException] boolean attached(Node node);
+ [MayThrowException] boolean pauseTransitionAtTimeOnElement(DOMString propertyName, unrestricted double pauseTime, Element element);
+ [MayThrowException] boolean pauseTransitionAtTimeOnPseudoElement(DOMString property, unrestricted double pauseTime, Element element, DOMString pseudoId);
DOMString visiblePlaceholder(Element element);
-#if defined(ENABLE_INPUT_TYPE_COLOR) && ENABLE_INPUT_TYPE_COLOR
- void selectColorInColorChooser(Element element, DOMString colorValue);
-#endif
- [RaisesException] DOMString[] formControlStateOfPreviousHistoryItem();
- [RaisesException] void setFormControlStateOfPreviousHistoryItem(sequence<DOMString> values);
+ void selectColorInColorChooser(HTMLInputElement element, DOMString colorValue);
+ [MayThrowException] sequence<DOMString> formControlStateOfPreviousHistoryItem();
+ [MayThrowException] void setFormControlStateOfPreviousHistoryItem(sequence<DOMString> values);
- [RaisesException] ClientRect absoluteCaretBounds();
+ [MayThrowException] ClientRect absoluteCaretBounds();
- [RaisesException] ClientRect boundingBox(Element element);
+ ClientRect boundingBox(Element element);
- [RaisesException] ClientRectList inspectorHighlightRects();
- [RaisesException] DOMString inspectorHighlightObject();
+ [MayThrowException] ClientRectList inspectorHighlightRects();
+ [MayThrowException] DOMString inspectorHighlightObject();
- [RaisesException] unsigned long markerCountForNode(Node node, DOMString markerType);
- [RaisesException] Range markerRangeForNode(Node node, DOMString markerType, unsigned long index);
- [RaisesException] DOMString markerDescriptionForNode(Node node, DOMString markerType, unsigned long index);
+ [MayThrowException] unsigned long markerCountForNode(Node node, DOMString markerType);
+ [MayThrowException] Range? markerRangeForNode(Node node, DOMString markerType, unsigned long index);
+ [MayThrowException] DOMString markerDescriptionForNode(Node node, DOMString markerType, unsigned long index);
+ [MayThrowException] DOMString dumpMarkerRects(DOMString markerType);
void addTextMatchMarker(Range range, boolean isActive);
+ [MayThrowException] void setMarkedTextMatchesAreHighlighted(boolean flag);
+
+ void invalidateFontCache();
+
+ [MayThrowException] void setScrollViewPosition(long x, long y);
+
+ [MayThrowException] ClientRect layoutViewportRect();
+ [MayThrowException] ClientRect visualViewportRect();
+
+ [MayThrowException] void setViewBaseBackgroundColor(DOMString colorValue);
- [RaisesException] void setScrollViewPosition(long x, long y);
+ [MayThrowException] void setPagination(DOMString mode, long gap, optional long pageLength = 0);
+ [MayThrowException] void setPaginationLineGridEnabled(boolean enabled);
- [RaisesException] void setPagination(DOMString mode, long gap, optional long pageLength);
+ [MayThrowException] DOMString configurationForViewport(unrestricted float devicePixelRatio, long deviceWidth, long deviceHeight, long availableWidth, long availableHeight);
- [RaisesException] DOMString configurationForViewport(float devicePixelRatio,
- long deviceWidth,
- long deviceHeight,
- long availableWidth,
- long availableHeight);
+ [MayThrowException] boolean wasLastChangeUserEdit(Element textField);
+ boolean elementShouldAutoComplete(HTMLInputElement inputElement);
+ void setEditingValue(HTMLInputElement inputElement, DOMString value);
+ void setAutofilled(HTMLInputElement inputElement, boolean enabled);
+ void setShowAutoFillButton(HTMLInputElement inputElement, AutoFillButtonType autoFillButtonType);
- [RaisesException] boolean wasLastChangeUserEdit(Element textField);
- [RaisesException] boolean elementShouldAutoComplete(Element inputElement);
- [RaisesException] DOMString suggestedValue(Element inputElement);
- [RaisesException] void setSuggestedValue(Element inputElement, DOMString value);
- [RaisesException] void setEditingValue(Element inputElement, DOMString value);
- [RaisesException] void setAutofilled(Element inputElement, boolean enabled);
+ [MayThrowException] Range? rangeOfString(DOMString text, Range? referenceRange, sequence<DOMString> findOptions);
+ [MayThrowException] unsigned long countMatchesForText(DOMString text, sequence<DOMString> findOptions, DOMString markMatches);
+ [MayThrowException] unsigned long countFindMatches(DOMString text, sequence<DOMString> findOptions);
- [RaisesException] void paintControlTints();
+ [MayThrowException] DOMString autofillFieldName(Element formControlElement);
- [RaisesException] void scrollElementToRect(Element element, long x, long y, long w, long h);
+ [MayThrowException] void paintControlTints();
- [RaisesException] Range rangeFromLocationAndLength(Element scope, long rangeLocation, long rangeLength);
- [RaisesException] unsigned long locationFromRange(Element scope, Range range);
- [RaisesException] unsigned long lengthFromRange(Element scope, Range range);
- [RaisesException] DOMString rangeAsText(Range range);
+ [MayThrowException] void scrollElementToRect(Element element, long x, long y, long w, long h);
- [RaisesException] void setDelegatesScrolling(boolean enabled);
+ Range? rangeFromLocationAndLength(Element scope, long rangeLocation, long rangeLength);
+ unsigned long locationFromRange(Element scope, Range range);
+ unsigned long lengthFromRange(Element scope, Range range);
+ DOMString rangeAsText(Range range);
+ Range subrange(Range range, long rangeLocation, long rangeLength);
+ [MayThrowException] Range? rangeForDictionaryLookupAtLocation(long x, long y);
+ Range? rangeOfStringNearLocation(Range range, DOMString text, long targetOffset);
- [RaisesException] long lastSpellCheckRequestSequence();
- [RaisesException] long lastSpellCheckProcessedSequence();
+ [MayThrowException] void setDelegatesScrolling(boolean enabled);
+
+ [MayThrowException] long lastSpellCheckRequestSequence();
+ [MayThrowException] long lastSpellCheckProcessedSequence();
sequence<DOMString> userPreferredLanguages();
void setUserPreferredLanguages(sequence<DOMString> languages);
- [RaisesException] unsigned long wheelEventHandlerCount();
- [RaisesException] unsigned long touchEventHandlerCount();
+ sequence<DOMString> userPreferredAudioCharacteristics();
+ void setUserPreferredAudioCharacteristic(DOMString characteristic);
+
+ [MayThrowException] unsigned long wheelEventHandlerCount();
+ [MayThrowException] unsigned long touchEventHandlerCount();
- [RaisesException] NodeList nodesFromRect(Document document, long x, long y,
+ [MayThrowException] NodeList? nodesFromRect(Document document, long x, long y,
unsigned long topPadding, unsigned long rightPadding, unsigned long bottomPadding, unsigned long leftPadding,
boolean ignoreClipping, boolean allowShadowContent, boolean allowChildFrameContent);
- void emitInspectorDidBeginFrame();
- void emitInspectorDidCancelFrame();
-
// Calling parserMetaData() with no arguments gets the metadata for the script of the current scope.
DOMString parserMetaData(optional any func);
- [RaisesException] boolean hasSpellingMarker(long from, long length);
- [RaisesException] boolean hasGrammarMarker(long from, long length);
- [RaisesException] boolean hasAutocorrectedMarker(long from, long length);
- [RaisesException] void setContinuousSpellCheckingEnabled(boolean enabled);
- [RaisesException] void setAutomaticQuoteSubstitutionEnabled(boolean enabled);
- [RaisesException] void setAutomaticLinkDetectionEnabled(boolean enabled);
- [RaisesException] void setAutomaticDashSubstitutionEnabled(boolean enabled);
- [RaisesException] void setAutomaticTextReplacementEnabled(boolean enabled);
- [RaisesException] void setAutomaticSpellingCorrectionEnabled(boolean enabled);
+ void updateEditorUINowIfScheduled();
+
+ boolean hasSpellingMarker(long from, long length);
+ boolean hasGrammarMarker(long from, long length);
+ boolean hasAutocorrectedMarker(long from, long length);
+ void setContinuousSpellCheckingEnabled(boolean enabled);
+ void setAutomaticQuoteSubstitutionEnabled(boolean enabled);
+ void setAutomaticLinkDetectionEnabled(boolean enabled);
+ void setAutomaticDashSubstitutionEnabled(boolean enabled);
+ void setAutomaticTextReplacementEnabled(boolean enabled);
+ void setAutomaticSpellingCorrectionEnabled(boolean enabled);
+
+ void handleAcceptedCandidate(DOMString candidate, unsigned long location, unsigned long length);
- [RaisesException] boolean isOverwriteModeEnabled();
- [RaisesException] void toggleOverwriteModeEnabled();
+ boolean isOverwriteModeEnabled();
+ void toggleOverwriteModeEnabled();
- [RaisesException] unsigned long numberOfScrollableAreas();
+ unsigned long numberOfScrollableAreas();
- [RaisesException] boolean isPageBoxVisible(long pageNumber);
+ [MayThrowException] boolean isPageBoxVisible(long pageNumber);
+
+ unsigned long imageFrameIndex(HTMLImageElement element);
+ void setImageFrameDecodingDuration(HTMLImageElement element, unrestricted float duration);
+ void resetImageAnimation(HTMLImageElement element);
readonly attribute InternalSettings settings;
readonly attribute unsigned long workerThreadCount;
+ readonly attribute boolean areSVGAnimationsPaused;
+
// Flags for layerTreeAsText.
const unsigned short LAYER_TREE_INCLUDES_VISIBLE_RECTS = 1;
const unsigned short LAYER_TREE_INCLUDES_TILE_CACHES = 2;
const unsigned short LAYER_TREE_INCLUDES_REPAINT_RECTS = 4;
const unsigned short LAYER_TREE_INCLUDES_PAINTING_PHASES = 8;
const unsigned short LAYER_TREE_INCLUDES_CONTENT_LAYERS = 16;
- [RaisesException] DOMString layerTreeAsText(Document document, optional unsigned short flags);
+ const unsigned short LAYER_TREE_INCLUDES_ACCELERATES_DRAWING = 32;
+ [MayThrowException] DOMString layerTreeAsText(Document document, optional unsigned short flags = 0);
- [RaisesException] DOMString scrollingStateTreeAsText();
- [RaisesException] DOMString mainThreadScrollingReasons(); // FIXME: rename to synchronousScrollingReasons().
- [RaisesException] ClientRectList nonFastScrollableRects();
+ [MayThrowException] DOMString scrollingStateTreeAsText();
+ [MayThrowException] DOMString mainThreadScrollingReasons(); // FIXME: rename to synchronousScrollingReasons().
+ [MayThrowException] ClientRectList? nonFastScrollableRects();
- [RaisesException] DOMString repaintRectsAsText();
+ [MayThrowException] DOMString repaintRectsAsText();
- [RaisesException] void garbageCollectDocumentResources();
+ // These throw if the element does not have a compositing layer.
+ [MayThrowException] void setElementUsesDisplayListDrawing(Element element, boolean usesDisplayListDrawing);
+ [MayThrowException] void setElementTracksDisplayListReplay(Element element, boolean trackReplay);
- void allowRoundingHacks();
+ // Flags for displayListForElement.
+ const unsigned short DISPLAY_LIST_INCLUDES_PLATFORM_OPERATIONS = 1;
+ // Returns the recorded display list.
+ [MayThrowException] DOMString displayListForElement(Element element, optional unsigned short flags = 0);
+ // Returns the display list that was actually painted.
+ [MayThrowException] DOMString replayDisplayListForElement(Element element, optional unsigned short flags = 0);
- [RaisesException] void insertAuthorCSS(DOMString css);
- [RaisesException] void insertUserCSS(DOMString css);
+ [MayThrowException] void garbageCollectDocumentResources();
-#if defined(ENABLE_BATTERY_STATUS) && ENABLE_BATTERY_STATUS
- [RaisesException] void setBatteryStatus(DOMString eventType, boolean charging, double chargingTime, double dischargingTime, double level);
-#endif
+ [MayThrowException] void insertAuthorCSS(DOMString css);
+ [MayThrowException] void insertUserCSS(DOMString css);
-#if defined(ENABLE_NETWORK_INFO) && ENABLE_NETWORK_INFO
- [RaisesException] void setNetworkInformation(DOMString eventType, double bandwidth, boolean metered);
-#endif
+ readonly attribute boolean isUnderMemoryPressure;
+ void beginSimulatedMemoryPressure();
+ void endSimulatedMemoryPressure();
#if defined(ENABLE_PROXIMITY_EVENTS) && ENABLE_PROXIMITY_EVENTS
- [RaisesException] void setDeviceProximity(DOMString eventType, double value, double min, double max);
+ [MayThrowException] void setDeviceProximity(DOMString eventType, unrestricted double value, unrestricted double min, unrestricted double max);
#endif
- [Conditional=INSPECTOR] unsigned long numberOfLiveNodes();
- [Conditional=INSPECTOR] unsigned long numberOfLiveDocuments();
- [Conditional=INSPECTOR] sequence<DOMString> consoleMessageArgumentCounts();
- [Conditional=INSPECTOR] DOMWindow openDummyInspectorFrontend(DOMString url);
- [Conditional=INSPECTOR] void closeDummyInspectorFrontend();
- [Conditional=INSPECTOR, RaisesException] void setInspectorResourcesDataSizeLimits(long maximumResourcesContentSize, long maximumSingleResourceContentSize);
- [Conditional=INSPECTOR, RaisesException] void setJavaScriptProfilingEnabled(boolean creates);
+ unsigned long numberOfLiveNodes();
+ unsigned long numberOfLiveDocuments();
+ DOMWindow? openDummyInspectorFrontend(DOMString url);
+ void closeDummyInspectorFrontend();
+ [MayThrowException] void setInspectorIsUnderTest(boolean isUnderTest);
DOMString counterValue(Element element);
- long pageNumber(Element element, optional float pageWidth, optional float pageHeight);
- DOMString[] shortcutIconURLs();
- DOMString[] allIconURLs();
- long numberOfPages(optional double pageWidthInPixels, optional double pageHeightInPixels);
- [RaisesException] DOMString pageProperty(DOMString propertyName, long pageNumber);
- [RaisesException] DOMString pageSizeAndMarginsInPixels(long pageIndex, long width, long height, long marginTop, long marginRight, long marginBottom, long marginLeft);
+ long pageNumber(Element element, optional unrestricted float pageWidth = 800, optional unrestricted float pageHeight = 600);
+ sequence<DOMString> shortcutIconURLs();
+ long numberOfPages(optional unrestricted double pageWidthInPixels = 800, optional unrestricted double pageHeightInPixels = 600);
+ [MayThrowException] DOMString pageProperty(DOMString propertyName, long pageNumber);
+ [MayThrowException] DOMString pageSizeAndMarginsInPixels(long pageIndex, long width, long height, long marginTop, long marginRight, long marginBottom, long marginLeft);
- [RaisesException] void setPageScaleFactor(float scaleFactor, long x, long y);
+ [MayThrowException] void setPageScaleFactor(unrestricted float scaleFactor, long x, long y);
+ [MayThrowException] float pageScaleFactor();
- void setHeaderHeight(float height);
- void setFooterHeight(float height);
+ [MayThrowException] void setPageZoomFactor(unrestricted float zoomFactor);
+ [MayThrowException] void setTextZoomFactor(unrestricted float zoomFactor);
+
+ [MayThrowException] void setUseFixedLayout(boolean useFixedLayout);
+ [MayThrowException] void setFixedLayoutSize(long width, long height);
+
+ [MayThrowException] void setViewExposedRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
+
+ void setHeaderHeight(unrestricted float height);
+ void setFooterHeight(unrestricted float height);
+
+ void setTopContentInset(unrestricted float contentInset);
#if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API
void webkitWillEnterFullScreenForElement(Element element);
@@ -220,64 +328,180 @@
void registerURLSchemeAsBypassingContentSecurityPolicy(DOMString scheme);
void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(DOMString scheme);
+ void registerDefaultPortForProtocol(unsigned short port, DOMString scheme);
+
MallocStatistics mallocStatistics();
TypeConversions typeConversions();
MemoryInfo memoryInfo();
- DOMString[] getReferencedFilePaths();
+ sequence<DOMString> getReferencedFilePaths();
- // These functions both reset the tracked repaint rects. They are inteded to be used in the following order:
+ // These functions both reset the tracked repaint rects. They are intended to be used in the following order:
// startTrackingRepaints, repaintRectsAsText, stopTrackingRepaints.
- [RaisesException] void startTrackingRepaints();
- [RaisesException] void stopTrackingRepaints();
+ [MayThrowException] void startTrackingRepaints();
+ [MayThrowException] void stopTrackingRepaints();
+
+ [MayThrowException] void startTrackingLayerFlushes();
+ [MayThrowException] unsigned long layerFlushCount();
+
+ // Query if a timer is currently throttled, to debug timer throttling.
+ [MayThrowException] boolean isTimerThrottled(long timerHandle);
+
+ boolean isRequestAnimationFrameThrottled();
+ boolean areTimersThrottled();
+
+ // Override the behavior of WebPage::eventThrottlingDelay(), which only affects iOS.
+ attribute EventThrottlingBehavior? eventThrottlingBehaviorOverride;
+
+ [MayThrowException] void startTrackingStyleRecalcs();
+ [MayThrowException] unsigned long styleRecalcCount();
+ readonly attribute unsigned long lastStyleUpdateSize;
+
+ [MayThrowException] void startTrackingCompositingUpdates();
+ [MayThrowException] unsigned long compositingUpdateCount();
// |node| should be Document, HTMLIFrameElement, or unspecified.
// If |node| is an HTMLIFrameElement, it assumes node.contentDocument is
- // specified without security checks. Unspecified means this document.
- [RaisesException] void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(optional Node node);
+ // specified without security checks. Unspecified or null means this document.
+ [MayThrowException] void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(optional Node? node = null);
+
+ readonly attribute unsigned long layoutCount;
// Returns a string with information about the mouse cursor used at the specified client location.
- [RaisesException] DOMString getCurrentCursorInfo();
+ [MayThrowException] DOMString getCurrentCursorInfo();
- [RaisesException] DOMString markerTextForListItem(Element element);
+ DOMString markerTextForListItem(Element element);
+
+ DOMString toolTipFromElement(Element element);
SerializedScriptValue deserializeBuffer(ArrayBuffer buffer);
- ArrayBuffer serializeObject(SerializedScriptValue obj);
+ ArrayBuffer serializeObject(SerializedScriptValue object);
+
+ boolean isFromCurrentWorld(any obj);
void setUsesOverlayScrollbars(boolean enabled);
+ void setUsesMockScrollAnimator(boolean enabled);
void forceReload(boolean endToEnd);
- [Conditional=VIDEO] void simulateAudioInterruption(Node node);
+ void enableAutoSizeMode(boolean enabled, long minimumWidth, long minimumHeight, long maximumWidth, long maximumHeight);
- [Conditional=ENCRYPTED_MEDIA_V2] void initializeMockCDM();
+ [Conditional=VIDEO] void simulateAudioInterruption(HTMLMediaElement element);
+ [Conditional=VIDEO, MayThrowException] boolean mediaElementHasCharacteristic(HTMLMediaElement element, DOMString characteristic);
+
+ [Conditional=LEGACY_ENCRYPTED_MEDIA] void initializeMockCDM();
+ [Conditional=ENCRYPTED_MEDIA] MockCDMFactory registerMockCDM();
[Conditional=SPEECH_SYNTHESIS] void enableMockSpeechSynthesizer();
- [RaisesException] DOMString getImageSourceURL(Element element);
+ DOMString getImageSourceURL(Element element);
- [Conditional=VIDEO_TRACK, RaisesException] DOMString captionsStyleSheetOverride();
- [Conditional=VIDEO_TRACK, RaisesException] void setCaptionsStyleSheetOverride(DOMString override);
- [Conditional=VIDEO_TRACK, RaisesException] void setPrimaryAudioTrackLanguageOverride(DOMString language);
- [Conditional=VIDEO_TRACK, RaisesException] void setCaptionDisplayMode(DOMString mode);
+ [Conditional=VIDEO_TRACK, MayThrowException] DOMString captionsStyleSheetOverride();
+ [Conditional=VIDEO_TRACK, MayThrowException] void setCaptionsStyleSheetOverride(DOMString override);
+ [Conditional=VIDEO_TRACK, MayThrowException] void setPrimaryAudioTrackLanguageOverride(DOMString language);
+ [Conditional=VIDEO_TRACK, MayThrowException] void setCaptionDisplayMode(DOMString mode);
[Conditional=VIDEO] TimeRanges createTimeRanges(Float32Array startTimes, Float32Array
endTimes);
- [Conditional=VIDEO] double closestTimeToTimeRanges(double time, TimeRanges ranges);
+ [Conditional=VIDEO] unrestricted double closestTimeToTimeRanges(unrestricted double time, TimeRanges ranges);
- boolean isSelectPopupVisible(Node node);
+ boolean isSelectPopupVisible(HTMLSelectElement element);
#if defined(ENABLE_VIBRATION) && ENABLE_VIBRATION
boolean isVibrating();
#endif
- [RaisesException] boolean isPluginUnavailabilityIndicatorObscured(Element element);
+ [MayThrowException] boolean isPluginUnavailabilityIndicatorObscured(Element element);
+ boolean isPluginSnapshotted(Element element);
+
+ [MayThrowException] ClientRect selectionBounds();
- [RaisesException] ClientRect selectionBounds();
-
[Conditional=MEDIA_SOURCE] void initializeMockMediaSource();
+ [Conditional=MEDIA_SOURCE] sequence<DOMString> bufferedSamplesForTrackID(SourceBuffer buffer, DOMString trackID);
+ [Conditional=MEDIA_SOURCE] sequence<DOMString> enqueuedSamplesForTrackID(SourceBuffer buffer, DOMString trackID);
+ [Conditional=MEDIA_SOURCE] void setShouldGenerateTimestamps(SourceBuffer buffer, boolean flag);
+
+ [Conditional=VIDEO, MayThrowException] void beginMediaSessionInterruption(DOMString interruptionType);
+ [Conditional=VIDEO] void endMediaSessionInterruption(DOMString flags);
+ [Conditional=MEDIA_SESSION] void sendMediaSessionStartOfInterruptionNotification(MediaSessionInterruptingCategory category);
+ [Conditional=MEDIA_SESSION] void sendMediaSessionEndOfInterruptionNotification(MediaSessionInterruptingCategory category);
+ [Conditional=MEDIA_SESSION] DOMString mediaSessionCurrentState(MediaSession session);
+ [Conditional=MEDIA_SESSION] double mediaElementPlayerVolume(HTMLMediaElement element);
+ [Conditional=MEDIA_SESSION] void sendMediaControlEvent(MediaControlEvent event);
+ [Conditional=VIDEO] void applicationDidEnterForeground();
+ [Conditional=VIDEO] void applicationWillEnterBackground();
+ [Conditional=VIDEO, MayThrowException] void setMediaSessionRestrictions(DOMString mediaType, DOMString restrictions);
+ [Conditional=VIDEO, MayThrowException] DOMString mediaSessionRestrictions(DOMString mediaType);
+ [Conditional=VIDEO] void setMediaElementRestrictions(HTMLMediaElement element, DOMString restrictions);
+ [Conditional=WEB_AUDIO] void setAudioContextRestrictions(AudioContext context, DOMString restrictions);
+ [Conditional=VIDEO, MayThrowException] void postRemoteControlCommand(DOMString command, optional unrestricted float argument = 0);
+ [Conditional=WIRELESS_PLAYBACK_TARGET] void setMockMediaPlaybackTargetPickerEnabled(boolean enabled);
+ [Conditional=WIRELESS_PLAYBACK_TARGET, MayThrowException] void setMockMediaPlaybackTargetPickerState(DOMString deviceName, DOMString deviceState);
+ [Conditional=MEDIA_STREAM] void setMockMediaCaptureDevicesEnabled(boolean enabled);
+ [Conditional=WEB_RTC] void emulateRTCPeerConnectionPlatformEvent(RTCPeerConnection connection, DOMString action);
+ [Conditional=WEB_RTC] void useMockRTCPeerConnectionFactory(DOMString testCase);
+
+ [Conditional=VIDEO] void simulateSystemSleep();
+ [Conditional=VIDEO] void simulateSystemWake();
+ [Conditional=VIDEO] boolean elementIsBlockingDisplaySleep(HTMLMediaElement element);
+
+ [MayThrowException] MockPageOverlay installMockPageOverlay(PageOverlayType type);
+ [MayThrowException] DOMString pageOverlayLayerTreeAsText(optional unsigned short flags = 0);
+
+ void setPageMuted(DOMString mutedState);
+ DOMString pageMediaState();
+
+ void setPageDefersLoading(boolean defersLoading);
+
+ File? createFile(DOMString url);
+ void queueMicroTask(long testNumber);
+ boolean testPreloaderSettingViewport();
+
+ [Conditional=CONTENT_FILTERING] readonly attribute MockContentFilterSettings mockContentFilterSettings;
+
+#if defined(ENABLE_CSS_SCROLL_SNAP) && ENABLE_CSS_SCROLL_SNAP
+ [MayThrowException] DOMString scrollSnapOffsets(Element element);
+ void setPlatformMomentumScrollingPredictionEnabled(boolean enabled);
+#endif
+
+ [MayThrowException] DOMString pathStringWithShrinkWrappedRects(sequence<double> rectComponents, double radius);
+
+ [Conditional=VIDEO] DOMString getCurrentMediaControlsStatusForElement(HTMLMediaElement element);
+
+ DOMString userVisibleString(DOMURL url);
+
+ void setShowAllPlugins(boolean showAll);
+
+ [Conditional=READABLE_STREAM_API, CallWith=ScriptState] boolean isReadableStreamDisturbed(any stream);
+
+ DOMString resourceLoadStatisticsForOrigin(DOMString domain);
+ void setResourceLoadStatisticsEnabled(boolean enable);
+
+ [MayThrowException] void setCanShowModalDialogOverride(boolean allow);
+
+ DOMString composedTreeAsText(Node parent);
+
+ boolean isProcessingUserGesture();
+
+ GCObservation? observeGC(any observed);
+
+ void setUserInterfaceLayoutDirection(UserInterfaceLayoutDirection userInterfaceLayoutDirection);
+ void setBaseWritingDirection(BaseWritingDirection direction);
+
+ boolean userPrefersReducedMotion();
+
+ void reportBacktrace();
+
+ [Conditional=POINTER_LOCK] boolean pageHasPendingPointerLock();
+ [Conditional=POINTER_LOCK] boolean pageHasPointerLock();
+
+ sequence<DOMString> accessKeyModifiers();
+
+#if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
+ void setQuickLookPassword(DOMString password);
+#endif
+
+ [CallWith=Document] void setAsRunningUserScripts();
- void beginMediaSessionInterruption();
- void endMediaSessionInterruption(DOMString flags);
- [RaisesException] void setMediaSessionRestrictions(DOMString mediaType, DOMString restrictions);
+ void disableTileSizeUpdateDelay();
};