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

9713 Коммитов

Автор SHA1 Сообщение Дата
Eitan Isaacson 8332f35d8d 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-31 23:10:51 +00:00
Eitan Isaacson a9bc6f0257 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-31 23:10:51 +00:00
Eitan Isaacson 75a312e6e0 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-31 23:10:51 +00:00
Cosmin Sabou ef48e09b4e Backed out 6 changesets (bug 1743967, bug 1748749, bug 1749828) for causing bc failures on browser_PBMCookieBehavior.js.
Backed out changeset afda8c72ba29 (bug 1749828)
Backed out changeset 8b5356f3d50d (bug 1743967)
Backed out changeset 04f178d71ae6 (bug 1748749)
Backed out changeset cd2e76de3d18 (bug 1748749)
Backed out changeset 4190c5e44b32 (bug 1748749)
Backed out changeset 8e23acc969d2 (bug 1748749)
2022-02-01 03:05:11 +02:00
James Teh c1ffcd58e4 Bug 1749736: Null check mContent in LocalAccessible::BundleFieldsForCache. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D137397
2022-01-31 23:44:37 +00:00
Eitan Isaacson 2c3b678a19 Bug 1749828 - Use Accessible::GroupPosition in xpcom, windows and mac. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D135748
2022-01-31 23:10:52 +00:00
Eitan Isaacson 6f159bbb67 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-31 23:10:52 +00:00
Eitan Isaacson 12d336ff2f 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-31 23:10:52 +00:00
Eitan Isaacson aae9fcaf91 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-31 23:10:51 +00:00
Eitan Isaacson 01dced264b 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-31 23:10:51 +00:00
Eitan Isaacson 6fc7b930b2 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-31 23:10:51 +00:00
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
Eitan Isaacson 70cf770e32 Bug 1744315 - P2: Don't traverse into remote accessibles in explore by touch. r=Jamie
Our default traversal rule will eventually work with remote trees, but
explore by touch will be local-only until we do hittesting in the parent
process. This change prevents the parent process from drilling down past
outer docs into frames.

