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

210 Коммитов

Автор SHA1 Сообщение Дата
Eitan Isaacson b2f056737e Bug 1755383 - P1: Move SelectAccessible methods to Accessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D138728
2022-02-16 18:42:53 +00:00
Eitan Isaacson c61f9c123e Bug 1752380 - P1: Introduce HasPrimaryAction and remove redundant DoAction/ActionCount implementation. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D137200
2022-02-15 23:20:11 +00:00
Eitan Isaacson af27cd475b Bug 1737944 - P7: Move and rename GetPositionAndSizeInternal to Accessible. r=Jamie
Now that the AccGroupInfo getter is in Accessible, the position and size
getter could go there too.

Differential Revision: https://phabricator.services.mozilla.com/D134210
2022-01-04 21:01:37 +00:00
Eitan Isaacson 935107258c Bug 1737944 - P5: Unify GetLevelInternal and GetDefaultLevel as Accessible::GetLevel. r=Jamie
The nsAccUtils method was a "fast" one for calculating set sizes and
conceptual parents. Unified it with
LocalAccessible::GetLevelInternal in Accessible::GetLevel with an
argument.

I also fixed select->optgroup->option group attributes.

Differential Revision: https://phabricator.services.mozilla.com/D134208
2022-01-04 21:01:36 +00:00
Chris Peterson f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +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 338d221423 Bug 1728442 - P2: Make LocalAccessible:Description const. r=Jamie
This makes it consistent with the remote Description method and will
allow us to merge them in Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D124234
2021-09-02 18:06:51 +00:00
Andi-Bogdan Postelnicu 75ed803f7c Bug 1725145 - fixes for linking in the hybrid build env. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D122344
2021-08-22 10:21:56 +00:00
Andi-Bogdan Postelnicu 250fa0d795 Bug 1725145 - header files fixes in the hybrid build env. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D122343
2021-08-22 10:21:55 +00:00
Emilio Cobos Álvarez 0c427cb231 Bug 1714290 - Don't flush in XULTreeGridAccessible. r=Jamie
If comment 5 is right, I don't think that this should be needed.

Differential Revision: https://phabricator.services.mozilla.com/D121711
2021-08-05 10:52:52 +00:00
James Teh f2a0bfe104 Bug 1722621: Fix detection of autocomplete popups in XULListboxAccessible after recent DOM changes. r=morgan
Previously, we used GetFlattenedTreeParent from the list box to find the autocomplete popup.
After bug 1708735, this now returns a slot instead of the panel.
We now use GetParentElement instead, which works as expected and is consistent with other code in this class anyway.

I also added a new test so this doesn't regress yet again.
We already have test_focus_autocomplete.xhtml which is supposed to test this, but that test is broken, was thus disabled and is complicated enough that I don't think we're going to fix it any time soon, if ever.

The new test was triggering an assertion on Windows when trying to handle a caret event, so HyperTextAccessible::GetCaretRect had to be tweaked slightly to fix this.

Differential Revision: https://phabricator.services.mozilla.com/D121163
2021-07-30 18:03:04 +00:00
Eitan Isaacson 474a197205 Bug 1714390 - P4: Set non-string values in AccAttributes when possible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D116785
2021-06-10 23:07:06 +00:00
Eitan Isaacson 62d0cdcad4 Bug 1714390 - P2: Use AccAttributes for accessible and text attributes. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D116783
2021-06-10 23:07:05 +00:00
James Teh 1e3921cd84 Bug 1703169: Support XUL buttons labelled by text children. r=morgan
Previously, text children were excluded from the a11y tree, so they weren't considered when computing name from subtree.

Differential Revision: https://phabricator.services.mozilla.com/D111029
2021-04-08 22:59:43 +00:00
Eitan Isaacson ffd5c8b856 Bug 1694566 - P3: Rename ChildAtPoint to LocalChildAtPoint. r=Jamie
This is in preparation for the next patch the virtualizes ChildAtPoint
in the Accessible class. LocalChildAtPoint allows us to house local-only
child at point implementations.

Differential Revision: https://phabricator.services.mozilla.com/D106679
2021-03-03 06:10:01 +00:00
Eitan Isaacson d6fb8b1903 Bug 1694566 - P2: Make EWhichChildAtPoint an enum class and put it in Accessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D106678
2021-03-03 06:10:01 +00:00
Simon Giesecke 1a4038f6e7 Bug 1693541 - Improve uses of nsBaseHashtable and descendants and avoid multiple subsequent lookups in accessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D106093
2021-03-01 09:59:30 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Eitan Isaacson 6e49732365 Bug 1693597 - P1: Rename Accessible to LocalAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D105670
2021-02-19 23:14:32 +00:00
Eitan Isaacson f48f468cb7 Bug 1693607 - [Linux] Add braces around statements. r=morgan
This is a collaboration between clang-tidy and clang-format.

