diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /accessible/html/HTMLFormControlAccessible.cpp | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-upstream/125.0.1.tar.xz firefox-upstream/125.0.1.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'accessible/html/HTMLFormControlAccessible.cpp')
-rw-r--r-- | accessible/html/HTMLFormControlAccessible.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/accessible/html/HTMLFormControlAccessible.cpp b/accessible/html/HTMLFormControlAccessible.cpp index 95d6fed7b3..5974cc2f7c 100644 --- a/accessible/html/HTMLFormControlAccessible.cpp +++ b/accessible/html/HTMLFormControlAccessible.cpp @@ -35,9 +35,7 @@ using namespace mozilla::a11y; //////////////////////////////////////////////////////////////////////////////// role HTMLFormAccessible::NativeRole() const { - nsAutoString name; - const_cast<HTMLFormAccessible*>(this)->Name(name); - return name.IsEmpty() ? roles::FORM : roles::FORM_LANDMARK; + return NameIsEmpty() ? roles::FORM : roles::FORM_LANDMARK; } void HTMLFormAccessible::DOMAttributeChanged(int32_t aNameSpaceID, @@ -293,7 +291,7 @@ already_AddRefed<AccAttributes> HTMLTextFieldAccessible::NativeAttributes() { nsString placeholderText; if (mContent->AsElement()->GetAttr(nsGkAtoms::placeholder, placeholderText)) { nsAutoString name; - const_cast<HTMLTextFieldAccessible*>(this)->Name(name); + Name(name); if (!name.Equals(placeholderText)) { attributes->SetAttribute(nsGkAtoms::placeholder, std::move(placeholderText)); |