Commit Graph

9552 Commits

Author SHA1 Message Date
Butkovits Atila
c6b99e8ff7 Backed out 5 changesets (bug 1743967, bug 1748749) for causing failures at browser_caching_actions.js. CLOSED TREE
Backed out changeset 6f15d287ecd8 (bug 1743967)
Backed out changeset fce9d3a2500d (bug 1748749)
Backed out changeset 9d405f9475b3 (bug 1748749)
Backed out changeset 9dccfcc00718 (bug 1748749)
Backed out changeset f1be79d75c5d (bug 1748749)
2022-01-28 07:07:56 +02:00
Eitan Isaacson
ab978bd5c2 Bug 1743967 - Support async DoAction. r=Jamie
Now that we cache ActionCount, we can check for the absence of actions
and return false, or send an async message and return true.

Differential Revision: https://phabricator.services.mozilla.com/D135909
2022-01-28 00:09:05 +00:00
Eitan Isaacson
0a906dbd4f Bug 1748749 - P4: Support cached actions. r=Jamie
Move ActionCount/ActionNameAt/ActionDescriptionAt to Accessible,
use cached values in RemoteAccessible, and tweak platforms.

Also introduce browser test.

Differential Revision: https://phabricator.services.mozilla.com/D135908
2022-01-28 00:09:04 +00:00
Eitan Isaacson
1f5048e73c Bug 1748749 - P3: Move TranslateString to Accessible. r=Jamie
Small refactor to allow action descriptions to be implemented in
Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D135907
2022-01-28 00:09:04 +00:00
Eitan Isaacson
6732b10718 Bug 1748749 - P2: Cache has long desc. r=Jamie
We only need to cache the existance of a longdesc in an image.
This increments the action count.

Differential Revision: https://phabricator.services.mozilla.com/D135906
2022-01-28 00:09:03 +00:00
Eitan Isaacson
dc6b629744 Bug 1748749 - P1: Push action name to cache. r=Jamie
We use an atom instead of a string because it a limited corpus of
strings so we don't need unique instances.

Differential Revision: https://phabricator.services.mozilla.com/D135905
2022-01-28 00:09:03 +00:00
James Teh
e3e9a67ed9 Bug 1748450: If an Accessible is moved, reuse the RemoteAccessible even if the cache is disabled. r=eeejay
This fixes problems for Orca caused by object destruction when grabbing focus or setting the caret.

This patch also Fixes two bugs in the RemoteAccessible reuse code.
First, moved LocalAccessibles were previously being tracked even in the parent process if the cache was enabled.
While that was harmless, it was also unnecessary, since we only need to do that in order to send IPC notifications.
Second, when an OuterDocAccessible was moved, we were previously trying to shut down its child document, causing a crash.
Child documents must be left alone, since they are added ande removed differently to normal children.