clang-tidy uses compiled code paths, so this patch is linux specific.

Differential Revision: https://phabricator.services.mozilla.com/D105669
2021-02-19 23:14:32 +00:00
Eitan Isaacson 8c842a59e3 Bug 1692523 - P1: Prefix local heirarchy functions with 'Local'. r=Jamie
Parent -> LocalParent
GetChildAt -> LocalChildAt
FirstChild -> LocalFirstChild
LastChild -> LocalLastChild
NextSibling -> LocalNextSibling
PrevSibling -> LocalPrevSibling

Differential Revision: https://phabricator.services.mozilla.com/D105034
2021-02-16 20:05:10 +00:00
Andi-Bogdan Postelnicu 8de41d8d26 Bug 1683561 - Make `accessibility` buildable outside of `unified-build` environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D100212
2021-01-05 09:47:12 +00:00
Emilio Cobos Álvarez 7d03492002 Bug 1682988 - Use UTF8String for querySelector and similar OM methods. r=heycam
This has no observable behavior change because we were converting to
UTF-8 in ParseSelectorList.

Differential Revision: https://phabricator.services.mozilla.com/D99961
2020-12-23 05:42:00 +00:00
Tim Nguyen 78d18899ac Bug 1678523 - Prevent unexpected flushes in XULTreeAccessible.cpp. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D97955
2020-11-26 08:49:56 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Emilio Cobos Álvarez ef3d21048d Bug 1640623 - Use enum classes for LookAndFeel int and float IDs. r=jmathies,geckoview-reviewers,esawin
Differential Revision: https://phabricator.services.mozilla.com/D76694
2020-06-11 11:27:43 +00:00
James Teh 9f69f88101 Bug 1628415 part 3: Remove XULListboxAccessible::Value. r=MarcoZ
This depends on richlistitem's nsIDOMXULSelectControlItemElement::label implementation, which does the wrong thing in several cases.
We could make this use a11y name computation, but I can't find any other list box implementation that exposes accessible value on the list box itself, so I don't see any reason to keep this.

Differential Revision: https://phabricator.services.mozilla.com/D74372
2020-05-08 04:28:11 +00:00
Jonathan Watt 2d1fc3c186 Bug 1634217. Make `accessible/` buildable outside of `unified-build` environment. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D73176
2020-05-01 04:28:35 +00:00
Emilio Cobos Álvarez 60fdfe51e1 Bug 1629838 - Don't flush reentrantly from XUL a11y construction. r=Jamie
This code has pretty much always been broken, we've started to flush
more because we fixed a bug that was not looking at XUL trees inside
shadow DOM in bug 1625991.

We cannot flush layout from a11y tree construction.

Differential Revision: https://phabricator.services.mozilla.com/D70917

--HG--
extra : moz-landing-system : lando
2020-04-15 01:01:12 +00:00
Tim Nguyen f4024ef912 Bug 1624482 - Adapt menupopup accessible to query the correct parent element when slotted. r=emilio
D67954 starts using shadow DOM for menulist and slots the menulist children. This causes GetFlattenedTreeParent to return the slot instead of the parent menulist. This patch fixes it.

Differential Revision: https://phabricator.services.mozilla.com/D70234

--HG--
extra : moz-landing-system : lando
2020-04-08 19:48:30 +00:00
Eitan Isaacson 3ea5342b3a Bug 1619458 - Add Accessible::IsXULTooltip. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D65038

--HG--
extra : moz-landing-system : lando
2020-03-03 01:42:46 +00:00
Simon Giesecke aaf6cb4e75 Bug 1617628 - Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63899

--HG--
extra : moz-landing-system : lando
2020-02-25 17:03:36 +00:00
James Teh 5fef6bfb48 Bug 1118086: When a menupopup is shown, if aria-activedescendant is set, redirect focus appropriately. r=eeejay
Normally, XUL menupopups contain XUL menuitems, and XUL menuitems fire DOMMenuitemActive events from layout to manage a11y focus.
However, the new parent process select dropdown implementation uses a menulist containing div elements instead of XUL menuitems.
DOMMenuItemActive doesn't work for div elements because we check Accessible::ContainerWidget(), and that doesn't know to return the menupopup for div elements.
Since aria-activedescendant is the more web standard way to handle this, the new select dropdown implementation uses aria-activedescendant.

