Readonly
IMEIsReadonly
IMEStatusGet IME status, see above IME_STATUS_* definitions.
Readonly
asyncReports 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.
Readonly
canvasReturns the effective canvas background color for the window.
Readonly
currentReturns the current audio backend as a free-form string.
Readonly
currentReturns the max channel counts of the current audio device.
Readonly
currentReturns the preferred sample rate of the current audio device.
Readonly
displayDPIThe DPI of the display
Readonly
docWhether the charset of the window's current document has been forced by the user. Cannot be accessed from unprivileged context (not content-accessible)
Readonly
effectivelyReadonly
focusedGet the action hint of the currently focused html input, if any.
Readonly
focusedGet the autocapitalize of the currently focused editing host, if any.
Readonly
focusedGet the inputmode of the currently focused editing host, if any.
Readonly
focusedGet the type of the currently focused html input, if any.
Readonly
framesNumber of frames constructed (excluding breaking) for the curent document.
May throw NS_ERROR_NOT_AVAILABLE.
Readonly
framesNumber of frames reflowed for the curent document.
May throw NS_ERROR_NOT_AVAILABLE.
Readonly
gpuReturns the GPU process pid, or -1 if there is no GPU process.
Readonly
hasImage 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.
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.
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.
Only images immediately in this window are affected; this is not recursive to subwindows.
imgIContainer
Readonly
inputReadonly
inputGet the document URI which may be retrieved by native IME.
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.
Readonly
isReturns true if a user input is being handled.
This calls EventStateManager::IsHandlingUserInput().
Readonly
isReturns true if the InputTaskManager is suspended.
Readonly
isReturns true if a MozAfterPaint event has been queued but not yet fired.
Readonly
isIs 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.
Readonly
isReports whether the current state is test-controlled refreshes (see advanceTimeAndRefresh and restoreNormalRefresh above).
Readonly
isTrue 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.
Readonly
lastGet the last used layer transaction id for this window's refresh driver.
Readonly
layerTrue 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.
Readonly
layerWhat 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.
Readonly
millisReturns milliseconds elapsed since last user input was started. Returns -1 if there wasn't any previous user input.
This relies on EventStateManager::LatestUserInputStart()
Readonly
nodeGet a root node which is observed by IMEContentObserver.
Readonly
orientationReadonly
paintReturns the number of times this document for this window has been painted to the screen.
Readonly
paintingReturns true if painting is suppressed for this window and false otherwise.
Readonly
parsedReturns the number of stylesheets that have been parsed on this document. Useful to test caching.
Readonly
physicalReturn the conversion of a physical millimeter in CSS pixels.
Readonly
refreshIndicates whether the current frame's refresh driver has a pending tick, as reported by nsRefreshDriver::HasPendingTick.
May throw NS_ERROR_NOT_AVAILABLE.
Readonly
restyleRestyle generation for the current document.
May throw NS_ERROR_NOT_AVAILABLE.
Readonly
suspendedNOTE: Currently works only on GTK+.
Readonly
webrtcReturns 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.
Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Adds an ElementState bit to the element.
The state string must be one of the following:
The supported state strings are defined in kManuallyManagedStates in nsDOMWindowUtils.cpp.
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.
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.
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.
Clears the SharedStyleSheetCache.
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.
Method for testing StyleAnimationValue::ComputeDistance.
Returns the distance between the two values as reported by StyleAnimationValue::ComputeDistance for the given element and property.
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.
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.
listener that receives information about the CC graph
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.
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.
If true, disable all non synthetic test mouse events on all windows. Otherwise, enable them.
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.
Event handlers won't get aEvent as parameter, but a similar event. Also, aEvent should not be reused.
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.
Retrieve the element at point aX, aY in the window's document.
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.
flushes layout if true. Otherwise, no flush occurs.
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!
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.
listener that receives information about the CC graph
Returns the directionality of a string using the first-strong character algorithm defined in http://unicode.org/reports/tr9/#P2.
one of DIRECTION_LTR, DIRECTION_RTL or DIRECTION_NOT_SET depending on the first-strong character found in the string.
the string to retrieve the direction for.
Function to get metadata associated with the window's current document
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.
the name of the metadata. This should be all lowercase.
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 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.
Returns the scroll position of the window's currently loaded document.
nsIDOMWindow::scrollX/Y
flushes layout if true. Otherwise, no flush occurs.
Returns the scroll position of the window's currently loaded document.
nsIDOMWindow::scrollX/Y
flushes layout if true. Otherwise, no flush occurs.
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.
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.
Returns the computed style for the specified property of given pseudo type on the given element after removing styles from declarative animations.
A target element
A pseudo type (e.g. '::before' or null)
A longhand CSS property (e.g. 'background-color')
FLUSH_NONE if any pending styles should not happen, FLUSH_STYLE to flush pending styles.
Information retrieved from the tag. See Document::GetViewportInfo for more information.
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').
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 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.)
One of the nsIStyleSheetService.*_SHEET constants.
Returns whether a given header and value is a CORS-safelisted request header per https://fetch.spec.whatwg.org/#cors-safelisted-request-header
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.
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.
Retrieve all nodes that intersect a rect in the window's document.
x reference for the rectangle in CSS pixels
y reference for the rectangle in CSS pixels
How much to expand up the rectangle
How much to expand right the rectangle
How much to expand down the rectangle
How much to expand left the rectangle
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.
flushes layout if true. Otherwise, no flush occurs.
Set to true if you only want nodes that pass a visibility hit test.
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").
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.
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.
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.
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.
the reason for the GC, from js/public/GCAPI.h. Defaults to DOM_WINDOW_UTILS.
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.
True if a selection occured, false otherwise.
NS_ERROR_DOM_SECURITY_ERR, NS_ERROR_UNEXPECTED for utils issues, and NS_ERROR_INVALID_ARG for coordinates that are outside this window.
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.
Type of command content event to send. Can be one of "cut", "copy", "paste", "delete", "undo", "redo", "insertText" or "pasteTransferable".
an instance of nsITransferable when aType is "pasteTransferable"
The string to be inserted into focused editor when aType is "insertText"
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.
event type
x offset in CSS pixels
y offset in CSS pixels
button to synthesize
number of clicks that have been performed
modifiers pressed, using constants defined as MODIFIER_*
whether the event should ignore viewport bounds during dispatch
touch input pressure: 0.0 -> 1.0
input source, see MouseEvent for values, defaults to mouse input.
controls Event.isSynthesized value that helps identifying test related events, defaults to true
controls WidgetMouseEvent.mReason value defaults to false (WidgetMouseEvent::eReal)
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
The same as sendMouseEvent but ensures that the event is dispatched to this DOM window or one of its children.
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.
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.
On Windows: WM_MOUSEWHEEL (0x020A), WM_MOUSEHWHEEL(0x020E), WM_VSCROLL (0x0115) or WM_HSCROLL (0x114).
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.
The touch point id to create or update.
one or more of the TOUCH_* listed above
x screen coord of this event
y screen coord of this event
0.0 -> 1.0 float val indicating pressure
0 -> 359 degree value indicating the rotation of the pointer. Use 0 for normal taps.
90 -> 90 degree value indicating the tilt along the x-axis of the pointer. Use 0 for normal taps.
90 -> 90 degree value indicating the tilt along the y-axis of the pointer. Use 0 for normal taps.
Same as MouseEvent::button.
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.
The touch point id to create or update.
one or more of the touch states listed above
0.0 -> 1.0 float val indicating pressure
0 -> 359 degree value indicating the orientation of the pointer. Use 90 for normal taps.
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.
true if the tap should be long, false for a short tap.
Send a native event as if the user double tapped the touchpad with two fingers.
Widget support: macOS.
is expected to contain native modifier values.
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.
is expected to contain native modifier values.
These values indicate touchpad pinch phase states : PHASE_BEGIN PHASE_UPDATE PHASE_END Widget support: Linux GTK 3.18+.
The touchpad pinch phase using states listed above.
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.
is expected to contain native modifier values.
Synthesize a query content event. Note that the result value returned here is in LayoutDevice pixels rather than CSS pixels.
One of the following const values. And see also each comment for the other parameters and the result.
See the description of QUERY_CONTENT_FLAG_*.
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.
True, if succeeded. Otherwise, false.
The caret offset of the selection start.
The length of the selection. If this is too long, the extra length is ignored.
See the description of SELECTION_SET_FLAG_*.
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.
event type
x offset in CSS pixels
y offset in CSS pixels
direction, using constants defined in SimpleGestureEvent.webidl
amount of magnification or rotation for magnify and rotation events
modifiers pressed, using constants defined in Event.webidl
For tap gestures, the number of taps.
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.
event type
modifiers pressed, using constants defined as MODIFIER_*
whether the event should ignore viewport bounds during dispatch
returns true if the page called prevent default on this touch event
The same as sendTouchEvent but ensures that the event is dispatched to this DOM window or one of its children.
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.
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.
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.
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.
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.
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.
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.
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.
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!
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.
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.
Record (and return) frame-intervals for frames which were presented between calling StartFrameTimeRecording and StopFrameTimeRecording.
Returns a handle which represents current recording start position.
Stop the composition recorder.
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.
Whether or not the frames should be written to disk. If false, they will be returned in the promise.
Suppresses/unsuppresses user initiated event handling in window's document and subdocuments.
NS_ERROR_DOM_SECURITY_ERR if called without chrome privileges and NS_ERROR_FAILURE if window doesn't have a document.
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:
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.
Generated using TypeDoc
Get IME open state. TRUE means 'Open', otherwise, 'Close'. This property works only when IMEEnabled is IME_STATUS_ENABLED.