Differential Revision: https://phabricator.services.mozilla.com/D135422
2022-01-27 18:30:46 +00:00
Cristian Tuns
fd0e69bce2 Bug 1659435 - disable browser_nested_iframe.js on mac x64 r=intermittent-reviewers,MasterWayZ DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D137036
2022-01-27 01:43:08 +00:00
James Teh
3aeccca016 Bug 1749274: Don't return an OOP iframe COM proxy in MsaaAccessible::ResolveChild. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D135968
2022-01-21 01:20:49 +00:00
Morgan Reschenberg
57c2acce79 Bug 1748878: Use LayoutDeviceInt types for points, rects, sizes in dev pixels r=Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D135272
2022-01-18 23:31:21 +00:00
Alexandru Michis
8508eb2c77 Backed out changeset 52345a440234 (bug 1748450) for causing crashes (Bug 1751268). 2022-01-21 01:47:46 +02:00
Butkovits Atila
e5a82d2e01 Backed out changeset 6c3a672524b7 (bug 1748878) for causing accessibility crashes. a=backout 2022-01-20 17:24:17 +02:00
James Teh
f76e5739ca Bug 1750680: Don't use the role to check for iframes in AccessibleHandler. r=morgan
We need to handle OOP iframes specially when querying for IEnumVARIANT.
However, we can't rely on the role because it might be overridden by ARIA.
Instead, check for the absence of IAccessibleHyperText (which isn't supported for iframes) and a child count of 1.
This might trigger for a few things other than iframes, but it's not a problem to do what we're doing here whenever the child count is 1.

Differential Revision: https://phabricator.services.mozilla.com/D136257
2022-01-20 01:10:03 +00:00
James Teh
432bc6dbfa Bug 1750550: Null check aAttributes in ConvertToAtkTextAttributeSet. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D136303
2022-01-20 00:57:51 +00:00
James Teh
48c6a49902 Bug 1749762: Don't emit load_complete, reload and load_stopped signals on objects that don't support AtkDocument. r=eeejay
In Gecko, ARIA documents and dialogs can fire load complete/reload/load stopped events, but they don't support AtkDocument.
Since the corresponding ATK signals are only supported on AtkDocument, just ignore these events for anything which isn't a DocAccessible.
This has no impact on clients, since the signal was invalid anyway, but it does prevent errors being logged.

Differential Revision: https://phabricator.services.mozilla.com/D135975
2022-01-20 00:40:59 +00:00
James Teh
90e3a2f3bb Bug 1748450: If an Accessible is moved, reuse the RemoteAccessible even if the cache is disabled. r=eeejay
This fixes problems for Orca caused by object destruction when grabbing focus or setting the caret.

This also fixes an oversight where moved LocalAccessibles were being tracked even in the parent process if the cache was enabled.
While that was harmless, it was also unnecessary, since we only need to do that in order to send IPC notifications.

Differential Revision: https://phabricator.services.mozilla.com/D135422
2022-01-20 00:40:17 +00:00
Eitan Isaacson
035538614c Bug 1748775 - Expire column children when table expires. r=morgan
I think there is a potential crasher if an AT holds a reference to a column object while its parent table expires, and then tries to retrieve AXChildren. We need to expire te column objects when the table expires or is destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D136288
2022-01-19 19:33:35 +00:00
Morgan Reschenberg
ac66a0e8a8 Bug 1748878: Use LayoutDeviceInt types for points, rects, sizes in dev pixels r=Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D135272
2022-01-18 23:31:21 +00:00
Emilio Cobos Álvarez
f6a958e457 Bug 1744009 - Accessibility fixes for new combobox layout code. r=eeejay
In terms of the C++ code, this patch does basically one thing, which is
allowing creating option / optgroup accessibles without a frame for
comboboxes, and tracking mutations like layout does.

It seems this should be straight-forward, but handling mutations got a
bit complicated. We don't want to forcibly re-create accessibles, so we
want to re-use the PruneOrInsertSubtree logic that ContentInserted uses.

But determining whether we need to create the accessible requires
having flushed styles, so I added a ScheduleAccessibilitySubtreeUpdate
API to trigger that from WillRefresh once style and layout are
up-to-date.

The rest of the test updates should be sort of straight-forward. They
reflect two changes:

 * <option> accessibles are leaves now (so they don't have text
   children). Note that we still have the right native name and so on,
   using the same logic we use to render the label.

 * In 1proc tests, the focus no longer goes to the <option>, and uses
   the same code-path that e10s does (moving focus to a <menulist> in
   the parent process). Since that wasn't easy to test for (afaict) and
   we have browser tests to cover that
   (browser_treeupdate_select_dropdown.js, etc), I've decided to just
   remove the tests that relied on the previous code-path, as they were
   testing for a codepath that users weren't hitting anyways.

I've tested this with JAWS and Orca and behavior seems unchanged to my
knowledge.

Differential Revision: https://phabricator.services.mozilla.com/D133098
2022-01-17 11:10:05 +00:00
Emilio Cobos Álvarez
b651bfe99a Bug 1744009 - Simplify combobox <select> code. r=mconley,dholbert
With this patch on its own we get some a11y tests failures, but those
are fixed on a later patch.

Combobox select no longer creates frames for its <options>, nor an
nsListControlFrame. Instead, it computes its right intrinsic size using
the largest size of the options. This is better, because we render the
option text using the select style so if the select and option styles
are mismatched it'd cause changes in the size of the select when text
changes. See the following in a build without the patch, for example:

  <select>
    <option>ABC</option>
    <option style="font-size: 1px">Something long</option>
  </select>

This seems like a rather obscure case, but it's important to get it
right, see bug 1741888.

With this patch we use the same setup in content and parent processes
(this needs bug 1596852 and bug 1744152). This means we can remove a
bunch of the native view and popup code in nsListControlFrame. A couple
browser_* tests are affected by this change and have been tweaked
appropriately (the changes there are trivial).

Not creating an nsListControlFrame for dropdown select means that we
need to move a bunch of the event handling code from nsListControlFrame
to a common place that nsComboboxControlFrame can also use. That place
is HTMLSelectEventListener, and I think the setup is much nicer than
having the code intertwined with nsListControlFrame. It should be
relatively straight-forward to review, mostly moving code from one part
to another.

Another thing that we need to do in HTMLSelectEventListener that we
didn't use to do is listening for DOM mutations on the dropdown. Before,
we were relying on changes like text mutations triggering a reflow of
the listcontrolframe, which also triggered a reflow of the
comboboxcontrolframe, which in turn updated the text of the anonymous
content. Now we need to trigger that reflow manually.

There are some further simplifications that can be done after this
lands (cleanup naming of openInParentProcess and so on, among others),
but I'd rather land this first (after the merge of course) and work on
them separately.

Differential Revision: https://phabricator.services.mozilla.com/D132719
2022-01-17 11:10:05 +00:00
Marian-Vasile Laza
35a88d897e Backed out 2 changesets (bug 1744009) for causing reftest failures on select-3.html.
Backed out changeset 3e44e31d3d12 (bug 1744009)
Backed out changeset 619389788775 (bug 1744009)
2022-01-17 11:14:27 +02:00
Emilio Cobos Álvarez
7b9c5fc6b2 Bug 1744009 - Accessibility fixes for new combobox layout code. r=eeejay
In terms of the C++ code, this patch does basically one thing, which is
allowing creating option / optgroup accessibles without a frame for
comboboxes, and tracking mutations like layout does.

It seems this should be straight-forward, but handling mutations got a
bit complicated. We don't want to forcibly re-create accessibles, so we
want to re-use the PruneOrInsertSubtree logic that ContentInserted uses.

But determining whether we need to create the accessible requires
having flushed styles, so I added a ScheduleAccessibilitySubtreeUpdate
API to trigger that from WillRefresh once style and layout are
up-to-date.

The rest of the test updates should be sort of straight-forward. They
reflect two changes:

 * <option> accessibles are leaves now (so they don't have text
   children). Note that we still have the right native name and so on,
   using the same logic we use to render the label.

 * In 1proc tests, the focus no longer goes to the <option>, and uses
   the same code-path that e10s does (moving focus to a <menulist> in
   the parent process). Since that wasn't easy to test for (afaict) and
   we have browser tests to cover that
   (browser_treeupdate_select_dropdown.js, etc), I've decided to just
   remove the tests that relied on the previous code-path, as they were
   testing for a codepath that users weren't hitting anyways.

I've tested this with JAWS and Orca and behavior seems unchanged to my
knowledge.

Differential Revision: https://phabricator.services.mozilla.com/D133098
2022-01-16 23:31:23 +00:00
Emilio Cobos Álvarez
a8d469a8d0 Bug 1744009 - Simplify combobox <select> code. r=mconley,dholbert
With this patch on its own we get some a11y tests failures, but those
are fixed on a later patch.

Combobox select no longer creates frames for its <options>, nor an
nsListControlFrame. Instead, it computes its right intrinsic size using
the largest size of the options. This is better, because we render the
option text using the select style so if the select and option styles
are mismatched it'd cause changes in the size of the select when text
changes. See the following in a build without the patch, for example:

  <select>
    <option>ABC</option>
    <option style="font-size: 1px">Something long</option>
  </select>

This seems like a rather obscure case, but it's important to get it
right, see bug 1741888.

With this patch we use the same setup in content and parent processes
(this needs bug 1596852 and bug 1744152). This means we can remove a
bunch of the native view and popup code in nsListControlFrame. A couple
browser_* tests are affected by this change and have been tweaked
appropriately (the changes there are trivial).

Not creating an nsListControlFrame for dropdown select means that we
need to move a bunch of the event handling code from nsListControlFrame
to a common place that nsComboboxControlFrame can also use. That place
is HTMLSelectEventListener, and I think the setup is much nicer than
having the code intertwined with nsListControlFrame. It should be
relatively straight-forward to review, mostly moving code from one part
to another.

Another thing that we need to do in HTMLSelectEventListener that we
didn't use to do is listening for DOM mutations on the dropdown. Before,
we were relying on changes like text mutations triggering a reflow of
the listcontrolframe, which also triggered a reflow of the
comboboxcontrolframe, which in turn updated the text of the anonymous
content. Now we need to trigger that reflow manually.

There are some further simplifications that can be done after this
lands (cleanup naming of openInParentProcess and so on, among others),
but I'd rather land this first (after the merge of course) and work on
them separately.

Differential Revision: https://phabricator.services.mozilla.com/D132719
2022-01-16 23:31:22 +00:00
Andi-Bogdan Postelnicu
120496a230 Bug 1519636 - Reformat recent changes to the Google coding style. r=sylvestre
Updated with clang-format version 13.0.0 (taskcluster-dn0nWlPhT22vaQNfMnFkSg)

Differential Revision: https://phabricator.services.mozilla.com/D135325
2022-01-11 15:49:03 +00:00
Cristian Tuns
dea3b789a7 Backed out 2 changesets (bug 1617369, bug 1519636) for causing lint failures on multiple files. CLOSED TREE
Backed out changeset 6726892a0012 (bug 1617369)
Backed out changeset c08caa5f8504 (bug 1519636)
2022-01-11 04:38:34 -05:00
Andi-Bogdan Postelnicu
f4ea362111 Bug 1519636 - Reformat recent changes to the Google coding style. r=sylvestre
Updated with clang-format version 13.0.0 (taskcluster-dn0nWlPhT22vaQNfMnFkSg)

Differential Revision: https://phabricator.services.mozilla.com/D135325
2022-01-11 09:16:56 +00:00
Morgan Reschenberg
e92d718273 Bug 1749063: Ensure articles expose only AXDescription and not AXTitle r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D135413
2022-01-07 23:00:36 +00:00
Neia Finch
b4dbcf262c Bug 1613634 - Reduce calls to CoalesceMutationEvents r=Jamie,eeejay
When adding a new accessibility event to NotificationController, we
check to see if the event should be suppressed. This is a time-memory
tradeoff; since we check every event before dispatching them, the
correctness should not be impacted regardless of whether we always
append events. This change takes the time required from O(mn^2) where m
is the average depth of an event's parent tree and n is the number of
events, to O(mn).

Differential Revision: https://phabricator.services.mozilla.com/D135159
2022-01-07 18:48:37 +00:00
James Teh
ea75bab2da Bug 1747157: Use a non-remote browser to load snippets in the parent process in a11y browser tests instead of a chrome:// page and .innerHTML. r=eeejay
Creating a non-remote browser is obscure, but it turns out that it is possible.
BrowserTestUtils.addTab/gBrowser.addTab takes a forceNotRemote: true option, but even though this doesn't set remote on the browser element, it still sets maychangeremoteness.
To work around this, we create a tab with a blank document and forceNotRemote: true, remove maychangeremoteness and finally set the src to load our document.
We must also set a pref to allow this.
With this patch, the sanitizer will no longer strip elements from our snippets.

Differential Revision: https://phabricator.services.mozilla.com/D135147
2022-01-05 23:46:20 +00:00
Eitan Isaacson
df3b1159a6 Bug 1747835 - P2: Cache text-input-type attribute for text and date/time inputs. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D134759
2022-01-05 22:30:53 +00:00
Eitan Isaacson
eeb42a46d7 Bug 1747835 - P1: Add eHTMLDateTimeFieldType AccType and IsDateTimeField checker. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D134758
2022-01-05 22:30:52 +00:00
Eitan Isaacson
f4fa8d02b2 Bug 1747164 - Make HTMLDateTimeAccessible inherit from HyperTextAccessibleWrap. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D134757
2022-01-05 22:30:52 +00:00
Eitan Isaacson
654a0be767 Bug 1737944 - P12: Add better todo support to attribute tests, and todo failing cache tests. r=Jamie
Changed how our attributes tests work a bit to be single "is" test
instead of comparing each attribute separately. This allows passing a
todo option without it failing on attributes that are identical.

Differential Revision: https://phabricator.services.mozilla.com/D134974
2022-01-04 21:01:39 +00:00
Eitan Isaacson
965646877d Bug 1737944 - P11: When cache is enabled, calculate group info remotely and add it to attributes. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D134214
2022-01-04 21:01:38 +00:00
Eitan Isaacson
7a6180f627 Bug 1737944 - P10: Store AccGroupInfo in remote accessible cache. r=Jamie
Now that an AccGroupInfo can be constructed with an Accessible, we can
support its getter in remote accessibles.

Differential Revision: https://phabricator.services.mozilla.com/D134213
2022-01-04 21:01:38 +00:00
Eitan Isaacson
f8f5a14d7a Bug 1737944 - P9: Make AccGroupInfo use Accessible. r=Jamie
Now that GroupPosition and GetGroupInfo are in Accessible, we can make
AccGroupInfo use the Accessible base class.

With one exception: Tables are still local only. That should be
addressed in bug 1735970.

Differential Revision: https://phabricator.services.mozilla.com/D134212
2022-01-04 21:01:38 +00:00
Eitan Isaacson
b7dd36fd8a Bug 1737944 - P8: Move GetGroupPosition to Accessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D134211
2022-01-04 21:01:37 +00:00
Eitan Isaacson
af27cd475b Bug 1737944 - P7: Move and rename GetPositionAndSizeInternal to Accessible. r=Jamie
Now that the AccGroupInfo getter is in Accessible, the position and size
getter could go there too.

Differential Revision: https://phabricator.services.mozilla.com/D134210
2022-01-04 21:01:37 +00:00
Eitan Isaacson
d06ad7cd3c Bug 1737944 - P6: Put AccGroupInfo getter/creator in Accessible. r=Jamie
Changed the methods a bit, instead of a HasDirty boolean method, I went
with a getter and a get-and-creator. This will lend better to remote
accessibles where we won't have a dirty flag.

Differential Revision: https://phabricator.services.mozilla.com/D134209
2022-01-04 21:01:36 +00:00
Eitan Isaacson
935107258c Bug 1737944 - P5: Unify GetLevelInternal and GetDefaultLevel as Accessible::GetLevel. r=Jamie
The nsAccUtils method was a "fast" one for calculating set sizes and
conceptual parents. Unified it with
LocalAccessible::GetLevelInternal in Accessible::GetLevel with an
argument.

I also fixed select->optgroup->option group attributes.

Differential Revision: https://phabricator.services.mozilla.com/D134208
2022-01-04 21:01:36 +00:00
Eitan Isaacson
4d4ae8fb45 Bug 1737944 - P4: Cache aria group attributes and introduce Accessible getter. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D134207
2022-01-04 21:01:35 +00:00
Eitan Isaacson
8d517827ab Bug 1737944 - P3: Introduce Accessible::TagName getter for retrieving HTML tags. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D134206
2022-01-04 21:01:35 +00:00
Eitan Isaacson
2aaeabdb69 Bug 1737944 - P2: Allow AccAttributes to store a UniquePtr of AccGroupInfo. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D134205
2022-01-04 21:01:34 +00:00
Eitan Isaacson
5379b3edcf Bug 1737944 - P1: Port HTML group position test to browser. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D134204
2022-01-04 21:01:34 +00:00
Eitan Isaacson
7eb72ab403 Bug 1747749 - Introduce inner reorder event. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D134813
2022-01-04 17:41:41 +00:00
Emilio Cobos Álvarez
fac07284a9 Bug 1745869 - Grant 1s of activity to hidden OOPIF iframes. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D134804
2022-01-02 12:39:38 +00:00
Mike Hommey
1acc37c7a6 Bug 1747756 - Move Windows system libraries from LIBS to moz.build. r=firefox-build-system-reviewers,mhentges
While mingw builds don't require user32 and advapi32 explicitly, it doesn't
hurt for them to be there (and they're required for clang-cl build).
Likewise, while clang-builds don't require uuid and userenv explicitly
because they're pulled in via #pragmas in the source code, mingw doesn't
support those #pragmas and needs them explicitly, which doesn't hurt the
clang-cl builds.

Differential Revision: https://phabricator.services.mozilla.com/D134737
2021-12-30 20:56:43 +00:00
Iulian Moraru
b469802d84 Backed out changeset 7f9b4b6191ad (bug 1747756) for causing multiple failures. CLOSED TREE 2021-12-30 01:59:26 +02:00
Mike Hommey
cb50a5444f Bug 1747756 - Move Windows system libraries from LIBS to moz.build. r=firefox-build-system-reviewers,mhentges
While mingw builds don't require user32 and advapi32 explicitly, it doesn't
hurt for them to be there (and they're required for clang-cl build).
Likewise, while clang-builds don't require uuid and userenv explicitly
because they're pulled in via #pragmas in the source code, mingw doesn't
support those #pragmas and needs them explicitly, which doesn't hurt the
clang-cl builds.

Differential Revision: https://phabricator.services.mozilla.com/D134737
2021-12-29 22:18:52 +00:00
Eitan Isaacson
b11dca3e81 Bug 1744315 - P3: Do explore by touch via DOM event. r=Jamie,botond
Differential Revision: https://phabricator.services.mozilla.com/D132842
2021-12-28 20:41:23 +00:00