diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /dom/base/FragmentOrElement.cpp | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/base/FragmentOrElement.cpp')
-rw-r--r-- | dom/base/FragmentOrElement.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp index 87fd81bfa3..8338fc6b9e 100644 --- a/dom/base/FragmentOrElement.cpp +++ b/dom/base/FragmentOrElement.cpp @@ -105,8 +105,6 @@ using namespace mozilla; using namespace mozilla::dom; -int32_t nsIContent::sTabFocusModel = eTabFocus_any; -bool nsIContent::sTabFocusModelAppliesToXUL = false; uint64_t nsMutationGuard::sGeneration = 0; NS_IMPL_CYCLE_COLLECTION_CLASS(nsIContent) @@ -1022,7 +1020,7 @@ void nsIContent::GetEventTargetParent(EventChainPreVisitor& aVisitor) { } } -Element* nsIContent::GetAutofocusDelegate(bool aWithMouse) const { +Element* nsIContent::GetAutofocusDelegate(IsFocusableFlags aFlags) const { for (nsINode* node = GetFirstChild(); node; node = node->GetNextNode(this)) { auto* descendant = Element::FromNode(*node); if (!descendant || !descendant->GetBoolAttr(nsGkAtoms::autofocus)) { @@ -1030,14 +1028,14 @@ Element* nsIContent::GetAutofocusDelegate(bool aWithMouse) const { } nsIFrame* frame = descendant->GetPrimaryFrame(); - if (frame && frame->IsFocusable(aWithMouse)) { + if (frame && frame->IsFocusable(aFlags)) { return descendant; } } return nullptr; } -Element* nsIContent::GetFocusDelegate(bool aWithMouse) const { +Element* nsIContent::GetFocusDelegate(IsFocusableFlags aFlags) const { const nsIContent* whereToLook = this; if (ShadowRoot* root = GetShadowRoot()) { if (!root->DelegatesFocus()) { @@ -1055,7 +1053,7 @@ Element* nsIContent::GetFocusDelegate(bool aWithMouse) const { return {}; } - return frame->IsFocusable(aWithMouse); + return frame->IsFocusable(aFlags); }; Element* potentialFocus = nullptr; @@ -1097,7 +1095,7 @@ Element* nsIContent::GetFocusDelegate(bool aWithMouse) const { if (auto* shadow = el->GetShadowRoot()) { if (shadow->DelegatesFocus()) { - if (Element* delegatedFocus = shadow->GetFocusDelegate(aWithMouse)) { + if (Element* delegatedFocus = shadow->GetFocusDelegate(aFlags)) { if (autofocus) { // This element has autofocus and we found an focus delegates // in its descendants, so use the focus delegates @@ -1114,7 +1112,7 @@ Element* nsIContent::GetFocusDelegate(bool aWithMouse) const { return potentialFocus; } -Focusable nsIContent::IsFocusableWithoutStyle(bool aWithMouse) { +Focusable nsIContent::IsFocusableWithoutStyle(IsFocusableFlags) { // Default, not tabbable return {}; } |