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

9992 Коммитов

Автор SHA1 Сообщение Дата
James Teh bb8a4b5e7e Bug 1779975: Check whether a LocalAccessible has its own content before trying to get MarkupMapInfo from it. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D152254
2022-07-22 00:05:21 +00:00
Neia Finch 034d8039a6 Bug 1645904 - Fix swapped parameters for nsIAccessibleVirtualCursorChangeEvent r=eeejay
The fields are unused, but there's no reason to propagate them
incorrectly.

Differential Revision: https://phabricator.services.mozilla.com/D134907
2022-07-21 16:59:49 +00:00
Eitan Isaacson f3cd181291 Bug 1778585 - Don't register non-top-level accessibles if there is no top-level regeistered. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152328
2022-07-21 16:57:04 +00:00
Cosmin Sabou 31deb146e7 Bug 1779541 - disable browser_caching_actions.js on macOS opt due to permafailures. r=intermittent-reviewers,MasterWayZ DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D152334
2022-07-21 00:50:50 +00:00
Mark Banner 4bfafd41fa Bug 1779982 - Migrate places consumers to use ESM imports directly. r=mak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152005
2022-07-20 22:34:21 +00:00
smolnar 102b779608 Backed out 8 changesets (bug 1779982, bug 1780017, bug 1780347) for causing doc generate failures. CLOSED TREE
Backed out changeset 3f22c0f99cf1 (bug 1780347)
Backed out changeset 6f20b7e4b21b (bug 1780017)
Backed out changeset ae6062c69aeb (bug 1780017)
Backed out changeset e668d7778d97 (bug 1780017)
Backed out changeset e158fc41594b (bug 1780017)
Backed out changeset d4c69c956271 (bug 1779982)
Backed out changeset 145212fd826d (bug 1779982)
Backed out changeset 54079aaa1857 (bug 1779982)
2022-07-20 22:43:53 +03:00
Emilio Cobos Álvarez 92c9ff22dc Bug 1780385 - Remove canvas hit region api. r=jrmuizel
Add a pref for MouseEvent.region since that wasn't un-exposed. No other
browser supports it so we can probably safely remove it, but just in
case.

Differential Revision: https://phabricator.services.mozilla.com/D152274
2022-07-20 16:52:47 +00:00
Mark Banner fd37e0e9da Bug 1780017 - Migrate urlbar consumers to use ESM imports directly. r=adw,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152057
2022-07-20 15:50:42 +00:00
Mark Banner 23086da9b9 Bug 1779982 - Migrate places consumers to use ESM imports directly. r=mak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152005
2022-07-20 15:50:40 +00:00
Iulian Moraru 1108246986 Backed out 7 changesets (bug 1779982, bug 1780017) for causing multiple failures. CLOSED TREE
Backed out changeset f33a58aa2f3f (bug 1780017)
Backed out changeset e21c85d61b91 (bug 1780017)
Backed out changeset 213ee5578e7c (bug 1780017)
Backed out changeset ea9b3bf42ea1 (bug 1780017)
Backed out changeset d2d8530f3c4d (bug 1779982)
Backed out changeset 088e5148c307 (bug 1779982)
Backed out changeset 267e08f3868a (bug 1779982)
2022-07-20 15:44:53 +03:00
Mark Banner ac90e83952 Bug 1780017 - Migrate urlbar consumers to use ESM imports directly. r=adw,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152057
2022-07-20 10:36:51 +00:00
Mark Banner e84aaa1b85 Bug 1779982 - Migrate places consumers to use ESM imports directly. r=mak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152005
2022-07-20 10:36:49 +00:00
Morgan Reschenberg e8b96a564c Bug 1778550: Trim whitespace on mozAcc titles, prune empty mozTextLeafAccs from tree r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D151328
2022-07-18 15:48:17 +00:00
James Teh 6c7598c3fe Bug 1772050: Don't call Attributes() in Android's HandleLiveRegionEvent. r=eeejay
Attributes() might do computation that we'll just throw away; e.g. building a CachedTableAccessible.
In a content process, cached data structures like this will never get used by a client, so building them will always be wasteful.
Instead, use nsAccUtils::SetLiveContainerAttributes, which only computes live region stuff.

Differential Revision: https://phabricator.services.mozilla.com/D151799
2022-07-14 21:58:37 +00:00
Andrew Osmond a9049b5248 Bug 1779519 - gfxFontCache expiration tracker operations should be more atomic. r=jfkthame
gfxFontCache acquires and releases its mutex during various operations.
In order to keep the state internally consistent, we should only release
the lock after the full operation is complete. This involves moving the
deletion of gfxFont to outside the lock via a temporary discard array.

