Граф коммитов

9366 Коммитов

Автор SHA1 Сообщение Дата
James Teh 769356106e Bug 1733513: Implement IAccessibleText nCharacters, text, textAtOffset and caretOffset for RemoteAccessible. r=morgan
1. Use ia2AccessibleHypertext for RemoteAccessibles that support hypertext.
2. Allow querying to the IAccessibleText interface for RemoteAccessibles. IAccessibleHypertext, etc. are not yet supported at all, so don't allow querying to those.
3. Use HyperTextAccessibleBase for methods it supports. For other IAccessibleText methods, return E_NOTIMPL if dealing with a RemoteAccessible.

Differential Revision: https://phabricator.services.mozilla.com/D127217
2021-10-07 11:14:32 +00:00
James Teh 2534f21673 Bug 1730088 part 11: Move IsValidOffset/Range to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127216
2021-10-07 04:22:47 +00:00
James Teh 8c9bfeac73 Bug 1730088 part 10: Move TextAtOffset's TextLeafPoint implementation to HyperTextAccessibleBase. r=eeejay
The TextLeafPoint implementation works for both local and remote.
HyperTextAccessible calls the base implementation for supported boundaries when the cache is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D127215
2021-10-07 04:22:47 +00:00
James Teh 550d7598c3 Bug 1730088 part 9: Add HyperTextAccessibleBase::TransformOffset. r=eeejay
This is pretty similar to HyperTextAccessible::TransformOffset.
However, the local implementation has to compensate for list bullet errors propagating from FindOffset/PeekOffset, which isn't relevant for TextLeafPoint.
Therefore, we leave the HyperTextAccessible implementation alone so it will still be used by HyperTextAccessible code (FindOffset, etc.).

Differential Revision: https://phabricator.services.mozilla.com/D127214
2021-10-07 04:22:46 +00:00
James Teh ddbabe9849 Bug 1730088 part 8: Move ToTextLeafPoint to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127213
2021-10-07 04:22:46 +00:00
James Teh eb660a098e Bug 1730088 part 7: Move CharAt to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127212
2021-10-07 04:22:46 +00:00
James Teh 2dbf269a3f Bug 1730088 part 6: Move TextSubstring to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127211
2021-10-07 04:22:45 +00:00
James Teh 3c9b8a17dd Bug 1730088 part 5: Move ConvertMagicOffset to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127210
2021-10-07 04:22:45 +00:00
James Teh 90725f7aed Bug 1730088 part 4: Move CaretOffset to HyperTextAccessibleBase. r=eeejay
The implementation for RemoteAccessibleBase is just a stub; we don't cache the caret yet.
However, this needs to be in HyperTextAccessibleBase because it is used by ConvertMagicOffset, which will be moved in an upcoming patch.

Differential Revision: https://phabricator.services.mozilla.com/D127209
2021-10-07 04:22:45 +00:00
James Teh adae2323e9 Bug 1730088 part 3: Move CharacterCount to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127208
2021-10-07 04:22:44 +00:00
James Teh 68d5471fbc Bug 1730088 part 2: HyperTextAccessibleBase: Add methods for child index/text offset conversion. r=eeejay
Although HyperTextAccessibleBase implements these, we leave the HyperTextAccessible implementations (overriding the base) because they do caching.
Depending on performance, we may eventually want to move the caching into the base implementation.
I decided not to do this initially because it will use extra memory in the parent process and it may be a premature optimisation.

Differential Revision: https://phabricator.services.mozilla.com/D127207
2021-10-07 04:22:44 +00:00
James Teh f46a0aaf44 Bug 1730088 part 1: Add hyperTextAccessibleBase class. r=eeejay
This will contain methods that can be used for both local and remote Accessibles.
It is inherited into both HyperTextAccessible (local) and RemoteAccessibleBase.

