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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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