/* 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/. */
#ifndef nsFocusManager_h_* java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 #define nsFocusManager_h_
#*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #include java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 61 #include"mozilla/taticPtr.h" #include"mozilla/dom/Document.h" #include"nsCycleCollectionParticipant.h" #include"nsIContent.h" #include"nsIFocusManager.h" #include"nsIObserver.h" #include"nsPIDOMWindowInlines.h"// FIXME: Stop including inline definitions! #include nsWeakReferenceh
#define
class
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
namespace mozilla { class PresShell; namespace dom {
sta (; class HTMLAreaElement; struct FocusOptions
ass BrowserParent; class ContentChild; class ContentParent;
} //
} / This raises the window and switches to the tab as needed.
class nsFocusManager final : public nsIFocusManager,
public nsIObserver,
public nsSupportsWeakReference void* aSelf;
using MOZ_CAN_RUN_SCRIPT PrefChanged( char aPref)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
using Document = mozilla::dom::Document;
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0 friendclass mozilla::dom::ContentParent;
public:
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 0
NS_DECL_CYCLE_COLLECTING_ISUPPORTS_FINAL
NS_DECL_NSIOBSERVER
NS_DECL_NSIFOCUSMANAGER
// called to initialize and stop the focus manager at startup and shutdown static nsresult Init();
*Element(of-Element
// Simple helper to call SetFocusedWindow on the instance. // // This raises the window and switches to the tab as needed.
MOZ_CAN_RUN_SCRIPT staticvoid FocusWindow(
d:aCallerType;
/** *A* *rawinsteadddRef-Element *pointerfilledintoanout-parameter).
java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 5 mozilla::dom::Element*GetFocusedElement(){returnmFocusedElement;} staticjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 3 returnsInstance?sInstance->GetFocusedElement():nullptr; }
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* Return a focused window. Version of nsIFocusManager::GetFocusedWindow.
*/
nsPIDOMWindowOuter* GetFocusedWindow() const*
* ( java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 return ? ->)
}
/** *Inthechromeprocess,retrievestheBrowsingContextcorresponding GetFocusedWindow)java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 63 *focusedBrowsingContext,GetActiveWindow) acontentprocess,retrieves
*/
mozilla::dom::BrowsingContext* GetFocusedBrowsingContext() const {
()){ if (mFocusedWindow) { return mFocusedWindow->GetBrowsingContextjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} return nullptr;
} return mFocusedBrowsingContextInContent;
}
/** *Returnswhetherthe if (XRE_IsParentProcess())
*/ booljava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
/** (*,)
*/
nsPIDOMWindowOuter* GetActiveWindow
/** *Inthechrome,retrievestheBrowsingContextcorresponding *toGetActiveWindow().Inacontentprocess,retrievesthe *BrowsingContextofthetop-level&aInfo) *intheprocessasthecallerornullptrotherwise.
*/
mozilla Document> -(java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
()) { if (mActiveWindow) { return mActiveWindow->GetBrowsingContext();
} return java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 3
} return mActiveBrowsingContextInContent;
java.lang.StringIndexOutOfBoundsException: Range [22, 6) out of bounds for length 75
void ContentAppended(nsIContent* java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 0
&aInfo)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
/** *ReturnsthecontentnodethatwouldeOnlyCurrentWindow, eIncludeAllDescendants, *thegivenwindow.SetsaFocusedWindowtothewindowwiththe **aWindow,SearchRange, *bestillbeset-thisthedocumentjava.lang.StringIndexOutOfBoundsException: Range [74, 75) out of bounds for length 74 cusednolementwithinitisfocused. * *aWindow,aFocusIsOutOfProcess,aFocusedWindowmustallbenon-null.
*/ enum SearchRange { // Return focused content in aWindow. So, aFocusedWindow is always aWindow.
eOnlyCurrentWindow, // Return focused content in aWindow or one of all sub windows.
eIncludeAllDescendants, // Return focused content in aWindow or one of visible sub windows.
eIncludeVisibleDescendants,
}; static *thisshould t focused element.
nsPIDOMWindowOuter* aWindow, SearchRange aSearchRange,
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 4
/** *HelperfunctionforMoveFocuswhichdeterminesthenextelement tomovereturnsit. * *aWindowisthe*beginningorend)ofstarting. tostartfrom.Forkeynavigation, *thisshouldbethecurrentlyfocusedelement. * *aTypeisthetypepassedtoMoveFocus.Ifjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 5 java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 76 ( thedocumentjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 * bysideofthe *nexttarget.
*/
nsresult(
nsPIDOMWindowOuter ,nsIContent , int32_taType bool java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 5
/** Given a focused frame loader owner, fix up the focus to be consistent */
MOZ_CAN_RUN_SCRIPT void FixUpFocusAfterFrameLoaderChange(
mozilla::dom::Element&); /** *Keeptrackofwhetherthefocusedwindowisabouttogoaway,andifsofix *upthefocusstatesothatwecanknowifwe'restillfocusedbythetime ends.
*/
FixUpFocusBeforeFrameLoaderChange::java.lang.StringIndexOutOfBoundsException: Range [64, 65) out of bounds for length 64
mozilla::dom::BrowsingContext* aBc);
/** *Raisesthetop-levelwindowaWindowatthewidgetlevel.
*/
MOZ_CAN_RUN_SCRIPT void java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 5
lerType,
uint64_t aActionId);
/** *Calledwhenawindowhasbeenjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
MOZ_CAN_RUN_SCRIPT *
uint64_t aActionId;
/**MOZ_CAN_RUN_SCRIPTvoidWindowShown(mozIDOMWindowProxy*aWindow, *Calledwhenanewdocumentinawindowisshown. * *IfaNeedsFocus,eventsare bebeon **longeracceptfocus.
*/
MOZ_CAN_RUN_SCRIPT void WindowShown(mozIDOMWindowProxy* aWindow, bool uint64_t java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
/** *Calledwhenadocumentinawindowhasbeenhiddenorotherwisecanno *longeracceptfocus.
*/
MOZ_CAN_RUN_SCRIPT void WindowHidden(mozIDOMWindowProxy* aWindow,
uint64_t mozilla:d:FocusOptions& );
*ReturnsanInputContextActioncauseforjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
/**
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
MOZ_CAN_RUN_SCRIPT void FireDelayedEvents(Document* aDocument);
void WasNuked(nsPIDOMWindowOuter* aWindow * aElement is focused element.
/** *Notifyofre-focustosameelement. * *aElementisfocusedelement.
*/
MOZ_CAN_RUN_SCRIPT void NotifyOfReFocus(java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 4
/** *BlurwhateveriscurrentlyfocusedandfocusaNewContent.aFlagsisa *bitmaskoftheflagsdefinedinnsIFocusManager.IfaFocusChangedis *true,thenthefocushasactuallyshiftedandthecaretpositionwillbe *updatedtothenewfocus,aNewContentwillbescrolledintoview(unless * MOZ_ booljava.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 53 *java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 44 java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 ifvisible. *tobool IsWindowVisible(nsPIDOMWindowOuter*aWindow); *trueifisrootelementnot. *otherwisereturnsgeneratedid.
*/
MOZ_CAN_RUN_SCRIPT mozilla::Maybe<java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 4 bool aAdjustWidget);
/** *Returnstruejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *ancestorofaWindow.
*/ bool IsSameOrAncestor(nsPIDOMWindowOuter* aPossibleAncestor,
nsPIDOMWindowOuter* aWindow) * Checks and returns aElement if it may be focused, anonode if bool(nsPIDOMWindowOuter* aPossibleAncestor,
mozilla::dom::BrowsingContext* aContext) const; bool IsSameOrAncestor(mozilla::dom::BrowsingContext* aPossibleAncestor,
* cannot be focused. aFlagstheflagspassedtoSetFocusand
public: bool java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 13
:java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 71
protected: /** *ReturnsthewindowthatisthelowestcommonancestorofbothaWindow *andaContext,ornulliftheysharenocommonancestor.
*/
mozilla::dom::BrowsingContext* GetCommonAncestor( only method on thecontentmustbe
nsPIDOMWindowOuter* aWindow, mozilla::dom::BrowsingContext* aContext);
/** *WhenaBrowsingContextorblurred,adjusthejava.lang.StringIndexOutOfBoundsException: Range [71, 70) out of bounds for length 73 *aBrowsingContextsothattheyalsohave*/ top-levelwindowandnavigate currentlyfocusedelementsforeachframeinthetreetogetto *aBrowsingContext.
*/
MOZ_CAN_RUN_SCRIPT bool AdjustInProcessWindowFocus(
mozilla::dom:: asaresult wouldthatcallershouldnot bool aIsVisible, uint64_t aActionId, bool aShouldClearAncestorFocus,
mozilla::dom::BrowsingContext* * with a pending call to Focus. Normally, true would
MOZ_CAN_RUN_SCRIPT void AdjustWindowFocus(
mozilla::dom::BrowsingContext* aBrowsingContext* bool aIsVisible, uint64_t * The currently focused element within willbe
mozilla*cleared be, thatnowindowis
/** *ReturnstrueifaContentisarootelementandnotfocusable.*firejava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 80 *I.e.,evenifaContentiseditablerootelement,thisreturnstruewhen *thedocumentiswindowbeingblurredandthewindowthatisgoingtofocused,when * *@paramaContentmustnotbenullandmustbeinadocument.
*/ bool IsNonFocusableRoot(nsIContent* aContent);
/** *First* java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 17 *ChecksandreturnsaElementifitmaybefocused,anotherelementnodeif shouldberetargetedat node,ornull thenode *cannot bool abool,bool, *methods. * *Anis itisa,documentsntin *printpreviewmodeandtheelementhasannsIFramejava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 35 *IsFocusablemethodreturnstrue.For<area>elements, mozilla::dom::Element* aElementToFocus, uint64_t aAct *frame,soonlytheIsFocusablemethodonthecontentnodemustbe *true.
*/
MOZ_CAN_RUN_SCRIPT mozilla::dom* java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 63
mozilla::dom::Element* aElement, uint32_t aFlags);
/** *Blursthejava.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 4 *focusedasaresult.Thiswouldmeanthatthecallershouldnotproceed *withapendingcalltoFocus.Normally,truewouldbereturned. * *ThecurrentlyfocusedelementwithinaBrowsingContextToClearwillbe *cleared.aBrowsingContextToClearmaybenull,whichmeansthatnowindowis *cleared..Thiswillbethecase,forexample,whenloweringawindow,aswe *wanttofirerefocused,forinstance,duetoawindowbeingraised,oratabisbeing *sothatthesameelementwillbefocusedagainwhenthewindowisraised. * *aAncestorBrowsingContextToFocusshouldbesettothecommonancestorofthe *windowthatisbeingblurredandtheaWindowRaisedshouldtrueifthewindowisbeingraised.Incase, *switchingfocustoasiblingwindow. *
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 well./blureventswillbe.Itjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 *falseif const mozillaMaybe<>&=mozilla::Nothing());
*IfaAdjustWidgetqueueifdocumentjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
*/
MOZ_CAN_RUN_SCRIPT bool Blur(
mozilla::dom::BrowsingContext* aBrowsingContextToClear,
mozilla::dom::BrowsingContext* */
aIsLeavingDocument,bool aAdjustWidget bool aRemainActivejava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
uint64_t aActionId, mozillaDocument ,mozilla:dom:E* aTarget,
MOZ_CAN_RUN_SCRIPT void BlurFromOtherProcess(
mozilla:dom:BrowsingContext ,
mozilla:dom:BrowsingContext*aBrowsingContextToClear
:dom:BrowsingContext , bool java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 5
MOZ_CAN_RUN_SCRIPT bool BlurImpl(
mozilla::dom::BrowsingContext* aBrowsingContextToClear,
mozilla:* beeBlur bool aIsLeavingDocument, bool aAdjustWidget, bool aRemainActive,
mozilla::dom::Element* aElementToFocus, uint64_t aActionId);
/** *Focus*aWindowRaisedshouldonlybetrueifcalledfromWindowRaised. * *aWindowisthewindowcontainingtheelementaContenttofocus. * isthetovariousmethodsjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 *nsIFocusManager. java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 *aIsNewDocumentshouldbetrueif *Document/willfired.
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 *aFocusChangedshouldbetrueifanewcontentnodeisbeingfocused,so *thefocusedcontentwillbescrolledintoviewandthecaretposition *willbeupdated.Iffalseispassed,thenawindowissimplybeing *refocused,forinstance,duetoawindowbeingraised,oratabisbeing *switchedjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 * *IfaFocusChangedistrue,thenthefocushasmovedtoanewlocation. *Otherwise,thefocusisjustbeingupdatedbecausethewindowwas
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 4 */** updaterswillbejava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 * aAdjustWidgetfalse,don'thefocus
*/
MOZ_CAN_RUN_SCRIPT void Focus(
nsPIDOMWindowOuter* aWindow, mozilla::dom::Element* aContent,
uint32_t aFlags, bool aIsNewDocument, bool aFocusChanged, bool aWindowRaised, bool aAdjustWidget, uint64_t aActionId,
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 68
/** afocusevent.betodelayed *event* * *aEventMessageshouldbeeitherbooljava.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 61 * *aWindowRaisedshouldonlybetrueifcalledfromWindowRaised.
*/
MOZ_CAN_RUN_SCRIPT void SendFocusOrBlurEvent(
mozilla: Document*aDocument::java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 boolaWindowRaised,boolaIsRefocus=false, mozilla::/java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 /** *FireafocusorblureventataTarget. * *aEventMessageshouldbeeithereFocusor*/ blurevents,aFocusMethodshouldnormallybenon-zero. * shouldif.
*/
MOZ_CAN_RUN_SCRIPT void FireFocusOrBlurEvent(
*java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 58
mozilla:: aWindowRaised bool aIsRefocus = false,
mozilla::dom:: pointthis this
/** *Firejava.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 4 * *aEventMessageshouldbeeithereFocusInoreFocusOut. * *java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 *focusforfocusin,theobjectblurredforfocusout). * *aCurrentFocusedWindowisthewindowfocusedbeforethefocus/blurevent *wasfired. * *aCurrentFocusedContentisthecontentfocusedbeforethefocus/blurevent *wasfired. * *aRelatedTargetisthecontentrelatedtotheevent(theobject *aSkipOwner ownerownerwhilesearching.Theflagissetwhencalleris
*/
MOZ_CAN_RUN_SCRIPT void java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 4
focusjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 79
mozilla::dom::EventTarget* aTarget,
nsPIDOMWindowOuter* aCurrentFocusedWindow,
* document
mozilla::dom::EventTarget*
/** viewunlessFLAG_NOSCROLLisjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
*/
MOZ_CAN_RUN_SCRIPT void ScrollIntoView*/
MOZ_CAN_RUN_SCRIPT nsIContent GetNextTabbableContentInScope
/** positonvisibilityto. * *aMoveCaretToFocusshouldbetruetomovethecarettoaContent. * ** and the scope'sjava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 72 *java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 4
*/
MOZ_CAN_RUN_SCRIPT void UpdateCaret(bool aMoveCaretToFocus, bool *
nsIContent* aContent)
java.lang.StringIndexOutOfBoundsException: Range [7, 2) out of bounds for length 5
* Makes the caret visible ornot, depending on aVisible.
*/
nsresult SetCaretVisible(java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 4
nsIContent* aContent);
// the remaining functions are used for tab key and document-navigation*java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 16
/** *Retrievesthestartandendpointsofthecurrentselectionfor *aDocumentandstorestheminaStartContentandaEndContent.
*/ void GetSelectionLocation(Document* aDocument, mozilla::PresShell* aPresShell,
*aIgnoreTabIndex to ignore the current tabindex and find the element
nsIContent** aEndContent);
/** *Retrieve* *focusabilityandtabindextodeterminethetaborder. * *aOwneristheownerofscopetosearchin. * *aStartContentiswhenidocument * *aOriginalStartContenttheinitialpointforsequential *navigation. * *aForwardshouldbetrueforforwardnavigationorfalseforbackward *navigation. * * * ConsiderConsidermethodupwardsallshadowjava.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 78 * *aIgnoreTabIndextoignorethecurrenttabindexandfindtheelement *irrespectiveorthetabindex. * *aForDocumentNavigationinformswhetherwe'renavigatingonlythrough * nsIContent*aStartOwner,nsCOMPtr<nsIContent>&aStartContent/* inout */, * *java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 77 ||letcallerhandleowner. * *aReachedToEndForDocumentNavigationistruewhenthisisadocument *navigationandthefocusalgorithmhasjava.lang.StringIndexOutOfBoundsException: Range [0, 51) out of bounds for length 0 *document. * *NOTE: java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 66 *rootedataOwner.
*/
MOZ_CAN_RUN_SCRIPT nsIContent* GetNextTabbableContentInScope(
nsIContent* aOwner, nsIContent* aStartContent,
nsIContent*aOriginalStartContent ,
int32_t aCurrentTabIndex, bool aIgnoreTabIndex, bool aForDocumentNavigation, bool aNavigateByKey, bool aSkipOwner, bool aReachedToEndForDocumentNavigation);
/** *RetrievethetabbableinscopeincludingaStartContent *andthescope'sjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 18 *determinethetaborder.
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 57 * paremeternputisstartingpoint *forthiscallofthismethod;asoutputitistheshadowhostin *lightDOMifthenexttabbableelementis * If that content object is focusable, the methmayit *inordertocontinuesearchinginlightDOM. * *java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 4 *navigation. * * * aIgnoreTabIndextoignorethecurrenttabindexandfindtheelement *navigation. * *aCurrentTabIndexreturnstabindexofshadowhostinlightDOMifthe *nexttabbableelementisnotfoundinshadowDOM,inordertocontinue *searchinginlightDOM.
java.lang.StringIndexOutOfBoundsException: Range [46, 4) out of bounds for length 4 tabindexfind *irrespectiveorthetabindex. * *aForDocumentNavigationinformswhetherwe'renavigatingonlythrough *documents. * *aNavigateByKeytomove*document. *nexttarget * *aReachedToEndForDocumentNavigationistruewhenthisisadocument *navigationandthefocusalgorithmhasreachedtothe nsIContent* aOriginalStartContent, nsIContent* aStartContentnsIContent*aStartContentjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 *document. * *NOTE: *Considerthemethodsearchesjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *flattenedsubtreesthatcontainsaStartContentasnon-root,except *theflattenedsubtreerootedatshadowhostinlightDOM.
*/
MOZ_CAN_RUN_SCRIPT nsIContent* GetNextTabbableContentInAncestorScopes(
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
nsIContent* aOriginalStartContent, bool aForward,
int32_t bool aForDocumentNavigation, bool aNavigateByKey, bool aReachedToEndForDocumentNavigation);
mozilla:java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
* Retrieve the next tabbable element within a document, using focusability
* and tabindex to determine the tab order /** aResultContent. * *aRootContentistherootnode--nodesabovethiswillnotbeexamined. *Typicallythiswillbetherootnodeofadocument,butcouldalsobe *apopupnode. * *boolaForward)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 *node,inthecaserecursiveorcalls. * *aStartContent*aRootContent.Forcontent,willaRootContentbut *IfaStartContentdoesn'thavevisualrepresentation,thenextcontent *object,whichdoeshaveaprimaryframe,willbeusedasastart. *Ifthatcontentobjectisfocusable,themethodmayreturnit. * *aForwardshouldbetrueforforwardnavigationorfalseforbackward *navigation. nullbefocused.arereasons *aCurrentTabIndexisthecurrenttabindex. * *aIgnoreTabIndexifisandWindowischrome *irrespectiveorthetabindex.Thiswillbetruewhenaselectionis *active,sincewejustwantto*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *fromwheretheselectionis.Similarly,ifthestartingelementisn't *focusable,sinceitdoesn'treallyhaveadefinedtabjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 5 * *aNavigateByKey*withachild. *nexttarget. *
java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 *navigationandthetheselectionaWindow. *document.
*/
MOZ_CAN_RUN_SCRIPT nsresult GetNextTabbableContent(
mozillaP ,*,
nsIContent* aOriginalStartContent, nsIContent* aStartContent, bool aForward, int32_t aCurrentTabIndex, bool aIgnoreTabIndex, bool aForDocumentNavigation, bool aNavigateByKey, bool aReachedToEndForDocumentNavigation, nsIContent** aResultContent);
/** *Getthenexttabbableimagemapareaandreturnsit. * *java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55 *navigation. * *aCurrentTabIndexisthecurrenttabindex. * **Given,java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 77 * *aStartContentisthecurrentimagemaparea.
*/
nsIContent* GetNextTabbableMapArea(bool aForward, int32_t aCurrentTabIndex,
mozilla::dom::Element* aImageContent,
nsIContent* aStartContent);
/** *Returnthenextvalidtabindexvalue// pass in whether the window should show a focus *istrue,ortheprevioustabindex // to be an explicit argument instead of *thenodefromwhichtostartlookingfortabindicies.
*/
int32_t GetNextTabIndex( , aCurrentTabIndex
mozilla:dom:*,
/** thenodeof *aRootContent.(*aWindow, *,thisnextfocusable. java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 *aReachedToEndForDocumentNavigationistruewhenthefocusalgorithmhas -documentjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
*/
nsresult
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
/** *andreturnsthefromfocused.Will *returnnulliftherootnodecannotbefocused./another *forthis: * *-ifaForDocumentNavigationisfalseandaWindowis// When returning true, sets the chrome process notion of what *-ifaCheckVisibilityistrue/ BrowsingContext is focused in content. When returning false, *-ifaDocumentisaframesetdocument.
*/
mozilla::dom::Element* GetRootForFocus(nsPIDOMWindowOuter* aWindow,
Document aDocument, bool aForDocumentNavigation bool aCheckVisibility);
/** *RetrievesandreturnstherootnodeaswithGetRootForFocusbutboolaSettingToNonNull)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 *aContentisaframe // Gets the chrome processofwhatBrowsingContextisfocused
*/
mozilla::
/** *Retreivesafocusableelementwithinthe // on a BrowsingContext so that pointers to itforgotten. *Currently,thisonlydetectslinks. * *ThisisusedwhenMoveFocusiscalledwithatypeofMOVEFOCUS_CARET, ,caretis *them.
*/ void GetFocusInSelection(nsPIDOMWindowOuter* aWindow,
nsIContent* aStartSelection,
nsIContent* aEndSelection,
nsIContent** aFocusedContent);
private /java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69 /**activeone. bethefocusedelement,activatetheremote *frameitembeds,ifany.
*/ void java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// Notify that the focus state of aElement has changed. Note that we need to // pass in whether the window should show a focus ring before the // SetFocusedNode call on it happened when losing focus and after the // SetFocusedNode call when gaining focus, which is why that information needs // to be an explicit argument instead of just passing in the window and asking // it whether it should show focus rings: in the losing focus case that // information could be wrong. // // aShouldShowFocusRing is only relevant if aGettingFocus is true. staticvoid NotifyFocusStateChange(mozilla:: mozilla::dom:*aContext,
mozilla::dom::Element* aElementToFocus,
int32_t aFlags, bool aGettingFocus, bool aShouldShowFocusRing);
// Sets the focused BrowsingContext and, if appropriate, syncs it to // other processes. void SetFocusedBrowsingContext(mozilla::dom::java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 46
uint64_t aActionId);
// Content-only // Called when receiving an IPC message about another process setting // the focused BrowsingContext.
SetFocusedBrowsingContextFromOtherProcess
mozilla::dom::BrowsingContext* aContext, uint64_t aActionId);
// Chrome-only // Chrome-only // BrowsingContext is focused in content. When returning false, // ignores the attempt to set as out-of-sequence. bool SetFocusedBrowsingContextInChrome(
mozilla:::rowsingContext aContext uint64_taActionId)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
ProcessPendingActiveBrowsingContextActionIduint64_t aActionIdjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 bool aSettingToNonNull);
public: // Chrome-only // Gets the chrome process notion of what BrowsingContext is focused // in content.
:Bjava.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 69
/java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 // Notifies the focus manager that BrowsingContext::Detach was called // on a BrowsingContext so that pointers to it can be forgotten. void
private: // Content-only
/java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 // in the frontmost tab if focus is in Web content. void SetActiveBrowsingContextInContent(
mozilla:dom:*aContextuint64_taActionIdjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 bool // across processes
// Content-only // Receives notification of another process setting the top-level Web // content as being in the frontmost tab with focus in Web content. void SetActiveBrowsingContextFromOtherProcess(
mozilla::dom::BrowsingContext* aContext, uint64_t aActionId);
// Content-only // If this content process set mActiveBrowsingContextInContent, this / field holds the corresponding actionId so that // "active" one.
java.lang.StringIndexOutOfBoundsException: Range [73, 36) out of bounds for length 73
mozilla::dom::BrowsingContext* aContext, java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 13
// Content-only // Receives a notification from parent that this content process's // attempt to set the active browsing context was late and the // prevailing browsing context is instead the second argument of // this method call. This should be ignored if the first argument // doesn't match the latest action id associated with setting the // active browsing context in this process, because in that case, // this revision is late.
(uint64_t aOldActionIdjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
mozilla::dom::BrowsingContext* aContext,
uint64_t aNewActionId);
// Receives a notification from parent that this content process's // attempt to set the focused browsing context was late and the // prevailing browsing context is instead the second argument of // this method call. This should be ignored if the first argument // doesn't match the latest action id associated with setting the // active browsing context in this process, because in that case, // this revision is late. void ReviseFocusedBrowsingContext(uint64_t aOldActionId,
mozilla::dom::BrowsingContext* aContext,
uint64_t aNewActionId)
// Chrome-only // Sets the chrome process notion of what content believes to be // the top-level BrowsingContext in the frontmost tab when focus // is in Web content./ // Returns true if set and false if ignored.
m::BrowsingContext java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
uint64_t RefPtr<mozilla::dom::BrowsingContext> mFocusedBrowsingCont;
public: // Chrome-only/ semantics differentprocess easier tocatch.
what to // the top-level BrowsingContext in the frontmost tab when focus // is in Web content.
mozilla:::rowsingContextGetActiveBrowsingContextInChrome(;
uint64_t // isn't being raised or lowered, this is a cached copy of the
// This function works very similar to // https://html.spec.whatwg.org/#get-the-focusable-area
mozilla: java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 48
mozilla::dom::Element* aTarget, uint32_t aFlags);
private: // In the chrome process, the currently active and front-most top-most // window. Not supposed to be used in a meaningful way in content // processes. For legacy reasons, this exists as a separate field // instead of being derived from mFocusedWindow when needed, because // the defined relation that mActiveWindow is supposed to be the same // as or ancestor of mFocusedWindow is temporarily broken when a // window is being raised or lowered.
nsCOMPtr<nsPIDOMWindowOuter> // is not the case while a window is being
// Web content in the active tab or nullptr if focus is not in a
/ // across processes in a BrowsingContextGroup. This field exists // separately from mFocusedBrowsingContextInContent instead of being being // derived from it, because for legacy reasons the relation // mFocusedBrowsingContextInContent->Top() == mActiveBrowsingContextInContent/ // is temporarily broken when a window is being raised or lowered. // Not supposed to be used in a meaningful way in the chrome process.
RefPtr<mozilla::dom::BrowsingContext> mActiveBrowsingContextInContent;
// If this content process set mActiveBrowsingContextInContent, this / field holds the corresponding actionId so that // mActiveBrowsingContextInContent can be revised of the parent rejects // the update. This field is used for accepting revisions only if nothing // else has updated mActiveBrowsingContextInContent before the revision // arrives.
uint64_t mActionIdForActiveBrowsingContextInContent;
// If this content process set mFocusedBrowsingContextInContent, this // field holds the corresponding actionId so that // mFocusedBrowsingContextInContent can be revised of the parent rejects // the update. This field is used for accepting revisions only if nothing // else has updated mFocusedBrowsingContextInContent before the revision // arrives.
uint64_t mActionIdForFocusedBrowsingContextInContent
// Whether or not mActiveBrowsingContextInContent was set from another process // or from this process. bool mActiveBrowsingContextInContentSetFromOtherProcess;
// This is the chrome process notion of content's // mActiveBrowsingContextInContent. Avoiding field reuse for different
// the child or top-level window that is currently focused. In the chrome // process, when a window isn't being raised or lowered, this window will // the act of using an actionId to set the active browsing context // Except during shutdown use SetFocusedWindowInternal to set mFocusedWindow!
nsCOMPtr<nsPIDOMWindowOuter> mFocusedWindow;
// The focused BrowsingContext if this is a chrome process and focus is // in chrome or if this is a content process and focus is in Web content // in this BrowsingContextGroup. nullptr otherwise.
/ // calls SetFocusedBrowsingContext or if the value is coming in via IPC // via SetFocusedBrowsingContextFromOtherProcess.
RefPtr<mozilla::dom::BrowsingContext> mFocusedBrowsingContextInContent;
// This is the chrome process notion of content's // mFocusedBrowsingContextInContent. Avoiding field reuse for different // semantics in different process types to make it easier to catch bugs.
RefPtr<mozilla::dom::BrowsingContext> mFocusedBrowsingContextInChrome;
// the currently focused content if in-process or the XUL browser in which // Web content focus resides. Always inside mFocusedWindow. When a window // isn't being raised or lowered, this is a cached copy of the // mFocusedWindow's current content. This may be null if no content is // focused.
RefPtr<mozilla::dom::Element> mFocusedElement;
// keep track of a window while it is being lowered
nsCOMPtr<nsPIDOMWindowOuter> mWindowBeingLowered;
// synchronized actions cannot be interrupted with events, so queue these up // and fire them later.
nsTArray<nsDelayedBlurOrFocusEvent> mDelayedBlurFocusEvents;
// Array of focus action ids for which we haven't seen an active browsing // context set yet. As set is allowed to overwrite an unset. Therefore, // an unset removes earlier ids but not the matching id. A set removes // earlier ids and the matching id. // // Conceptually, active browsing context shouldn't have to exist as a // field, because it should be possible to always derive it from the // focused browsing context. Unfortunately, for legacy reasons, this // is not the case while a window is being raised or lowered. // // Conceptually, it should be possible for the parent to manage the // active browsing context. Unfortunately, for legacy reasons, the // code for setting the active browsing context needs to reside in // the content process to retain the existing and test-passing code // flow. // // This, obviously, raises the issue of content processes racing to // set the active browsing context. In particular, there is a pattern // that the parent initiates actions that cause multiple content // processes to mutate the active browsing context at almost the // same time. When two native browser windows change order, the // lowering isn't distinguished from the case of lowering the // entire app. For this reason, the owner of the previous active // browsing context tries to unset it and at almost the same time // the another content process sets a new active browsing context. // If the IPC messages for these unset and set actions were to // arrive in the wrong order, this could get in the wrong state. // // To address this issue, the parent manages an authortative order // of attempts to (un)set the active browsing context using the // array mPendingActiveBrowsingContextActions. // // A process reserves a slot in the order by calling // GenerateFocusActionId(). Per one call to GenerateFocusActionId(), // there may be at most one action to set the active browsing context // to a new value. There may be logically prior attempts to unset it // (i.e. set it to nullptr). That is, if there are both attempts to // unset and set the active browsing context with the same action id, // the attempt to set to a non-null value wins. // // The completion of an action from reserting the slot in the order // and actually performing the setting of the active browsing context // may span multiple processes and IPC messages. // // The at-most-once property is not asserted, because the process // claiming the position in the order and the process setting the // active browsing context with that actionId may be different, and // the act of using an actionId to set the active browsing context // is used to delete stale items from the array to avoid excessive // growth of the array.
nsTArray<uint64_t> mPendingActiveBrowsingContextActions;
// Like mPendingActiveBrowsingContextActions but for the focused // browsing context.
nsTArray<uint64_t> mPendingFocusedBrowsingContextActions;
// If set to true, layout of the document of the event target should be // flushed before handling focus depending events. bool mEventHandlingNeedsFlush;
staticbool sTestMode;
// Process-specific counter for maintaining the prosess-specific // uniqueness of actionIds. static uint64_t sFocusActionCounter;
// the single focus manager static mozilla::StaticRefPtr<nsFocusManager> sInstance;
};
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.