Commit Graph
45 Commits
Author SHA1 Message Date
Sylvestre Ledru eafe8b152d Bug 2023419 - Remove Emacs/Vim modelines from accessible/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287834
2026-03-18 10:29:47 +00:00
Serban Stanca 5a709d4a9a Revert "Bug 2023419 - Remove Emacs/Vim modelines from accessible/ r=emilio" for causing mochitests failures in browser_action.js.
This reverts commit 2fa4815c8d.
2026-03-17 15:34:26 +00:00
Sylvestre Ledru 2fa4815c8d Bug 2023419 - Remove Emacs/Vim modelines from accessible/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287834
2026-03-17 09:21:51 +00:00
Eitan Isaacson 928030275a Bug 2002345 - Store bounds in nsRect unique pointer. r=Jamie
This is more compact then a general use, variable length nsTArray.
An nsTArray also has a size field, so in addition to the 32 x 4 bits for
the bounds, there is an additional 64 bit integer. Dropping that integer
cuts the allocated space by a third.

Differential Revision: https://phabricator.services.mozilla.com/D274633
2025-12-03 23:20:57 +00:00
Eitan Isaacson 1515116d27 Bug 2002340 - Store class attribute as array of nsAtoms. r=Jamie
DOM class names are meant to be repeated in elements. Therefore, this
should be an array of atoms. DOM's nsAttrValue stores them like this as
well.

Differential Revision: https://phabricator.services.mozilla.com/D274629
2025-12-03 23:20:55 +00:00
Eitan Isaacson 6cd265bc11 Bug 2002339 - Only store text attributes when they differ from parent. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D274209
2025-12-03 23:20:52 +00:00
Eitan Isaacson 4699061782 Bug 1979968 - P1: Cache WritingMode. r=Jamie
The WritingMode is a single byte bitfield that gives information on the orientation and base direction of the text in the frame.

The absence of the WritingMode in cache can imply the default horizontal LTR direction.

Differential Revision: https://phabricator.services.mozilla.com/D259133
2025-08-21 23:33:10 +00:00
Cristian Tuns 66586f2499 Revert "Bug 1979968: apply code formatting via Lando" for causing mochitest failures in browser_caret_rect.js
This reverts commit 2f50728070.

Revert "Bug 1979968 - P2: Introduce TextLeafPoint::InsertionPointBounds. r=Jamie"

This reverts commit ab3aada4d7.

Revert "Bug 1979968 - P1: Cache WritingMode. r=Jamie"

This reverts commit 0aaf695894.
2025-08-20 19:03:21 +00:00
Eitan Isaacson 0aaf695894 Bug 1979968 - P1: Cache WritingMode. r=Jamie
The WritingMode is a single byte bitfield that gives information on the orientation and base direction of the text in the frame.

The absence of the WritingMode in cache can imply the default horizontal LTR direction.

Differential Revision: https://phabricator.services.mozilla.com/D259133
2025-08-20 18:07:04 +00:00
Cristina Horotan 211b124048 Revert "Bug 1979968: apply code formatting via Lando" for causing ba failures on browser_caret_rect.js
This reverts commit 8a052b055d.

Revert "Bug 1979968 - P2: Introduce TextLeafPoint::InsertionPointBounds. r=Jamie"

This reverts commit a9506fdb9f.

Revert "Bug 1979968 - P1: Cache WritingMode. r=Jamie"

This reverts commit c109d51779.
2025-08-20 00:39:28 +00:00
Eitan Isaacson c109d51779 Bug 1979968 - P1: Cache WritingMode. r=Jamie
The WritingMode is a single byte bitfield that gives information on the orientation and base direction of the text in the frame.

The absence of the WritingMode in cache can imply the default horizontal LTR direction.

Differential Revision: https://phabricator.services.mozilla.com/D259133
2025-08-19 23:46:36 +00:00
Nathan LaPre 9190ddf12f Bug 1922696: Opt AccAttributes into ToString via operator<<, r=eeejay
This revision adds an operator<< that writes a text representation of an
AccAttributes object to an ostream object. This makes it possible to call
ToString on an AccAttributes object, which is useful for printing AccAttributes
objects embedded in AccAttributes objects, and relevant to how Gecko stores
ARIA and text attributes. This revision rewrites DebugPrint in terms of ToString
and uses ToString in StringFromNameAndValue to print AccAttributes in AccAttributes.

