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

9336 Коммитов

Автор SHA1 Сообщение Дата
Gijs Kruitbosch cd8c2be09f Bug 1724319 - fix accessibility test relying on the download modal opening to work with download improvements pref flipped, r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127487
2021-10-05 09:04:26 +00:00
Butkovits Atila 0db4640a28 Backed out 2 changesets (bug 1732154, bug 1726227) for causing build bustages complaining about RemoteAccessible. CLOSED TREE
Backed out changeset 4fd72f9ca327 (bug 1732154)
Backed out changeset 6591f14bbc71 (bug 1726227)
2021-10-05 00:19:09 +03:00
Morgan Reschenberg 2162cc6e2d Bug 1732154: Add ParentRelativeBounds method for HTMLImageMapAccessible r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126386
2021-10-04 19:46:55 +00:00
Morgan Reschenberg c2cac47ff1 Bug 1726227: Cache parent-relative accessible bounds, resolution in parent process r=Jamie,eeejay
Differential Revision: https://phabricator.services.mozilla.com/D123399
2021-10-04 19:46:54 +00:00
Eitan Isaacson 41ca3eadd8 Bug 1733223 - Fire READONLY state change when input gets readonly attribute. r=morgan
This patch also adds tests for other READONLY/EDITABLE state changes
that already work.

Differential Revision: https://phabricator.services.mozilla.com/D127165
2021-10-04 16:47:34 +00:00
Eitan Isaacson 130f52e318 Bug 1611062 - Remove unused eAutoComplete. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127148
2021-10-04 16:30:45 +00:00
Eitan Isaacson 9fed8c38f9 Bug 1733228 - Fire DEFAULT state change when control loses or gains default state. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127177
2021-10-04 15:56:38 +00:00
Daniel Holbert ed93bd5007 Bug 1733465 part 2: Modernize nsViewManager::GetRootWidget() to use already_AddRefed return value, instead of requiring getter_AddRefs at callsite. r=tnikkel
This patch shouldn't change behavior at all.

This patch replaces a manual NS_ADDREF call with typesafe code that manages the
reference count for us.  This reduces repeated boilerplate code, in the
implementation as well as the callsites.

Differential Revision: https://phabricator.services.mozilla.com/D127179
2021-10-01 20:38:09 +00:00
Sandor Molnar 325902a5b7 Backed out 5 changesets (bug 1733465) for causing android build bustages in android/SessionAccessibility.cpp. CLOSED TREE
Backed out changeset 4c5b28b66740 (bug 1733465)
Backed out changeset 3db0452b185c (bug 1733465)
Backed out changeset d7460c9c6acb (bug 1733465)
Backed out changeset 3cee3f595e45 (bug 1733465)
Backed out changeset 267d5fc92f12 (bug 1733465)
2021-10-01 19:13:59 +03:00
Daniel Holbert 54c1df0de9 Bug 1733465 part 3: Make nsPresContext::GetRootWidget() return an already_AddRefed pointer instead of a raw pointer. r=tnikkel
Also, make the same change to nsPresContext::GetTextInputHandlingWidget and
TextComposition::GetWidget, which are essentially aliases/wrappers for this
function.

This patch shouldn't change behavior at all, aside from:
* optimizing away some redundant reference counting and widget-lookups
* delaying some nsIWidget::Release() calls, which will now happen after we're
  actually done using the object, instead of happening when the getter
  completes. (It's unlikely this impacts behavior, because there are other
  objects that are keeping the nsIWidget instance alive.)

Motivation / "wins" from this patch:
* nsPresContext::GetRootWidget already works with a refcounted pointer
  internally. Before this patch, it drops the reference before returning the
  pointer.  This is a bit suspect and would cause security issues, in the
  unlikely event that this were the last strong reference to the object.  It
  can just as easily/efficiently transfer the strong reference to the caller,
  and let the caller determine when to release it.
* Many of the callers were already storing the return value in nsCOMPtr, which
  meant that they were incurring an additional AddRef/Release when
  populating/destructing that smart pointer. Now they can just take ownership
  of the already_AddRefed return value and avoid redundnat refcount-churn.
