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

9463 Коммитов

Автор SHA1 Сообщение Дата
Morgan Reschenberg 02b4894dca Bug 1733440: Adjust RemoteAccessibleBase::Bounds for root relative coordinates r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127848
2021-10-20 14:49:14 +00:00
James Teh 72a9e32e30 Bug 1735952 part 2: Support IAccessible::accLocation for RemoteAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D128561
2021-10-19 03:58:57 +00:00
James Teh a2353ff109 Bug 1735952 part 1: Support QueryInterface to IAccessibleValue for RemoteAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D128560
2021-10-19 03:58:56 +00:00
James Teh f0399f75aa Bug 1735953: Temporary a11y state hacks to get NVDA to render virtual buffers for cached documents. r=morgan
1. Don't return an error from IAccessible2::states. Otherwise, NVDA assumes the Accessible is defunct.
2. Return STATE_SYSTEM_READONLY for all documents in IAccessible::get_accState. Otherwise, NVDA doesn't treat the document as browseable.

Differential Revision: https://phabricator.services.mozilla.com/D128556
2021-10-19 03:58:14 +00:00
James Teh 68274e64bd Bug 1735722 part 6: Support QueryInterface to IAccessibleHypertext and IAccessibleHypertext::get_hyperlink for RemoteAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D128555
2021-10-19 03:57:20 +00:00
James Teh a149fee47a Bug 1735722 part 5: Rename ia2AccessibleHypertext::TextAcc to LocalTextAcc. r=morgan
This makes way for a new unified TextAcc method in a subsequent patch.

Strictly speaking, doing it like this isn't correct because methods will return CO_E_OBJNOTCONNECTED for a RemoteAccessible instead of E_NOTIMPL.
I fixed this for IAccessibleText, but I realised fixing this for all interfaces is going to involve a lot of churn which we're going to end up removing anyway once we unify everything.
Clients don't really care about the error code, so I think this situation is acceptable while this is still in early development.

Differential Revision: https://phabricator.services.mozilla.com/D128554
2021-10-19 03:57:19 +00:00
James Teh b65ffbc6d2 Bug 1735722 part 4: Support QueryInterface to IAccessibleHyperlink for RemoteAccessible. r=morgan
We don't support any of the methods in this interface for RemoteAccessible yet.
However, IAccessibleHypertext::get_hyperlink returns an IAccessibleHyperlink, so we must support QI to it.

Differential Revision: https://phabricator.services.mozilla.com/D128553
2021-10-19 03:57:19 +00:00
James Teh 99831a6ce1 Bug 1735722 part 3: Add test for HyperTextAccessibleBase::LinkAt. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D128552
2021-10-19 03:57:19 +00:00
James Teh 8b6bb7ad30 Bug 1735722 part 2: Add HyperTextAccessibleBase::LinkAt. r=morgan
This uses the unified Accessible::EmbeddedChildAt from the previous patch.
HyperTextAccessible::LinkAt still exists, since there are still some callers that depend on it returning a LocalAccessible.
xpcAccessibleHyperText has also been updated to call this, which means tests will work on Windows when the cache is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D128551
2021-10-19 03:57:18 +00:00
James Teh 1dc833a28d Bug 1735722 part 1: Move EmbeddedChildAt into base Accessible. r=morgan
This required renaming LocalAccessible::GetEmbeddedChildAt to EmbeddedChildAt.
LocalAccessible::EmbeddedChildAt uses a covariant return type to return a LocalAccessible* while still overriding the base method (which returns Accessible*).
Unfortunately, this can't be done for RemoteAccessible, since the Derived type isn't complete in time due to the templating.
There was only one caller of RemoteAccessible::EmbeddedChildAt, so I just changed it to call AsRemote.
Eventually, even that caller will use the unified tree anyway.