Differential Revision: https://phabricator.services.mozilla.com/D224558
2024-10-16 01:07:59 +00:00
Butkovits Atila dfd11c2926 Backed out changeset e05604fb874e (bug 1922696) for causing bustages at AccAttributes.cpp. CLOSED TREE 2024-10-10 00:07:25 +03:00
Nathan LaPre 3c7fd2569e Bug 1922696: Opt AccAttributes into ToString via operator<<, r=eeejay
This revision adds an operator<< that writes a text representation of an
AccAttributes object to an ostream object. This makes it possible to call
ToString on an AccAttributes object, which is useful for printing AccAttributes
objects embedded in AccAttributes objects, and relevant to how Gecko stores
ARIA and text attributes. This revision rewrites DebugPrint in terms of ToString
and uses ToString in StringFromNameAndValue to print AccAttributes in AccAttributes.

Differential Revision: https://phabricator.services.mozilla.com/D224558
2024-10-09 19:25:40 +00:00
James Teh 49df0104b0 Bug 1905211 part 3: Introduce TextOffsetAttribute struct and support it as a serialisable attribute value. r=morgan
See the code comments for details.
We will soon use this for spelling errors, etc.

Differential Revision: https://phabricator.services.mozilla.com/D217064
2024-08-05 02:54:36 +00:00
Nathan LaPre 22e4c96a2b Bug 1840732 Part 1: Remove unnecessary includes from accessible/base, r=Jamie
This revision removes unnecessary include directives from cpp files in the
accessible/base directory. These suggestions came from the Include What You Use
tool.

Differential Revision: https://phabricator.services.mozilla.com/D182288
2023-07-07 03:22:07 +00:00
Morgan Rae Reschenberg 5bcf6488f6 Bug 1804991: Issue a warning if we attempt to stringify an empty array, but don't crash r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D164391
2022-12-09 23:56:58 +00:00
Paul Bone ccb8847a81 Bug 1800582 - Don't count atoms in the a11y cache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D162079
2022-11-16 09:55:27 +00:00
Paul Bone ee47afb3d0 Bug 1769688 - Add a memory reporter for the a11y cache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D161242
2022-11-09 06:29:42 +00:00
Nathan LaPre 0eb4698a56 Bug 1794043: Improve AccAttributes ergonomics, r=eeejay
This revision modifies aspects of AccAttributes to make them a bit easier to
work with from a developer perspective. One big win here is the removal of
SFINAE logic that prunes the overload set when resolving calls to SetAttribute.
That logic, plus the other overloads of SetAttribute, have been translated
fairly directly into if constexpr blocks in a single SetAttribute
implementation. The upshot of this is that we can now explicitly disallow
people, at compile time, from accidentally making string copies when passing
strings to SetAttribute, with a nice error message! This revision also enables
us to use AccAttributes in a read-only fashion, particularly in range-based for
loops. This revision accomplishes that by adding const wherever is reasonable.
Next, this revision also removes some redundant special member function
definitions (deletions). My hope is that these changes will generally make
AccAttributes easier to use as safely as possible. Finally, this revision
updates a couple places where we use AccAttributes in a read-only way such
that they use the new const mechanisms.

Differential Revision: https://phabricator.services.mozilla.com/D158995
2022-10-13 01:00:57 +00:00
Eitan Isaacson 50f9844021 Bug 1793488 - Add AccAttributes::DebugPrint. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D158529
2022-10-07 20:45:58 +00:00
James Teh 89aa189379 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
Bogdan Szekely d216e0ef73 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 03414d7b1d 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 5a6905d741 Bug 1735970 part 8: Enable AccAttributes to store an array of uint64_t. r=morgan
We need this to cache explicitly associated headers.
This should also be useful later for relations.