* For the callers that weren't storing the return value in nsCOMPtr, some of
  them were calling this getter twice in a row (once to test for truthiness and
  once to use the known-truthy value).  This was wasteful, both from the
  repeated lookup-work (since the function isn't a trivial getter), and from
  repeated refcount-churn.  This patch collapses these repeat-calls to a single
  call, avoiding those inefficiencies.

Differential Revision: https://phabricator.services.mozilla.com/D127180
2021-10-01 14:37:06 +00:00
Daniel Holbert 5b203843bc Bug 1733465 part 2: Modernize nsViewManager::GetWidget() to use already_AddRefed return value, instead of requiring getter_AddRefs at callsite. r=tnikkel
This patch shouldn't change behavior at all.

This patch replaces a manual NS_ADDREF call with typesafe code that manages the
reference count for us.  This reduces repeated boilerplate code, in the
implementation as well as the callsites.

Differential Revision: https://phabricator.services.mozilla.com/D127179
2021-10-01 14:37:05 +00:00
Eitan Isaacson 7c2a7c9949 Bug 1733437 - Don't use non-existant bullet images in xul test. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D127146
2021-09-30 22:25:41 +00:00
James Teh 0240b39c82 Bug 1732592: Create in-tree accessibility documentation and add Document Accessibility Lifecycle as our first page. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126855
2021-09-30 21:52:54 +00:00
Eitan Isaacson da1f9f11d1 Bug 1733457 - Remove unused LocalAccessible::MaybeFireFocusableStateChange. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D127156
2021-09-30 20:00:06 +00:00
James Teh e85d14a8ef Bug 1730175: Set aria-valuetext to "" on numeric datetime fields when the input is cleared. r=emilio,eeejay
Before this patch, we didn't set aria-valuetext when the value was initially empty, nor did we clear it after a value was set and subsequently cleared.
This resulted in incorrect numeric values being reported to users.
Now, we set aria-valuetext to "" in either of these cases.

Differential Revision: https://phabricator.services.mozilla.com/D125366
2021-09-29 06:30:06 +00:00
Sandor Molnar 9b742bfa2d Backed out changeset c8bcdcdc5fd7 (bug 1730175) for causing mochitest failures in test_datetime. CLOSED TREE 2021-09-29 06:37:56 +03:00
James Teh e414139808 Bug 1730175: Set aria-valuetext to "" on numeric datetime fields when the input is cleared. r=emilio,eeejay
Before this patch, we didn't set aria-valuetext when the value was initially empty, nor did we clear it after a value was set and subsequently cleared.
This resulted in incorrect numeric values being reported to users.
Now, we set aria-valuetext to "" in either of these cases.

Differential Revision: https://phabricator.services.mozilla.com/D125366
2021-09-29 02:48:15 +00:00
Eitan Isaacson de9be32795 Bug 1732944 - Return early if recieving cache on a shutdown document. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D126839
2021-09-28 22:02:47 +00:00
Eitan Isaacson 1de5b0abcd Bug 1731374 - Add string storage to AccAttributes with move semantics. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D126012
2021-09-28 22:01:35 +00:00
Eitan Isaacson d4a231a724 Bug 1729061 - Introduce cache verification logging. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124486
2021-09-28 21:55:41 +00:00
criss dfdc70739c Backed out changeset 4d44c5b706db (bug 1729061) for causing bustages in DocAccessibleChildBase.cpp. CLOSED TREE 2021-09-28 00:45:56 +03:00
Eitan Isaacson a5dc06abb2 Bug 1729061 - Introduce cache verification logging. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124486
2021-09-27 18:46:20 +00:00
James Teh 4305e646e2 Bug 1638880: Fire EVENT_DOCUMENT_LOAD_COMPLETE when PresShell is created after DOM loading completes. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126622
2021-09-27 15:26:03 +00:00
James Teh 4f65e90ec4 Bug 1729531: Re-enable accessible/tests/browser/fission/browser_nested_iframe.js on Apple silicon. r=bhearsum
This passes for me on try.
We do have some low frequency intermittent failures for this test, but they apply to all platforms.

Differential Revision: https://phabricator.services.mozilla.com/D126428
2021-09-27 11:40:45 +00:00
Jonathan Kew 98c510163c Bug 1732464 - Reverse the order of calls to FindLineContaining in IsLocalAccAtLineStart, so that we can pass prevLineNum as a starting index to accelerate the second call. r=Jamie
Depends on D126587

Differential Revision: https://phabricator.services.mozilla.com/D126588
2021-09-27 08:35:35 +00:00
Jonathan Kew 1989dbf0ca Bug 1732463 - Make nsIFrame::GetContainingBlockForLine return a pair of `nsIFrame*`s instead of using an outparam for one of them. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D126587
2021-09-25 09:13:02 +00:00
James Teh fd1b75596f Bug 1427811: Add null checks to some a11y document logging functions. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126444
2021-09-24 20:31:00 +00:00
Jonathan Kew fb9588e175 Bug 1732268 - Remove redundant failure-checks from nsLineIterator initialization, as it uses infallible allocation. r=dholbert
This means nsBlockFrame::GetLineIterator is also infallible, so callers that know
they're dealing with an nsBlockFrame (not an arbitrary nsIFrame) don't need to
check for null.

Differential Revision: https://phabricator.services.mozilla.com/D126470
2021-09-24 14:20:05 +00:00
James Teh f08c138efd Bug 1732108: Map ATK_ROLE_CONTENT_DELETION/INSERTION. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126432
2021-09-24 00:05:50 +00:00
Eitan Isaacson 050fed6811 Bug 1731154 - Add move semantics to AccAttributes and use value references to avoid copies. r=morgan
Changed the array type to nsTArray to avoid copies and get compile-time
errors if we ever try to do that. To set an array as a value, it must be
moved.

Differential Revision: https://phabricator.services.mozilla.com/D125899
2021-09-23 20:01:11 +00:00
James Teh ac10d619ce Bug 1729407 part 6: Fix an existing line boundary test. r=eeejay
Previously, the test asserted that the line offsets for an embedded object should be an empty range.
This is actually incorrect, since there is content on the line (an empty text box and a button).
Update this with the correct result, but mark it as an expected failure.
The new implementation fixes this, so once we enable it by default, we can assert success.

Differential Revision: https://phabricator.services.mozilla.com/D125670
2021-09-23 11:38:11 +00:00
James Teh 178fe814d8 Bug 1729407 part 5: Use TextLeafRange for word/line starts in HyperTextAccessible::TextAtOffset if the cache is enabled. r=eeejay
We won't use HyperTextAccessible for building the cache.
However, we have a lot of existing single process mochitests for HyperTextAccessible.
Putting it behind this pref makes it easy for us to run those tests against this new text implementation.
Eventually, we want to use this implementation for both local and remote Accessibles.

Differential Revision: https://phabricator.services.mozilla.com/D124778
2021-09-23 11:38:11 +00:00
James Teh 18dedeaf42 Bug 1729407 part 4: Add TextLeafPoint support for finding character boundaries. r=eeejay
Again, this should be very easy to adapt to RemoteAccessible once we cache text there.

Differential Revision: https://phabricator.services.mozilla.com/D124776
2021-09-23 11:38:10 +00:00
James Teh b52bf17cab Bug 1729407 part 3: Add TextLeafPoint support for finding word boundaries. r=eeejay
This implementation uses WordBreaker and a bunch of code to emulate layout's handling of punctuation, space, words spanning across nodes, words broken due to lines, etc.

While this does mean we're effectively duplicating layout, there are a couple of advantages.
First, PeekOffset has a lot of quirks which have caused us problems in the past and are difficult to debug.
They don't matter so much for other consumers, but a11y is very sensitive to these kinds of bugs.
Having our own logic means we can make changes as needed without potentially affecting other PeekOffset consumers.
Second, while the implementation currently only works on LocalAccessibles (because we don't have text in RemoteAccessible yet), it's been designed so that it should be very easy to adapt for RemoteAccessible.
It already walks the unified Accessible tree, so it just has to be taught how to get text from RemoteAccessible once that's possible.
This means we don't have to cache word boundaries; they can be calculated on demand in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D124775
2021-09-23 11:38:10 +00:00
James Teh 1093cc6340 Bug 1729407 part 2: Add TextLeafPoint support for finding line start boundaries for LocalAccessibles. r=eeejay
This adds TextLeafPoint::FindBoundary, which will be the main entry point for finding single boundaries.
FindBoundary searches individual Accessibles for a boundary, walking the a11y tree and continuing the search if a boundary isn't found.

Support for line start boundaries uses layout to determine line edges, but otherwise traverses the accessibility tree.
This avoids depending on PeekOffset, which has a lot of quirks that cause problems for a11y.
More importantly, it's possible to find line boundaries within a single LocalAccessible using the lower level FindPrev/NextLineStartSameLocalAcc methods.
This will be useful for line boundary caching, since we want to cache this info on individual Accessibles.
In contrast, PeekOffset might walk outside the current Accessible, which makes caching more difficult.

Differential Revision: https://phabricator.services.mozilla.com/D124774
2021-09-23 11:38:09 +00:00
James Teh ca8f43ff48 Bug 1729407 part 1: Add new TextLeafPoint and TextLeafRange classes. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D124773
2021-09-23 11:38:09 +00:00
Chris Peterson e8232ec5a5 Bug 1731526 - Fix non-unified build errors in accessible/. r=eeejay
accessible/base/TreeWalker.cpp:151:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
accessible/xpcom/xpcAccessibleMacInterface.mm:177:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]

Differential Revision: https://phabricator.services.mozilla.com/D126173
2021-09-22 01:41:40 +00:00
Marian-Vasile Laza 6ee4314955 Backed out changeset 176469dcdeba (bug 1731154) for causing bc failures on browser_attributed_text.js. 2021-09-21 21:14:29 +03:00
Eitan Isaacson 74d979ca0d Bug 1731154 - Add move semantics to AccAttributes and use value references to avoid copies. r=morgan
Changed the array type to nsTArray to avoid copies and get compile-time
errors if we ever try to do that. To set an array as a value, it must be
moved.

Differential Revision: https://phabricator.services.mozilla.com/D125899
2021-09-21 17:04:04 +00:00
James Teh 3f364558d3 Bug 1731003: RemoteAccessible: Don't try to use the COM proxy at all if the cache is enabled, even if mCachedFields is null. r=eeejay
If the cache is enabled, we don't have COM proxies from the content process.

Differential Revision: https://phabricator.services.mozilla.com/D125786
2021-09-20 23:00:08 +00:00
Morgan Reschenberg b45f079410 Bug 1730949: Send initial cache update for doc accessibles if accessibility.cache.enabled r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D125743
2021-09-17 22:08:17 +00:00
Morgan Reschenberg c7aea51785 Bug 1593273: Default browser.display.use_system_colors to true on windows, false elsewhere r=emilio,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D125268
2021-09-17 16:45:12 +00:00
Olli Pettay 79f14a7580 Bug 1730836, wallpaper the old issue where code expects GetDocShell to return non-null, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D125669
2021-09-16 12:29:59 +00:00
Butkovits Atila 42611d5b3f Backed out changeset f2f9361b8e5e (bug 1593273) for causing failures at test_default_background.xhtml. 2021-09-16 02:46:17 +03:00
Morgan Reschenberg ceca77b740 Bug 1593273: Default browser.display.use_system_colors to true on windows, false elsewhere r=emilio,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D125268
2021-09-15 22:27:27 +00:00
James Teh a1b5690620 Bug 1468128: Use an extra bit for the content process portion of MSAA unique ids. r=aklotz
This allows us to support 255 content processes instead of 127.
It also means we have 1 less bit for the Accessible portion of the id, which means we can support less Accessibles per process.
Hopefully, this shouldn't be a problem, especially with Fission generally meaning less documents per process.

Differential Revision: https://phabricator.services.mozilla.com/D104344
2021-09-15 02:21:11 +00:00
Morgan Reschenberg eae2965c1b Bug 1730545: Add CopyableTArray<int32_t> to AccAttributes variant r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D123398
2021-09-13 23:02:47 +00:00
Olli Pettay a6ae4c4cf1 Bug 1730541, remove nsCoreUtils::IsContentDocument, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D125462
2021-09-13 21:01:23 +00:00
Niklas Baumgardner 42f48852ca Bug 1534799 - Convert &searchTextBox.clear.label; to fluent. r=emalysz,fluent-reviewers,flod,dao,morgan
Differential Revision: https://phabricator.services.mozilla.com/D123640
2021-09-10 14:52:55 +00:00
Marian-Vasile Laza 9ae7ce258e Backed out changeset a6d7f0da2513 (bug 1729061) for causing bustages on DocAccessibleChildBase.cpp. CLOSED TREE 2021-09-10 03:47:09 +03:00