Differential Revision: https://phabricator.services.mozilla.com/D128550
2021-10-19 03:57:18 +00:00
Evgenia Kotovich 0d0980ee0d Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-18 09:26:33 +00:00
Noemi Erli 2bba3cec69 Backed out changeset 2ab6bb03dcc1 (bug 1576768) for causing failures in test_double_submit.html CLOSED TREE 2021-10-18 02:05:57 +03:00
Andreea Pavel cac8dbda22 Bug 1734271 - Disable browser_test_zoom.js for webrender builds and reverted previous change r=aryx DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D128692
2021-10-17 16:50:13 +00:00
Evgenia Kotovich 3e3dff109c Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-17 14:59:14 +00:00
Morgan Reschenberg a3da1e4b03 Bug 1735868: Map roles::switch to mozCheckboxAccessible r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D128639
2021-10-15 21:48:29 +00:00
Morgan Reschenberg c703ea6425 Bug 1734271: Disable browser_test_zoom.js for webrender builds r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D128500
2021-10-15 16:08:13 +00:00
Alexandru Michis dac6815201 Backed out changeset 7c08aa027893 (bug 1576768) for causing multiple failures.
CLOSED TREE
2021-10-15 16:52:43 +03:00
Evgenia Kotovich a8b32926fa Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-15 12:58:11 +00:00
James Teh a145479a09 Bug 1734582: Don't assert for a null frame in TextLeafPoint::FindPrev/NextLineStartSameLocalAcc. r=morgan
This can happen for display: contents.
In that case, there are no lines in the Accessible anyway, so returning an invalid TextLeafPoint (as we already did) is the correct thing to do.

Differential Revision: https://phabricator.services.mozilla.com/D128319
2021-10-14 01:53:47 +00:00
James Teh 2a1be4ad84 Bug 1734322 follow-up: Use different value for Text and DOMNodeID CacheDomains. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D128331
2021-10-14 01:52:46 +00:00
James Teh 90ef3d34d8 Bug 1733514 part 5: Add initial tests for a11y text caching. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D128035
2021-10-12 23:43:09 +00:00
James Teh ec36f1e8b3 Bug 1733514 part 4: Add xpcAccessibleHyperText::Intl and use it for methods which are supported by HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D128034
2021-10-12 23:43:08 +00:00
James Teh 76d1361d9b Bug 1733514 part 3: Rename xpcAccessibleHyperText::Intl to IntlLocal. r=eeejay
This is to make way for a new Intl which returns HyperTextAccessibleBase.

Differential Revision: https://phabricator.services.mozilla.com/D128033
2021-10-12 23:43:08 +00:00
James Teh 9c2435ba49 Bug 1733514 part 2: Rename RemoteAccessible::GetTextAtOffset to TextAtOffset and have it override HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D128032
2021-10-12 23:43:07 +00:00
James Teh 18cac61d01 Bug 1733514 part 1: Make HyperTextAccessibleBase::CharacterCount virtual and override it in RemoteAccessible. r=eeejay
When the cache is disabled, we need a different implementation of RemoteAccessible::CharacterCount for non-Windows.
This already existed, but it hid the base implementation rather than overriding it.
On Windows, we don't support this for RemoteAccessible at all unless the cache is enabled, so there's no change there.

Differential Revision: https://phabricator.services.mozilla.com/D128031
2021-10-12 23:43:07 +00:00
James Teh 8fefbe08c1 Bug 1734540: Use document.body.innerHTML instead of document.write in chrome-document-builder.html. r=eeejay
This is a follow-up to my original patch.
It turns out that there is an assertion preventing use of document.write in privileged contexts which my original patch triggered.
Instead, set document.body.innerHTML.

Differential Revision: https://phabricator.services.mozilla.com/D128159
2021-10-12 23:43:06 +00:00
Eitan Isaacson d1e01ab3a8 Bug 1733243 - P3: Fire state change events for select[multiple]. r=morgan
If a select's size is greater than 1 it won't be recreated when multiple
is added or removed. State change events should be fired in that case.

