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

9575 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Kew aef8a0d1a8 Bug 1587094 - Create a pref to control whether we use DirectWrite's bold simulation or multi-strike synthetic bold; default to multi-strike for webfonts. r=lsalzman
This is designed to mitigate the problem of third-party fonts that render poorly
under DirectWrite's bold simulation, by using multi-strike synthetic bold (like
we use on macOS) instead.

The behavior is controlled by a pref, so that we can readily switch between
using DWrite's bold simulation for all fonts (pref=2, our current behavior);
using it only for installed fonts and falling back to multi-strike for webfonts
(pref=1, new behavior); or never using the DWrite simulation (pref=0).

Differential Revision: https://phabricator.services.mozilla.com/D137584
2022-02-07 20:54:52 +00:00
Emilio Cobos Álvarez b699e8cdc8 Bug 1753995 - Remove nsDOMWindowUtils.screenPixelsPerCSSPixel. r=smaug,dholbert
For all purposes, this is the same as devicePixelRatio. It was meant to
skip the resistFingerprinting check the devicePixelRatio getter does,
but we do that now using CallerType in WebIDL, so if we cared about that
for these tests (which we don't) we could just do
SpecialPowers.wrap(window).devicePixelRatio.

As a follow-up we could move the NoOverride to window for symmetry. But
it's only used by devtools touch simulation so not sure if worth it.

Differential Revision: https://phabricator.services.mozilla.com/D138021
2022-02-07 18:23:36 +00:00
James Teh 0862082e9c Bug 1730086 part 4: Support IAccessibleText::textBefore/AfterOffset for cached RemoteAccessibles. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D137505
2022-02-04 02:10:29 +00:00
James Teh 9f17a2e0b4 Bug 1730086 part 3: Rename RemoteAccessible::GetTextBefore/AfterOffset to TextBefore/AfterOffset, have it override HyperTextAccessibleBase and use the base methods in ATK/XPCOM. r=morgan
This also unifies the code path for TextAtOffset in ATK, rather than having different local and remote code paths.
This isn't strictly related to this patch series, but this change was missed before, so I took the opportunity to deal with it here.

Differential Revision: https://phabricator.services.mozilla.com/D137504
2022-02-04 02:10:28 +00:00
James Teh 4375cfce39 Bug 1730086 part 2: Fix HyperTextAccessibleBase::TextBeforeOffset when called just after two consecutive line feeds. r=morgan
This was due to a bug in TextLeafPoint::FindPrevWordStartSameAcc which hasn't been exposed before now.

Differential Revision: https://phabricator.services.mozilla.com/D137503
2022-02-04 02:10:28 +00:00
James Teh 9b074e4d84 Bug 1730086 part 1: Implement HyperTextAccessibleBase::TextBefore/AfterOffset using TextLeafPoint. r=morgan
As with TextAtOffset, the local HyperTextAccessible methods use the base implementation when the cache is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D137502
2022-02-04 02:10:28 +00:00
James Teh d17fdfa69c Bug 1753328: Fix inverted check for Accessible validity in ia2Accessible::get_groupPosition . r=morgan
This was a typo in bug 1749828.

Differential Revision: https://phabricator.services.mozilla.com/D137712
2022-02-04 02:04:47 +00:00
Morgan Reschenberg c32559a480 Bug 1744573: Add infrastructure on DocAccessible to queue cache updates r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D136661
2022-02-03 16:49:46 +00:00
Joel Maher a261492460 Bug 1750839 - Enable fission browser-chrome for variants. r=mccr8,releng-reviewers,gbrown
Differential Revision: https://phabricator.services.mozilla.com/D136512
2022-02-01 19:30:34 +00:00
Eitan Isaacson 81a8e4ea77 Bug 1749828 - Use Accessible::GroupPosition in xpcom, windows and mac. r=Jamie CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D135748
2022-01-31 23:10:52 +00:00
Eitan Isaacson b494f3eab9 Bug 1743967 - Support async DoAction. r=Jamie
Now that we cache ActionCount, we can check for the absence of actions
and return false, or send an async message and return true.

Differential Revision: https://phabricator.services.mozilla.com/D135909
2022-01-31 23:10:52 +00:00
Eitan Isaacson ac8433cd7e Bug 1748749 - P4: Support cached actions. r=Jamie
Move ActionCount/ActionNameAt/ActionDescriptionAt to Accessible,
use cached values in RemoteAccessible, and tweak platforms.

Also introduce browser test.

Differential Revision: https://phabricator.services.mozilla.com/D135908
2022-01-31 23:10:52 +00:00
Eitan Isaacson 8332f35d8d Bug 1748749 - P3: Move TranslateString to Accessible. r=Jamie
Small refactor to allow action descriptions to be implemented in
Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D135907
2022-01-31 23:10:51 +00:00
Eitan Isaacson a9bc6f0257 Bug 1748749 - P2: Cache has long desc. r=Jamie
We only need to cache the existance of a longdesc in an image.
This increments the action count.

Differential Revision: https://phabricator.services.mozilla.com/D135906
2022-01-31 23:10:51 +00:00
Eitan Isaacson 75a312e6e0 Bug 1748749 - P1: Push action name to cache. r=Jamie
We use an atom instead of a string because it a limited corpus of
strings so we don't need unique instances.

Differential Revision: https://phabricator.services.mozilla.com/D135905
2022-01-31 23:10:51 +00:00
Cosmin Sabou ef48e09b4e Backed out 6 changesets (bug 1743967, bug 1748749, bug 1749828) for causing bc failures on browser_PBMCookieBehavior.js.
Backed out changeset afda8c72ba29 (bug 1749828)
Backed out changeset 8b5356f3d50d (bug 1743967)
Backed out changeset 04f178d71ae6 (bug 1748749)
Backed out changeset cd2e76de3d18 (bug 1748749)
Backed out changeset 4190c5e44b32 (bug 1748749)
Backed out changeset 8e23acc969d2 (bug 1748749)
2022-02-01 03:05:11 +02:00
James Teh c1ffcd58e4 Bug 1749736: Null check mContent in LocalAccessible::BundleFieldsForCache. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D137397
2022-01-31 23:44:37 +00:00
Eitan Isaacson 2c3b678a19 Bug 1749828 - Use Accessible::GroupPosition in xpcom, windows and mac. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D135748
2022-01-31 23:10:52 +00:00
Eitan Isaacson 6f159bbb67 Bug 1743967 - Support async DoAction. r=Jamie
Now that we cache ActionCount, we can check for the absence of actions
and return false, or send an async message and return true.

Differential Revision: https://phabricator.services.mozilla.com/D135909
2022-01-31 23:10:52 +00:00
Eitan Isaacson 12d336ff2f Bug 1748749 - P4: Support cached actions. r=Jamie
Move ActionCount/ActionNameAt/ActionDescriptionAt to Accessible,
use cached values in RemoteAccessible, and tweak platforms.

Also introduce browser test.

Differential Revision: https://phabricator.services.mozilla.com/D135908
2022-01-31 23:10:52 +00:00
Eitan Isaacson aae9fcaf91 Bug 1748749 - P3: Move TranslateString to Accessible. r=Jamie
Small refactor to allow action descriptions to be implemented in
Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D135907
2022-01-31 23:10:51 +00:00
Eitan Isaacson 01dced264b Bug 1748749 - P2: Cache has long desc. r=Jamie
We only need to cache the existance of a longdesc in an image.
This increments the action count.

Differential Revision: https://phabricator.services.mozilla.com/D135906
2022-01-31 23:10:51 +00:00
Eitan Isaacson 6fc7b930b2 Bug 1748749 - P1: Push action name to cache. r=Jamie
We use an atom instead of a string because it a limited corpus of
strings so we don't need unique instances.

Differential Revision: https://phabricator.services.mozilla.com/D135905
2022-01-31 23:10:51 +00:00
Butkovits Atila c6b99e8ff7 Backed out 5 changesets (bug 1743967, bug 1748749) for causing failures at browser_caching_actions.js. CLOSED TREE
Backed out changeset 6f15d287ecd8 (bug 1743967)
Backed out changeset fce9d3a2500d (bug 1748749)
Backed out changeset 9d405f9475b3 (bug 1748749)
Backed out changeset 9dccfcc00718 (bug 1748749)
Backed out changeset f1be79d75c5d (bug 1748749)
2022-01-28 07:07:56 +02:00
Eitan Isaacson ab978bd5c2 Bug 1743967 - Support async DoAction. r=Jamie
Now that we cache ActionCount, we can check for the absence of actions
and return false, or send an async message and return true.

Differential Revision: https://phabricator.services.mozilla.com/D135909
2022-01-28 00:09:05 +00:00
Eitan Isaacson 0a906dbd4f Bug 1748749 - P4: Support cached actions. r=Jamie
Move ActionCount/ActionNameAt/ActionDescriptionAt to Accessible,
use cached values in RemoteAccessible, and tweak platforms.

Also introduce browser test.

Differential Revision: https://phabricator.services.mozilla.com/D135908
2022-01-28 00:09:04 +00:00
Eitan Isaacson 1f5048e73c Bug 1748749 - P3: Move TranslateString to Accessible. r=Jamie
Small refactor to allow action descriptions to be implemented in
Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D135907
2022-01-28 00:09:04 +00:00
Eitan Isaacson 6732b10718 Bug 1748749 - P2: Cache has long desc. r=Jamie
We only need to cache the existance of a longdesc in an image.
This increments the action count.

Differential Revision: https://phabricator.services.mozilla.com/D135906
2022-01-28 00:09:03 +00:00
Eitan Isaacson dc6b629744 Bug 1748749 - P1: Push action name to cache. r=Jamie
We use an atom instead of a string because it a limited corpus of
strings so we don't need unique instances.

Differential Revision: https://phabricator.services.mozilla.com/D135905
2022-01-28 00:09:03 +00:00
James Teh e3e9a67ed9 Bug 1748450: If an Accessible is moved, reuse the RemoteAccessible even if the cache is disabled. r=eeejay
This fixes problems for Orca caused by object destruction when grabbing focus or setting the caret.

This patch also Fixes two bugs in the RemoteAccessible reuse code.
First, moved LocalAccessibles were previously being tracked even in the parent process if the cache was enabled.
While that was harmless, it was also unnecessary, since we only need to do that in order to send IPC notifications.
Second, when an OuterDocAccessible was moved, we were previously trying to shut down its child document, causing a crash.
Child documents must be left alone, since they are added ande removed differently to normal children.

Differential Revision: https://phabricator.services.mozilla.com/D135422
2022-01-27 18:30:46 +00:00
Cristian Tuns fd0e69bce2 Bug 1659435 - disable browser_nested_iframe.js on mac x64 r=intermittent-reviewers,MasterWayZ DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D137036
2022-01-27 01:43:08 +00:00
James Teh 3aeccca016 Bug 1749274: Don't return an OOP iframe COM proxy in MsaaAccessible::ResolveChild. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D135968
2022-01-21 01:20:49 +00:00
Morgan Reschenberg 57c2acce79 Bug 1748878: Use LayoutDeviceInt types for points, rects, sizes in dev pixels r=Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D135272
2022-01-18 23:31:21 +00:00
Alexandru Michis 8508eb2c77 Backed out changeset 52345a440234 (bug 1748450) for causing crashes (Bug 1751268). 2022-01-21 01:47:46 +02:00
Butkovits Atila e5a82d2e01 Backed out changeset 6c3a672524b7 (bug 1748878) for causing accessibility crashes. a=backout 2022-01-20 17:24:17 +02:00
James Teh f76e5739ca Bug 1750680: Don't use the role to check for iframes in AccessibleHandler. r=morgan
We need to handle OOP iframes specially when querying for IEnumVARIANT.
However, we can't rely on the role because it might be overridden by ARIA.
Instead, check for the absence of IAccessibleHyperText (which isn't supported for iframes) and a child count of 1.
This might trigger for a few things other than iframes, but it's not a problem to do what we're doing here whenever the child count is 1.

Differential Revision: https://phabricator.services.mozilla.com/D136257
2022-01-20 01:10:03 +00:00
James Teh 432bc6dbfa Bug 1750550: Null check aAttributes in ConvertToAtkTextAttributeSet. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D136303
2022-01-20 00:57:51 +00:00
James Teh 48c6a49902 Bug 1749762: Don't emit load_complete, reload and load_stopped signals on objects that don't support AtkDocument. r=eeejay
In Gecko, ARIA documents and dialogs can fire load complete/reload/load stopped events, but they don't support AtkDocument.
Since the corresponding ATK signals are only supported on AtkDocument, just ignore these events for anything which isn't a DocAccessible.
This has no impact on clients, since the signal was invalid anyway, but it does prevent errors being logged.

Differential Revision: https://phabricator.services.mozilla.com/D135975
2022-01-20 00:40:59 +00:00
James Teh 90e3a2f3bb Bug 1748450: If an Accessible is moved, reuse the RemoteAccessible even if the cache is disabled. r=eeejay
This fixes problems for Orca caused by object destruction when grabbing focus or setting the caret.

This also fixes an oversight where moved LocalAccessibles were being tracked even in the parent process if the cache was enabled.
While that was harmless, it was also unnecessary, since we only need to do that in order to send IPC notifications.

Differential Revision: https://phabricator.services.mozilla.com/D135422
2022-01-20 00:40:17 +00:00
Eitan Isaacson 035538614c Bug 1748775 - Expire column children when table expires. r=morgan
I think there is a potential crasher if an AT holds a reference to a column object while its parent table expires, and then tries to retrieve AXChildren. We need to expire te column objects when the table expires or is destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D136288
2022-01-19 19:33:35 +00:00
Morgan Reschenberg ac66a0e8a8 Bug 1748878: Use LayoutDeviceInt types for points, rects, sizes in dev pixels r=Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D135272
2022-01-18 23:31:21 +00:00
Emilio Cobos Álvarez f6a958e457 Bug 1744009 - Accessibility fixes for new combobox layout code. r=eeejay
In terms of the C++ code, this patch does basically one thing, which is
allowing creating option / optgroup accessibles without a frame for
comboboxes, and tracking mutations like layout does.

It seems this should be straight-forward, but handling mutations got a
bit complicated. We don't want to forcibly re-create accessibles, so we
want to re-use the PruneOrInsertSubtree logic that ContentInserted uses.

But determining whether we need to create the accessible requires
having flushed styles, so I added a ScheduleAccessibilitySubtreeUpdate
API to trigger that from WillRefresh once style and layout are
up-to-date.

The rest of the test updates should be sort of straight-forward. They
reflect two changes:

 * <option> accessibles are leaves now (so they don't have text
   children). Note that we still have the right native name and so on,
   using the same logic we use to render the label.

 * In 1proc tests, the focus no longer goes to the <option>, and uses
   the same code-path that e10s does (moving focus to a <menulist> in
   the parent process). Since that wasn't easy to test for (afaict) and
   we have browser tests to cover that
   (browser_treeupdate_select_dropdown.js, etc), I've decided to just
   remove the tests that relied on the previous code-path, as they were
   testing for a codepath that users weren't hitting anyways.

I've tested this with JAWS and Orca and behavior seems unchanged to my
knowledge.

Differential Revision: https://phabricator.services.mozilla.com/D133098
2022-01-17 11:10:05 +00:00
Emilio Cobos Álvarez b651bfe99a Bug 1744009 - Simplify combobox <select> code. r=mconley,dholbert
With this patch on its own we get some a11y tests failures, but those
are fixed on a later patch.

Combobox select no longer creates frames for its <options>, nor an
nsListControlFrame. Instead, it computes its right intrinsic size using
the largest size of the options. This is better, because we render the
option text using the select style so if the select and option styles
are mismatched it'd cause changes in the size of the select when text
changes. See the following in a build without the patch, for example:

  <select>
    <option>ABC</option>
    <option style="font-size: 1px">Something long</option>
  </select>

This seems like a rather obscure case, but it's important to get it
right, see bug 1741888.

With this patch we use the same setup in content and parent processes
(this needs bug 1596852 and bug 1744152). This means we can remove a
bunch of the native view and popup code in nsListControlFrame. A couple
browser_* tests are affected by this change and have been tweaked
appropriately (the changes there are trivial).

Not creating an nsListControlFrame for dropdown select means that we
need to move a bunch of the event handling code from nsListControlFrame
to a common place that nsComboboxControlFrame can also use. That place
is HTMLSelectEventListener, and I think the setup is much nicer than
having the code intertwined with nsListControlFrame. It should be
relatively straight-forward to review, mostly moving code from one part
to another.

Another thing that we need to do in HTMLSelectEventListener that we
didn't use to do is listening for DOM mutations on the dropdown. Before,
we were relying on changes like text mutations triggering a reflow of
the listcontrolframe, which also triggered a reflow of the
comboboxcontrolframe, which in turn updated the text of the anonymous
content. Now we need to trigger that reflow manually.

There are some further simplifications that can be done after this
lands (cleanup naming of openInParentProcess and so on, among others),
but I'd rather land this first (after the merge of course) and work on
them separately.

Differential Revision: https://phabricator.services.mozilla.com/D132719
2022-01-17 11:10:05 +00:00
Marian-Vasile Laza 35a88d897e Backed out 2 changesets (bug 1744009) for causing reftest failures on select-3.html.
Backed out changeset 3e44e31d3d12 (bug 1744009)
Backed out changeset 619389788775 (bug 1744009)
2022-01-17 11:14:27 +02:00
Emilio Cobos Álvarez 7b9c5fc6b2 Bug 1744009 - Accessibility fixes for new combobox layout code. r=eeejay
In terms of the C++ code, this patch does basically one thing, which is
allowing creating option / optgroup accessibles without a frame for
comboboxes, and tracking mutations like layout does.

It seems this should be straight-forward, but handling mutations got a
bit complicated. We don't want to forcibly re-create accessibles, so we
want to re-use the PruneOrInsertSubtree logic that ContentInserted uses.

But determining whether we need to create the accessible requires
having flushed styles, so I added a ScheduleAccessibilitySubtreeUpdate
API to trigger that from WillRefresh once style and layout are
up-to-date.

The rest of the test updates should be sort of straight-forward. They
reflect two changes:

 * <option> accessibles are leaves now (so they don't have text
   children). Note that we still have the right native name and so on,
   using the same logic we use to render the label.

 * In 1proc tests, the focus no longer goes to the <option>, and uses
   the same code-path that e10s does (moving focus to a <menulist> in
   the parent process). Since that wasn't easy to test for (afaict) and
   we have browser tests to cover that
   (browser_treeupdate_select_dropdown.js, etc), I've decided to just
   remove the tests that relied on the previous code-path, as they were
   testing for a codepath that users weren't hitting anyways.

I've tested this with JAWS and Orca and behavior seems unchanged to my
knowledge.

Differential Revision: https://phabricator.services.mozilla.com/D133098
2022-01-16 23:31:23 +00:00
Emilio Cobos Álvarez a8d469a8d0 Bug 1744009 - Simplify combobox <select> code. r=mconley,dholbert
With this patch on its own we get some a11y tests failures, but those
are fixed on a later patch.

Combobox select no longer creates frames for its <options>, nor an
nsListControlFrame. Instead, it computes its right intrinsic size using
the largest size of the options. This is better, because we render the
option text using the select style so if the select and option styles
are mismatched it'd cause changes in the size of the select when text
changes. See the following in a build without the patch, for example:

  <select>
    <option>ABC</option>
    <option style="font-size: 1px">Something long</option>
  </select>

This seems like a rather obscure case, but it's important to get it
right, see bug 1741888.

With this patch we use the same setup in content and parent processes
(this needs bug 1596852 and bug 1744152). This means we can remove a
bunch of the native view and popup code in nsListControlFrame. A couple
browser_* tests are affected by this change and have been tweaked
appropriately (the changes there are trivial).

Not creating an nsListControlFrame for dropdown select means that we
need to move a bunch of the event handling code from nsListControlFrame
to a common place that nsComboboxControlFrame can also use. That place
is HTMLSelectEventListener, and I think the setup is much nicer than
having the code intertwined with nsListControlFrame. It should be
relatively straight-forward to review, mostly moving code from one part
to another.

Another thing that we need to do in HTMLSelectEventListener that we
didn't use to do is listening for DOM mutations on the dropdown. Before,
we were relying on changes like text mutations triggering a reflow of
the listcontrolframe, which also triggered a reflow of the
comboboxcontrolframe, which in turn updated the text of the anonymous
content. Now we need to trigger that reflow manually.

There are some further simplifications that can be done after this
lands (cleanup naming of openInParentProcess and so on, among others),
but I'd rather land this first (after the merge of course) and work on
them separately.

Differential Revision: https://phabricator.services.mozilla.com/D132719
2022-01-16 23:31:22 +00:00
Andi-Bogdan Postelnicu 120496a230 Bug 1519636 - Reformat recent changes to the Google coding style. r=sylvestre
Updated with clang-format version 13.0.0 (taskcluster-dn0nWlPhT22vaQNfMnFkSg)

Differential Revision: https://phabricator.services.mozilla.com/D135325
2022-01-11 15:49:03 +00:00
Cristian Tuns dea3b789a7 Backed out 2 changesets (bug 1617369, bug 1519636) for causing lint failures on multiple files. CLOSED TREE
Backed out changeset 6726892a0012 (bug 1617369)
Backed out changeset c08caa5f8504 (bug 1519636)
2022-01-11 04:38:34 -05:00
Andi-Bogdan Postelnicu f4ea362111 Bug 1519636 - Reformat recent changes to the Google coding style. r=sylvestre
Updated with clang-format version 13.0.0 (taskcluster-dn0nWlPhT22vaQNfMnFkSg)

Differential Revision: https://phabricator.services.mozilla.com/D135325
2022-01-11 09:16:56 +00:00
Morgan Reschenberg e92d718273 Bug 1749063: Ensure articles expose only AXDescription and not AXTitle r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D135413
2022-01-07 23:00:36 +00:00