The expiration state should not be protected by the gfxFont's mutex
since we don't hold it during most operations. Instead we should hold
gfxFontCache's mutex because then we can guarantee the operation is
atomic, particularly when a worker wants a font, and the main thread is
aging the generations.

When a font is returned from gfxFontCache, we now return it already
removed from the tracker, and with its refcount updated. This avoids any
potential races between the expiration timer and a worker accessing the
font, as well as simplying the callers so they don't need to be aware of
addref-ing manually in case the result is to be discarded (so that it
gets readded to the tracker).

Differential Revision: https://phabricator.services.mozilla.com/D151821
2022-07-14 19:53:09 +00:00
criss ba063e13c6 Backed out changeset e4cd98b5984d (bug 1779519) for causing build bustages. CLOSED TREE 2022-07-14 22:06:53 +03:00
Andrew Osmond 9f767ee84a Bug 1779519 - gfxFontCache expiration tracker operations should be more atomic. r=jfkthame
gfxFontCache acquires and releases its mutex during various operations.
In order to keep the state internally consistent, we should only release
the lock after the full operation is complete. This involves moving the
deletion of gfxFont to outside the lock via a temporary discard array.

The expiration state should not be protected by the gfxFont's mutex
since we don't hold it during most operations. Instead we should hold
gfxFontCache's mutex because then we can guarantee the operation is
atomic, particularly when a worker wants a font, and the main thread is
aging the generations.

When a font is returned from gfxFontCache, we now return it already
removed from the tracker, and with its refcount updated. This avoids any
potential races between the expiration timer and a worker accessing the
font, as well as simplying the callers so they don't need to be aware of
addref-ing manually in case the result is to be discarded (so that it
gets readded to the tracker).

Differential Revision: https://phabricator.services.mozilla.com/D151821
2022-07-14 18:35:49 +00:00
James Teh ef6f7fb547 Bug 1757126 part 4: Support AccessKey on cached RemoteAccessible. r=morgan
1. Move AccessKey to base Accessible.
2. Retrieve AccessKey from the cache for RemoteAccessible.
3. Update XPCOM and platform specific code accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D151202
2022-07-14 05:48:16 +00:00
James Teh 96dc8466b6 Bug 1757126 part 3: Push AccessKey to the parent process cache. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D151201
2022-07-14 05:48:16 +00:00
James Teh 2d82055fe8 Bug 1757126 part 2: Move KeyBinding to base Accessible header. r=morgan
We'll need this to unify AccessKey.

Differential Revision: https://phabricator.services.mozilla.com/D151200
2022-07-14 05:48:16 +00:00
James Teh 52a9b98ce9 Bug 1757126 part 1: Remove RemoteAccessible::KeyboardShortcut. r=morgan,ipc-reviewers,nika
KeyboardShortcut is only supported for XUL menu items.
XUL menu items can never be remote, so there's no point in querying this via IPDL.

Differential Revision: https://phabricator.services.mozilla.com/D151199
2022-07-14 05:48:15 +00:00
Norisz Fay d152ee99bf Backed out 4 changesets (bug 1757126) for causing build bustages on xpcAccessible.cpp CLOSED TREE
Backed out changeset e57b1129fd48 (bug 1757126)
Backed out changeset 6ee5d245c2fc (bug 1757126)
Backed out changeset b0809e6a3de3 (bug 1757126)
Backed out changeset 4d10b2dfdc99 (bug 1757126)
2022-07-14 04:18:36 +03:00
James Teh 4ea684224b Bug 1770878: Don't fire collapsed selection events on the container of a focused text field. r=morgan
These events were clobbering the text field selection in the cache.
They aren't useful to clients anyway.

Differential Revision: https://phabricator.services.mozilla.com/D151004
2022-07-14 00:50:38 +00:00
James Teh e83581aacd Bug 1757126 part 4: Support AccessKey on cached RemoteAccessible. r=morgan
1. Move AccessKey to base Accessible.
2. Retrieve AccessKey from the cache for RemoteAccessible.
3. Update XPCOM and platform specific code accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D151202
2022-07-14 00:49:47 +00:00
James Teh 1e23a19e0f Bug 1757126 part 3: Push AccessKey to the parent process cache. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D151201
2022-07-14 00:49:46 +00:00
James Teh b64daafc2b Bug 1757126 part 2: Move KeyBinding to base Accessible header. r=morgan
We'll need this to unify AccessKey.

Differential Revision: https://phabricator.services.mozilla.com/D151200
2022-07-14 00:49:46 +00:00
James Teh 01bc6196d8 Bug 1757126 part 1: Remove RemoteAccessible::KeyboardShortcut. r=morgan,ipc-reviewers,nika
KeyboardShortcut is only supported for XUL menu items.
XUL menu items can never be remote, so there's no point in querying this via IPDL.

