summaryrefslogtreecommitdiffstats
path: root/dom/base/FragmentOrElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/FragmentOrElement.cpp')
-rw-r--r--dom/base/FragmentOrElement.cpp14
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 {};
}