Differential Revision: https://phabricator.services.mozilla.com/D141211
2022-04-01 09:49:58 +00:00
criss b5ffaf31cd Backed out 18 changesets (bug 1735970) for causing hazard bustages.CLOSED TREE
Backed out changeset e7af2be486ce (bug 1735970)
Backed out changeset 73c93a18f65b (bug 1735970)
Backed out changeset 7e48716784d2 (bug 1735970)
Backed out changeset 30f61cdfd3c0 (bug 1735970)
Backed out changeset 3e4697e57570 (bug 1735970)
Backed out changeset 16ac3bec2412 (bug 1735970)
Backed out changeset 945ef21895ec (bug 1735970)
Backed out changeset 5dbfbf341ff8 (bug 1735970)
Backed out changeset d498d61c8f5a (bug 1735970)
Backed out changeset 50a2ee53b763 (bug 1735970)
Backed out changeset 9e2e11ea1a3d (bug 1735970)
Backed out changeset cf84daf9e40f (bug 1735970)
Backed out changeset 003bbf7f5f24 (bug 1735970)
Backed out changeset 00f1fbedc774 (bug 1735970)
Backed out changeset b17a1182539b (bug 1735970)
Backed out changeset 6d0f4821ddcf (bug 1735970)
Backed out changeset d82660fb5408 (bug 1735970)
Backed out changeset e506a5b04bf4 (bug 1735970)
2022-03-23 10:27:08 +02:00
James Teh 26655c91b1 Bug 1735970 part 8: Enable AccAttributes to store an array of uint64_t. r=morgan
We need this to cache explicitly associated headers.
This should also be useful later for relations.

Differential Revision: https://phabricator.services.mozilla.com/D141211
2022-03-23 04:00:28 +00:00
Morgan Reschenberg dc014b3f09 Bug 1744573: Cache the transform matrix r=eeejay,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D133134
2022-02-25 22:23:13 +00:00
James Teh 412225a36f Bug 1754675: Fix crash in AccAttributes::Equal when a string value exists in this AccAttributes but not the other. r=morgan
We were checking for a non-existent entry in the other AccAttributes in most cases except when the value was a string.

Differential Revision: https://phabricator.services.mozilla.com/D138875
2022-02-17 21:54:41 +00:00
Eitan Isaacson 84ba0cc7f0 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
James Teh d7f384869c 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 81699a2b94 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 b9b450a09c 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 20147790ea 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
Eitan Isaacson 73d290259d 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 b5d175fdde 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
Marian-Vasile Laza 24ef33e8f5 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 c0f7e88624 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
Morgan Reschenberg 94f8651051 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
Eitan Isaacson 74fa87ace9 Bug 1728437 - Keep cache sparse and only store populated fields. r=Jamie
When constructing the initial cache, don't push empty or default fields.
Also, have a way to remove fields from an established cache if it
becomes empty/default.

Differential Revision: https://phabricator.services.mozilla.com/D124127
2021-09-01 22:20:09 +00:00
Eitan Isaacson bcc77be7ba Bug 1727643 - P2: Send numeric value fields to cache. r=morgan
Also added double to AccAttributes.

Differential Revision: https://phabricator.services.mozilla.com/D123696
2021-08-26 19:40:05 +00:00
Eitan Isaacson 2ba80aacf4 Bug 1700263 - Implement async Cache protocol method. r=Jamie
This is a good place to formalize the following naming convention:
 * A "field" is and direct accessible getter method (name,
   role, value, min, max, etc.)
 * An "attribute" is a member of the "attributes" field.

With that said, I think AccAttributes should probably be named
AccProperties or something of the sort. Might leave that for another
time.

Differential Revision: https://phabricator.services.mozilla.com/D121924
2021-08-17 18:17:38 +00:00
Eitan Isaacson d8236d6b04 Bug 1722394 - Slim AccAttributes::AttrValueType by removing nsString. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D120897
2021-07-26 21:38:48 +00:00
Eitan Isaacson 517135092b Bug 1714390 - P3: Add variant values to AccAttributes. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D116784
2021-06-10 23:07:06 +00:00
Eitan Isaacson 5b2b00539d Bug 1714390 - P1: Introduce AccAttributes with string values. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D116782
2021-06-10 23:07:05 +00:00