/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/** *Informationretrievedfromthe<metaname="viewport">tag. *SeeDocument::GetViewportInfoformoreinformation.
*/ void getViewportInfo(in uint32_t aDisplayWidth, in uint32_t aDisplayHeight,
out double aDefaultZoom, out boolean aAllowZoom,
out double aMinZoom, out double aMaxZoom,
out uint32_t aWidth, out uint32_t aHeight,
out boolean aAutoSize); /* *Informationretrievedfromtheviewport-fitvalueof<metaname="viewport"> *element.
*/
AString getViewportFitInfo();
/** *Informationaboutthewindowsizeindevicepixels.
*/ void getDocumentViewerSize(out uint32_t aDisplayWidth, out uint32_t aDisplayHeight);
/** *Foranyscrollableelement,thisallowsyoutooverridethedefault *scrollbehaviourandforceautodir(whichallowsamousewheelto *horizontallyscrollregionsthatonlyscrollonthatoneaxis). * *Seethedocumentationformousewheel.autodir.enabledand *mousewheel.autodir.honourrootforamorethoroughexplanationof *whatthesebehavioursdo.
*/ void setMousewheelAutodir(in Element aElement, in boolean aEnabled, in boolean aHonourRoot);
/** *Foranyscrollableelement,thisallowsyoutooverridethe *visibleregionanddrawmorethanwhatisvisible,whichis *usefulforasynchronousdrawing.The"displayport"willbe *<xPx,yPx,widthPx,heightPx>inunitsofCSSpixels, *regardlessofthesizeoftheenclosingcontainer.This *will*not*triggerreflow. * *Fortherootscrollarea,passintherootdocumentelement. *Forscrollableelements,passinthecontainerelement(for *instance,theelementwithoverflow:scroll). * *<x,y>isrelativetothetop-leftofwhatwouldnormallybe *thevisibleareaoftheelement.Thismeansthatthepixels *renderedtothedisplayporttakescrollingintoaccount, *forexample. * *It'slegaltosetadisplayportthatextendsbeyondtheoverflow *areainanydirection(left/right/top/bottom). * *It'salsolegaltosetadisplayportthatextendsbeyondthe *area'sbounds.Nopixelsarerenderedoutsidetheareabounds. * *Thecallerofthismethodmusthavechromeprivileges. * *Callingthiswillalwaysforcearecomposite,soitshouldbe *avoidedifatallpossible.Clientcodeshoulddochecksbefore *callingthissothatduplicatesetsarenotmadewiththesame *displayport. * *aPriorityisrecordedalongwiththedisplayportrectangle.Ifthis *methodiscalledwithalowerprioritythanthecurrentpriority,the *callisignored.
*/ void setDisplayPortForElement(in float aXPx, in float aYPx,
in float aWidthPx, in float aHeightPx,
in Element aElement,
in uint32_t aPriority); /** *Analternatewaytorepresentadisplayportrectasasetofmarginsanda *baserecttoapplythosemarginsto.Aconsumerofpixelsmayaskforas *manyextrapixelsasitwouldlikeineachdirection.Layoutthensets *thebaserecttothe"visiblerect"oftheelement,whichisjustthe *subrectoftheelementthatisdrawn(itdoesnottakeinaccountcontent *coveringtheelement). * *Ifbothadisplayportrectanddisplayportmarginswithcorrespondingbase *rectaresetwiththesameprioritythenthemarginswilltakeprecendence. * *Specifyinganalignmentvaluewillensurethatafterthebaserecthas *beenexpandedbythedisplayportmargins,itwillbefurtherexpandedso *thateachedgeislocatedatamultipleofthe"alignment"value. * *Notethatboththemarginvaluesandalignmentaretreatedasvaluesin *ScreenPixels.Refertolayout/base/Units.hforadescriptionofthisunit. *Thebaserectvaluesareinappunits.
*/ void setDisplayPortMarginsForElement(in float aLeftMargin,
in float aTopMargin,
in float aRightMargin,
in float aBottomMargin,
in Element aElement,
in uint32_t aPriority);
void setDisplayPortBaseForElement(in int32_t aX,
in int32_t aY,
in int32_t aWidth,
in int32_t aHeight,
in Element aElement);
/** *If|aElement|isascrollcontainer,returnstheamountoflayout *spacetakenupbyitsscrollbars(thatis,thewidthofthevertical *scrollbarandtheheightofthehorizontalscrollbar)inCSSpixels; *otherwisereturnszero. * *Notethatonsomeplatforms,scrollbarsdon'ttakeuplayoutspace *("overlayscrollbars").Onsuchplatforms,thereturnedsizesare *alwayszero. * *Layoutscrollbarsthatnormallytakeupspacebutwereonlyshownto *scrollthevisualviewportinsidethelayoutviewport(thelayoutviewport *cannotbescrolled)donottakeupspacebuttheystillreturntheirsize *fromthisfunction.
*/ void getScrollbarSizes(in Element aElement,
out uint32_t aVerticalScrollbarWidth,
out uint32_t aHorizontalScrollbarHeight);
/** Synthesize a wheel event for a window. The event types supported is only *wheel. * *EventsaresentincoordinatesoffsetbyaXandaYfromthewindow. * *Cannotbeaccessedfromunprivilegedcontext(notcontent-accessible) *WillthrowaDOMsecurityerrorifcalledwithoutchromeprivileges. * *@paramaXxoffsetinCSSpixels *@paramaYyoffsetinCSSpixels *@paramaDeltaXdeltaXvalue. *@paramaDeltaYdeltaYvalue. *@paramaDeltaZdeltaZvalue. *@paramaDeltaModedeltaModevaluewhichmustbeoneofthe *WheelEventDOM_DELTA_*constants. *@paramaModifiersmodifierspressed,usingconstantsdefinedas *MODIFIER_* *@paramaLineOrPageDeltaXIfyousetthisvaluenon-zerofor *DOM_DELTA_PIXELevent,EventStateManagerwill *dispatchNS_MOUSE_SCROLLeventforhorizontal *scroll. *@paramaLineOrPageDeltaYIfyousetthisvaluenon-zerofor *DOM_DELTA_PIXELevent,EventStateManagerwill *dispatchNS_MOUSE_SCROLLeventforvertical *scroll. *@paramaOptionsSetfollowingflags. *@paramaCallbackThecallbackwillbenotifiedwhenthe *synthesizedwheeleventhasbeendispatched. *XXX:Thisisnotimplementedinthecontent *processwhenasyncisenabled(i.e.,eitherthe *optionhasWHEEL_EVENT_ASYNC_ENABLEDorthe *test.events.async.enabledprefistrue).Insuch *cases,passingaCallbackwillthrowanexception.
*/ constunsignedlong WHEEL_EVENT_CAUSED_BY_NO_LINE_OR_PAGE_DELTA_DEVICE = 0x0001; constunsignedlong WHEEL_EVENT_CAUSED_BY_MOMENTUM = 0x0002; constunsignedlong WHEEL_EVENT_CUSTOMIZED_BY_USER_PREFS = 0x0004; constunsignedlong WHEEL_EVENT_ASYNC_ENABLED = 0x0008; // If any of the following flags is specified this method will throw an // exception in case the relevant overflowDelta has an unexpected value. constunsignedlong WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_X_ZERO = 0x0010; constunsignedlong WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_X_POSITIVE = 0x0020; constunsignedlong WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_X_NEGATIVE = 0x0040; constunsignedlong WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_ZERO = 0x0100; constunsignedlong WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_POSITIVE = 0x0200; constunsignedlong WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_NEGATIVE = 0x0400; void sendWheelEvent(in float aX,
in float aY,
in double aDeltaX,
in double aDeltaY,
in double aDeltaZ,
in unsignedlong aDeltaMode,
in long aModifiers,
in long aLineOrPageDeltaX,
in long aLineOrPageDeltaY,
in unsignedlong aOptions,
[optional] in nsISynthesizedEventCallback aCallback);
/** *NativemodifiersforsendNativeKeyEventandsendNativeMouseEvent. *TODO:TheothersendNative*Eventshouldtakethesevaluesinstead.
*/ constunsignedlong NATIVE_MODIFIER_CAPS_LOCK = 0x00000001; constunsignedlong NATIVE_MODIFIER_NUM_LOCK = 0x00000002; constunsignedlong NATIVE_MODIFIER_SHIFT_LEFT = 0x00000100; constunsignedlong NATIVE_MODIFIER_SHIFT_RIGHT = 0x00000200; constunsignedlong NATIVE_MODIFIER_CONTROL_LEFT = 0x00000400; constunsignedlong NATIVE_MODIFIER_CONTROL_RIGHT = 0x00000800; constunsignedlong NATIVE_MODIFIER_ALT_LEFT = 0x00001000; constunsignedlong NATIVE_MODIFIER_ALT_RIGHT = 0x00002000; constunsignedlong NATIVE_MODIFIER_COMMAND_LEFT = 0x00004000; constunsignedlong NATIVE_MODIFIER_COMMAND_RIGHT = 0x00008000; constunsignedlong NATIVE_MODIFIER_HELP = 0x00010000; // On Windows, AltGraph key emulates the AltRight key on specific keyboard // layouts. Therefore, this shouldn't be used without `synthesizeNativeKey`. constunsignedlong NATIVE_MODIFIER_ALT_GRAPH = 0x00020000; // Available only on macOS. constunsignedlong NATIVE_MODIFIER_FUNCTION = 0x00100000; // Available only on macOS. When pressing a key in numeric key pad, this // must be included. constunsignedlong NATIVE_MODIFIER_NUMERIC_KEY_PAD = 0x01000000;
/** *SeensIWidget::SynthesizeNativeKeyEvent * *Cannotbeaccessedfromunprivilegedcontext(notcontent-accessible) *WillthrowaDOMsecurityerrorifcalledwithoutchromeprivileges. * *Whenyouusethisfortests,usetheconstantsdefinedinNativeKeyCodes.js * *NOTE:Thesynthesizednativeeventwillbefiredasynchronously,andupon *completionthecallback,ifprovided,willbenotified.
*/ void sendNativeKeyEvent(in long aNativeKeyboardLayout,
in long aNativeKeyCode,
in unsignedlong aModifierFlags,
in AString aCharacters,
in AString aUnmodifiedCharacters,
[optional] in nsISynthesizedEventCallback aCallback);
/** *SeensIWidget::SynthesizeNativeMouseEvent * *WillbecalledonthewidgetthatcontainsaElement. *Cannotbeaccessedfromunprivilegedcontext(notcontent-accessible) *WillthrowaDOMsecurityerrorifcalledwithoutchromeprivileges. * *@paramaScreenXXoffsetinthescreenindevicepixels. *@paramaScreenYYoffsetinthescreeninderivepixels. *@paramaNativeMessageOneofNATIVE_MOUSE_MESSAGE_* *@paramaButtonSameas`MouseEvent.button`value. *@paramaModifierFlagsSeensIWidget'snativemodifierflags. *@paramaElementOnWidgetAnelementwhichisonawidget. *@paramaCallbackThesynthesizednativeeventwillbefired *asynchronously,anduponcompletionthecallback,if *provided,willbenotified.
*/ constunsignedlong NATIVE_MOUSE_MESSAGE_BUTTON_DOWN = 0x00000001; constunsignedlong NATIVE_MOUSE_MESSAGE_BUTTON_UP = 0x00000002; constunsignedlong NATIVE_MOUSE_MESSAGE_MOVE = 0x00000003; constunsignedlong NATIVE_MOUSE_MESSAGE_ENTER_WINDOW = 0x00000004; constunsignedlong NATIVE_MOUSE_MESSAGE_LEAVE_WINDOW = 0x00000005; void sendNativeMouseEvent(in long aScreenX,
in long aScreenY,
in unsignedlong aNativeMessage,
in short aButton,
in unsignedlong aModifierFlags,
in Element aElementOnWidget,
[optional] in nsISynthesizedEventCallback aCallback);
/** *SeensIWidget::SynthesizeNativeMouseScrollEvent * *WillbecalledonthewidgetthatcontainsaElement. *Cannotbeaccessedfromunprivilegedcontext(notcontent-accessible) *WillthrowaDOMsecurityerrorifcalledwithoutchromeprivileges. * *NOTE:Thesynthesizednativeeventwillbefiredasynchronously,andupon *completionthecallback,ifprovided,willbenotified. * *@paramaNativeMessage *OnWindows:WM_MOUSEWHEEL(0x020A),WM_MOUSEHWHEEL(0x020E), *WM_VSCROLL(0x0115)orWM_HSCROLL(0x114).
*/ void sendNativeMouseScrollEvent(in long aScreenX,
in long aScreenY,
in unsignedlong aNativeMessage,
in double aDeltaX,
in double aDeltaY,
in double aDeltaZ,
in unsignedlong aModifierFlags,
in unsignedlong aAdditionalFlags,
in Element aElement,
[optional] in nsISynthesizedEventCallback aCallback);
// The pointer is in a hover state above the digitizer constlong TOUCH_HOVER = 0x01; // The pointer is in contact with the digitizer constlong TOUCH_CONTACT = 0x02; // The pointer has been removed from the digitizer detection area constlong TOUCH_REMOVE = 0x04; // The pointer has been canceled. Will cancel any pending os level // gestures that would be triggered as a result of completion of the // input sequence. This may not cancel moz platform related events // that might get tirggered by input already delivered. constlong TOUCH_CANCEL = 0x08;
/** *Createaneworupdateanexistingtouchpointonthedigitizer. *Totriggeroslevelgestures,individualtouchpointsshould *transitionthroughacompletesetoftouchstateswhichshouldbe *sentasindividualcalls.Forexample: *tap-msg1:TOUCH_CONTACT,msg2:TOUCH_REMOVE *drag-msg1-n:TOUCH_CONTACT(moving),msgn+1:TOUCH_REMOVE *hoverdrag-msg1-n:TOUCH_HOVER(moving),msgn+1:TOUCH_REMOVE * *Widgetsupport:Windows8.0+,Winrt/Win32.Otherwidgetswillthrow. * *@paramaPointerIdThetouchpointidtocreateorupdate. *@paramaTouchStateoneormoreofthetouchstateslistedabove *@paramaScreenX,aScreenYscreencoordsofthisevent *@paramaPressure0.0->1.0floatvalindicatingpressure *@paramaOrientation0->359degreevalueindicatingthe *orientationofthepointer.Use90fornormaltaps. *@paramaCallbackThesynthesizednativeeventwillbefiredasynchronously, *anduponcompletionthecallback,ifprovided,willbenotified. *@paramaElementIfthetouchpointneedstohappenonapopupwindow, *aElementinsidethepopupwindowneedstobespecified.
*/ void sendNativeTouchPoint(in unsignedlong aPointerId,
in unsignedlong aTouchState,
in long aScreenX,
in long aScreenY,
in double aPressure,
in unsignedlong aOrientation,
[optional] in nsISynthesizedEventCallback aCallback,
[optional] in Element aElement); /** *Thesevaluesindicatetouchpadpinchphasestates: *PHASE_BEGIN *PHASE_UPDATE *PHASE_END *Widgetsupport:LinuxGTK3.18+. *@paramaEventPhaseThetouchpadpinchphaseusingstateslistedabove. *@paramaScaleEventswithPHASE_UPDATEwillchangethezoomlevelby *theratiobetweenthescaleofthecurrenteventandthescaleofthelastevent. *@paramaScreenX,aScreenYscreencoordsofthefocuspointofthisevent. *@paramaModifierFlagsisexpectedtocontainnativemodifiervalues.
*/ void sendNativeTouchpadPinch(in unsignedlong aEventPhase,
in float aScale,
in long aScreenX,
in long aScreenY,
in long aModifierFlags);
/** *Simulatesnativetouchbasedtapsontheinputdigitizer.Events *triggeredbythiscallareinjectedattheoslevel.Eventsdonot *bypasswidgetlevelinputprocessingandassuchcanbeusedto *testwidgeteventlogicandasyncpan-zoomcontrollerfunctionality. *Cannotbeaccessedfromanunprivilegedcontext. * *Longtaps(basedontheaLongTapparameter)willbecompleted *asynchrnouslyafterthecallreturns.Longtapdelayisbasedon *theui.click_hold_context_menus.delayprefor1500msecifpref *isnotset. * *Widgetsupport:Windows8.0+,Winrt/Win32.Otherwidgetswill *throw. * *NOTE:Thesynthesizednativeeventwillbefiredasynchronously,andupon *completionthecallback,ifprovided,willbenotified. * *@paramaScreenX,aScreenYscreencoordsofthisevent *@paramaLongTaptrueifthetapshouldbelong,falseforashort *tap.
*/ void sendNativeTouchTap(in long aScreenX,
in long aScreenY,
in boolean aLongTap,
[optional] in nsISynthesizedEventCallback aCallback);
/** *Createaneworupdateanexistingpeninputonthedigitizer. * *Widgetsupport:Windows101809+.Otherwidgetswillthrow. * *NOTE:Thesynthesizednativeeventwillbefiredasynchronously,andupon *completionthecallback,ifprovided,willbenotified. * *@paramaPointerIdThetouchpointidtocreateorupdate. *@paramaPointerStateoneormoreoftheTOUCH_*listedabove *@paramaScreenXxscreencoordofthisevent *@paramaScreenYyscreencoordofthisevent *@paramaPressure0.0->1.0floatvalindicatingpressure *@paramaRotation0->359degreevalueindicatingtherotationofthe *pointer.Use0fornormaltaps. *@paramaTiltX-90->90degreevalueindicatingthetiltalongthex-axis *ofthepointer.Use0fornormaltaps. *@paramaTiltY-90->90degreevalueindicatingthetiltalongthey-axis *ofthepointer.Use0fornormaltaps. *@paramaButtonSameasMouseEvent::button.
*/ void sendNativePenInput(in unsignedlong aPointerId,
in unsignedlong aPointerState,
in long aScreenX,
in long aScreenY,
in double aPressure,
in unsignedlong aRotation,
in long aTiltX,
in long aTiltY,
in long aButton,
[optional] in nsISynthesizedEventCallback aCallback,
[optional] in Element aElement);
/** *Sendanativeeventasiftheuserdoubletappedthetouchpadwithtwo *fingers. * *Widgetsupport:macOS. *@paramaScreenX,aScreenYscreencoordsofthefocuspointofthisevent. *@paramaModifierFlagsisexpectedtocontainnativemodifiervalues.
*/ void sendNativeTouchpadDoubleTap(in long aScreenX,
in long aScreenY,
in long aModifierFlags);
/** *Sendanativeeventasiftheuserpannedonthetouchpadwithtwo *fingers. * *NOTE:Thesynthesizednativeeventwillbefiredasynchronously,andupon *completionthecallback,ifprovided,willbenotified. * *Widgetsupport:Windows. *@paramaScreenX,aScreenYscreencoordsofthefocuspointofthisevent. *@paramaDeltaX,aDeltaYtheamountofdeltainthepan. *@paramaModifierFlagsisexpectedtocontainnativemodifiervalues.
*/ void sendNativeTouchpadPan(in unsignedlong aEventPhase,
in long aScreenX,
in long aScreenY,
in double aDeltaX,
in double aDeltaY,
in long aModifierFlags,
[optional] in nsISynthesizedEventCallback aCallback);
/** Synthesize a simple gesture event for a window. The event types *supportedare:MozSwipeGestureMayStart,MozSwipeGestureStart, *MozSwipeGestureUpdate,MozSwipeGestureEnd,MozSwipeGesture, *MozMagnifyGestureStart,MozMagnifyGestureUpdate,MozMagnifyGesture, *MozRotateGestureStart,MozRotateGestureUpdate,MozRotateGesture, *MozPressTapGesture,MozTapGesture,andMozEdgeUIGesture. * *Cannotbeaccessedfromunprivilegedcontext(not *content-accessible)WillthrowaDOMsecurityerrorifcalled *withoutchromeprivileges. * *@paramaTypeeventtype *@paramaXxoffsetinCSSpixels *@paramaYyoffsetinCSSpixels *@paramaDirectiondirection,usingconstantsdefinedinSimpleGestureEvent.webidl *@paramaDeltaamountofmagnificationorrotationformagnifyandrotationevents *@paramaModifiersmodifierspressed,usingconstantsdefinedinEvent.webidl *@paramaClickCountFortapgestures,thenumberoftaps.
*/ void sendSimpleGestureEvent(in AString aType,
in float aX,
in float aY,
in unsignedlong aDirection,
in double aDelta,
in long aModifiers,
[optional] in unsignedlong aClickCount);
/** *RetrievetheelementatpointaX,aYinthewindow'sdocument. * *@paramaIgnoreRootScrollFramewhetherornottoignoretherootscroll *framewhenretrievingtheelement.Iffalse,thismethodreturns *nullforcoordinatesoutsideoftheviewport. *@paramaFlushLayoutflusheslayoutiftrue.Otherwise,noflushoccurs.
*/
Element elementFromPoint(in float aX,
in float aY,
in boolean aIgnoreRootScrollFrame,
in boolean aFlushLayout);
/** *Retrieveallnodesthatintersectarectinthewindow'sdocument. * *@paramaXxreferencefortherectangleinCSSpixels *@paramaYyreferencefortherectangleinCSSpixels *@paramaTopSizeHowmuchtoexpanduptherectangle *@paramaRightSizeHowmuchtoexpandrighttherectangle *@paramaBottomSizeHowmuchtoexpanddowntherectangle *@paramaLeftSizeHowmuchtoexpandlefttherectangle *@paramaIgnoreRootScrollFramewhetherornottoignoretherootscroll *framewhenretrievingtheelement.Iffalse,thismethodreturns *nullforcoordinatesoutsideoftheviewport. *@paramaFlushLayoutflusheslayoutiftrue.Otherwise,noflushoccurs. *@paramaOnlyVisibleSettotrueifyouonlywantnodesthatpassavisibility *hittest. *@paramaTransparencyThresholdOnlyhasaneffectifaOnlyVisibleistrue. *Returnswhatamountoftransparencyisconsidered"opaqueenough" *toconsiderelements"notvisible".Thedefaultiseffectively"1" *(so,onlyopaqueelementswillstopanelementfrombeing *"visible").
*/
NodeList nodesFromRect(in float aX,
in float aY,
in float aTopSize,
in float aRightSize,
in float aBottomSize,
in float aLeftSize,
in boolean aIgnoreRootScrollFrame,
in boolean aFlushLayout,
in boolean aOnlyVisible,
[optional] in float aTransparencyThreshold);
/** *Comparethetwocanvases,returningthenumberofdifferingpixelsand *themaximumdifferenceinachannel.Thiswillthrowanerrorif *thedimensionsofthetwocanvasesaredifferent. * *Thismethodrequireschromeprivileges.
*/
uint32_t compareCanvases(in nsISupports aCanvas1,
in nsISupports aCanvas2,
out unsignedlong aMaxDifference);
/** *Returnsthescrollpositionofthewindow'scurrentlyloadeddocument. * *@paramaFlushLayoutflusheslayoutiftrue.Otherwise,noflushoccurs. *@seensIDOMWindow::scrollX/Y
*/ void getScrollXY(in boolean aFlushLayout, out long aScrollX, out long aScrollY);
/** *Returnsthescrollpositionofthewindow'scurrentlyloadeddocument. * *@paramaFlushLayoutflusheslayoutiftrue.Otherwise,noflushoccurs. *@seensIDOMWindow::scrollX/Y
*/ void getScrollXYFloat(in boolean aFlushLayout, out float aScrollX, out float aScrollY);
/** *Returnsthescrollbarwidthofthewindow'sscrollframe. * *@paramaFlushLayoutflusheslayoutiftrue.Otherwise,noflushoccurs.
*/ void getScrollbarSize(in boolean aFlushLayout, out long aWidth, out long aHeight);
/** *Returnsthegivenelement'sboundswithoutflushingpendinglayoutchanges.
*/
DOMRect getBoundsWithoutFlushing(in Element aElement);
/** Returns the opaque region, for testing */
Array<DOMRect> getWidgetOpaqueRegion();
/** *Scrollthevisualviewporttothegivencoordinates,relativetothe *documentorigin. *Onlyapplicabletothewindowassociatedwiththerootcontentdocument. *Note:thisdoesnottakeeffectrightaway.Rather,thevisualscroll *requestissenttoAPZwiththenexttransaction,andwillbe *reflectedinthemainthreadwiththesubsequentAPZrepaintrequest. *PleaseseethecaveatsmentionedatPresShell::ScrollToVisual(),and *requestAPZreviewifaddinganewcalltothis.
*/ constlong UPDATE_TYPE_RESTORE = 0; constlong UPDATE_TYPE_MAIN_THREAD = 1; constlong SCROLL_MODE_INSTANT = 0; constlong SCROLL_MODE_SMOOTH = 1; void scrollToVisual(in float aOffsetX, in float aOffsetY,
in long aUpdateType, in long aScrollMode);
/** *Synthesizeaquerycontentevent.Notethattheresultvaluereturnedhere *isinLayoutDevicepixelsratherthanCSSpixels. * *@paramaTypeOneofthefollowingconstvalues.Andseealsoeachcomment *fortheotherparametersandtheresult. *@paramaAdditionalFlagsSeethedescriptionofQUERY_CONTENT_FLAG_*.
*/
nsIQueryContentEventResult sendQueryContentEvent(
in unsignedlong aType,
in longlong aOffset,
in unsignedlong aLength,
in long aX,
in long aY,
[optional] in unsignedlong aAdditionalFlags);
/** *Calledwhentheremotechildframehaschangeditsfullscreenstate, *whenenteringfullscreen,andwhentheoriginwhichisfullscreenchanges. *aFrameElementistheiframeelementwhichcontainsthechild-process *fullscreendocument.
*/ void remoteFrameFullscreenChanged(
in Element aFrameElement,
[optional] in boolean aFullscreenKeyboardLockEnabled);
/** *Setasyncscrolloffsetonanelement.Thenextcompositewillrender *withthatoffsetifasyncscrollingisenabled,andthentheoffset *willberemoved.Onlycallthiswhiletest-controlledrefreshesisenabled.
*/ void setAsyncScrollOffset(in Element aElement, in float aX, in float aY);
/** *Setasynczoomvalue.aRootElementshouldbethedocumentelementofour *document.Thenextcompositewillrenderwiththatzoomaddedtoany *existingzoomifasyncscrollingisenabled,andthenthezoomwillbe *removed.Onlycallthiswhiletest-controlledrefreshesisenabled.
*/ void setAsyncZoom(in Element aRootElement, in float aValue);
/** *Doaround-triptothecompositortoensureanypendingAPZrepaintrequests *getflushedtothemainthread.Ifthefunctionreturnstrue,theflushwas *triggeredandan"apz-repaints-flushed"notificationwillbedispatchedvia *theobserverserviceoncetheflushiscomplete.Ifthefunctionreturns *false,anerroroccurredoraflushisnotneeded,andthenotification *willnotfire.Thisisintendedtobeusedbytestcodeonly! * *@paramaElementifyouwanttodotheflushinsidepopupwindows,youneedto *theelementinsidethepoupwindow.
*/
boolean flushApzRepaints([optional] in Element aElement);
/** *MethodfortestingStyleAnimationValue::ComputeDistance. * *Returnsthedistancebetweenthetwovaluesasreportedby *StyleAnimationValue::ComputeDistanceforthegivenelementand *property.
*/ double computeAnimationDistance(in Element element,
in AString property,
in AString value1,
in AString value2);
/** *Returnsthecomputedstyleforthespecifiedpropertyofgivenpseudotype *onthegivenelementafterremovingstylesfromdeclarativeanimations. *@paramaElement-Atargetelement *@paramaPseudoElement-Apseudotype(e.g.'::before'ornull) *@paramaProperty-AlonghandCSSproperty(e.g.'background-color') *@paramaFlushType-FLUSH_NONEifanypendingstylesshouldnothappen, *FLUSH_STYLEtoflushpendingstyles.
*/
AString getUnanimatedComputedStyle(in Element aElement,
in AString aPseudoElement,
in AString aProperty,
in long aFlushType);
/** *Getfilerefcountinfoforgivendatabaseandfileid.
*/
boolean getFileReferences(in AString aDatabaseName, in longlong aId,
[optional] out long aRefCnt,
[optional] out long aDBRefCnt);
/** *Getthecontent-andcompositor-sideAPZtestdatainstances. *ThereturnvaluesareoftypeAPZTestData(seeAPZTestData.webidl). * *|aElement|isanoptionalargumentforpopupwindowwhereAPZisenabled. *|aElement|wouldbeapopupelementforpopup
*/
[implicit_jscontext] jsval getContentAPZTestData([optional] in Element aElement);
/* *|aElement|isanoptionalargumentforpopupwindowwhereAPZisenabled. *|aElement|wouldbeapopupelementforpopup
*/
[implicit_jscontext] jsval getCompositorAPZTestData([optional] in Element aElement);
/** *SendaMozMouseHittesteventhitonthegiven(x,y)onthiswindow. *TheeventissenttothecorrespondingAPZCTreeManagerandthemanager *performsahittestinginAPZ.Thehittestingresultcanbeviaobtained *byabovegetCompositorAPZTestData(). *|aElement|isanoptionalargumentforpopupwindowwhereAPZisenabled. *|aElement|wouldbeapopupelementforpopup
*/
[can_run_script] void sendMozMouseHitTestEvent(in float aX, in float aY, [optional] in Element aElement);
/** *PostsanRestyleHint::RESTYLE_SELFrestyleeventforthegivenelement.
*/ void postRestyleSelfEvent(in Element aElement);
// These consts are only for testing purposes. constlong DEFAULT_MOUSE_POINTER_ID = 0; constlong DEFAULT_PEN_POINTER_ID = 1; constlong DEFAULT_TOUCH_POINTER_ID = 2;
// Match mozilla::MouseButtonsFlag. constlong MOUSE_BUTTONS_NO_BUTTON = 0x00; constlong MOUSE_BUTTONS_LEFT_BUTTON = 0x01; constlong MOUSE_BUTTONS_RIGHT_BUTTON = 0x02; constlong MOUSE_BUTTONS_MIDDLE_BUTTON = 0x04; // Typically, "back" button being left side of 5-button // mice, see "buttons" attribute document of DOM3 Events. constlong MOUSE_BUTTONS_4TH_BUTTON = 0x08; // Typically, "forward" button being right side of 5-button // mice, see "buttons" attribute document of DOM3 Events. constlong MOUSE_BUTTONS_5TH_BUTTON = 0x10;
// |aElement| is an optional argument for popup window where APZ is enabled. // |aElement| would be a popup element for popup. unsignedlonglong getLayersId([optional] in Element aElement);
// Returns true if we are effectively throttling frame requests.
readonly attribute boolean effectivelyThrottlesFrameRequests;
// Returns the ID for the underlying window widget, which can // be compared against the rawId from a nsIMediaDevice to determine // if the window is being shared. // // Using this only makes sense in the parent process, and the function // will intentionally crash any non-parent process that tries to access // it.
readonly attribute AString webrtcRawDeviceId;
// Used for testing to check the suspend status.
readonly attribute boolean suspendedByBrowsingContextGroup;
// Whether there's any scroll-linked effect in this document. This is only // meaningful after the script in question tried to mutate something in a // scroll event callback until the next refresh driver tick happens. // // See https://firefox-source-docs.mozilla.org/performance/scroll-linked_effects.html // about scroll-linked effects.
readonly attribute boolean hasScrollLinkedEffect;
// Returns the current orientation lock value in browsing context. // This value is defined in hal/HalScreenConfiguration.h
readonly attribute uint32_t orientationLock;
// Returns an element currently scrolling by wheel.
Element getWheelScrollTarget();
// The current drag session on this widget of this window (if any).
readonly attribute nsIDragSession dragSession;
// Get/Set microtask level. If you don't know how microtasks work both in the // specification and Gecko, please don't use this.
attribute unsignedlong microTaskLevel;
};
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.105Bemerkung:
(vorverarbeitet am 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.