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

9903 Коммитов

Автор SHA1 Сообщение Дата
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