Differential Revision: https://phabricator.services.mozilla.com/D151199
2022-07-14 00:49:45 +00:00
James Teh c838f807ed Bug 1762116: When a global ARIA attribute is added to an element, create an Accessible if there isn't one already. r=morgan
We don't create Accessibles for all elements.
If an element has a global ARIA attribute when it is shown, we do create an Accessible for it.
However, previously, if we didn't initially create an Accessible for an element (e.g. no global ARIA attributes) and it subsequently gained a global ARIA attribute, we didn't create an Accessible at that point.
We now explicitly handle this case when such an attribute is added.

Differential Revision: https://phabricator.services.mozilla.com/D151348
2022-07-14 00:48:47 +00:00
James Teh e29e5e6308 Bug 1778644: When a row is added to a table, push a cache update for the table's layout guess. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D151454
2022-07-14 00:47:55 +00:00
James Teh 21a943f29d Bug 1779149: Remove/fix incorrect assertions in CachedTableAccessible. r=morgan
1. When updating the row/col map, there can be overlapping cells - we even have code to support that - so don't assert that there is no existing cell.
2. When retrieving the caption, the role assertion was accidentally reversed.

Differential Revision: https://phabricator.services.mozilla.com/D151569
2022-07-14 00:45:26 +00:00
James Teh cd91557c45 Bug 1779162: Don't walk ancestors unnecessarily in CachedTableCellAccessible::RowHeaderCells. r=morgan
Previously, we used CellAt, but this returns the Accessible, discarding the CachedTableCellAccessible.
RowHeaderCells needs both, so it then called AsTableCellBase, which must walk ancestors to get the table.
We already have the table and access to its private data, so use it directly.
This is probably an insignificant performance improvement, but the unnecessary indirection was bothering me.

Differential Revision: https://phabricator.services.mozilla.com/D151571
2022-07-14 00:44:56 +00:00
James Teh bbcfab7595 Bug 1779303: Don't add null attribute values for RemoteAccessibles with markup attributes that must be fetched from DOM. r=morgan
Some markup elements expose Accessible attributes which must be retrieved from DOM; e.g. the datetime attribute of the datetime element.
We don't cache these yet for RemoteAccessible.
Previously, these were unintentionally exposed from MarkupAttributes with null values.
For now, these should be skipped instead until we have caching code for them.
This fixes crashes whenever a client tries to fetch attributes from such an element.

Differential Revision: https://phabricator.services.mozilla.com/D151659
2022-07-14 00:21:27 +00:00
Norisz Fay c58fc06b93 Backed out changeset 588fd65ea989 (bug 1778550) for causing mochitest failures on browser_hierarchy.js, browser_rootgroup.js, browser_text_leaf.js CLOSED TREE 2022-07-14 03:20:35 +03:00
Morgan Reschenberg 4da022c85c Bug 1778550: Trim whitespace on mozAcc titles, prune empty mozTextLeafAccs from tree r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D151328
2022-07-13 23:03:40 +00:00
Tooru Fujisawa a4edb84be9 Bug 1777486 - Part 5: Remove unnecessary XPCOMUtils.jsm imports. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D151217
2022-07-12 04:21:35 +00:00
Tooru Fujisawa 54623364da Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
James Teh d2d7992aaf Bug 1748755: Support IAccessibleText::get_new/oldText for cached RemoteAccessible. r=morgan
1. Make ia2AccessibleText::UpdateTextChangeData (and sLastTextChangeAcc) use HyperTextAccessibleBase instead of HyperTextAccessibleWrap.
2. Make ProxyTextChangeEvent call UpdateTextChangeData when the cache is enabled.
3. Don't send sync text change events when the cache is enabled. They don't need to be sync because clients query the cache, not the content process a11y tree. Even if the content process a11y tree mutates, the cache can't update until in-process clients have synchronously handled the event.

Differential Revision: https://phabricator.services.mozilla.com/D139677
2022-07-12 02:45:58 +00:00
James Teh 2e5729d4e9 Bug 1757121 part 5: Expose live region attributes on cached RemoteAccessibles. r=morgan
As part of this, aria-relevant is now exposed via object attributes.
This is necessary to ensure it is included in the cache.
There's no good reason not to expose it anyway, since we already expose the other live region attributes.

Differential Revision: https://phabricator.services.mozilla.com/D150380
2022-07-12 02:45:58 +00:00
James Teh d0d3ec2479 Bug 1757121 part 4: Acquire the Android lock while shutting down the accessibility service. r=eeejay
RemoteAccessibleBase::Attributes will soon use the service to query markup attributes.
Thus, the service must not shut down while a client call is being handled on the UI thread.