Differential Revision: https://phabricator.services.mozilla.com/D128277
2021-10-12 22:13:34 +00:00
Eitan Isaacson 035a73c527 Bug 1733243 - P2: Recreate accessible when select size or multiple changes. r=morgan
If a <select> element with a default size or size of 1 gets the
`multiple` attribute it will change from a combobox button to an
embedded listbox. Similarly, if a select's size is set to something
larger than 1 it will convert from a combobox button to a listbox.

We should recreate the select's subtree because the
implementing classes are different for those two cases.

Differential Revision: https://phabricator.services.mozilla.com/D128276
2021-10-12 22:13:34 +00:00
Eitan Isaacson f9f789b389 Bug 1733243 - P1: Don't recreate aria-multiselectable changes, fire state change instead. r=morgan
We were force recreating accessibles when their aria-multiselectable
attribute changed. This was perhaps done in the past because of
percieved limitations in COM, or the implementing class was different.

This isn't the case anymore. We should instead fire state change events
when aria-multiselectable changes.

Differential Revision: https://phabricator.services.mozilla.com/D128275
2021-10-12 22:13:34 +00:00
Eitan Isaacson b822a27de3 Bug 1734695 - Add untilCacheIs and untilCacheOk for testing cache states. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127882
2021-10-12 15:51:15 +00:00
Eitan Isaacson 6f380d42dd Bug 1733238 - P3: Add ANIMATED state change notification to ImageAccessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127720
2021-10-12 15:46:39 +00:00
Eitan Isaacson bc023a74f1 Bug 1733238 - P2: Make ImageAccessible an imgINotificationObserver. r=Jamie
Use imgINotificationObserver to get notified of size availability.
Layout uses an observer to wait for this too. Our observer is notified
after layout so we should have bounds by then.

We need to store the request status because we get a lot of "replayed"
status changes that would cause chatty and wrong state change events
when the accessible is first created and bound to parent.

We can use that status for both INVISIBLE and ANIMATED states in
NativeState.

Differential Revision: https://phabricator.services.mozilla.com/D127719
2021-10-12 15:46:38 +00:00
Eitan Isaacson 25d16b6a5d Bug 1733238 - P1: Add test for late-loading image and INVISIBLE change. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127718
2021-10-12 15:46:38 +00:00
Mike Hommey afec0c79c1 Bug 1735259 - Add missing include in MsaaAccessible.cpp. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D128158
2021-10-12 04:55:52 +00:00
Masayuki Nakano 25a3c48305 Bug 1732845 - Add `nsINode::IsInDesignMode()` to check whether the node is directly in design mode r=smaug
There are a lot of check of `Document`'s editable state **with** comments. This
means that it's unclear for developers that only `Document` node is editable in
design mode.

Additionally, there are some points which use composed document rather than
uncomposed document even though the raw API uses uncomposed document. Comparing
with the other browsers, checking uncomposed document is compatible behavior,
i.e., nodes in shadow trees are not editable unless `contenteditable`.

Therefore, `nsINode` should have a method to check whether it's in design mode
or not.

Note that it may be called with a node in UA widget.  Therefore, this patch
adds new checks if it's in UA widget subtree or native anonymous subtree,
checking whether it's in design mode with its host.

Differential Revision: https://phabricator.services.mozilla.com/D126764
2021-10-12 03:14:43 +00:00
Narcis Beleuzu 908970e8a5 Backed out 3 changesets (bug 1733238) for Bp-hybrid bustages on ImageAccessible . CLOSED TREE
Backed out changeset af8436178a49 (bug 1733238)
Backed out changeset 910aebecda65 (bug 1733238)
Backed out changeset c5d218eb6acb (bug 1733238)
2021-10-12 00:53:23 +03:00
Eitan Isaacson 61d62bdfb5 Bug 1733238 - P3: Add ANIMATED state change notification to ImageAccessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127720
2021-10-11 19:43:19 +00:00
Eitan Isaacson 4bd2d11bcb Bug 1733238 - P2: Make ImageAccessible an imgINotificationObserver. r=Jamie
Use imgINotificationObserver to get notified of size availability.
Layout uses an observer to wait for this too. Our observer is notified
after layout so we should have bounds by then.