Differential Revision: https://phabricator.services.mozilla.com/D127206
2021-10-07 04:22:43 +00:00
Cristian Tuns 9ff6a2ca7d Backed out 11 changesets (bug 1730088) for causing build bustages on DocAccessibleWrap.cpp. CLOSED TREE
Backed out changeset f2ccbd5e0640 (bug 1730088)
Backed out changeset 4138ff98e3c6 (bug 1730088)
Backed out changeset 18f24e8c925c (bug 1730088)
Backed out changeset 0f6d7bf87aeb (bug 1730088)
Backed out changeset b91cb9d7de75 (bug 1730088)
Backed out changeset 3d5b2d949109 (bug 1730088)
Backed out changeset 1910e46ed82c (bug 1730088)
Backed out changeset be69e17a817a (bug 1730088)
Backed out changeset b96051622689 (bug 1730088)
Backed out changeset 89f855907787 (bug 1730088)
Backed out changeset 52c6c1d60659 (bug 1730088)
2021-10-06 08:33:43 -04:00
James Teh 65616347a8 Bug 1730088 part 11: Move IsValidOffset/Range to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127216
2021-10-06 10:13:12 +00:00
James Teh 75adfa3d1a Bug 1730088 part 10: Move TextAtOffset's TextLeafPoint implementation to HyperTextAccessibleBase. r=eeejay
The TextLeafPoint implementation works for both local and remote.
HyperTextAccessible calls the base implementation for supported boundaries when the cache is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D127215
2021-10-06 10:13:11 +00:00
James Teh 5ea7d17606 Bug 1730088 part 9: Add HyperTextAccessibleBase::TransformOffset. r=eeejay
This is pretty similar to HyperTextAccessible::TransformOffset.
However, the local implementation has to compensate for list bullet errors propagating from FindOffset/PeekOffset, which isn't relevant for TextLeafPoint.
Therefore, we leave the HyperTextAccessible implementation alone so it will still be used by HyperTextAccessible code (FindOffset, etc.).

Differential Revision: https://phabricator.services.mozilla.com/D127214
2021-10-06 10:13:11 +00:00
James Teh 6d4a7b6804 Bug 1730088 part 8: Move ToTextLeafPoint to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127213
2021-10-06 10:13:11 +00:00
James Teh 0300ea1e93 Bug 1730088 part 7: Move CharAt to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127212
2021-10-06 10:13:10 +00:00
James Teh b1c9ba78d4 Bug 1730088 part 6: Move TextSubstring to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127211
2021-10-06 10:13:10 +00:00
James Teh c766150f7a Bug 1730088 part 5: Move ConvertMagicOffset to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127210
2021-10-06 10:13:10 +00:00
James Teh 80e6298b78 Bug 1730088 part 4: Move CaretOffset to HyperTextAccessibleBase. r=eeejay
The implementation for RemoteAccessibleBase is just a stub; we don't cache the caret yet.
However, this needs to be in HyperTextAccessibleBase because it is used by ConvertMagicOffset, which will be moved in an upcoming patch.

Differential Revision: https://phabricator.services.mozilla.com/D127209
2021-10-06 10:13:09 +00:00
James Teh 39aa66590c Bug 1730088 part 3: Move CharacterCount to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127208
2021-10-06 10:13:09 +00:00
James Teh 7511a00c4f Bug 1730088 part 2: HyperTextAccessibleBase: Add methods for child index/text offset conversion. r=eeejay
Although HyperTextAccessibleBase implements these, we leave the HyperTextAccessible implementations (overriding the base) because they do caching.
Depending on performance, we may eventually want to move the caching into the base implementation.
I decided not to do this initially because it will use extra memory in the parent process and it may be a premature optimisation.

Differential Revision: https://phabricator.services.mozilla.com/D127207
2021-10-06 10:13:08 +00:00
James Teh 0b986179c4 Bug 1730088 part 1: Add hyperTextAccessibleBase class. r=eeejay
This will contain methods that can be used for both local and remote Accessibles.
It is inherited into both HyperTextAccessible (local) and RemoteAccessibleBase.

Differential Revision: https://phabricator.services.mozilla.com/D127206
2021-10-06 10:13:08 +00:00
James Teh 174f5c0b71 Bug 1730093 part 4: Support RemoteAccessible in TextLeafPoint. r=eeejay
This uses the unified AppendTextTo and TextLength, as well as adding support for cached line start boundaries.

