summaryrefslogtreecommitdiffstats
path: root/accessible/html/HTMLFormControlAccessible.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /accessible/html/HTMLFormControlAccessible.cpp
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 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.cpp6
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));