Interface nsIDOMWindowUtilsType

Hierarchy

Properties

Methods

AddRef GetSelectionAsPlaintext QueryInterface Release activateNativeMenuItemAt addManuallyManagedState addSheet advanceTimeAndRefresh allowScriptsToClose areDialogsEnabled askPermission audioDevices checkAndClearDisplayListState checkAndClearPaintedState clearNativeTouchSequence clearSharedStyleSheetCache compareCanvases computeAnimationDistance convertFromParentProcessWidgetToLocal cycleCollect defaultDevicesRoundTripLatency disableApzForElement disableDialogs disableNonTestMouseEvents dispatchDOMEventViaPresShellForTesting dispatchEventToChromeOnly elementFromPoint enableDialogs ensureDirtyRootFrame enterChaosMode enterModalState exitFullscreen flushApzRepaints flushLayoutWithoutThrottledAnimations flushPendingFileDeletions forceReflowInterrupt forceUpdateNativeMenuAt garbageCollect getBoundsWithoutFlushing getClassName getCompositorAPZTestData getContentAPZTestData getContentViewerSize getDirectionFromText getDocumentMetadata getFileId getFilePath getFileReferences getFrameUniformityTestData getLastOverWindowPointerLocationInCSSPixels getLayersId getOMTAStyle getPCCountScriptContents getPCCountScriptCount getPCCountScriptSummary getPresShellId getResolution getRootBounds getScrollXY getScrollXYFloat getScrollbarSize getScrollbarSizes getStorageUsage getTranslationNodes getUnanimatedComputedStyle getViewId getViewportFitInfo getViewportInfo getVisitedDependentComputedStyle getVisualViewportOffset getVisualViewportOffsetRelativeToLayoutViewport handleFullscreenRequests hasRuleProcessorUsedByMultipleStyleSets isAnimationInPendingTracker isCORSSafelistedRequestHeader isCoepCredentialless isCssPropertyRecordedInUseCounter isInModalState isKeyboardEventUserActivity isNodeDisabledForEvents isPartOfOpaqueLayer leaveChaosMode leaveModalState loadSheet loadSheetUsingURIString needsFlush nodesFromRect numberOfAssignedPaintedLayers pokeGC postRestyleSelfEvent purgePCCounts remoteFrameFullscreenChanged remoteFrameFullscreenReverted removeManuallyManagedState removeSheet removeSheetUsingURIString resetDialogAbuseState resetMobileViewportManager respectDisplayPortSuppression restoreHiDPIMode restoreNormalRefresh resumeTimeouts runNextCollectorTimer scrollToVisual selectAtPoint sendContentCommandEvent sendMouseEvent sendMouseEventToWindow sendNativeKeyEvent sendNativeMouseEvent sendNativeMouseScrollEvent sendNativePenInput sendNativeTouchPoint sendNativeTouchTap sendNativeTouchpadDoubleTap sendNativeTouchpadPan sendNativeTouchpadPinch sendQueryContentEvent sendSelectionSetEvent sendSimpleGestureEvent sendTouchEvent sendTouchEventToWindow sendWheelEvent setAsyncScrollOffset setAsyncZoom setChromeMargin setCompositionRecording setDisplayPortBaseForElement setDisplayPortForElement setDisplayPortMarginsForElement setDynamicToolbarMaxHeight setHandlingUserInput setHiDPIMode setMousewheelAutodir setResizeMargin setResolutionAndScaleTo setRestoreResolution setVisualViewportSize startCompositionRecording startFrameTimeRecording startPCCountProfiling stopCompositionRecording stopPCCountProfiling suppressAnimation suppressEventHandling suspendTimeouts syncFlushCompositor terminateGPUProcess toScreenRect toScreenRectInCSSUnits transformRectLayoutToVisual triggerDeviceReset updateLayerTree wrCapture wrStartCaptureSequence wrStopCaptureSequence xpconnectArgument zoomToFocusedInput

Properties

IMEIsOpen: boolean

Get IME open state. TRUE means 'Open', otherwise, 'Close'. This property works only when IMEEnabled is IME_STATUS_ENABLED.

IMEStatus: number

Get IME status, see above IME_STATUS_* definitions.

asyncPanZoomEnabled: bool

Reports whether APZ is enabled on the widget that this window is attached to. If there is no widget it will report the default platform value of whether or not APZ is enabled.

canvasBackgroundColor: string

Returns the effective canvas background color for the window.

currentAudioBackend: string

Returns the current audio backend as a free-form string.

currentMaxAudioChannels: number

Returns the max channel counts of the current audio device.

currentPreferredSampleRate: number

Returns the preferred sample rate of the current audio device.

displayDPI: number

The DPI of the display

docCharsetIsForced: boolean

Whether the charset of the window's current document has been forced by the user. Cannot be accessed from unprivileged context (not content-accessible)

effectivelyThrottlesFrameRequests: bool
focusedActionHint: string

Get the action hint of the currently focused html input, if any.

focusedAutocapitalize: string

Get the autocapitalize of the currently focused editing host, if any.

focusedInputMode: string

Get the inputmode of the currently focused editing host, if any.

focusedInputType: string

Get the type of the currently focused html input, if any.

framesConstructed: number

Number of frames constructed (excluding breaking) for the curent document.

May throw NS_ERROR_NOT_AVAILABLE.

framesReflowed: number

Number of frames reflowed for the curent document.

May throw NS_ERROR_NOT_AVAILABLE.

gpuProcessPid: int32_t

Returns the GPU process pid, or -1 if there is no GPU process.

hasScrollLinkedEffect: bool
imageAnimationMode: number

Image animation mode of the window. When this attribute's value is changed, the implementation should set all images in the window to the given value. That is, when set to kDontAnimMode, all images will stop animating. The attribute's value must be one of the animationMode values from imgIContainer.

Note

Images may individually override the window's setting after the window's mode is set. Therefore images given different modes since the last setting of the window's mode may behave out of line with the window's overall mode.

Note

The attribute's value is the window's overall mode. It may for example continue to report kDontAnimMode after all images have subsequently been individually animated.

Note

Only images immediately in this window are affected; this is not recursive to subwindows.

See

imgIContainer

inputContextOrigin: number
inputContextURI: nsIURI

Get the document URI which may be retrieved by native IME.

isFirstPaint: boolean

Whether the next paint should be flagged as the first paint for a document. This gives a way to track the next paint that occurs after the flag is set. The flag gets cleared after the next paint.

Can only be accessed with chrome privileges.

isHandlingUserInput: boolean

Returns true if a user input is being handled.

This calls EventStateManager::IsHandlingUserInput().

isInputTaskManagerSuspended: boolean