Differential Revision: https://phabricator.services.mozilla.com/D132841
2021-12-28 20:41:22 +00:00
Mike Hommey fce6eb7d83 Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-23 20:29:07 +00:00
Cristian Tuns e1e31e01f2 Backed out 2 changesets (bug 1747165) for causing nightly blockers(bustages) a=backout
Backed out changeset 4b1ab0915c94 (bug 1747165)
Backed out changeset 96043d814772 (bug 1747165)
2021-12-23 08:00:54 -05:00
Mike Hommey b55194a16f Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-22 23:56:24 +00:00
James Teh f32815354c Bug 1739050: If an Accessible is moved, reuse the RemoteAccessible and don't push the cache for it. r=eeejay
A move is sent to the parent process as a hide and then a show, even if the LocalAccessible wasn't recreated.
Previously, this meant that a new RemoteAccessible was created and the original RemoteAccessible was destroyed.
This was particularly problematic if the Accessible had focus and the client cached focus.
In that case, the client cache contained a dead Accessible, and since no focus event was fired (because it's the same Accessible in the content process), focus in the client was broken.
This also meant that there was a full cache push for a moved Accessible, which was wasteful.

To fix this:

1. Keep track of LocalAccessibles inserted during a tick.
2. Keep track of LocalAccessibles moved during a tick, including descendants. If a LocalAccessible was inserted during the same tick (1), don't track it as a move.
3. Before processing mutation events, tell the parent process about which Accessibles are about to be moved (2).
4. When sending a subtree to the parent process, don't send cache info for an Accessible which is being moved (2).
5. When the parent process receives a hide event, if there is an Accessible that is about to be moved (3), don't shut it down; allow it to be reused.
6. When the parent process receives a show event, if there is an Accessible that has an existing RemoteAccessible (5), reuse it.

Differential Revision: https://phabricator.services.mozilla.com/D132328
2021-12-22 01:33:52 +00:00
James Teh 40ee301bcd Bug 1746827: Null check mCachedFields in RemoteAccessibleBase::Min/Cur/MaxValue/Step. r=eeejay
It's rare that mCachedFields is null now, but it seems it can still happen.

Differential Revision: https://phabricator.services.mozilla.com/D134268
2021-12-20 22:52:45 +00:00
Morgan Reschenberg 422693242c Bug 1723766: Process internal table groups in moxRows r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D133676
2021-12-16 23:06:16 +00:00
James Teh 16c3343e30 Bug 1735955: Always push bounds for an initial cache push, irrespective of LocalAccessible::mBounds. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D133594
2021-12-14 04:58:57 +00:00
Masayuki Nakano 8cddf2911a Bug 1741148 - part 4: Add `nsINode::ComputeIndexInParentNode()` and `nsINode::ComputeIndexInParentContent()` r=smaug
Some callers of `nsINode::ComputeIndexOf()` do not use its parent node except
calling it.  These tiny methods make such callers simpler.

Differential Revision: https://phabricator.services.mozilla.com/D131337
2021-12-09 12:03:00 +00:00
Masayuki Nakano 3816ca9546 Bug 1741148 - part 3: Make users of `nsINode::ComputeIndexOf_Deprecated()` use `nsINode::ComputeIndexOf()` if the result is not set to `int32_t` nor return as `int32_t` r=smaug
This patch fixes only the cases if the result of `ComputeIndexOf_Deprecated()`
is used as unsigned integer with implicit or explicit cast.

Differential Revision: https://phabricator.services.mozilla.com/D131336
2021-12-09 11:55:36 +00:00
Masayuki Nakano f2baf0d9ab Bug 1741148 - part 1: Rename `nsINode::ComputeIndexOf` to `ComputeIndexOf_Deprecated` r=smaug
It's hard to fix some callers.  Therefore, in this bug, we should fix only
simple cases.  Therefore, we should rename existing API first.

Differential Revision: https://phabricator.services.mozilla.com/D131334
2021-12-09 08:32:30 +00:00
Masayuki Nakano 67dfbee062 Bug 1740853 - part 2: Make `HyperTextAccessible::GetSpellTextAttr` take `uint32_t` for offset in a text node r=Jamie
It takes text node's offset that is never larger than `INT32_T` because
`nsTextFragment` limits max text length of a text node is
`<= NS_MAX_TEXT_FRAGMENT_LENGTH`, that means equals or less than `0x1FFFFFFF`.
So that it must be safe to convert the offset to `uint32_t` from `int32_t`.

Differential Revision: https://phabricator.services.mozilla.com/D131111
2021-12-09 08:01:31 +00:00
Masayuki Nakano c19aa5aaa5 Bug 1740853 - part 1: Make `nsContentUtils::ComparePoints` take `uint32_t` for offset in DOM nodes r=smaug
They are defined as "unsigned long" by the standards.  So we should use
`uint32_t` rather than `int32_t` with the methods.  However, layout code
uses `int32_t` a lot for representing the offset.  Therefore, this patch
adds `*_FixOffset1` etc for the cases which cannot fix easily in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D131110
2021-12-09 07:51:45 +00:00
Masayuki Nakano 82e2013683 Bug 1735446 - part 4: Make `Selection::GetRangeAt()` take `uint32_t` instead of `int32_t` r=smaug
It's an internal API corresponding to `Selection.getRangeAt` DOM API.
I think that it should use `uint32_t` rather than `size_t` because of the
consistency with the DOM API and `Selection::RangeCount()`.

This patch fixes all callers of `GetRangeAt()`, and rewrites it with ranged-
loops unless original ones do not refer `RangeCount()` every time and may run
script in the loop.

Differential Revision: https://phabricator.services.mozilla.com/D128848
2021-12-09 07:35:09 +00:00
Mike Hommey 8e411675ac Bug 1744877 - Remove --disable-xul. r=Gijs
Building with --disable-xul has been busted since _at least_ bug
1082579, for more than 7 years (I didn't try to track that down
further). It's time to recognize that the option serves no purpose.

Differential Revision: https://phabricator.services.mozilla.com/D133161
2021-12-08 21:37:11 +00:00
James Teh e649b5b5cd Bug 1742915 part 2: Cache the tag attribute. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D132653
2021-12-07 03:37:03 +00:00
James Teh 6309a094fe Bug 1742915 part 1: Move Attributes to base Accessible. r=morgan
The RemoteAccessibleBase implementation is a stub for now, but will be expanded in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D132652
2021-12-07 03:37:03 +00:00
Alexandru Michis 77f2a1c3aa Backed out 2 changesets (bug 1742915) for causing android bustages.
CLOSED TREE

Backed out changeset 587bbb6b9224 (bug 1742915)
Backed out changeset 1beb5cf0cceb (bug 1742915)
2021-12-07 03:08:45 +02:00
James Teh 09a73de6f5 Bug 1742915 part 2: Cache the tag attribute. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D132653
2021-12-07 00:01:31 +00:00
James Teh 25f7ff3485 Bug 1742915 part 1: Move Attributes to base Accessible. r=morgan
The RemoteAccessibleBase implementation is a stub for now, but will be expanded in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D132652
2021-12-07 00:01:30 +00:00
Joel Maher 63bf096aef Bug 1743907 - Remove webrender annotation from manifestparser manifests. r=ahal,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D132682
2021-12-03 16:04:29 +00:00
James Teh aaae0cfc51 Bug 1742917 part 4: Move LinkIndexAtOffset to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D132201
2021-12-02 06:55:29 +00:00
James Teh d3e92fc1a1 Bug 1742917 part 3: Move LinkIndexOf to HyperTextAccessibleBase. r=eeejay
I removed the sync IPDL implementation of LinkIndexOf because we can calculate this in the parent process even with the cache disabled.

Differential Revision: https://phabricator.services.mozilla.com/D132200
2021-12-02 06:55:28 +00:00
James Teh c840074d40 Bug 1742917 part 2: Move IndexOfEmbeddedChild to base Accessible. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D132199
2021-12-02 06:55:28 +00:00
James Teh 5a9991c9d0 Bug 1742917 part 1: Move StartOffset to base Accessible. r=eeejay
1. There was a Windows non-cached RemoteAccessible implementation, but it was never actually called, so I removed it.
2. The sync IPDL RemoteAccessible implementation previously provided a boolean indicating success.
    I removed this because the LocalAccessible implementation doesn't have this and it doesn't seem like remote is special in this respect.

Differential Revision: https://phabricator.services.mozilla.com/D132198
2021-12-02 06:55:27 +00:00
Chris Peterson f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +00:00
James Teh 4904fa05f2 Bug 1741792 part 2: Use the cached caret. r=eeejay
This includes support in both TextLeafPoint and HyperTextAccessibleBase.

Differential Revision: https://phabricator.services.mozilla.com/D132098
2021-12-01 04:48:34 +00:00
James Teh 934c9cb61c Bug 1741792 part 1: Cache the caret in the parent process using caret events. r=eeejay
As well as the caret offset, we also need to cache whether the caret is at the end of a line.
Therefore, this information has been added to caret events.

Differential Revision: https://phabricator.services.mozilla.com/D132097
2021-12-01 04:48:33 +00:00
James Teh 42e16c9c21 Bug 1730862 part 3: Support the caret at the end of a line in HyperTextAccessibleBase. r=eeejay
This uses the caret support in TextLeafPoint.

Differential Revision: https://phabricator.services.mozilla.com/D132096
2021-11-30 02:07:37 +00:00
James Teh d2ad6859eb Bug 1730862 part 2: Support retrieval of the caret using TextLeafPoint. r=eeejay
The caret can be at the end of a wrapped line, but this does not have its own offset.
In this case, the way we handle the caret depends on what is being queried.
For character, we want to return no character at the position of the caret.
For word and line, we want to return the word/line before the caret.

To facilitate this conditional treatment, we use a special TextLeafPoint which represents the caret.
This is then actualized to a real point depending on the method called.

Differential Revision: https://phabricator.services.mozilla.com/D132095
2021-11-30 02:07:37 +00:00
James Teh ab3b1b2ccc Bug 1730862 part 1: Make HyperTextAccessibleBase::TransformOffset easier to use. r=eeejay
1. When calculating a start offset, we usually want 0 if the offset can't be transformed, thus clipping to the start of this Accessible.
    Previously, CharacterCount was always returned even when calculating a start offset.
    Now, we return 0 for a start offset, CharacterCount for an end offset.
2. Sometimes, this fallback value is insufficient and we need to know explicitly whether it failed.
    As well as the offset, we now return a boolean indicating this.
    This will be used in a subsequent patch.
3. Even though TransformOffset only deals with positive numbers, callers usually deal with signed numbers.
    Therefore, we now use int32_t insteaed of uint32_t to avoid a lot of casting.

Differential Revision: https://phabricator.services.mozilla.com/D132094
2021-11-30 02:07:36 +00:00
James Teh 50af5360c1 Bug 1743064: When the cache is enabled, release MSAA ids after a short delay. r=morgan
This is necessary to fix problems with Gmail and NVDA caused by reusing ids too quickly.

Differential Revision: https://phabricator.services.mozilla.com/D132316
2021-11-30 01:48:19 +00:00
James Teh f9fa2783ad Bug 1742902: Return the MsaaAccessible when using window emulation with the cache enabled. r=morgan
Previously, we tried to get a COM proxy even when the cache was enabled, which just crashed.
As part of this, use a RefPtr instead of manually managing references.

Differential Revision: https://phabricator.services.mozilla.com/D132104
2021-11-29 18:24:30 +00:00
James Teh e02052c2cc Bug 1742595: Don't throw an assertion when calling ImageAccessible::NativeState on a XUL image. r=eeejay
XUL images use nsImageBoxFrame, not nsImageFrame.
AccessibleType() returns eNoType on nsImageBoxFrame.
Changing this to return eImageType seems a bit risky and adding a new type just for an assertion seems pointless.
Therefore, we just check the frame type.

Differential Revision: https://phabricator.services.mozilla.com/D132051
2021-11-29 18:23:48 +00:00
Tooru Fujisawa d35e49b80a Bug 1617545 - Part 2: Make datalist item not removable in autocomplete drop down menu. r=MattN
Add nsIAutoCompleteResult.isRemovableAt method, to indicate whether the value
is removable, and do nothing for Shift+Delete on the item when the value is
not removable.

Depends on D131740

Differential Revision: https://phabricator.services.mozilla.com/D131741
2021-11-28 16:19:56 +00:00
James Teh 39db459749 Bug 1739372: Improve handling of reentry in MsaaAccessible::GetRemoteIAccessibleFor. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D131468
2021-11-23 21:51:32 +00:00
James Teh 159159dc66 Bug 1742003: Handle mContent being null when caching DOM node id. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D131732
2021-11-22 05:39:39 +00:00
Andi-Bogdan Postelnicu c8e0f87391 Bug 1519636 - First reformat with clang-format 13.0.0. r=firefox-build-system-reviewers,sylvestre,mhentges
Updated with clang-format version 13.0.0 (taskcluster-OgjH5lasS5K_fvefdRcJVg)

Depends on D131114

Differential Revision: https://phabricator.services.mozilla.com/D129119
2021-11-16 08:07:30 +00:00
Eitan Isaacson 4df46094a0 Bug 1741014 - Null check container widget in option state change handler. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D131146
2021-11-15 19:27:28 +00:00
Eitan Isaacson 37107fdf4c Bug 1733263 - P5: Rely on DOMMenuItem events for ACTIVE state changes in select elements. r=Jamie
1. Use dom events in RootAccessible to fire ACTIVE state changes.
2. Add DOMMenuItemInactive events to nsListControlFrame and fire it on
   the previously active option.
3. Don't fire those DOM events on collapsed combo boxes.
4. Add ACTIVE state change events for collapsed combo box options.

Differential Revision: https://phabricator.services.mozilla.com/D130298
2021-11-11 17:05:58 +00:00
Eitan Isaacson bdc3cd4279 Bug 1733263 - P4: Promisify the select focus change test. r=Jamie
This will make it easier to work with in a later change.

Differential Revision: https://phabricator.services.mozilla.com/D130297
2021-11-11 17:05:58 +00:00
Eitan Isaacson 9116ad2a43 Bug 1733263 - P3: Fire ACTIVE state change when aria-activedescendant changes. r=Jamie
Have ARIAActiveDescendantIDMaybeMoved call ARIAActiveDescendantChanged regardless of
widget focus state. The latter already checks if the widget is focused. This gives us
a chance to fire and ACTIVE state change regardless of focus state.

If an id or aria-activedescendant attribute is about to change, fire an
ACTIVE state change on the previously active accessible.

Differential Revision: https://phabricator.services.mozilla.com/D130296
2021-11-11 17:05:58 +00:00
Eitan Isaacson 48ccdd1553 Bug 1733263 - P2: Flush events and notifications when waiting for unexpected events. r=Jamie
By allowing async DOM events to be dispatched, and advancing the refresh
driver we can force some calls to NotificationController::WillRefresh
and flush out any pending notifications or events.

This lets us more reliably catch unexpected events without the need for
a sentinel event at the end.

Differential Revision: https://phabricator.services.mozilla.com/D130295
2021-11-11 17:05:57 +00:00
Eitan Isaacson ad6731236c Bug 1733263 - P1: Refactor state change event promises. r=Jamie
We do this in a bunch of places, so I moved it into promisified-events.

Differential Revision: https://phabricator.services.mozilla.com/D130294
2021-11-11 17:05:57 +00:00
Butkovits Atila b1ead9992f Backed out 5 changesets (bug 1733263) for causing leakes. CLOSED TREE
Backed out changeset 06263018f1f7 (bug 1733263)
Backed out changeset c8f226476a30 (bug 1733263)
Backed out changeset 2b1755721a8e (bug 1733263)
Backed out changeset 0b3d68cb6e68 (bug 1733263)
Backed out changeset 439e821c9640 (bug 1733263)
2021-11-10 02:22:56 +02:00
Eitan Isaacson 379e516511 Bug 1733263 - P5: Rely on DOMMenuItem events for ACTIVE state changes in select elements. r=Jamie
1. Use dom events in RootAccessible to fire ACTIVE state changes.
2. Add DOMMenuItemInactive events to nsListControlFrame and fire it on
   the previously active option.
3. Don't fire those DOM events on collapsed combo boxes.
4. Add ACTIVE state change events for collapsed combo box options.

Differential Revision: https://phabricator.services.mozilla.com/D130298
2021-11-09 23:17:17 +00:00
Eitan Isaacson c96fcc25b5 Bug 1733263 - P4: Promisify the select focus change test. r=Jamie
This will make it easier to work with in a later change.

Differential Revision: https://phabricator.services.mozilla.com/D130297
2021-11-09 23:17:17 +00:00
Eitan Isaacson c24895a970 Bug 1733263 - P3: Fire ACTIVE state change when aria-activedescendant changes. r=Jamie
Have ARIAActiveDescendantIDMaybeMoved call ARIAActiveDescendantChanged regardless of
widget focus state. The latter already checks if the widget is focused. This gives us
a chance to fire and ACTIVE state change regardless of focus state.

If an id or aria-activedescendant attribute is about to change, fire an
ACTIVE state change on the previously active accessible.

Differential Revision: https://phabricator.services.mozilla.com/D130296
2021-11-09 23:17:17 +00:00
Eitan Isaacson cece555e00 Bug 1733263 - P2: Flush events and notifications when waiting for unexpected events. r=Jamie
By allowing async DOM events to be dispatched, and advancing the refresh
driver we can force some calls to NotificationController::WillRefresh
and flush out any pending notifications or events.

This lets us more reliably catch unexpected events without the need for
a sentinel event at the end.

Differential Revision: https://phabricator.services.mozilla.com/D130295
2021-11-09 23:17:16 +00:00
Eitan Isaacson 594d200c93 Bug 1733263 - P1: Refactor state change event promises. r=Jamie
We do this in a bunch of places, so I moved it into promisified-events.

Differential Revision: https://phabricator.services.mozilla.com/D130294
2021-11-09 23:17:16 +00:00
Nils 3c79233da8 Bug 1740294: Fix typo "then then" -> "then" r=mhentges
Instances of the typo that have been imported from other repositories have been left unchanged.

Differential Revision: https://phabricator.services.mozilla.com/D130561
2021-11-09 17:36:40 +00:00
Ting-Yu Lin f32eaad379 Bug 1722484 Part 2 - Replace LineBreaker::Next() and WordBreaker::Next() with the new iterators. r=m_kato
With the rewrite, we reduce the dependency of lwbrk LineBreaker::Next(),
WordBreaker::Next(), and their `int32_t` sentinel values
NS_LINEBREAKER_NEED_MORE_TEXT and NS_WORDBREAKER_NEED_MORE_TEXT.

Differential Revision: https://phabricator.services.mozilla.com/D130392
2021-11-09 01:14:15 +00:00
Gerald Squelart 5399574d8b Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-08 23:59:35 +00:00
Iulian Moraru 36283a9a3b Backed out 2 changesets (bug 1722484) for causing multiple build bustages. CLOSED TREE
Backed out changeset bef547b588ff (bug 1722484)
Backed out changeset e676fa1a0cb7 (bug 1722484)
2021-11-09 01:42:20 +02:00
Ting-Yu Lin 7310c93473 Bug 1722484 Part 2 - Replace LineBreaker::Next() and WordBreaker::Next() with the new iterators. r=m_kato
With the rewrite, we reduce the dependency of lwbrk LineBreaker::Next(),
WordBreaker::Next(), and their `int32_t` sentinel values
NS_LINEBREAKER_NEED_MORE_TEXT and NS_WORDBREAKER_NEED_MORE_TEXT.

Differential Revision: https://phabricator.services.mozilla.com/D130392
2021-11-08 22:24:19 +00:00
Cristian Tuns 1aeac93d23 Backed out 5 changesets (bug 1738627) for causing xpcshell failures on test_ext_geckoProfiler_schema.js CLOSED TREE
Backed out changeset 42d385d7da97 (bug 1738627)
Backed out changeset edeb3a338954 (bug 1738627)
Backed out changeset 98f02e35134d (bug 1738627)
Backed out changeset 711daa6dd24b (bug 1738627)
Backed out changeset 49e12753a40c (bug 1738627)
2021-11-05 05:12:28 -04:00
James Teh 5d76f559b9 Bug 1736742 part 3: When running in an MSIX container, register AccessibleHandler in HKCU at startup if it isn't already registered. r=nalexander,jmathies
Differential Revision: https://phabricator.services.mozilla.com/D129951
2021-11-05 06:25:45 +00:00
Gerald Squelart 7fa084ae7c Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-05 05:52:28 +00:00
James Teh eb568eccaf Bug 1735969: Unify Accessible::TakeFocus, thus allowing it to be used for RemoteAccessibles when the cache is enabled on Windows. r=morgan
1. Add TakeFocus in Windows PDocAccessible.
2. Move RecvTakeFocus into DocAccessibleChildBase so it is used for all platforms.
3. Move TakeFocus into the Accessible base class.
4. Move the IPDL version of TakeFocus into RemoteAccessibleBase so it is used for all plaforms.
5. Make the Windows RemoteAccessible::TakeFocus use the base (IPDL) implementation if the cache is enabled or COM otherwise.
6. Use Accessible::TakeFocus for ATK, Mac, Windows and XPCOM.

Differential Revision: https://phabricator.services.mozilla.com/D130327
2021-11-05 00:52:15 +00:00
ssummar c7c477296e Bug 1738840 - Replaces mozilla::Tuple with std::tuple in accessible/ r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D130152
2021-11-04 13:39:19 +00:00
Magnus Melin 28f70eb371 Bug 1738565 - fix Crash in [@ -[MOXWebAreaAccessible handleAccessibleEvent:]]. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D129979
2021-11-03 08:44:02 +00:00
James Teh ca81384a66 Bug 1738051: Use a11y focus events to support the focused state when the cache is enabled. r=eeejay
This will also serve as the groundwork for unifying FocusedChild, but that isn't implemented here.

Differential Revision: https://phabricator.services.mozilla.com/D129669
2021-11-02 23:56:37 +00:00
James Teh eca2f19b0d Bug 1738032 part 6: browser_caching_states.js: Ignore state changes for states we aren't interested in. r=eeejay
For example, when disabling an HTML input, we get an event for SUPPORTS_AUTOCOMPLETION among others.
If we continue with the test after that state change and there hasn't been an ENABLED/UNAVAILABLE state change, the cache won't be up to date.
Unfortunately, we can't use untilCacheOk here because we don't do a cache push for state changes.

Differential Revision: https://phabricator.services.mozilla.com/D129643
2021-11-02 23:56:36 +00:00
James Teh 6deb1a13cb Bug 1738032 part 5: Use the unified Accessible::State on Windows to support cached RemoteAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D129642
2021-11-02 23:56:36 +00:00
James Teh f20971182b Bug 1738032 part 4: Use the cache for RemoteAccessible state. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D129641
2021-11-02 23:56:36 +00:00
James Teh 461332528f Bug 1738032 part 3: Move LocalAccessible::State to Accessible. r=eeejay
This patch includes XPCOM support.
Unfortunately, LocalAccessible::State isn't const, so the base method can't be const for now either.

Differential Revision: https://phabricator.services.mozilla.com/D129640
2021-11-02 23:56:35 +00:00
James Teh 1d1d118200 Bug 1738032 part 2: Push a11y state in the initial cache push. r=eeejay
Rather than cache updates thereafter, state will be kept up to date using state change events.

Differential Revision: https://phabricator.services.mozilla.com/D129639
2021-11-02 23:56:35 +00:00
James Teh 9123e3a0ce Bug 1738032 part 1: Support uint64_t as a value type for AccAttributes. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D129638
2021-11-02 23:56:34 +00:00
James Teh 9e4079f57f Bug 1738070: Don't fire state change a11y events for NS_EVENT_STATE_DEFAULT changes on things other than buttons. r=morgan
We only expose this state on HTMLButtonAccessible, but we sometimes get these notifications for other controls; e.g. checkbox inputs.
We shouldn't fire a state change event for a state we never expose.

Differential Revision: https://phabricator.services.mozilla.com/D129673
2021-11-02 23:51:12 +00:00
Masayuki Nakano 4341d6fb0c Bug 1455514 - part 1: Add accessors and static helper methods to retrieve `nsINode` or its concrete classes from `EventTarget` r=smaug
Currently, checking whether an `EventTarget` is `nsINode` (or its concrete
classes) or not requires a QI, but it's expensive and used a lot while we
handle each event.  Therefore, it'd be nicer for creating a virtual method,
`EventTarget::IsNode()` and use it for the check.

If trying to convert `EventTarget` to a concrete class, it may require two
virtual method calls.  I'm not sure whether it's cheaper than a QI, but at
least, it won't depend on the UUID check order of `QueryInterface()` when
multiple interfaces are implemented.

Differential Revision: https://phabricator.services.mozilla.com/D129781
2021-11-02 13:03:43 +00:00
Emilio Cobos Álvarez f3f1e06187 Bug 1738586 - Fix a11y test_general on dark mode. r=Jamie
Since this is a chrome page we start honoring dark mode colors by
default, and after bug 1525107 that affects default background and text
colors, which these tests were hardcoding to black/white.

Differential Revision: https://phabricator.services.mozilla.com/D129983
2021-11-02 10:36:17 +00:00
James Teh 570683a696 Bug 1730096 part 9: Add tests for cached text attributes. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D129475
2021-11-01 23:27:40 +00:00
James Teh 1563d99b94 Bug 1730096 part 8: Move DefaultTextAttributes to HyperTextAccessibleBase and implement it for RemoteAccessible. r=eeejay
This patch includes ATK and XPCOM support.

Differential Revision: https://phabricator.services.mozilla.com/D129474
2021-11-01 23:27:39 +00:00
James Teh 6bd5ccff7d Bug 1730096 part 7: Support cached remote text attributes in TextLeafPoint. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D129473
2021-11-01 23:27:39 +00:00
James Teh 7f79cc0400 Bug 1730096 part 6: Add AccAttributes::CopyTo to copy an AccAttributes. r=eeejay
This is necessary for two reasons:

1. Leaf text attributes and default text attributes are cached separately, since the caller can choose whether to include defaults or not. This means merging them together.
2. Methods for retrieving attributes currently return a non-const AccAttributes. We might be able to change this in future for some of them, but I didn't want to deal with that in this work.

Differential Revision: https://phabricator.services.mozilla.com/D129472
2021-11-01 23:27:39 +00:00
James Teh e2a75ff2ce Bug 1730096 part 5: Push text attributes to the cache. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D129471
2021-11-01 23:27:38 +00:00
James Teh 5cb3312f64 Bug 1730096 part 4: Support AccAttributes as a value inside an AccAttributes. r=eeejay
This will be used to include text attributes as part of the cache for an Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D129470
2021-11-01 23:27:38 +00:00
James Teh f24390b6a8 Bug 1730096 part 3: Add HyperTextAccessibleBase::TextAttributes. r=eeejay
This uses TextLeafPoint.
This patch includes support for ATK, IA2 and XPCOM.
As with TextAtOffset, HyperTextAccessible calls the base implementation if the cache is enabled, but otherwise uses the old implementation for now.

Differential Revision: https://phabricator.services.mozilla.com/D129469
2021-11-01 23:27:37 +00:00
James Teh 754058c557 Bug 1730096 part 2: Implement support for text attributes in TextLeafPoint. r=eeejay
This supports both fetching text attributes and finding the start of attribute runs, but only for LocalAccessible.
Support for RemoteAccessible will be added in a subsequent patch.

Differential Revision: https://phabricator.services.mozilla.com/D129468
2021-11-01 23:27:37 +00:00
James Teh 39c9ee45b8 Bug 1730096 part 1: Add AccAttributes::Equal to compare attributes in two instances. r=eeejay
This will be used later to check whether text attributes are different between two Accessibles.
I added this as a method instead of operator== because callers always hold a pointer to AccAttributes, and *a1 == *a2 is weird and will probably lead to mistakes.
This required adding operator== for our value structs.

Differential Revision: https://phabricator.services.mozilla.com/D129467
2021-11-01 23:27:37 +00:00
Emilio Cobos Álvarez 43632d10fb Bug 1738084 - Make popups on Linux have shadows. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D129699
2021-10-28 00:51:58 +00:00
Markus Stange b0068bfe22 Bug 1737869 - Fix build with the macOS 12 SDK, by using AXTextMarker(Range)Ref instead of id and by ifdefing the declarations that are now public in the new SDK. r=eeejay
I think this patch is functionally neutral.
I'm not completely sure about the best way to do these casts - the __bridge may not be
necessary since we don't use ARC yet. But it's probably fine to add it anyway.
Also, returning autoreleased CFTypeRef objects seems a bit weird, but it's what we've
already been doing and it's probably fine.
And some of these nils should maybe be nullptrs, but the compiler doesn't seem to care.

Differential Revision: https://phabricator.services.mozilla.com/D129559
2021-10-27 20:38:07 +00:00
James Teh 20bdf607b8 Bug 1735706: Check the cache pref instead of mCachedFields in non-Windows RemoteAccessible methods. r=eeejay
mCachedFields might be null because all fields are default; i.e. mCachedFields being null doesn't mean the cache is invalid/disabled.
We should check the pref instead when determining whether to call base class methods to query the cache.

Differential Revision: https://phabricator.services.mozilla.com/D128445
2021-10-26 22:26:45 +00:00
James Teh c0e93222ee Bug 1735464: PrevWordBreakClassWalker::IsStartOfGroup: Don't advance mOffset if PrevChar fails. r=eeejay
IsStartOfGroup wants to peek at the previous character.
It calls PrevChar, but it doesn't check for failure.
It then unconditionally increments mOffset to "undo" PrevChar.
If PrevChar failed, that means we're now 1 character after where we started.
This wasn't causing any test failures and I can't think of a test case that shows breakage here.
Nevertheless, it definitely doesn't make sense and could cause difficult-to-diagnose bugs.

This in turn exposed a bug in PrevChar whereby it didn't handle being called again after it had already failed.
That also had to be fixed here.

Differential Revision: https://phabricator.services.mozilla.com/D128332
2021-10-26 22:25:29 +00:00
James Teh ce7bb0bc8c Bug 1734583: When retrieving text stuff from the cache, null check mCachedFields and also verify the cache. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D128334
2021-10-26 22:24:17 +00:00
Ting-Yu Lin c2f6ef7a09 Bug 1736938 Part 3 - Make all WordBreaker's methods static, and adapt the callers. r=jfkthame
The motivation is the same as the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D129109
2021-10-25 19:00:22 +00:00
Ting-Yu Lin 11ec3b3de9 Bug 1737332 - Remove unused WordBreaker argument for IsAcceptableWordStart(). r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D129108
2021-10-22 18:41:45 +00:00
Eitan Isaacson 254970745b Bug 1733248 - Fire state change events for autocomplete changes. r=morgan
Trickier than just listening for attributes on inputs since a form
can toggle autocomplete too.

Also fixed To32States to work on the 32nd bit.

Differential Revision: https://phabricator.services.mozilla.com/D128913
2021-10-21 22:47:43 +00:00
Eitan Isaacson 9ea8dc7379 Bug 1736115 - Remove HTMLTextFieldAccessible::BindingOrWidgetParent. r=Jamie
Also fix search-textbox's use of aria-autocomplete and a test.

Differential Revision: https://phabricator.services.mozilla.com/D128655
2021-10-21 22:47:43 +00:00
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