Differential Revision: https://phabricator.services.mozilla.com/D127205
2021-10-06 04:53:54 +00:00
James Teh 1ae2aea0d0 Bug 1730093 part 3: Support RemoteAccessible in nsAccUtils::TextLength. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127204
2021-10-06 04:53:53 +00:00
James Teh 3b8873fe57 Bug 1730093 part 2: Move AppendTextTo to Accessible and implement it for RemoteAccessible. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127203
2021-10-06 04:53:53 +00:00
James Teh 832dddd128 Bug 1730093 part 1: Push text and line start offsets to the cache. r=eeejay
As part of this, we no longer cache the name for text accessibles, as that would be redundant.
Instead, we return the cached text in RemoteAccessible::Name.

Differential Revision: https://phabricator.services.mozilla.com/D127202
2021-10-06 04:53:52 +00:00
Morgan Reschenberg 16a6a4e7b0 Bug 1732154: Add ParentRelativeBounds method for HTMLImageMapAccessible r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126386
2021-10-05 20:44:46 +00:00
Morgan Reschenberg 8ec999d32d Bug 1726227: Cache parent-relative accessible bounds, resolution in parent process r=Jamie,eeejay
Differential Revision: https://phabricator.services.mozilla.com/D123399
2021-10-05 20:44:46 +00:00
Gijs Kruitbosch cd8c2be09f Bug 1724319 - fix accessibility test relying on the download modal opening to work with download improvements pref flipped, r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127487
2021-10-05 09:04:26 +00:00
Butkovits Atila 0db4640a28 Backed out 2 changesets (bug 1732154, bug 1726227) for causing build bustages complaining about RemoteAccessible. CLOSED TREE
Backed out changeset 4fd72f9ca327 (bug 1732154)
Backed out changeset 6591f14bbc71 (bug 1726227)
2021-10-05 00:19:09 +03:00
Morgan Reschenberg 2162cc6e2d Bug 1732154: Add ParentRelativeBounds method for HTMLImageMapAccessible r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126386
2021-10-04 19:46:55 +00:00
Morgan Reschenberg c2cac47ff1 Bug 1726227: Cache parent-relative accessible bounds, resolution in parent process r=Jamie,eeejay
Differential Revision: https://phabricator.services.mozilla.com/D123399
2021-10-04 19:46:54 +00:00
Eitan Isaacson 41ca3eadd8 Bug 1733223 - Fire READONLY state change when input gets readonly attribute. r=morgan
This patch also adds tests for other READONLY/EDITABLE state changes
that already work.

Differential Revision: https://phabricator.services.mozilla.com/D127165
2021-10-04 16:47:34 +00:00
Eitan Isaacson 130f52e318 Bug 1611062 - Remove unused eAutoComplete. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127148
2021-10-04 16:30:45 +00:00
Eitan Isaacson 9fed8c38f9 Bug 1733228 - Fire DEFAULT state change when control loses or gains default state. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127177
2021-10-04 15:56:38 +00:00
Daniel Holbert ed93bd5007 Bug 1733465 part 2: Modernize nsViewManager::GetRootWidget() to use already_AddRefed return value, instead of requiring getter_AddRefs at callsite. r=tnikkel
This patch shouldn't change behavior at all.

This patch replaces a manual NS_ADDREF call with typesafe code that manages the
reference count for us.  This reduces repeated boilerplate code, in the
implementation as well as the callsites.

Differential Revision: https://phabricator.services.mozilla.com/D127179
2021-10-01 20:38:09 +00:00
Sandor Molnar 325902a5b7 Backed out 5 changesets (bug 1733465) for causing android build bustages in android/SessionAccessibility.cpp. CLOSED TREE
Backed out changeset 4c5b28b66740 (bug 1733465)
Backed out changeset 3db0452b185c (bug 1733465)
Backed out changeset d7460c9c6acb (bug 1733465)
Backed out changeset 3cee3f595e45 (bug 1733465)
Backed out changeset 267d5fc92f12 (bug 1733465)
2021-10-01 19:13:59 +03:00
Daniel Holbert 54c1df0de9 Bug 1733465 part 3: Make nsPresContext::GetRootWidget() return an already_AddRefed pointer instead of a raw pointer. r=tnikkel
Also, make the same change to nsPresContext::GetTextInputHandlingWidget and
TextComposition::GetWidget, which are essentially aliases/wrappers for this
function.