We need to store the request status because we get a lot of "replayed"
status changes that would cause chatty and wrong state change events
when the accessible is first created and bound to parent.

We can use that status for both INVISIBLE and ANIMATED states in
NativeState.

Differential Revision: https://phabricator.services.mozilla.com/D127719
2021-10-11 19:43:19 +00:00
Eitan Isaacson c347c225c3 Bug 1733238 - P1: Add test for late-loading image and INVISIBLE change. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127718
2021-10-11 19:43:18 +00:00
Morgan Reschenberg 2ea20c4c52 Bug 1734541: Verify IPC doc exists before sending resolution update r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127860
2021-10-11 15:11:17 +00:00
Cristian Tuns a373e25460 Backed out 3 changesets (bug 1733238) for causing hybrid build bustages. CLOSED TREE
Backed out changeset 7753b03a092a (bug 1733238)
Backed out changeset 352c6a7ae5cd (bug 1733238)
Backed out changeset 9c132ebfabb2 (bug 1733238)
2021-10-08 19:17:37 -04:00
Eitan Isaacson b9bdd79ca9 Bug 1733238 - P3: Add ANIMATED state change notification to ImageAccessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127720
2021-10-08 20:20:58 +00:00
Eitan Isaacson 306495fc6c Bug 1733238 - P2: Make ImageAccessible an imgINotificationObserver. r=Jamie
Use imgINotificationObserver to get notified of size availability.
Layout uses an observer to wait for this too. Our observer is notified
after layout so we should have bounds by then.

We need to store the request status because we get a lot of "replayed"
status changes that would cause chatty and wrong state change events
when the accessible is first created and bound to parent.

We can use that status for both INVISIBLE and ANIMATED states in
NativeState.

Differential Revision: https://phabricator.services.mozilla.com/D127719
2021-10-08 20:20:58 +00:00
Eitan Isaacson 4df7a921a8 Bug 1733238 - P1: Add test for late-loading image and INVISIBLE change. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127718
2021-10-08 20:20:57 +00:00
James Teh 1834390663 Bug 1734322: Cash DOM node id in the parent process a11y cache. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127757
2021-10-08 01:57:46 +00:00
James Teh cccfd3eb4e Bug 1734517: static_cast from DocAccessible* to DocAccessibleWrap* instead of reinterpret_cast. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127762
2021-10-08 00:52:39 +00:00
James Teh 490b5ed046 Bug 1734540: For a11y browser tests, allow snippets when passing chrome: true to load as a chrome document in the parent process. r=eeejay
Normally, we use data: URLs to load snippets as tab documents.
However, there is no way we can make this load in the parent process.
Using a chrome:// URL will allow us to load a file in the parent process.
For OOP iframes, we use document-builder.sjs to yield a document with supplied markup, but sjs doesn't work for chrome:// (since sjs is handled by our test web server).
Instead, for chrome://, we use an HTML file with an embedded script which replaces the content of the document with the supplied markup.

Differential Revision: https://phabricator.services.mozilla.com/D127769
2021-10-08 00:27:09 +00:00
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
criss dfdc70739c Backed out changeset 4d44c5b706db (bug 1729061) for causing bustages in DocAccessibleChildBase.cpp. CLOSED TREE 2021-09-28 00:45:56 +03:00
Eitan Isaacson a5dc06abb2 Bug 1729061 - Introduce cache verification logging. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124486
2021-09-27 18:46:20 +00:00
James Teh 4305e646e2 Bug 1638880: Fire EVENT_DOCUMENT_LOAD_COMPLETE when PresShell is created after DOM loading completes. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126622
2021-09-27 15:26:03 +00:00