Differential Revision: https://phabricator.services.mozilla.com/D62677

--HG--
extra : moz-landing-system : lando
2020-02-17 04:06:00 +00:00
Gabriele Svelto 69790bc62e Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55443

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
Emilio Cobos Álvarez 3c12d374bc Bug 1600362 - Cleanup IntersectionObserver. r=smaug
Initially this was going to be a simple cleanup: Remove some useless namespaces
here and there and so on, remove `using` statements from the header and so on.

But unfortunately, DOMIntersectionObserver.h (which is included in Element.h,
unnecessarily) ended up exposing `Element` unnamespaced to a lot of code, so I
had to fix that.

Differential Revision: https://phabricator.services.mozilla.com/D55316

--HG--
extra : moz-landing-system : lando
2019-11-29 20:39:36 +00:00
Sylvestre Ledru 7c309095ea Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
Please note that it is the first reformat with clang-format 9
I only saw a fix in the .mm file

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D49056

--HG--
extra : moz-landing-system : lando
2019-10-21 14:13:44 +00:00
James Teh cb2f077062 Bug 1577381: Correct accessibility exposure for optgroups in content select dropdowns. r=eeejay,NeilDeakin
For remote content documents, select dropdowns (for <select size="1">) are rendered in the parent process using a XUL menupopup.
This means that the accessibility code for HTML selects doesn't apply.

In the menupopup, the optgroup is a sibling of its contained options.
For accessibility, we want to preserve the hierarchy such that the options are inside the optgroup.
We do this using aria-owns on the optgroup item.

This required some tweaks to XULMenuitemAccessible, as it couldn't previously handle grouping Accessibles between the menupopup and its items.

Differential Revision: https://phabricator.services.mozilla.com/D43901

--HG--
extra : moz-landing-system : lando
2019-10-16 06:10:32 +00:00
Morgan Reschenberg 5f968ff73a Bug 1557849: Check if a MenuPopupAccessible belongs to a context menu to determine its role assignment. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D48394

--HG--
extra : moz-landing-system : lando
2019-10-10 20:33:29 +00:00
Sylvestre Ledru f12b9fa5c3 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D47737

--HG--
extra : moz-landing-system : lando
2019-10-06 18:29:55 +00:00
Alexander Surkov e670b51391 Bug 1582590 - Clean up unused <textbox type='autocomplete'> platform code. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D46541

--HG--
extra : moz-landing-system : lando
2019-10-03 11:18:53 +00:00
Coroiu Cristina c094fff9aa Backed out changeset ea2c69779571 (bug 1577381) for a11y failures at accessible/tests/mochitest/attributes/test_obj_group.xul on a CLOSED TREE 2019-09-27 08:00:39 +03:00
James Teh 1adf6ac726 Bug 1577381: Correct accessibility exposure for optgroups in content select dropdowns. r=eeejay,NeilDeakin
For remote content documents, select dropdowns (for <select size="1">) are rendered in the parent process using a XUL menupopup.
This means that the accessibility code for HTML selects doesn't apply.

In the menupopup, the optgroup is a sibling of its contained options.
For accessibility, we want to preserve the hierarchy such that the options are inside the optgroup.
We do this using aria-owns on the optgroup item.

This required some tweaks to XULMenuitemAccessible, as it couldn't previously handle grouping Accessibles between the menupopup and its items.

Differential Revision: https://phabricator.services.mozilla.com/D43901

--HG--
extra : moz-landing-system : lando
2019-09-27 02:50:59 +00:00
James Teh 187e20b6ae Bug 1578140: Use nsXULElement::Click for DoAction on XULLabelAccessible so it works for labels inside buttons. r=eeejay
For labels inside buttons, The base implementation of DispatchClickEvent doesn't fire a command event on the button.
To fix this, override DispatchClickEvent to use nsXULElement::Click, which does fire a command event on the button.

Differential Revision: https://phabricator.services.mozilla.com/D44410

--HG--
extra : moz-landing-system : lando
2019-09-03 19:11:35 +00:00
Mike Hommey 66d7fe943e Bug 1575420 - Replace MOZ_WIDGET_TOOLKIT value of "gtk3" with "gtk". r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D42765

--HG--
extra : moz-landing-system : lando
2019-08-21 12:25:42 +00:00