Bug 1301385 - input type='search' subrole on OS X is wrong; r?surkov draft
authorFederico Padua <federico_padua@yahoo.it>
Tue, 21 Mar 2017 15:32:14 +0100
changeset 502265 3e95473c4f504997615f3ed6b169190981add2f3
parent 502245 bd4f3810b402147f8656390555b29502ce5e2644
child 550111 1b90c3510218051bf3b68f49df8ca4f983d6a9ed
push id50230
push userbmo:federico_padua@yahoo.it
push dateTue, 21 Mar 2017 14:33:04 +0000
reviewerssurkov
bugs1301385
milestone55.0a1
Bug 1301385 - input type='search' subrole on OS X is wrong; r?surkov This patch makes Accessible::IsSearchbox() check for nsGkAtoms::search value instead of nsGkAtoms::textInputType as noted in the bug description. MozReview-Commit-ID: DSNrNwUwREa
accessible/generic/Accessible-inl.h
--- a/accessible/generic/Accessible-inl.h
+++ b/accessible/generic/Accessible-inl.h
@@ -72,17 +72,17 @@ Accessible::SetRoleMapEntry(const nsRole
 
 inline bool
 Accessible::IsSearchbox() const
 {
   const nsRoleMapEntry* roleMapEntry = ARIARoleMap();
   return (roleMapEntry && roleMapEntry->Is(nsGkAtoms::searchbox)) ||
     (mContent->IsHTMLElement(nsGkAtoms::input) &&
      mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
-                           nsGkAtoms::textInputType, eCaseMatters));
+                           nsGkAtoms::search, eCaseMatters));
 }
 
 inline bool
 Accessible::HasGenericType(AccGenericType aType) const
 {
   const nsRoleMapEntry* roleMapEntry = ARIARoleMap();
   return (mGenericTypes & aType) ||
     (roleMapEntry && roleMapEntry->IsOfType(aType));