Differential Revision: https://phabricator.services.mozilla.com/D150722
2022-07-12 02:45:57 +00:00
James Teh d2615d1719 Bug 1757121 part 3: Normalize true/false/mixed ARIA tokens to atoms. r=morgan
This will be needed for easier checking of aria-atomic.
It is also more efficient in terms of cache storage, since we previously pushed strings for these values.
This moves the code from GetARIAToken into NormalizeARIAToken, since GetARIAToken isn't used any more and it makes sense to handle normalization in one place.

Differential Revision: https://phabricator.services.mozilla.com/D150379
2022-07-12 02:45:57 +00:00
James Teh 99afe5c014 Bug 1757121 part 2: Rewrite nsAccUtils::SetLiveContainerAttributes to use the a11y tree instead of the DOM tree. r=morgan
This makes it possible for it to work for RemoteAccessible.
There is a functional change here in that using the a11y tree means we traverse parents set via aria-owns, where previously we only walked the DOM ancestry.
I doubt this will have any impact in the wild and Chromium already does this anyway.

Differential Revision: https://phabricator.services.mozilla.com/D150378
2022-07-12 02:45:56 +00:00
James Teh b40ace7f06 Bug 1757121 part 1: Allow nsAccessibilityService::MarkupAttribute/MarkupAttributes to take an Accessible. r=morgan
Previously, these methods took a DOM nsIContent, making it impossible for them to work for RemoteAccessible.
GetMarkupMapInfoForNode has been renamed to GetMarkupMapInfoFor and has overloads for nsIContent and Accessible.
MarkupAttribute is a template which can take either, as we still need the nsIContent version elsewhere.
MarkupAttributes now only takes an Accessible, as it can get the nsIContent from the Accessible if necessary.