Returns true if the InputTaskManager is suspended.

isMozAfterPaintPending: boolean

Returns true if a MozAfterPaint event has been queued but not yet fired.

isParentWindowMainWidgetVisible: boolean

Is the parent window's main widget visible? If it isn't, we probably don't want to display any dialogs etc it may request. This corresponds to the visibility check in nsWindowWatcher::OpenWindowInternal().

Will throw a DOM security error if called without chrome privileges or NS_ERROR_NOT_AVAILABLE in the unlikely event that the parent window's main widget can't be reached.

isTestControllingRefreshes: bool

Reports whether the current state is test-controlled refreshes (see advanceTimeAndRefresh and restoreNormalRefresh above).

isWebRenderRequested: boolean

True if webrender was requested by the user (via pref or env-var), false otherwise. Note that this doesn't represent whether or not webrender is actually enabled, just whether or not it was requested.

lastTransactionId: number

Get the last used layer transaction id for this window's refresh driver.

layerManagerRemote: boolean

True if the layer manager for the widget associated with this window is forwarding layers to a remote compositor, false otherwise. Throws an error if there is no widget associated with this window.

layerManagerType: string

What type of layer manager the widget associated with this window is using. "Basic" is unaccelerated; other types are accelerated. Throws an error if there is no widget associated with this window.

millisSinceLastUserInput: number

Returns milliseconds elapsed since last user input was started. Returns -1 if there wasn't any previous user input.

This relies on EventStateManager::LatestUserInputStart()

nodeObservedByIMEContentObserver: Node

Get a root node which is observed by IMEContentObserver.

orientationLock: uint32_t
paintCount: number

Returns the number of times this document for this window has been painted to the screen.

paintingSuppressed: boolean

Returns true if painting is suppressed for this window and false otherwise.

parsedStyleSheets: number

Returns the number of stylesheets that have been parsed on this document. Useful to test caching.

physicalMillimeterInCSSPixels: number

Return the conversion of a physical millimeter in CSS pixels.

refreshDriverHasPendingTick: bool

Indicates whether the current frame's refresh driver has a pending tick, as reported by nsRefreshDriver::HasPendingTick.

May throw NS_ERROR_NOT_AVAILABLE.

restyleGeneration: number

Restyle generation for the current document.

May throw NS_ERROR_NOT_AVAILABLE.

suspendedByBrowsingContextGroup: bool
systemFont: string

NOTE: Currently works only on GTK+.

