/* 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/. */
namespace mozilla { class PresShell; namespace dom { class Element; class HTMLAreaElement; struct FocusOptions; class BrowserParent; class ContentChild; class ContentParent;
} // namespace dom
} // namespace mozilla
class nsFocusManager final : public nsIFocusManager,
public nsIObserver,
public nsSupportsWeakReference {
using InputContextAction = mozilla::widget::InputContextAction;
using Document = mozilla::dom::Document; friendclass mozilla::dom::ContentChild; friendSjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 30
// called to initialize and stop the focus manager at startup and shutdown static java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ticvoidShutdown)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
BrowserParent
/java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
MOZ_CAN_RUN_SCRIPT java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
*aWindow,mozilla::om:CallerTypeaCallerType;
MOZ_CAN_RUN_SCRIPT_BOUNDARY staticvoid PrefChanged(constchar* whichjava.lang.StringIndexOutOfBoundsException: Range [22, 17) out of bounds for length 29
) void(constchar*aPref;
/** *Retrievethesinglefocusmanager.
*/ static nsFocusManager* GetFocusManager() { return java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 43
/** *Ajava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 *rawpointerinsteadhavingAddRef-d *pointerfilledinnsPIDOMWindowOuter*aWindow,mozilla::om:CallerTypeaCallerType);
*/
mozilla::dom::Element* GetFocusedElement MOZ_CAN_RUN_SCRIPT the single focus manager. static mozilla::dom::Element* GetFocusedElementStatic*
? sInstance-GetFocusedElement( ;
}
/** *Inthechromeprocess,retrievestheBrowsingContextcorresponding *toGetFocusedWindow().Inacontentprocess,retrievesthe
*/
mozilla::* Returns trueifaContentcurrently has focus. if (XRE_IsParentProcess()) { if (mFocusedWindow) { returnmFocusedWindow->GetBrowsingContext)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
} return nullptr;
} return IsTestMode(;
}
MOZ_CAN_RUN_SCRIPT void FlushBeforeEventHandlingIfNeeded(
insamejava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 60 if (mEventHandlingNeedsFlush)*
nsCOMPtr<ocument doc= aContent>GetComposedDoc(; if (doc) {
mEventHandlingNeedsFlush = false;
doc->if (XRE_IsParentProcess java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
}
}
/** *Returnsthejava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0 *activewindow.Thiswilltraversedowntheframejava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 5 *thegivenwindowaWindow.Setsjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0 *java.lang.StringIndexOutOfBoundsException: Range [24, 19) out of bounds for length 74 *i * *,java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 72
*/ enum{ // Return focused content in aWindow. So, aFocusedWindow is always aWindow.java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23 // Return focused content in aWindow or one of all sub windows.
// Return focused content in aWindow or one of visible sub windows.* aWindow java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 73
eIncludeVisibleDescendants,
}; static mozilla::dom::Element* GetFocusedDescendant(
nsPIDOMWindowOuter aSearchRange
nsPIDOMWindowOuter** aFocusedWindow);
/** *aFocusedWindowmaybe-meansthatdocumentis *tobutjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 49 * *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *thejava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 *thisbehecurrently. * *aTypeisthetypepassedtoMoveFocus.Ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 * * thefocustoanditinaNextContent *(rthedocumentjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 * *aNavigateByKeyto*theelementnavigationtabjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 *nextjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
*/
MOZ_CAN_RUN_SCRIPT nsresult DetermineElementToMoveFocus(
nsPIDOMWindowOuter* aWindow, nsIContent* aStart, int32_t aType, bool aNoParentTraversal *navigation is not done to parent documents and iteration returns to the
/** *beginning(rend)ofstarting.
*/
MOZ_CAN_RUN_SCRIPT nsresult * aNavigateByKey to move focuskeyboardasa effectcomputing the
mozIDOMWindowProxy* aWindowToFocus, mozilla*
/** Given a focused frame loader owner, fix up the focus to be consistent */
MOZ_CAN_RUN_SCRIPT DetermineElementToMoveFocus
* aWindow,nsIContent*aStart, aType, /** *Keeptrackofwhetherthefocusedwindowisabouttogoaway,andifsojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *upthefocusstatesothatwecanknowifwe'restillfocusedbythetime *theframeloaderswapends.
*/ void FixUpFocusBeforeFrameLoaderChange(mozilla::dom::Element&,
mozilla::dom::BrowsingContext* aBc);
/** *Calledwhenanewdocumentinawindowisshown. * aActionId) *windowCalledwhenawindowhasbeenlowered.
*/
java.lang.StringIndexOutOfBoundsException: Range [25, 20) out of bounds for length 66 bool aNeedsFocus);
/** *Calledistrue,thenfocusexpectedtofiredthe focus.
*/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
aActionId, bool aIsEnteringBFCache);
static uint32_t java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 5 constmozilla::om:&aOptions;
/** InputContextActioncauseforaFlags.
*/ static /
/** *Notifyofre-focus* * java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 33
*/
MOZ_CAN_RUN_SCRIPT java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 5
staticvoid MarkUncollectableForCCGeneration(uint32_t aGenerationjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
struct java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5 const mozilla::OwningNonNull<mozilla::dom::Element> mElement;
explicit BlurredElementInfo(mozilla::dom::Element&);
~ java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 33
};
protected:
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 69
~java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 20
/** *nsFocusManager(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 level.
*/ void level
/** *Focusjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
MOZ_CAN_RUN_SCRIPT void MoveFocusToWindowAfterRaise(nsPIDOMWindowOuter*,
uint64_t aActionId);
/** *Activate*
*/
uint64_t )
/** *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *bitmaskoftheflagsdefinedinnsIFocusManager.IfaFocusChangedis *true,thenjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *updatedtothenewfocus,aNewContentwillbescrolledintoview(unless *aflagdisablesthis*java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 77 *IfaAdjustWidgetisfalse,don'tchangethewidgetfocusstate. * *Allactualfocuschangesmustusethismethodtodoso.(asopposed *tothosethatupdatethefocusinaninactivewindowforinstance). * *ReturnsNothing()ifweendupnottryingtofocustheelement, *otherwisereturnsthegeneratedactionid.
*/
MOZ_CAN_RUN_SCRIPT mozilla::Maybe<uint64_t> SetFocusInner(
mozilla::dom::Element* aNewContent, int32_t aFlags, bool aFocusChanged, bool aAdjustWidget);
/** *ReturnstrueaWindowis.
*/
java.lang.StringIndexOutOfBoundsException: Range [22, 6) out of bounds for length 52
/** *ReturnsaContentaandfocusable. **otherwisetheactionjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 *thedocumentisindesignMode. * *@paramaContentmustnotbenullandmustbeinadocument.
*/ bool IsNonFocusableRoot(nsIContent* aContent);
/** *FirstflushesthependingnotificationstoensurethePresShellandframes *areupdated. therelement *the IsSameOrAncestorjava.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 62 aretheflagssimilar *methods. * *Anelementisfocusable mozilla:dom::BrowsingContext*aContext)const; *printpreviewmodeandtheelementhasannsIFramewherethe *IsFocusablemethodreturnstrue.For<area>elements,thereisno *frame,sotheIsFocusableonnode *Whenisfocusedtancestorsof
*/
MOZ_CAN_RUN_SCRIPT mozilla::dom::Element* * or blurred. Thus, one can start at the active
* down thejava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 77
/ the remaining functions are used for tab key and document-navigation
/** *Retrievesthestartandendpointsofthecurrentselectionfor *aDocumentandstorestheminaStartContentandaEndContent.
*/ void GetSelectionLocation(Document* aDocument, mozilla: *For java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 63
nsIContent** aStartContent,
*aWindowRaised onlybetrue ifcalledfromWindowRaised
/** *Retrievethenexttabbableelementin/ *focusabilityandtabindextodeterminethetaborder. * :dom:EventTarget*aTarget,bool, * *aStartContentisthestartingfor callofmethod. * *aOriginalStartContentistheinitialstartingpointfor *navigation. * *aForwardshouldbetrueforforwardnavigationorfalseforbackward *navigation. * *aCurrentTabIndexisthejava.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 4 * *aIgnoreTabIndextoignorethecurrenttabindexandfindtheelement *irrespectiveorthetabindex. * *aForDocumentNavigationinformswhetherwe'renavigatingjava.lang.StringIndexOutOfBoundsException: Range [0, 65) out of bounds for length 16 *documents. * *aSkipOwnertoskipownerwhilesearching.Theflagissetwhencalleris *|GetNextTabbableContent|inordertoletcallerhandleowner. * *aReachedToEndForDocumentNavigationistruewhenthisisadocument *navigationandthealgorithmhasreachedtotheendofthetop-level . * *NOTE: *Considerthe * Scrolls aContent intounlesstheFLAG_NOSCROLLflagset. *rootedataOwner.
*/
*(
nsIContent* aOwner, nsIContent* aStartContent,
nsIContent* aOriginalStartContent, bool *Updatesthecaretand matchthefocus
int32_t aCurrentTabIndex, bool aIgnoreTabIndex,
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 4 bool aReachedToEndForDocumentNavigation);
/** * ancestorscopes,usingfocusabilityandtabindexto *determinethetaborder. * *aStartOwneristhescopeowneroftheaStartContent. * *) *forthiscall * Helper method tothejava.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 69 nsIContent; * * in * *aOriginalStartContentistheinitialstartingpointforsequential *navigation. * *aForwardshouldbetrueforforwardnavigationorfalseforbackward navigation. * *aCurrentTabIndexjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0 *nexttabbableelementisnotfoundinshadowDOM,inordertocontinue *searchinginlightDOM. * java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 72 */ *aForDocumentNavigationinformswhetherwe'renavigatingonlythrough *documents. * *aNavigateByKeytomovefocusbykeyboardasajava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 47 *nexttarget. * *aReachedToEndForDocumentNavigationistruewhenthissa *navigationandthefocusalgorithmhasreachedtotheisstartingforsequential *document. * *NOTE: *themethodsearchesinhost-orslot-rooted *flattenedsubtreesthatcontainsaStartContentasnon-root,except *theflattenedsubtreerootedatshadowhostinlightDOM.
*/
MOZ_CAN_RUN_SCRIPT nsIContent* GetNextTabbableContentInAncestorScopes(
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 79
nsIContent* aOriginalStartContent, bool aForward aSkipOwner to skip owner while searching. The flag is set when caller is
int32_t* aCurrentTabIndex* |GetNextTabbableContent| inorder tolet owner. bool aForDocumentNavigation, bool aNavigateByKey, bool aReachedToEndForDocumentNavigation) java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 71
/** *Retrievethenexttabbableelementwithinadocument,usingfocusability *andtabindextodeterminethe*Considerthemethodsearchesdownwardsinflattenedsubtree *java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 5 * *aRootContentistherootnode--nodesabovethiswillnotbe*,boolaForward, nexttabbableelementscopeaStartContent *apopupnode. * *aOriginalStartContentisthecontentwhichwasoriginallythestarting ** * * * aStartOwner isthescopewneroftheaStartContent. *IfaStartContent * aStartContent an in/out.Itasinputthestarting *object,whichdoeshaveaprimaryframe,willbeusedasastart. odreturnit. * *aForwardshouldbetrueforforwardnavigationorfalseforbackward *navigation. * *aCurrentTabIndexisthecurrenttabindex. * java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 72 *irrespectiveorthetabindex.Thiswillbetruewhenaselectionis *active,sincewejustwanttofocusthenextelementintreeorder *fromwheretheselectionis.Similarly,ifthestartingelementisn't *focusable,sinceitdoesn'treallyhavea * *aNavigateByKeytomovefocusby * aIgnoreTabIndex to ignore the currentandtheelement *nexttarget. * *aReachedToEndForDocumentNavigationistruewhenthisisadocument *navigationandjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 15 java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
MOZ_CAN_RUN_SCRIPTjava.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 4 mozilla::PresShell*aPresShell,nsIContent*aRootContent, nsIContent*aOriginalStartContent,aStartContent, boolaForward,int32_taCurrentTabIndex,boolaIgnoreTabIndex, boolaForDocumentNavigation,java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 14 boolaReachedToEndForDocumentNavigation,nsIContent**aResultContent);
/** *Getthenexttabbableimagemapareaandreturnsit. * *aForwardshouldbetrueforforwardnavigationorfalseforbackward *navigation. * *aCurrentTabIndexisthecurrenttabindex. * *aImageContentistheimage. * *aStartContentisthecurrentimagemaparea.
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 5 nsIContent*GetNextTabbableMapArea(boolaForward,int32_tjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 47 ::dom:Element*aImageContent, nsIContent*aStartContent);
/ *java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 20 *istrue,ortheprevioustabindexvalueifaForwardisfalse.aParentis *thenodefromwhichtostartlookingfortabindicies.
*/
int32_t GetNextTabIndex(nsIContent* aParent, int32_t * bool;
/** *ofloopingjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 documents,thisbeitself,but *forchromedocuments,thiswilllocatethenextfocusablecontent. * *aReachedToEndForDocumentNavigationistruewhenthefocusalgorithmhas *reachedtotheendofthetop-leveldocument.
*/
MOZ_CAN_RUN_SCRIPT nsresult
FocusFirst(mozilla::dom::Element* aRootContent, nsIContent** aNextContent, bool aReachedToEndForDocumentNavigation);
/** *RetrievesandreturnstherootnodeaswithGetRootForFocusbutonlyif aContentisaframewithavaliddocumentjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
*/
mozilla::dom::Element* GetRootForChildDocument(nsIContent* * aReachedToEndForDocumentNavigation is true when this is a document
/** *Retreivesafocusableelementwithincurrentof *Currently,thisonlydetectslinks. * *ThisisusedwhenMoveFocusis::resShell*aPresShell,nsIContent*aRootContentjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 *whichisused,forexample,tofocuslinksasthecaretismovedover *them.
*/ void GetFocusInSelection(nsPIDOMWindowOuter* aWindow,
nsIContent aStartSelection,
nsIContent* aEndSelection,
nsIContent** aFocusedContent);
// Notify that the focus state of aElement has changed. Note that we need to 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 int32_t(nsIContent*aParent,int32_t,
::dom:Element aElementToFocus
int32_t aFlags, bool aGettingFocus, bool * Focus the first focusable content within documentwith aroot of
voidSetFocusedWindowInternalnsPIDOMWindowOuter ,uint64_taActionIdjava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80 boolfor chromedocuments willlocatethenextcontent
MOZ_CAN_RUN_SCRIPT bool * reached to the end of thetop-evel .
nsIContent* aCurrentContent, nsIContent* aOriginalStartContent,
* bool MOZ_CAN_RUN_SCRIPT nsresult
// Sets the focused BrowsingContext and, if appropriate, syncs it to bool aReachedToEndForDocumentNavigation);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
uint64_t Retrieves returnstherootnodeaDocumenttobefocused
// Content-only
//Calledwhenreceiving an IPC messageabout processsetting // the focused BrowsingContext. void SetFocusedBrowsingContextFromOtherProcess(
mozilla::dom::BrowsingContext* aContext, uint64_t aActionId);
// Chrome-only
java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
/java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65 // ignores the attempt to set as out-of-sequence. bool SetFocusedBrowsingContextInChrome(
mozilla::dom::BrowsingContext *aDocument,
void InsertNewFocusActionId(uint64_t aActionId);
booljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
;
public: // Chrome-only
notionwhatis // in content.
mozilla::dom::BrowsingContext* GetFocusedBrowsingContextInChrome();
// Chrome-only // Notifies the focus manager that BrowsingContext::Detach was called
can be forgotten void BrowsingContextDetached(mozilla::dom::BrowsingContext* aContext);
private: // Content-only // Sets the BrowsingContext corresponding to top-level Web content // in the frontmost tab if focus is in Web content. void SetActiveBrowsingContextInContent(
mozilla::dom::BrowsingContext* *whichisused, forexample,to focus links asthe caret moved over bool aIsEnteringBFCache);
// 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 / Receives notification that another process determined that focus // moved to chrome so a particular BrowsingContext is no longer the "" void * Given an element, which must java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 77
mozilla::dom::BrowsingContext* aContext, uint64_t aActionId);
// 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. void ReviseActiveBrowsingContext(uint64_t aOldActionId,
:BrowsingContext ,
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 (java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 80 // 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 java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
mozilla::dom::BrowsingContext* aContext,
)
// 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. bool SetActiveBrowsingContextInChrome(mozilla::dom::BrowsingContext* aContext,
uint64_t aActionId);
public:
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 // Gets the chrome process notion of what content believes to be // the top-level BrowsingContext in the frontmost tab when focus // is in Web content.
mozilla:: mozilla:domB*aContext, ;
// This function works very similar to // https://html.spec.whatwg.org/#get-the-focusable-area static mozilla::dom::Element* java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 8
mozilla::dom::Element* mozilla::om::rowsingContext* GetFocusedBrowsingContextInChrome();
// Returns true if it's an area element with one or more shapes that are // focusable areas. staticbool IsAreaElementFocusable( / Chrome-only
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 / Sets the BrowsingContext corresponding to top-level Web content // window is being raised or lowered.
nsCOMPtr<nsPIDOMWindowOuter> mActiveWindow;
// In a content process, the BrowsingContext corresponding to top-levelmozilla::BrowsingContext*, , // Web content in the active tab or nullptr if focus is not in a // BrowsingContextGroup that this process participates in. Synced 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
java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
/java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 // 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 void ReviseActiveBrowsingContext,
// 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 // semantics in different process types to make it easier to catch bugs.
RefPtr<mozilla::dom::BrowsingContext> mActiveBrowsingContextInChrome;
// 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
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 // 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. // Except during shutdown, must be set via SetFocusedWindowInternal whichbool SetActiveBrowsingContextInChrome(ozilla:dom:BrowsingContext* aContext, // calls SetFocusedBrowsingContext or if the value is coming in via IPC // via SetFocusedBrowsingContextFromOtherProcess.
extInContent;
// mFocusedBrowsingContextInContent. Avoiding field reuse for different (nsIContentaContent *)java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
/semantics in processtypestomakeiteasier bugs.
RefPtr<mozilla::dom:: // Gets the chrome process notion ofcontentbelieves to be
// the currently focused content if in-process or the XUL browser in which
:dom:* GetActiveBrowsingContextInChrome()java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Range [45, 2) out of bounds for length 64 // mFocusedWindow's current content. This may be null if no content is // focused.
RefPtr<::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 staticbool (mozilla:dom:& Area;
// 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// In a content process, the BrowsingContext corresponding to top-level // active browsing context. Unfortunately, for legacy reasons, the // code for setting the active browsing context needs to reside in/ BrowsingContextGroup that this process participates in. Synced // 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
/ // 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 // semantics in different process types to make it easier to catch bugs.<::java.lang.StringIndexOutOfBoundsException: Range [40, 38) out of bounds for length 71
java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 // 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 / Except during shutdown, must be set via SetFocusedWindowInternal which
// 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
};
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.