Differential Revision: https://phabricator.services.mozilla.com/D150377
2022-07-12 02:45:56 +00:00
James Teh 143b3ab931 Bug 1768269: Use IgnoredErrorResult instead of ErrorResult in LocalAccessible::IsActiveDescendant. r=eeejay
QuerySelector can fail if the id is invalid; e.g. if it contains a quote (") character.
ErrorResult treats a failure as an exception, so it asserts.
We explicitly check for and handle failure ourselves, so use IgnoredErrorResult instead.

Differential Revision: https://phabricator.services.mozilla.com/D151564
2022-07-12 02:44:31 +00:00
Eitan Isaacson 87bdd97025 Bug 1776919 - Add Accessible::DebugPrint for debugging. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D150497
2022-07-12 02:41:02 +00:00
Butkovits Atila ed1ef2fc65 Bug 1778220 - disable browser_test_zoom.js on Linux_64 & Win for frequent failures. r=intermittent-reviewers,MasterWayZ DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D151434
2022-07-11 18:04:49 +00:00
Andreea Pavel 7738a75fdd Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Tooru Fujisawa 6ee7d4ed56 Bug 1777486 - Part 5: Remove unnecessary XPCOMUtils.jsm imports. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D151217
2022-07-11 15:09:15 +00:00
Tooru Fujisawa 8cd6ed7409 Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-11 15:09:13 +00:00
Tooru Fujisawa 52c95734e7 Bug 1667455 - Part 9: Stop importing Services.jsm from chrome-priv HTML code, single-line cases. r=kmag,necko-reviewers,geckoview-reviewers,extension-reviewers,m_kato,dragana
Differential Revision: https://phabricator.services.mozilla.com/D150898
2022-07-11 12:41:52 +00:00
Tooru Fujisawa 47c8f80432 Bug 1667455 - Part 6: Stop importing Services.jsm from chrome-priv JS code, non-top-level or multi-line cases. r=kmag,perftest-reviewers,AlexandruIonescu,sparky
Differential Revision: https://phabricator.services.mozilla.com/D150895
2022-07-11 12:41:51 +00:00
Tooru Fujisawa bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Tooru Fujisawa f3a8c52c53 Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D150893
2022-07-11 12:41:50 +00:00
Morgan Reschenberg e1807daa21 Bug 1767304: Support ValueDescription, Orientation, Min, Max on AXIncrementors r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D151080
2022-07-07 21:31:17 +00:00
Butkovits Atila 41fa540cb7 Bug 1771934 - Lint fix. a=fix. CLOSED TREE 2022-07-07 02:07:45 +03:00
Eitan Isaacson 1916ea7d90 Bug 1771934 - Unregister all SessionAccessibility accessibles when top doc is shut down. r=Jamie
The associated PresShell of the root doc can be used for retrieving the
SessionAccessibility. If the PresShell is about to go away, we should
unregister all the accessibles.

Differential Revision: https://phabricator.services.mozilla.com/D150661
2022-07-06 22:26:08 +00:00
Nika Layzell 7ced96212e Bug 1778211 - Reject xpidl CDATA containing 'virtual', r=xpcom-reviewers,necko-reviewers,mccr8,dragana
We'll probably want to do something more accurate in the future with a
custom clang static analysis pass which validates that XPIDL interfaces
have the expected vtable and struct layout, however doing so would be
more involved than the string matching done in this patch.

In addition to checking for extra virtual methods, we'll likely also
want to check for data members on interfaces, and reject them unless the
class is marked as `[builtinclass]` in addition to some other attribute
which we'll need to add to prevent them from being implemented in Rust
(as c++ data members will not be reflected by the rust macro).

There were 2 instances of a comment which contained the word 'virtual'
within a CDATA block. These comments were moved out of the CDATA block
to avoid triggering the error.

Differential Revision: https://phabricator.services.mozilla.com/D151068
2022-07-06 14:53:06 +00:00
James Teh 7558f52d0c Bug 1777409: Fix IAccessible::accFocus for non-tab remote documents such as extension sidebars. r=morgan
Previously, we retrieved the active tab.
However, remote documents might not be within a tab; e.g. extension sidebars.
Instead, we now use BrowserParent::GetFocused to get the focused document.

Differential Revision: https://phabricator.services.mozilla.com/D150706
2022-07-05 21:04:27 +00:00
James Teh 71f8cac441 Bug 1777410: Fix IAccessible::accChild for extension sidebars. r=morgan
Extension sidebars are remote documents.
However, they are embedded inside a XUL <window>, which is a sub-document of the root document.
Previously, our accChild code required that the remote document be embedded in the same local document as the Accessible on which accChild was called.
This meant that calling accChild on the root with the id of an Accessible in an extension sidebar failed.
To fix this, allow a remote document to be embedded in a descendant local document.

Differential Revision: https://phabricator.services.mozilla.com/D150716
2022-07-05 21:03:13 +00:00
Morgan Rae Reschenberg 644b66ac98 Bug 1775329: Support cached OffsetAtPoint in HyperTextAccessibleBase r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D150049
2022-07-05 19:50:45 +00:00
Morgan Rae Reschenberg 1d91ffd52f Bug 1776275: Consistently fetch fullZoom from top level browsing context in tests, cache on the top level doc in core r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D150291
2022-07-05 19:50:45 +00:00
Mike Conley 49438bb09a Bug 1774262 - Make search-textbox component easier to theme. r=mstriemer,desktop-theme-reviewers,dao,freddyb
This allows consumers of the component to override the clear search icon
and change the width of the focus outline.

Differential Revision: https://phabricator.services.mozilla.com/D149563
2022-06-30 22:07:01 +00:00
criss fc6d3e181e Backed out 2 changesets (bug 1775329, bug 1776275) for causing mochitest failures on browser_test_zoom_text.js. CLOSED TREE
Backed out changeset 72519abf87ee (bug 1775329)
Backed out changeset 365e262b3dad (bug 1776275)
2022-06-29 23:39:31 +03:00
Morgan Rae Reschenberg a68d0f55b4 Bug 1775329: Support cached OffsetAtPoint in HyperTextAccessibleBase r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D150049
2022-06-29 19:00:14 +00:00
Morgan Rae Reschenberg 3fd29fdf82 Bug 1776275: Consistently fetch fullZoom from top level browsing context in tests, cache on the top level doc in core r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D150291
2022-06-29 19:00:13 +00:00
Bogdan Szekely a0e2dc5103 Backed out 5 changesets (bug 1748755, bug 1757121) for causing reftest failures on 448064.xhtml CLOSED TREE
Backed out changeset 4ff1f0c0d866 (bug 1748755)
Backed out changeset 41328f13fe58 (bug 1757121)
Backed out changeset 27631b3a007f (bug 1757121)
Backed out changeset 2d4cc5953773 (bug 1757121)
Backed out changeset 8d874e7a2a8f (bug 1757121)
2022-06-29 12:25:04 +03:00
James Teh ee4cfc52be Bug 1748755: Support IAccessibleText::get_new/oldText for cached RemoteAccessible. r=morgan
1. Make ia2AccessibleText::UpdateTextChangeData (and sLastTextChangeAcc) use HyperTextAccessibleBase instead of HyperTextAccessibleWrap.
2. Make ProxyTextChangeEvent call UpdateTextChangeData when the cache is enabled.
3. Don't send sync text change events when the cache is enabled. They don't need to be sync because clients query the cache, not the content process a11y tree. Even if the content process a11y tree mutates, the cache can't update until in-process clients have synchronously handled the event.

Differential Revision: https://phabricator.services.mozilla.com/D139677
2022-06-29 07:04:13 +00:00
James Teh b2ec52f4a2 Bug 1757121 part 4: Expose live region attributes on cached RemoteAccessibles. r=morgan
As part of this, aria-relevant is now exposed via object attributes.
This is necessary to ensure it is included in the cache.
There's no good reason not to expose it anyway, since we already expose the other live region attributes.

Differential Revision: https://phabricator.services.mozilla.com/D150380
2022-06-29 07:04:13 +00:00
James Teh 20f696d41d Bug 1757121 part 3: Normalize true/false/mixed ARIA tokens to atoms. r=morgan
This will be needed for easier checking of aria-atomic.
It is also more efficient in terms of cache storage, since we previously pushed strings for these values.
This moves the code from GetARIAToken into NormalizeARIAToken, since GetARIAToken isn't used any more and it makes sense to handle normalization in one place.

Differential Revision: https://phabricator.services.mozilla.com/D150379
2022-06-29 07:04:12 +00:00
James Teh 46c2de7cf7 Bug 1757121 part 2: Rewrite nsAccUtils::SetLiveContainerAttributes to use the a11y tree instead of the DOM tree. r=morgan
This makes it possible for it to work for RemoteAccessible.
There is a functional change here in that using the a11y tree means we traverse parents set via aria-owns, where previously we only walked the DOM ancestry.
I doubt this will have any impact in the wild and Chromium already does this anyway.

Differential Revision: https://phabricator.services.mozilla.com/D150378
2022-06-29 07:04:12 +00:00
James Teh a39fe994da Bug 1757121 part 1: Allow nsAccessibilityService::MarkupAttribute/MarkupAttributes to take an Accessible. r=morgan
Previously, these methods took a DOM nsIContent, making it impossible for them to work for RemoteAccessible.
GetMarkupMapInfoForNode has been renamed to GetMarkupMapInfoFor and has overloads for nsIContent and Accessible.
MarkupAttribute is a template which can take either, as we still need the nsIContent version elsewhere.
MarkupAttributes now only takes an Accessible, as it can get the nsIContent from the Accessible if necessary.

Differential Revision: https://phabricator.services.mozilla.com/D150377
2022-06-29 07:04:12 +00:00
Narcis Beleuzu 53df7af2fd Backed out 1 changesets (bug 1771934) for crashes on WeakPtr.h . CLOSED TREE
Backed out changeset 5956f91b3975 (bug 1771934)
2022-06-29 00:26:14 +03:00
Morgan Rae Reschenberg 08c0e3cd98 Bug 1775361: Wait for a show event on the imagemap before querying its firstChild r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D150175
2022-06-28 20:15:04 +00:00
Eitan Isaacson 681cf4b1f5 Bug 1771934 - Return null accessible when SessionAcc is not fully attached. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D149295
2022-06-28 19:40:08 +00:00
Ryan VanderMeulen 3187ab6878 Bug 1776496 - Re-enable some passing browser-chrome tests. r=preferences-reviewers,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D150280
2022-06-27 13:57:41 +00:00
James Teh e998d303d0 Bug 1773930: Expose xml-roles object attribute on cached RemoteAccessible. r=morgan
This also changes LocalAccessible::Attributes to ignore the edge case of an empty role attribute when calculating xml-roles.
This is consistent with how we handle the role attribute elsewhere (see aria::GetRoleMapIndex) and makes it easier to handle this consistently between local and remote.

Differential Revision: https://phabricator.services.mozilla.com/D149594
2022-06-24 05:28:53 +00:00
Joel Maher 5bf232d7af Bug 1776212 - cleanup e10s in manifest conditions for bc/dt. r=aryx,necko-reviewers,extension-reviewers,preferences-reviewers,dragana,zombie
Differential Revision: https://phabricator.services.mozilla.com/D150127
2022-06-23 17:49:07 +00:00
James Teh 4c4dccc52b Bug 1774197 part 3: Correctly recurse into iframe documents in RemoteAccessibleBase::ChildAtPoint. r=morgan
We were previously looking for a doc (IsDoc), but we'll never get any doc in a viewport cache except for the doc whose viewport we are searching.
Instead, if we encounter an iframe, we'll hit an OuterDoc (IsOuterDoc) which is the Accessible for the iframe element.
In that case, we walk *inside* that OuterDoc to get its embedded document, then recurse from there if appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D149247
2022-06-23 04:57:04 +00:00
James Teh e03a5619fd Bug 1774197 part 2: Don't include the document in the viewport cache. r=morgan
Sometimes, the document occurs too early in the viewport cache, perhaps even right at the start.
We weren't benefitting from it being in the cache anyway, since we always skipped it.
We already have a fallback in ChildAtPoint for the case where we didn't find a matching Accessible, so we rely on that to handle returning the document when appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D149493
2022-06-23 04:57:04 +00:00
James Teh d73cd7641e Bug 1774197 part 1: Move sending of the viewport cache to ProcessQueuedCacheUpdates. r=morgan
This was moved to a post refresh observer on the misunderstanding that this would allow us to benefit from retained display lists.
In reality, it doesn't; work would need to be done in layout to benefit from those, and since there are different display lists for hit testing and painting, this may not be feasible anyway.
Furthermore, the post refresh implementation was broken because WillRefresh often removes the post refresh observer, which meant that a viewport cache update was never actually pushed!
We could fix this by adding the post refresh observer only if the viewport cache is dirty, removing the post refresh observer in DidRefresh and also removing the post refresh observer in Shutdown only if the viewport cache is dirty.
However, given that we can't benefit from retained display lists anyway, using a post refresh observer doesn't serve any purpose at this stage.
Among other things, this fixes intermittent problems with image maps, which often get inserted into the tree after the initial tree is built.

Differential Revision: https://phabricator.services.mozilla.com/D149492
2022-06-23 04:57:04 +00:00
Morgan Rae Reschenberg fdd6afc666 Bug 1772861: Cache offset for cross-proc iframe docs r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D148832
2022-06-21 20:23:18 +00:00
James Teh 1a49b1e666 Bug 1760739 part 6: Add unified GroupPosition and TotalItemCount support for aria-row/colcount/index. r=eeejay
While this removes most of the local-specific code, we can't remove ARIARowAccessible::GroupPosition yet because it also calculates row index/count compensating for intervening Accessibles between tables and rows.
Eventually, we should fix that properly in AccGroupInfo, at which point we can remove this.

Differential Revision: https://phabricator.services.mozilla.com/D149225
2022-06-16 06:25:52 +00:00
James Teh 32aea8c6e2 Bug 1760739 part 5: Add Accessible method to retrieve an integer ARIA attribute. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D149224
2022-06-16 06:25:51 +00:00
James Teh b8d51ef048 Bug 1760739 part 4: Normalize aria-row/colcount/index as integers. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D149223
2022-06-16 06:25:51 +00:00
James Teh 237c1cc6fa Bug 1760739 part 3: Expose ARIA object attributes for cached RemoteAccessibles. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D149222
2022-06-16 06:25:51 +00:00
James Teh 70b810b3c0 Bug 1760739 part 2: Provide a way for ARIAMap's AttrIterator to expose values other than strings. r=eeejay
Previously, AttrIterator always exposed string values.
Soon, we'll be using this for caching, so we don't want to convert token values to strings.
We'll eventually need to expose numeric values as well.
To achieve this, an ExposeAttr method was added which takes an AccAttributes and sets the attribute on it using an appropriately typed value.

In addition, a small optimisation was made so we don't search the ARIA attributes map twice for each attribute we query.
The string version of AttrName was also removed, since it wasn't used.
Unfortunately, AttrValue can't be removed yet because our old UIA implementation depends on it, but that will have to be rewritten at some point in future.

Differential Revision: https://phabricator.services.mozilla.com/D149221
2022-06-16 06:25:50 +00:00
James Teh 06433bf920 Bug 1760739 part 1: Remove propagation of ARIA object attributes from iframes to documents. r=eeejay
This behaviour doesn't currently work for OOP iframes.
While we could make it work for OOP iframes using the cache, it isn't covered by the spec, nor does any other browser support it.

Differential Revision: https://phabricator.services.mozilla.com/D149220
2022-06-16 06:25:50 +00:00
James Teh 977aa35653 Bug 1774393: Support BoundsInCSSPixels for cached RemoteAccessible. r=morgan
Our hit testing tests need this.
This adds a base Accessible::BoundsInCSSPixels implementation which relies on BoundsInAppUnits.
BoundsInAppUnits was also moved to Accessible, but it is implemented differently for local and remote, so the base method is abstract.
I also did a drive-by removal of a pointless conditional in xpcAccessible::GetBounds.

Differential Revision: https://phabricator.services.mozilla.com/D149374
2022-06-16 01:03:26 +00:00
Eitan Isaacson afad4c3c85 Bug 1755377 - Send list of accessibles that are un/selected to parent cache. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D149313
2022-06-15 17:08:38 +00:00
James Teh 2b226822c0 Bug 1774193: Allow IAccessible::accHitTest to use RemoteAccessible's ChildAtPoint. r=morgan
When the cache is enabled, this now also fetches the deepest descendant instead of a direct child.
In addition, I removed some unnecessary/misleading comments.

Differential Revision: https://phabricator.services.mozilla.com/D149240
2022-06-14 22:18:29 +00:00
James Teh 23c3b53d41 Bug 1773996: Don't queue a11y cache updates if we're never going to send them. r=morgan
This was wasting memory for the parent process, and when the cache was disabled, all content processes.
QueueCacheUpdate now checks whether we are actually sending cache updates before it queues anything.
Simple calls rely on this check, rather than guarding the call to QueueCacheUpdate themselves.
We still call QueueCacheUpdate conditionally for more complex cases which would have to do work before calling QueueCacheUpdate, since we don't want to pointlessly do that prerequisite work.

Differential Revision: https://phabricator.services.mozilla.com/D149231
2022-06-14 22:10:37 +00:00
Morgan Reschenberg 574b6f1192 Bug 1773745: Add FullKeyboardAccess to A11Y_INSTANTIATORS r=eeejay,spohl
Differential Revision: https://phabricator.services.mozilla.com/D148941
2022-06-13 22:38:42 +00:00
Morgan Rae Reschenberg 894d3bd827 Bug 1772609: Support cached hittesting on image maps r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D148556
2022-06-13 22:28:36 +00:00
Morgan Rae Reschenberg 2fbf4cf4f2 Bug 1758689: Create and maintain a viewport cache for hittesting r=Jamie,emilio
This hittesting approach is borrowed from our Android implementation.
We maintain a cache of ID's for accessibles which are visible in the viewport.
This cache is created with a call to `nsLayoutUtils::GetFramesForArea`, which
returns frames in the viewport, in hittesting order.

In the parent process, we walk through the cache, keeping track of accs whose
bounds contain the hittesting point. Depending on if we're searching for the
direct child, or the deepest child, we walk the entire cache or return the
first match.

Each document (in the content process) maintains a dirty bit, which gets set
any time an acc it contains bundles either a text update, or an update that
affects bounds. We check whether this bit is set in `DidRefresh` after getting
a notification from our post-refresh observer. If that bit is set, we
queue a cache update for the `::Viewport` domain on the current document.

Because this cache depends on the viewport being painted, we include the
`IgnorePaintSuppression` flag in our `GetFramesForArea` call. This ensures
the display lists are built before the page finishes loading.

Differential Revision: https://phabricator.services.mozilla.com/D147225
2022-06-13 22:28:36 +00:00
James Teh 19d797513c Bug 1773104: Hold a reference to the BrowsingContext when deferring the sending of a PDocAccessible constructor. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D148747
2022-06-13 21:57:15 +00:00
James Teh 73a4914387 Bug 1772170: Ensure cached Accessibles and offsets are valid before returning them in DocAccessibleParent::SelectionRanges. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D148745
2022-06-13 21:56:23 +00:00
Emilio Cobos Álvarez 9fc2aa47fc Bug 1773558 - Move fixed-point font types to Rust. r=layout-reviewers,jfkthame
Now that cbindgen and rust support const generics, it seems more simple.

This centralizes all the relevant font constants etc in rust and avoids
conversions when going from rust to C++ and vice versa.

Differential Revision: https://phabricator.services.mozilla.com/D148847
2022-06-13 00:59:23 +00:00
Noemi Erli 841e350bc4 Backed out changeset 7585591a9bad (bug 1773558) for causing failures in system-fonts.html 2022-06-12 19:02:33 +03:00
Emilio Cobos Álvarez e441089ca0 Bug 1773558 - Move fixed-point font types to Rust. r=layout-reviewers,jfkthame
Now that cbindgen and rust support const generics, it seems more simple.

This centralizes all the relevant font constants etc in rust and avoids
conversions when going from rust to C++ and vice versa.

Differential Revision: https://phabricator.services.mozilla.com/D148847
2022-06-12 10:48:58 +00:00
Eitan Isaacson 32e8c940bd Bug 1773102 - Accomodate xul label[value] in offset conversions and spelling errors. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D148677
2022-06-12 06:59:18 +00:00
criss c6b2c5db61 Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE
Backed out changeset f17c7565707b (bug 1772006)
Backed out changeset c725fe1f5882 (bug 1772006)
Backed out changeset d19663161261 (bug 1772006)
Backed out changeset b6611ab002d9 (bug 1772006)
Backed out changeset 790f42b64af9 (bug 1772006)
Backed out changeset 79a734b4e4d9 (bug 1772006)
Backed out changeset 42730aae16ea (bug 1772006)
Backed out changeset b2542aef3054 (bug 1772006)
Backed out changeset 962bfea4a309 (bug 1772006)
2022-06-11 01:13:42 +03:00