webrtcRawDeviceId: string

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Returns the current selection as plaintext. Note that the result may be different from the result of sendQueryContentEvent(QUERY_SELECTED_TEXT). This result is computed by native API with transferable data. In other words, when the OS treats the selection as plaintext, it treats current selection as this result.

    Returns string

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • See nsIWidget::ActivateNativeMenuItemAt

    Cannot be accessed from unprivileged context (not content-accessible) Will throw a DOM security error if called without chrome privileges.

    Parameters

    • indexString: string

    Returns void

  • Adds an ElementState bit to the element.

    The state string must be one of the following:

    • (none yet; but for example "higlighted" for ElementState::HIGHLIGHTED)

    The supported state strings are defined in kManuallyManagedStates in nsDOMWindowUtils.cpp.

    Parameters

    • element: Element
    • state: string

    Returns void

  • Adds a style sheet to the list of additional style sheets of the document.

    Style sheets can be preloaded with nsIStyleSheetService.preloadSheet.

    Sheets added via this API take effect immediately on the document.

    Parameters

    • sheet: nsIPreloadedStyleSheet
    • type: number

    Returns void

  • advanceTimeAndRefresh allows the caller to take over the refresh driver timing for a window. A call to advanceTimeAndRefresh does three things: (1) It marks the refresh driver for this presentation so that it no longer refreshes on its own, but is instead driven entirely by the caller (except for the refresh that happens when a document comes out of the bfcache). (2) It advances the refresh driver's current refresh time by the argument given. Negative advances are permitted. (3) It does a refresh (i.e., notifies refresh observers) at that new time.

    Note that this affects other connected docshells of the same type in the same docshell tree, such as parent frames.

    When callers have completed their use of advanceTimeAndRefresh, they must call restoreNormalRefresh.

    Parameters

    • aMilliseconds: number

    Returns void

  • After calling the method, the window for which this DOMWindowUtils was created can be closed using scripts.

    Returns void

  • Returns bool

  • Helper for JS components that need to send permission requests with e10s support properly.

    Parameters

    • aRequest: nsIContentPermissionRequest

    Returns void

  • Parameters

    • aSide: number

    Returns nsIArray

  • Check if any display list building has been done for this element, clears the display list flags if they have.

    Parameters

    • aElement: Element

    Returns boolean

  • Check if any PaintedLayer painting has been done for this element, clears the painted flags if they have.

    Parameters

    • aElement: Element

    Returns boolean

  • Cancel any existing touch points or long tap delays. Calling this is safe even if you're sure there aren't any pointers recorded. You should call this when tests shut down to reset the digitizer driver. Not doing so can leave the digitizer in an undetermined state which can screw up subsequent tests and native input.

    NOTE: The synthesized native event will be fired asynchronously, and upon completion the observer, if provided, will be notified with a "cleartouch" topic.

    Parameters

    • aObserver: nsIObserver

    Returns void

  • Clears the SharedStyleSheetCache.

    Returns void

  • Compare the two canvases, returning the number of differing pixels and the maximum difference in a channel. This will throw an error if the dimensions of the two canvases are different.

    This method requires chrome privileges.

    Parameters

    • aCanvas1: nsISupports
    • aCanvas2: nsISupports
    • aMaxDifference: number

    Returns uint32_t

  • Method for testing StyleAnimationValue::ComputeDistance.

    Returns the distance between the two values as reported by StyleAnimationValue::ComputeDistance for the given element and property.

    Parameters

    • element: Element
    • property: string
    • value1: string
    • value2: string

    Returns number

  • Transform a rectangle given in coordinates relative to the top level parent process widget to the local widget. This window should be in a child process.

    Parameters

    • aX: number
    • aY: number
    • aWidth: number
    • aHeight: number

    Returns DOMRect

  • Force a cycle collection without garbage collection.

    Will throw a DOM security error if called without chrome privileges in non-debug builds. Available to all callers in debug builds.

    Parameters

    • aListener: nsICycleCollectorListener

      listener that receives information about the CC graph

    Returns void

  • Returns the mean round trip latency in seconds for the default input and output device, and the stddev of this latency, as a two element array when the Promise succeeds.

    Returns any

  • Sets a flag on the element to forcibly disable APZ on it. This affects the result of nsLayoutUtils::ShouldDisableApzForElement when called on this element. This function also schedules a repaint to ensure that the change takes effect. Note that this is not reversible; it is intended for use by test code only.

    Parameters

    • aElement: Element

    Returns void

  • These are used to control whether dialogs (alert, prompt, confirm) are allowed, and to reset the inernal state that controls whether dialogs are currently blocked or not.

    Returns void

  • Disable or enable non synthetic test mouse events on all windows.

    Cannot be accessed from unprivileged context (not content-accessible). Will throw a DOM security error if called without chrome privileges.

    Parameters

    • aDisable: boolean

      If true, disable all non synthetic test mouse events on all windows. Otherwise, enable them.

    Returns void

  • Dispatches aEvent as a synthesized trusted event for tests via the PresShell object of the window's document. The event is dispatched to aTarget, which should be an object which implements nsIContent interface (#element, #text, etc).

    Cannot be accessed from unprivileged context (not content-accessible) Will throw a DOM security error if called without chrome privileges.

    Note

    Event handlers won't get aEvent as parameter, but a similar event. Also, aEvent should not be reused.

    Parameters

    • aTarget: Node
    • aEvent: Event

    Returns boolean

  • Sets WidgetEvent::mFlags::mOnlyChromeDispatch to true to ensure that the event is propagated only to chrome. Event's .target property will be aTarget. Returns the same value as what EventTarget.dispatchEvent does.

    Parameters

    • aTarget: EventTarget
    • aEvent: Event

    Returns boolean

  • Retrieve the element at point aX, aY in the window's document.

    Parameters

    • aX: number
    • aY: number
    • aIgnoreRootScrollFrame: boolean

      whether or not to ignore the root scroll frame when retrieving the element. If false, this method returns null for coordinates outside of the viewport.

    • aFlushLayout: boolean

      flushes layout if true. Otherwise, no flush occurs.

    Returns Element

  • Returns void

  • Calls FrameNeedsReflow on that root frame so that a layout flush will be necessary.

    This should only be used for testing.

    Returns void

  • Increase the chaos mode activation level. An equivalent number of calls to leaveChaosMode must be made in order to restore the original chaos mode state. If the activation level is nonzero all chaos mode features are activated.

    Returns void

  • Put the window into a state where scripts are frozen and events suppressed, for use when the window has launched a modal prompt.

    Returns void

  • Called when the child frame has fully exit fullscreen, so that the parent process can also fully exit.

    Parameters

    • aDontRestoreViewSize: boolean

    Returns void

  • Do a round-trip to the compositor to ensure any pending APZ repaint requests get flushed to the main thread. If the function returns true, the flush was triggered and an "apz-repaints-flushed" notification will be dispatched via the observer service once the flush is complete. If the function returns false, an error occurred or a flush is not needed, and the notification will not fire. This is intended to be used by test code only!

    Returns bool

  • Flush pending layout-type notification without flushing throttled animations.

    Returns void

  • Returns void

  • Set a flag that forces the next reflow interrupt check to return true. This can be used by tests to force execution of the interrupted reflow codepaths.

    Returns void

  • See nsIWidget::ForceUpdateNativeMenuAt

    Cannot be accessed from unprivileged context (not content-accessible) Will throw a DOM security error if called without chrome privileges.

    Parameters

    • indexString: string

    Returns void

  • Force a garbage collection followed by a cycle collection.

    Will throw a DOM security error if called without chrome privileges in non-debug builds. Available to all callers in debug builds.

    Parameters

    • aListener: nsICycleCollectorListener

      listener that receives information about the CC graph

    Returns void

  • Returns the given element's bounds without flushing pending layout changes.

    Parameters

    • aElement: Element

    Returns DOMRect

  • Returns the real classname (possibly of the mostly-transparent security wrapper) of aObj.

    Parameters

    • aObject: any

    Returns string

  • Returns any

  • Get the content- and compositor-side APZ test data instances. The return values are of type APZTestData (see APZTestData.webidl).

    Returns any

  • Information about the window size in device pixels.

    Parameters

    • aDisplayWidth: uint32_t
    • aDisplayHeight: uint32_t

    Returns void

  • Returns the directionality of a string using the first-strong character algorithm defined in http://unicode.org/reports/tr9/#P2.

    Returns

    one of DIRECTION_LTR, DIRECTION_RTL or DIRECTION_NOT_SET depending on the first-strong character found in the string.

    Parameters

    • aString: string

      the string to retrieve the direction for.

    Returns number

  • Function to get metadata associated with the window's current document

    Returns

    the value of the metadata, or the empty string if it's not set

    Will throw a DOM security error if called without chrome privileges.

    Parameters

    • aName: string

      the name of the metadata. This should be all lowercase.

    Returns string

  • Get internal id of the stored blob, file or file handle.

    Parameters

    • aFile: any

    Returns number

  • Get internal file path of the stored file or file handle.

    TODO: File handle objects are actually not supported at the moment.

    Parameters

    • aFile: any

    Returns string

  • Get file ref count info for given database and file id.

    Parameters

    • aDatabaseName: string
    • aId: number
    • aRefCnt: number
    • aDBRefCnt: number

    Returns boolean

  • Returns a JSObject which contains a list of frame uniformities when the pref gfx.vsync.collect-scroll-data is enabled. Every result contains a layer address and a frame uniformity for that layer. A negative frame uniformity value indicates an invalid frame uniformity and an error has occured.

    Returns any

  • Relative to the top-level document.

    Parameters

    • aX: number

      0, if there's no such location.

    • aY: number

      0, if there's no such location.

    Returns void

  • Returns number

  • Returns the value of a given property animated on the compositor thread. If the property is NOT currently being animated on the compositor thread, returns an empty string. NOTE: Do not use this function for elements that there was another animation running on the compositor before.

    Parameters

    • aElement: Element
    • aProperty: string
    • aPseudoElement: string

    Returns string

  • Get a JSON string with full information about a profiled script, including the decompilation of the script and placement of decompiled operations within it, and PC counts for each operation.

    Parameters

    • script: number

    Returns string

  • Get the number of scripts with opcode-level profiling information.

    Returns number

  • Get a JSON string for a short summary of a script and the PC counts accumulated for it.

    Parameters

    • script: number

    Returns string

  • Returns uint32_t

  • Returns number

  • Returns the bounds of the window's currently loaded document. This will generally be (0, 0, pageWidth, pageHeight) but in some cases (e.g. RTL documents) may have a negative left value.

    Returns DOMRect

  • Returns the scroll position of the window's currently loaded document.

    See

    nsIDOMWindow::scrollX/Y

    Parameters

    • aFlushLayout: boolean

      flushes layout if true. Otherwise, no flush occurs.

    • aScrollX: number
    • aScrollY: number

    Returns void

  • Returns the scroll position of the window's currently loaded document.

    See

    nsIDOMWindow::scrollX/Y

    Parameters

    • aFlushLayout: boolean

      flushes layout if true. Otherwise, no flush occurs.

    • aScrollX: number
    • aScrollY: number

    Returns void

  • Returns the scrollbar width of the window's scroll frame.

    Parameters

    • aFlushLayout: boolean

      flushes layout if true. Otherwise, no flush occurs.

    • aWidth: number
    • aHeight: number

    Returns void

  • If |aElement| is a scroll container, returns the amount of layout space taken up by its scrollbars (that is, the width of the vertical scrollbar and the height of the horizontal scrollbar) in CSS pixels; otherwise returns zero.

    Note that on some platforms, scrollbars don't take up layout space ("overlay scrollbars"). On such platforms, the returned sizes are always zero.

    Layout scrollbars that normally take up space but were only shown to scroll the visual viewport inside the layout viewport (the layout viewport cannot be scrolled) do not take up space but they still return their size from this function.

    Parameters

    • aElement: Element
    • aVerticalScrollbarWidth: uint32_t
    • aHorizontalScrollbarHeight: uint32_t

    Returns void

  • Returns usage data for a given storage object.

    Parameters

    • aStorage: Storage

      The storage object to get usage data for.

    Returns int64_t

  • Get a list of nodes that have meaningful textual content to be translated. The implementation of this algorithm is in flux as we experiment and refine which approach works best.

    This method requires chrome privileges.

    Parameters

    • aRoot: Node

    Returns nsITranslationNodeList

  • Returns the computed style for the specified property of given pseudo type on the given element after removing styles from declarative animations.

    Parameters

    • aElement: Element

      A target element

    • aPseudoElement: string

      A pseudo type (e.g. '::before' or null)

    • aProperty: string

      A longhand CSS property (e.g. 'background-color')

    • aFlushType: number

      FLUSH_NONE if any pending styles should not happen, FLUSH_STYLE to flush pending styles.

    Returns string

  • Find the view ID for a given element. This is the reverse of findElementWithViewId().

    Parameters

    • aElement: Element

    Returns nsViewID

  • Information retrieved from the viewport-fit value of element.

    Returns string

  • Information retrieved from the tag. See Document::GetViewportInfo for more information.

    Parameters

    • aDisplayWidth: uint32_t
    • aDisplayHeight: uint32_t
    • aDefaultZoom: number
    • aAllowZoom: boolean
    • aMinZoom: number
    • aMaxZoom: number
    • aWidth: uint32_t
    • aHeight: uint32_t
    • aAutoSize: boolean

    Returns void

  • Perform the equivalent of: window.getComputedStyle(aElement, aPseudoElement). getPropertyValue(aPropertyName) except that, when the link whose presence in history is allowed to influence aElement's style is visited, get the value the property would have if allowed all properties to change as a result of :visited selectors (except for cases where getComputedStyle uses data from the frame).

    This is easier to implement than adding our property restrictions to this API, and is sufficient for the present testing requirements (which are essentially testing 'color').

    Parameters

    • aElement: Element
    • aPseudoElement: string
    • aPropertyName: string

    Returns string

  • Returns the scroll position of the window's visual viewport.

    Parameters

    • aOffsetX: number
    • aOffsetY: number

    Returns void

  • Returns the offset of the window's visual viewport relative to the layout viewport.

    Parameters

    • aOffsetX: number
    • aOffsetY: number

    Returns void

  • Calls the document to handle any pending fullscreen requests. It is called when the parent document has entered fullscreen, and we want to put the current document into fullscreen as well. The return value indicates whether there is any fullscreen request handled by this call.

    Returns boolean

  • Returns whether the document's style set's rule processor for the specified level of the cascade is shared by multiple style sets. (Used by tests to ensure that certain optimizations do not regress.)

    Parameters

    • aSheetType: number

      One of the nsIStyleSheetService.*_SHEET constants.

    Returns bool

  • Returns true if the given animation is being tracked by the pending animation tracker for the current document.

    Parameters

    • aAnimation: Animation

    Returns bool

  • Returns bool

  • Returns whether the document we're associated to has recorded a given CSS property via the use counter mechanism.

    Throws if there's no document or the property is invalid.

    Parameters

    • aProperty: string

    Returns bool

  • Is the window is in a modal state? [See enterModalState()]

    Returns boolean

  • Returns true if a keyboard event qualifies as "user activity" such that it would mark the document with the ChromeOnly userHasInteracted property.

    Parameters

    • aKeyboardEvent: Event

    Returns bool

  • In certain cases the event handling of nodes, form controls in practice, may be disabled. Such cases are for example the existence of disabled attribute or -moz-user-input: none.

    Parameters

    • aNode: Node

    Returns boolean

  • Check whether all display items of the primary frame of aElement have been assigned to the same single PaintedLayer in the last paint. If that is the case, returns whether that PaintedLayer is opaque; if it's not the case, an exception is thrown.

    Parameters

    • aElement: Element

    Returns boolean

  • Decrease the chaos mode activation level. See enterChaosMode().

    Returns void

  • Resume normal window state, where scripts can run and events are delivered.

    Returns void

  • Synchronously loads a style sheet from |sheetURI| and adds it to the list of additional style sheets of the document.

    These additional style sheets are very much like user/agent sheets loaded with loadAndRegisterSheet. The only difference is that they are applied only on the document owned by this window.

    Sheets added via this API take effect immediately on the document.

    Parameters

    • sheetURI: nsIURI
    • type: number

    Returns void

  • Same as the above method but allows passing the URI as a string.

    Parameters

    • sheetURI: string
    • type: number

    Returns void

  • Returns true if a flush of the given type is needed.

    Parameters

    • aFlushtype: number

    Returns bool

  • Retrieve all nodes that intersect a rect in the window's document.

    Parameters

    • aX: number

      x reference for the rectangle in CSS pixels

    • aY: number

      y reference for the rectangle in CSS pixels

    • aTopSize: number

      How much to expand up the rectangle

    • aRightSize: number

      How much to expand right the rectangle

    • aBottomSize: number

      How much to expand down the rectangle

    • aLeftSize: number

      How much to expand left the rectangle

    • aIgnoreRootScrollFrame: boolean

      whether or not to ignore the root scroll frame when retrieving the element. If false, this method returns null for coordinates outside of the viewport.

    • aFlushLayout: boolean

      flushes layout if true. Otherwise, no flush occurs.

    • aOnlyVisible: boolean

      Set to true if you only want nodes that pass a visibility hit test.

    • aTransparencyThreshold: number

      Only has an effect if aOnlyVisible is true. Returns what amount of transparency is considered "opaque enough" to consider elements "not visible". The default is effectively "1" (so, only opaque elements will stop an element from being "visible").

    Returns NodeList

  • Count the number of different PaintedLayers that the supplied elements have been assigned to in the last paint. Throws an exception if any of the elements doesn't have a primary frame, or if that frame's display items are assigned to any other layers than just a single PaintedLayer per element.

    Parameters

    • aElements: invalid

    Returns number

  • "Poke" the GC: set a timer to run a GC soon (usually 4 seconds), unless another GC timer has already been set. This is used for testing.

    Parameters

    • aReason: string

      the reason for the GC, from js/public/GCAPI.h. Defaults to DOM_WINDOW_UTILS.

    Returns void

  • Posts an RestyleHint::RESTYLE_SELF restyle event for the given element.

    Parameters

    • aElement: Element

    Returns void

  • Purge collected PC counters.

    Returns void

  • Called when the remote child frame has changed its fullscreen state, when entering fullscreen, and when the origin which is fullscreen changes. aFrameElement is the iframe element which contains the child-process fullscreen document.

    Parameters

    • aFrameElement: Element

    Returns void

  • Called when the remote frame has popped all fullscreen elements off its stack, so that the operation can complete on the parent side.

    Returns void

  • Removes the specified ElementState bits from the element.

    See above for the strings that can be passed for |state|.

    Parameters

    • element: Element
    • state: string

    Returns void

  • Remove the document style sheet at |sheetURI| from the list of additional style sheets of the document. The removal takes effect immediately.

    Parameters

    • sheetURI: nsIURI
    • type: number

    Returns void

  • Same as the above method but allows passing the URI as a string.

    Parameters

    • sheetURI: string
    • type: number

    Returns void

  • Returns void

  • Calls SetInitialViewport on the MobileViewportManager, which effectively causes it to refresh all of its internal state and update things that need updating.

    Returns void

  • Enable or disable displayport suppression. This is intended to be used by testing code, to provide more deterministic behaviour over the displayport suppression during tests. Note that this updates a flag, so whatever value was last provided is what will be used.

    Parameters

    • aEnabled: boolean

    Returns void

  • Restore the modified HiDPI mode.

    Returns void

  • Undoes the effects of advanceTimeAndRefresh.

    Returns void

  • Returns void

  • Trigger whichever GC or CC timer is currently active and waiting to fire. Don't do this too much for initiating heavy actions, like the start of a IGC.

    Parameters

    • aReason: string

      the reason for the GC, from js/public/GCAPI.h. Defaults to DOM_WINDOW_UTILS.

    Returns void

  • Parameters

    • aOffsetX: number
    • aOffsetY: number
    • aUpdateType: number
    • aScrollMode: number

    Returns void

  • Select content at a client point based on a selection behavior if the underlying content is selectable. Selection will accumulate with any existing selection, callers should clear selection prior if needed. May fire selection changed events. Calls nsFrame's SelectByTypeAtPoint.

    Returns

    True if a selection occured, false otherwise.

    Throw

    NS_ERROR_DOM_SECURITY_ERR, NS_ERROR_UNEXPECTED for utils issues, and NS_ERROR_INVALID_ARG for coordinates that are outside this window.

    Parameters

    • aX: number
    • aY: number
    • aSelectBehavior: number

    Returns boolean

  • Generate a content command event.

    Cannot be accessed from unprivileged context (not content-accessible) Will throw a DOM security error if called without chrome privileges.

    Parameters

    • aType: string

      Type of command content event to send. Can be one of "cut", "copy", "paste", "delete", "undo", "redo", "insertText" or "pasteTransferable".

    • aTransferable: nsITransferable

      an instance of nsITransferable when aType is "pasteTransferable"

    • aString: string

      The string to be inserted into focused editor when aType is "insertText"

    Returns void

  • Synthesize a mouse event. The event types supported are: mousedown, mouseup, mousemove, mouseover, mouseout, mousecancel, contextmenu, MozMouseHittest

    Events are sent in coordinates offset by aX and aY from the window.

    Note that additional events may be fired as a result of this call. For instance, typically a click event will be fired as a result of a mousedown and mouseup in sequence.

    Normally at this level of events, the mouseover and mouseout events are only fired when the window is entered or exited. For inter-element mouseover and mouseout events, a movemove event fired on the new element should be sufficient to generate the correct over and out events as well.

    Cannot be accessed from unprivileged context (not content-accessible) Will throw a DOM security error if called without chrome privileges.

    The event is dispatched via the toplevel window, so it could go to any window under the toplevel window, in some cases it could never reach this window at all.

    NOTE: mousecancel is used to represent the vanishing of an input device such as a pen leaving its digitizer by synthesizing a WidgetMouseEvent, whose mMessage is eMouseExitFromWidget and mExitFrom is WidgetMouseEvent::eTopLevel.

    Parameters

    • aType: string

      event type

    • aX: number

      x offset in CSS pixels

    • aY: number

      y offset in CSS pixels

    • aButton: number

      button to synthesize

    • aClickCount: number

      number of clicks that have been performed

    • aModifiers: number

      modifiers pressed, using constants defined as MODIFIER_*

    • aIgnoreRootScrollFrame: boolean

      whether the event should ignore viewport bounds during dispatch

    • aPressure: number

      touch input pressure: 0.0 -> 1.0

    • aInputSourceArg: number

      input source, see MouseEvent for values, defaults to mouse input.

    • aIsDOMEventSynthesized: boolean

      controls Event.isSynthesized value that helps identifying test related events, defaults to true

    • aIsWidgetEventSynthesized: boolean

      controls WidgetMouseEvent.mReason value defaults to false (WidgetMouseEvent::eReal)

    • aButtons: number
    • aIdentifier: number

      A unique identifier for the pointer causing the event, defaulting to nsIDOMWindowUtils::DEFAULT_MOUSE_POINTER_ID.

      returns true if the page called prevent default on this event

    Returns boolean

  • The same as sendMouseEvent but ensures that the event is dispatched to this DOM window or one of its children.

    Parameters

    • aType: string
    • aX: number
    • aY: number
    • aButton: number
    • aClickCount: number
    • aModifiers: number
    • aIgnoreRootScrollFrame: boolean
    • aPressure: number
    • aInputSourceArg: number
    • aIsDOMEventSynthesized: boolean
    • aIsWidgetEventSynthesized: boolean
    • aButtons: number
    • aIdentifier: number

    Returns void

  • See nsIWidget::SynthesizeNativeKeyEvent

    Cannot be accessed from unprivileged context (not content-accessible) Will throw a DOM security error if called without chrome privileges.

    When you use this for tests, use the constants defined in NativeKeyCodes.js

    NOTE: The synthesized native event will be fired asynchronously, and upon completion the observer, if provided, will be notified with a "keyevent" topic.

    Parameters

    • aNativeKeyboardLayout: number
    • aNativeKeyCode: number
    • aModifierFlags: number
    • aCharacters: string
    • aUnmodifiedCharacters: string
    • aObserver: nsIObserver

    Returns void

  • Parameters

    • aScreenX: number
    • aScreenY: number
    • aNativeMessage: number
    • aButton: number
    • aModifierFlags: number
    • aElementOnWidget: Element
    • aObserver: nsIObserver

    Returns void

  • See nsIWidget::SynthesizeNativeMouseScrollEvent

    Will be called on the widget that contains aElement. Cannot be accessed from unprivileged context (not content-accessible) Will throw a DOM security error if called without chrome privileges.

    NOTE: The synthesized native event will be fired asynchronously, and upon completion the observer, if provided, will be notified with a "mousescrollevent" topic.

    Parameters

    • aScreenX: number
    • aScreenY: number
    • aNativeMessage: number

      On Windows: WM_MOUSEWHEEL (0x020A), WM_MOUSEHWHEEL(0x020E), WM_VSCROLL (0x0115) or WM_HSCROLL (0x114).

    • aDeltaX: number
    • aDeltaY: number
    • aDeltaZ: number
    • aModifierFlags: number
    • aAdditionalFlags: number
    • aElement: Element
    • aObserver: nsIObserver

    Returns void

  • Create a new or update an existing pen input on the digitizer.

    Widget support: Windows 10 1809+. Other widgets will throw.

    NOTE: The synthesized native event will be fired asynchronously, and upon completion the observer, if provided, will be notified with a "peninput" topic.

    Parameters

    • aPointerId: number

      The touch point id to create or update.

    • aPointerState: number

      one or more of the TOUCH_* listed above

    • aScreenX: number

      x screen coord of this event

    • aScreenY: number

      y screen coord of this event

    • aPressure: number

      0.0 -> 1.0 float val indicating pressure

    • aRotation: number

      0 -> 359 degree value indicating the rotation of the pointer. Use 0 for normal taps.

    • aTiltX: number

      90 -> 90 degree value indicating the tilt along the x-axis of the pointer. Use 0 for normal taps.

    • aTiltY: number

      90 -> 90 degree value indicating the tilt along the y-axis of the pointer. Use 0 for normal taps.

    • aButton: number

      Same as MouseEvent::button.

    • aObserver: nsIObserver

    Returns void

  • Create a new or update an existing touch point on the digitizer. To trigger os level gestures, individual touch points should transition through a complete set of touch states which should be sent as individual calls. For example: tap - msg1:TOUCH_CONTACT, msg2:TOUCH_REMOVE drag - msg1-n:TOUCH_CONTACT (moving), msgn+1:TOUCH_REMOVE hover drag - msg1-n:TOUCH_HOVER (moving), msgn+1:TOUCH_REMOVE

    Widget support: Windows 8.0+, Winrt/Win32. Other widgets will throw.

    NOTE: The synthesized native event will be fired asynchronously, and upon completion the observer, if provided, will be notified with a "touchpoint" topic.

    Parameters

    • aPointerId: number

      The touch point id to create or update.

    • aTouchState: number

      one or more of the touch states listed above

    • aScreenX: number
    • aScreenY: number
    • aPressure: number

      0.0 -> 1.0 float val indicating pressure

    • aOrientation: number

      0 -> 359 degree value indicating the orientation of the pointer. Use 90 for normal taps.

    • aObserver: nsIObserver

    Returns void

  • Simulates native touch based taps on the input digitizer. Events triggered by this call are injected at the os level. Events do not bypass widget level input processing and as such can be used to test widget event logic and async pan-zoom controller functionality. Cannot be accessed from an unprivileged context.

    Long taps (based on the aLongTap parameter) will be completed asynchrnously after the call returns. Long tap delay is based on the ui.click_hold_context_menus.delay pref or 1500 msec if pref is not set.

    Widget support: Windows 8.0+, Winrt/Win32. Other widgets will throw.

    NOTE: The synthesized native event will be fired asynchronously, and upon completion the observer, if provided, will be notified, with a "touchtap" topic.

    Parameters

    • aScreenX: number
    • aScreenY: number
    • aLongTap: boolean

      true if the tap should be long, false for a short tap.

    • aObserver: nsIObserver

    Returns void

  • Send a native event as if the user double tapped the touchpad with two fingers.

    Widget support: macOS.

    Parameters

    • aScreenX: number
    • aScreenY: number
    • aModifierFlags: number

      is expected to contain native modifier values.

    Returns void

  • Send a native event as if the user panned on the touchpad with two fingers.

    NOTE: The synthesized native event will be fired asynchronously, and upon completion the observer, if provided, will be notified with a "touchpadpanevent" topic.

    Widget support: Windows.

    Parameters

    • aEventPhase: number
    • aScreenX: number
    • aScreenY: number
    • aDeltaX: number
    • aDeltaY: number
    • aModifierFlags: number

      is expected to contain native modifier values.

    • aObserver: nsIObserver

    Returns void

  • These values indicate touchpad pinch phase states : PHASE_BEGIN PHASE_UPDATE PHASE_END Widget support: Linux GTK 3.18+.

    Parameters

    • aEventPhase: number

      The touchpad pinch phase using states listed above.

    • aScale: number

      Events with PHASE_UPDATE will change the zoom level by the ratio between the scale of the current event and the scale of the last event.

    • aScreenX: number
    • aScreenY: number
    • aModifierFlags: number

      is expected to contain native modifier values.

    Returns void

  • Synthesize a query content event. Note that the result value returned here is in LayoutDevice pixels rather than CSS pixels.

    Parameters

    • aType: number

      One of the following const values. And see also each comment for the other parameters and the result.

    • aOffset: number
    • aLength: number
    • aX: number
    • aY: number
    • aAdditionalFlags: number

      See the description of QUERY_CONTENT_FLAG_*.

    Returns nsIQueryContentEventResult

  • Synthesize a selection set event to the window.

    This sets the selection as the specified information. Note that for avoiding unnecessary update from user and web app point of view, it compares aOffset and aLength with selection cache which is same as what is notified with NOTIFY_IME_OF_SELECTION_CHANGE. Therefore, if the notification is still queued, this works different from user's scenario. Therefore, before calling this, the caller should wait at least 2 animation frames if Selection was changed before.

    Returns

    True, if succeeded. Otherwise, false.

    Parameters

    • aOffset: number

      The caret offset of the selection start.

    • aLength: number

      The length of the selection. If this is too long, the extra length is ignored.

    • aAdditionalFlags: number

      See the description of SELECTION_SET_FLAG_*.

    Returns boolean

  • Synthesize a simple gesture event for a window. The event types supported are: MozSwipeGestureMayStart, MozSwipeGestureStart, MozSwipeGestureUpdate, MozSwipeGestureEnd, MozSwipeGesture, MozMagnifyGestureStart, MozMagnifyGestureUpdate, MozMagnifyGesture, MozRotateGestureStart, MozRotateGestureUpdate, MozRotateGesture, MozPressTapGesture, MozTapGesture, and MozEdgeUIGesture.

    Cannot be accessed from unprivileged context (not content-accessible) Will throw a DOM security error if called without chrome privileges.

    Parameters

    • aType: string

      event type

    • aX: number

      x offset in CSS pixels

    • aY: number

      y offset in CSS pixels

    • aDirection: number

      direction, using constants defined in SimpleGestureEvent.webidl

    • aDelta: number

      amount of magnification or rotation for magnify and rotation events

    • aModifiers: number

      modifiers pressed, using constants defined in Event.webidl

    • aClickCount: number

      For tap gestures, the number of taps.

    Returns void

  • Synthesize a touch event. The event types supported are: touchstart, touchend, touchmove, and touchcancel

    Events are sent in coordinates offset by aX and aY from the window.

    Cannot be accessed from unprivileged context (not content-accessible) Will throw a DOM security error if called without chrome privileges.

    The event is dispatched via the toplevel window, so it could go to any window under the toplevel window, in some cases it could never reach this window at all.

    Parameters

    • aType: string

      event type

    • aIdentifiers: invalid
    • aXs: invalid
    • aYs: invalid
    • aRxs: invalid
    • aRys: invalid
    • aRotationAngles: invalid
    • aForces: invalid
    • aTiltXs: invalid
    • aTiltYs: invalid
    • aTwists: invalid
    • aModifiers: number

      modifiers pressed, using constants defined as MODIFIER_*

    • aIgnoreRootScrollFrame: boolean

      whether the event should ignore viewport bounds during dispatch

      returns true if the page called prevent default on this touch event

    Returns boolean

  • The same as sendTouchEvent but ensures that the event is dispatched to this DOM window or one of its children.

    Parameters

    • aType: string
    • aIdentifiers: invalid
    • aXs: invalid
    • aYs: invalid
    • aRxs: invalid
    • aRys: invalid
    • aRotationAngles: invalid
    • aForces: invalid
    • aTiltXs: invalid
    • aTiltYs: invalid
    • aTwists: invalid
    • aModifiers: number
    • aIgnoreRootScrollFrame: boolean

    Returns boolean

  • Parameters

    • aX: number
    • aY: number
    • aDeltaX: number
    • aDeltaY: number
    • aDeltaZ: number
    • aDeltaMode: number
    • aModifiers: number
    • aLineOrPageDeltaX: number
    • aLineOrPageDeltaY: number
    • aOptions: number

    Returns void

  • Set async scroll offset on an element. The next composite will render with that offset if async scrolling is enabled, and then the offset will be removed. Only call this while test-controlled refreshes is enabled.

    Parameters

    • aElement: Element
    • aX: number
    • aY: number

    Returns void

  • Set async zoom value. aRootElement should be the document element of our document. The next composite will render with that zoom added to any existing zoom if async scrolling is enabled, and then the zoom will be removed. Only call this while test-controlled refreshes is enabled.

    Parameters

    • aRootElement: Element
    • aValue: number

    Returns void

  • Controls the amount of chrome that should be visible on each side of the window. Works like the chromemargin xul:window attribute. This should only be used with non-XUL windows.

    Parameters

    • aTop: int32_t
    • aRight: int32_t
    • aBottom: int32_t
    • aLeft: int32_t

    Returns void

  • Toggle recording of composition on and off.

    This is equivalent to calling |startCompositionRecorder()| or |stopCompositionRecorder(true)|.

    Parameters

    • aValue: boolean

    Returns any

  • Parameters

    • aX: int32_t
    • aY: int32_t
    • aWidth: int32_t
    • aHeight: int32_t
    • aElement: Element

    Returns void

  • For any scrollable element, this allows you to override the visible region and draw more than what is visible, which is useful for asynchronous drawing. The "displayport" will be <xPx, yPx, widthPx, heightPx> in units of CSS pixels, regardless of the size of the enclosing container. This will not trigger reflow.

    For the root scroll area, pass in the root document element. For scrollable elements, pass in the container element (for instance, the element with overflow: scroll).

    <x, y> is relative to the top-left of what would normally be the visible area of the element. This means that the pixels rendered to the displayport take scrolling into account, for example.

    It's legal to set a displayport that extends beyond the overflow area in any direction (left/right/top/bottom).

    It's also legal to set a displayport that extends beyond the area's bounds. No pixels are rendered outside the area bounds.

    The caller of this method must have chrome privileges.

    Calling this will always force a recomposite, so it should be avoided if at all possible. Client code should do checks before calling this so that duplicate sets are not made with the same displayport.

    aPriority is recorded along with the displayport rectangle. If this method is called with a lower priority than the current priority, the call is ignored.

    Parameters

    • aXPx: number
    • aYPx: number
    • aWidthPx: number
    • aHeightPx: number
    • aElement: Element
    • aPriority: uint32_t

    Returns void

  • An alternate way to represent a displayport rect as a set of margins and a base rect to apply those margins to. A consumer of pixels may ask for as many extra pixels as it would like in each direction. Layout then sets the base rect to the "visible rect" of the element, which is just the subrect of the element that is drawn (it does not take in account content covering the element).

    If both a displayport rect and displayport margins with corresponding base rect are set with the same priority then the margins will take precendence.

    Specifying an alignment value will ensure that after the base rect has been expanded by the displayport margins, it will be further expanded so that each edge is located at a multiple of the "alignment" value.

    Note that both the margin values and alignment are treated as values in ScreenPixels. Refer to layout/base/Units.h for a description of this unit. The base rect values are in app units.

    Parameters

    • aLeftMargin: number
    • aTopMargin: number
    • aRightMargin: number
    • aBottomMargin: number
    • aElement: Element
    • aPriority: uint32_t

    Returns void

  • Sets the maximum height of the dynamic toolbar in Screen pixel units.

    Parameters

    • aHeightInScreen: uint32_t

    Returns void

  • If aHandlingInput is true, this informs the event state manager that we're handling user input, and provides transient user activation. Otherwise, this is a no-op (as by default we're not handling user input). Remember to call destruct() on the return value! See also nsIDOMWindowUtils::isHandlingUserInput.

    Parameters

    • aHandlingInput: boolean

    Returns nsIJSRAIIHelper

  • Change the DPI setting for the primary monitor. This setHiDPIMode and restoreHiDPIMode below are only available on debug builds since these APIs are supposed to be used in tests.

    Note that on Mac, this API doesn't change the system DPI setting, rather it changes our internal state of DPI settings, thus it will not invoke the exact same stuff when the system DPI setting is changed.

    Parameters

    • aHiDPI: boolean

    Returns void

  • For any scrollable element, this allows you to override the default scroll behaviour and force autodir (which allows a mousewheel to horizontally scroll regions that only scroll on that one axis).

    See the documentation for mousewheel.autodir.enabled and mousewheel.autodir.honourroot for a more thorough explanation of what these behaviours do.

    Parameters

    • aElement: Element
    • aEnabled: boolean
    • aHonourRoot: boolean

    Returns void

  • Controls the amount of space on each edge of the window that can be dragged to resize the window in that direction.

    Parameters

    • aResizeMargin: int32_t

      In CSS pixels, will apply to all four window sides.

    Returns void

  • Get/set the resolution at which rescalable web content is drawn for testing purposes.

    Setting a new resolution does not trigger reflow. This API is entirely separate from textZoom and fullZoom; a resolution scale can be applied together with both textZoom and fullZoom.

    The effect of this API is for gfx code to allocate more or fewer pixels for rescalable content by a factor of |resolution| in both dimensions.

    In addition, the content is scaled by the amount of the resolution, so that it is displayed at a correspondingly larger or smaller size, without the need for the caller to set an additional transform.

    The purpose of this API is to allow tests to simulate many of the effects a non-reflowing scale-zoom, e.g. for pinch-zoom on mobile platforms, and should be only used for testing purposes.

    The caller of this method must have chrome privileges.

    This is intended to be used by test code only!

    Parameters

    • aResolution: number

    Returns void

  • Set a resolution on the presShell which is the "restored" from history. The display dimensions are compared to their current values and used to scale the resolution value if necessary, e.g. if the device was rotated between saving and restoring of the session data. This resolution should be used when painting for the first time. Calling this too late may have no effect.

    Parameters

    • aResolution: number
    • aDisplayWidth: uint32_t
    • aDisplayHeight: uint32_t

    Returns void

  • Set the viewport size for the purposes of clamping scroll positions for the root scroll frame of this document to be (aWidth,aHeight) in CSS pixels.

    The caller of this method must have chrome privileges.

    Parameters

    • aWidth: number
    • aHeight: number

    Returns void

  • Start the composition recorder.

    Returns

    A promise that is resolved to true if the composion recorder was started successfully.

    Returns any

  • Record (and return) frame-intervals for frames which were presented between calling StartFrameTimeRecording and StopFrameTimeRecording.

    • Uses a cyclic buffer and serves concurrent consumers, so if Stop is called too late (elements were overwritten since Start), result is considered invalid and hence empty.
    • Buffer is capable of holding 10 seconds @ 60fps (or more if frames were less frequent). Can be changed (up to 1 hour) via pref: toolkit.framesRecording.bufferSize.
    • Note: the first frame-interval may be longer than expected because last frame might have been presented some time before calling StartFrameTimeRecording.

    Returns a handle which represents current recording start position.

    Parameters

    • startIndex: number

    Returns void

  • Begin opcode-level profiling of all JavaScript execution in the window's runtime.

    Returns void

  • Stop the composition recorder.

    Returns

    A promise that resolves when the frames have been collected. When |aWriteToDisk| is true, the promise will resolve to |undefined|. Otherwise, the promise will resolve to a |DOMCollectedFrames| dictionary, which contains the timestamps and contents of the captured frames.

    Parameters

    • aWriteToDisk: boolean

      Whether or not the frames should be written to disk. If false, they will be returned in the promise.

    Returns any

  • Stop opcode-level profiling of JavaScript execution in the runtime, and collect all counts for use by getPCCount methods.

    Returns void

  • Suppress animations that are applied to a window by OS when resizing, moving, changing size mode, ...

    Parameters

    • aSuppress: boolean

    Returns void

  • Suppresses/unsuppresses user initiated event handling in window's document and subdocuments.

    Throw

    NS_ERROR_DOM_SECURITY_ERR if called without chrome privileges and NS_ERROR_FAILURE if window doesn't have a document.

    Parameters

    • aSuppress: boolean

    Returns void

  • Suspend/resume timeouts on this window and its descendant windows.

    Returns void

  • Returns void

  • Terminate the GPU process. Used for testing GPU process restarts.

    Returns void

  • Transform a rectangle given in coordinates relative to this document to the screen.

    Parameters

    • aX: number
    • aY: number
    • aWidth: number
    • aHeight: number

    Returns DOMRect

  • Transform a rectangle given in coordinates relative to this document into CSS coordinates relative to the screen.

    Parameters

    • aX: number
    • aY: number
    • aWidth: number
    • aHeight: number

    Returns DOMRect

  • Transforms the passed in rect from layout relative coords (relative to this document) to be is visual coords.

    Parameters

    • aX: number
    • aY: number
    • aWidth: number
    • aHeight: number

    Returns DOMRect

  • Alerts Gecko of a device reset

    Returns void

  • Force a synchronous layer transaction for this window if necessary.

    Returns void

  • Capture the contents of the current WebRender frame and save them to a folder relative to the current working directory.

    Returns void

  • Start capturing each WebRender frame to disk.

    |aPath| is the name of a new directory to be created to hold the captures. it is relative to:

    • the |PUBLIC_STORAGE| environment variable, if set, else
    • the |MOZ_UPLOAD_DIR| environment variable, if set, else
    • the user's home directory, if known, else the current directory.

    If there is already a directory with the given name, a numeric suffix is added to ensure a fresh directory is created. This means that you can't be sure your capture directory is actually named |aPath|.

    |aFlags| is a set of flags from |webrender::render_api::CaptureBits|.

    If there is already a sequence capture in progress, stop it and start a new one, with the new path and flags.

    Parameters

    • aPath: string
    • aFlags: uint32_t

    Returns void

  • Stop a capture begun with |wrStartCaptureSequence|.

    Returns void

  • This method doesn't do anything useful. It was solely added for the purpose of the test for bug 503926.

    Parameters

    • aObj: nsISupports

    Returns void

  • Ask APZ to pan and zoom to the focused input element.

    Returns void

Generated using TypeDoc