gecko-dev/accessible/mac
Nika Layzell c15823d075 Bug 1772006 - Part 5: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.

In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.

These patches do the following major changes to the searching APIs:

1. The ASCII case-insensitive search method was split out as
   LowerCaseFindASCII, rather than using a boolean. This should be less
   error-prone and more explicit, and allows the method to continue to use
   narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
   matching character types. I considered adding a FindASCII method which would
   use narrow string literals for both wide and narrow strings but it would've
   been the same amount of work as changing all of the literals to unicode
   literals.
   This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
   algorithm or stl algorithms to reduce code complexity, and avoid the need to
   carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
   called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
   to booleans normally implicitly coercing to `index_type`. This should
   probably be removed at some point, but may be useful during the transition.

Differential Revision: https://phabricator.services.mozilla.com/D148300
2022-07-30 00:12:48 +00:00
..
.clang-format
AccessibleWrap.h
AccessibleWrap.mm Bug 1772006 - Part 5: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret 2022-07-30 00:12:48 +00:00
ApplicationAccessibleWrap.h
ARIAGridAccessibleWrap.h
DocAccessibleWrap.h
DocAccessibleWrap.mm
GeckoTextMarker.h
GeckoTextMarker.mm
HTMLTableAccessibleWrap.h
HyperTextAccessibleWrap.h
HyperTextAccessibleWrap.mm
ImageAccessibleWrap.h
MacUtils.h
MacUtils.mm
MOXAccessibleBase.h
MOXAccessibleBase.mm
MOXAccessibleProtocol.h Bug 1767304: Support ValueDescription, Orientation, Min, Max on AXIncrementors r=eeejay 2022-07-07 21:31:17 +00:00
MOXLandmarkAccessibles.h
MOXLandmarkAccessibles.mm
MOXMathAccessibles.h
MOXMathAccessibles.mm
MOXSearchInfo.h
MOXSearchInfo.mm
MOXTextMarkerDelegate.h
MOXTextMarkerDelegate.mm
MOXWebAreaAccessible.h
MOXWebAreaAccessible.mm
moz.build
mozAccessible.h
mozAccessible.mm Bug 1780228: Expose label, not title, on entries and spinbuttons r=eeejay 2022-07-27 17:16:11 +00:00
mozAccessibleProtocol.h
mozActionElements.h Bug 1767304: Support ValueDescription, Orientation, Min, Max on AXIncrementors r=eeejay 2022-07-07 21:31:17 +00:00
mozActionElements.mm Bug 1767304: Support ValueDescription, Orientation, Min, Max on AXIncrementors r=eeejay 2022-07-07 21:31:17 +00:00
mozHTMLAccessible.h
mozHTMLAccessible.mm
mozRootAccessible.h
mozRootAccessible.mm
mozSelectableElements.h
mozSelectableElements.mm
mozTableAccessible.h
mozTableAccessible.mm
mozTextAccessible.h Bug 1778550: Trim whitespace on mozAcc titles, prune empty mozTextLeafAccs from tree r=eeejay 2022-07-18 15:48:17 +00:00
mozTextAccessible.mm Bug 1778550: Trim whitespace on mozAcc titles, prune empty mozTextLeafAccs from tree r=eeejay 2022-07-18 15:48:17 +00:00
Platform.mm Bug 1780788 - Use abstract strings as in-arguments for ipdl. r=nika,necko-reviewers,media-playback-reviewers,alwu,dragana 2022-07-25 20:19:48 +00:00
PlatformExtTypes.h
RootAccessibleWrap.h
RootAccessibleWrap.mm
RotorRules.h
RotorRules.mm
SelectorMapGen.py
TextLeafAccessibleWrap.h
XULListboxAccessibleWrap.h
XULMenuAccessibleWrap.h
XULTreeGridAccessibleWrap.h