From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- accessible/html/HTMLFormControlAccessible.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'accessible/html/HTMLFormControlAccessible.cpp') 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(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 HTMLTextFieldAccessible::NativeAttributes() { nsString placeholderText; if (mContent->AsElement()->GetAttr(nsGkAtoms::placeholder, placeholderText)) { nsAutoString name; - const_cast(this)->Name(name); + Name(name); if (!name.Equals(placeholderText)) { attributes->SetAttribute(nsGkAtoms::placeholder, std::move(placeholderText)); -- cgit v1.2.3