This patch shouldn't change behavior at all, aside from:
* optimizing away some redundant reference counting and widget-lookups
* delaying some nsIWidget::Release() calls, which will now happen after we're
  actually done using the object, instead of happening when the getter
  completes. (It's unlikely this impacts behavior, because there are other
  objects that are keeping the nsIWidget instance alive.)

Motivation / "wins" from this patch:
* nsPresContext::GetRootWidget already works with a refcounted pointer
  internally. Before this patch, it drops the reference before returning the
  pointer.  This is a bit suspect and would cause security issues, in the
  unlikely event that this were the last strong reference to the object.  It
  can just as easily/efficiently transfer the strong reference to the caller,
  and let the caller determine when to release it.
* Many of the callers were already storing the return value in nsCOMPtr, which
  meant that they were incurring an additional AddRef/Release when
  populating/destructing that smart pointer. Now they can just take ownership
  of the already_AddRefed return value and avoid redundnat refcount-churn.
* For the callers that weren't storing the return value in nsCOMPtr, some of
  them were calling this getter twice in a row (once to test for truthiness and
  once to use the known-truthy value).  This was wasteful, both from the
  repeated lookup-work (since the function isn't a trivial getter), and from
  repeated refcount-churn.  This patch collapses these repeat-calls to a single
  call, avoiding those inefficiencies.

Differential Revision: https://phabricator.services.mozilla.com/D127180
2021-10-01 14:37:06 +00:00
Daniel Holbert 5b203843bc Bug 1733465 part 2: Modernize nsViewManager::GetWidget() to use already_AddRefed return value, instead of requiring getter_AddRefs at callsite. r=tnikkel
This patch shouldn't change behavior at all.

This patch replaces a manual NS_ADDREF call with typesafe code that manages the
reference count for us.  This reduces repeated boilerplate code, in the
implementation as well as the callsites.

Differential Revision: https://phabricator.services.mozilla.com/D127179
2021-10-01 14:37:05 +00:00
Eitan Isaacson 7c2a7c9949 Bug 1733437 - Don't use non-existant bullet images in xul test. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D127146
2021-09-30 22:25:41 +00:00
James Teh 0240b39c82 Bug 1732592: Create in-tree accessibility documentation and add Document Accessibility Lifecycle as our first page. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126855
2021-09-30 21:52:54 +00:00
Eitan Isaacson da1f9f11d1 Bug 1733457 - Remove unused LocalAccessible::MaybeFireFocusableStateChange. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D127156
2021-09-30 20:00:06 +00:00
James Teh e85d14a8ef Bug 1730175: Set aria-valuetext to "" on numeric datetime fields when the input is cleared. r=emilio,eeejay
Before this patch, we didn't set aria-valuetext when the value was initially empty, nor did we clear it after a value was set and subsequently cleared.
This resulted in incorrect numeric values being reported to users.
Now, we set aria-valuetext to "" in either of these cases.

Differential Revision: https://phabricator.services.mozilla.com/D125366
2021-09-29 06:30:06 +00:00
Sandor Molnar 9b742bfa2d Backed out changeset c8bcdcdc5fd7 (bug 1730175) for causing mochitest failures in test_datetime. CLOSED TREE 2021-09-29 06:37:56 +03:00
James Teh e414139808 Bug 1730175: Set aria-valuetext to "" on numeric datetime fields when the input is cleared. r=emilio,eeejay
Before this patch, we didn't set aria-valuetext when the value was initially empty, nor did we clear it after a value was set and subsequently cleared.
This resulted in incorrect numeric values being reported to users.
Now, we set aria-valuetext to "" in either of these cases.

Differential Revision: https://phabricator.services.mozilla.com/D125366
2021-09-29 02:48:15 +00:00
Eitan Isaacson de9be32795 Bug 1732944 - Return early if recieving cache on a shutdown document. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D126839
2021-09-28 22:02:47 +00:00
Eitan Isaacson 1de5b0abcd Bug 1731374 - Add string storage to AccAttributes with move semantics. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D126012
2021-09-28 22:01:35 +00:00
Eitan Isaacson d4a231a724 Bug 1729061 - Introduce cache verification logging. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124486
2021-09-28 21:55:41 +00:00