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

172 Коммитов

Автор SHA1 Сообщение Дата
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
Alexander Surkov cfb8c8aef7 Bug 1573337 - remove XBL anon content filtering support from accessible tree traversal r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D42022

--HG--
extra : moz-landing-system : lando
2019-08-15 00:58:28 +00:00
James Teh 52d863a910 Bug 1566299: Update XULListBoxAccessible now that autocomplete-richlistbox-popup is a Custom Element. r=surkov
In bug 1525101, autocomplete-richlistbox-popup was converted to a Custom Element.
This means we can no longer use do_QueryInterface to get nsIAutoCompletePopup.
Instead, we must use Element::AsAutoCompletePopup.
This fixes accessibility focus for these autocompletes.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 04:47:42 +00:00
Boris Zbarsky 374137e8d8 Bug 1565767 part 5. Remove some unnecesary refcounting at nsIContent::GetBaseURI callsites. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D37973

--HG--
extra : moz-landing-system : lando
2019-07-15 18:29:05 +00:00
Andrew Swan 7696519cff Bug 1555060 Convert <tabs> to a custom element
The conversion for "regular" <tabs> elements is straightforward, most of
the work here is to support the tab strip (the <tabs> element with the id
"tabbrowser-tabs").  The markup needed for the tab strip moves directly
into browser.xhtml and the construction/teardown logic is now explicitly
driven from gBrowser.  There are many more little tweaks too numerous to
enumerate.

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

--HG--
rename : browser/base/content/tabbrowser.xml => browser/base/content/tabbrowser-tabs.js
extra : source : c163881a80c9a032b40f7d965fad6a6850fcf8a4
extra : intermediate-source : a5c6deeda8a9475ac0268a4351417c8ff659c962
extra : histedit_source : 5eb8b3d14027f2aeca5c52534096837cd0343104%2Ca23a07ddd5e1fb8bd084644dd6db0ee028b7c4b4
2019-06-20 14:09:37 -07:00
Ciure Andrei c04368fddd Backed out 3 changesets (bug 1555060) for causing test_tabbar.py to perma fail CLOSED TREE
Backed out changeset a5c6deeda8a9 (bug 1555060)
Backed out changeset f4e21e465f38 (bug 1555060)
Backed out changeset c71c45fe3e63 (bug 1555060)

--HG--
rename : browser/base/content/tabbrowser-tabs.js => browser/base/content/tabbrowser.xml
2019-06-28 00:21:50 +03:00
Andrew Swan e6c0e0f03a Bug 1555060 Convert <tabs> to a custom element
The conversion for "regular" <tabs> elements is straightforward, most of
the work here is to support the tab strip (the <tabs> element with the id
"tabbrowser-tabs").  The markup needed for the tab strip moves directly
into browser.xhtml and the construction/teardown logic is now explicitly
driven from gBrowser.  There are many more little tweaks too numerous to
enumerate.

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

--HG--
rename : browser/base/content/tabbrowser.xml => browser/base/content/tabbrowser-tabs.js
extra : rebase_source : 6b2b0ed9b01958d1b2db605ab300c4bebcaa461c
extra : source : c163881a80c9a032b40f7d965fad6a6850fcf8a4
2019-06-20 14:09:37 -07:00
Masayuki Nakano 3bd62fb08a Bug 1543315 - part 11: Mark nsIPresShell::ScrollContentIntoView() as MOZ_CAN_RUN_SCRIPT r=smaug
This patch marks `ScrollContentIntoView()` as `MOZ_CAN_RUN_SCRIPT` and changing
some callers of them to guarantee thar their parent callers are also safe.

Additionally, this patch moves it from `nsIPresShell` to `PresShell` because
all callers can refer `PresShell` directly.

Unfortunately, this patch changes a lot of methods in autocomplete and satchel
since this patch needs to mark some interface methods as `can_run_script` and
they are called each other.  This means that autocomplete module is really
sensitive like editor module.  Perhaps, autocomplete and satchel should do
scroll asynchronously and unmark some of them as `MOZ_CAN_RUN_SCRIPT` again.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 01:34:24 +00:00
Brian Grinstead 9bda39c108 Bug 1519502 - Convert menu bindings to a Custom Element r=surkov
Differential Revision: https://phabricator.services.mozilla.com/D19593

--HG--
extra : moz-landing-system : lando
2019-04-18 16:41:46 +00:00
Dorel Luca f5a2c905f4 Backed out 2 changesets (bug 1519502, bug 1528268) for Crashtest failures in toolkit/content/tests/chrome/test_popupincontent.xul. CLOSED TREE
Backed out changeset 904cc7903feb (bug 1519502)
Backed out changeset f8770d7eebd1 (bug 1528268)
2019-04-18 18:26:41 +03:00
Brian Grinstead d48d388df2 Bug 1519502 - Convert menu bindings to a Custom Element r=surkov
Differential Revision: https://phabricator.services.mozilla.com/D19593

--HG--
extra : moz-landing-system : lando
2019-04-17 15:56:41 +00:00
Masayuki Nakano 09fd54444c Bug 1543013 - part 1: Mark some methods of nsCoreUtils as MOZ_CAN_RUN_SCRIPT r=Jamie
This patch marks some methods of nsCoreUtils which are found at writing the
following patches, as `MOZ_CAN_RUN_SCRIPT`.

Due to bug 1543294, some of them are marked as `MOZ_CAN_RUN_SCRIPT_BOUNDARY`
because `MOZ_CAN_RUN_SCRIPT` requires to change base class, but that's
other licenses header or used in our code too many places.

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

--HG--
extra : moz-landing-system : lando
2019-04-13 12:13:13 +00:00
Masayuki Nakano 5e41233499 Bug 1540990 - Get rid of unnecessary nsIPresShell.h inclusions r=emilio
A lot of files include `nsIPresShell.h` even though currently they don't
need it.  This patch removes the unnecessary inclusions.

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

--HG--
extra : moz-landing-system : lando
2019-04-04 00:19:48 +00:00
Razvan Maries 1cd564b971 Backed out changeset 3b94c20ba873 (bug 1540990) for build bustages. CLOSED TREE 2019-04-04 02:44:00 +03:00
Masayuki Nakano b2bba953cc Bug 1540990 - Get rid of unnecessary nsIPresShell.h inclusions r=emilio
A lot of files include `nsIPresShell.h` even though currently they don't
need it.  This patch removes the unnecessary inclusions.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 23:29:38 +00:00
Masayuki Nakano 9165a150a1 Bug 1540930 - Make nsPresContext use mozilla::PresShell directly rather than via nsIPresShell r=emilio
`nsPresContext` should use `mozilla::PresShell` directly instead of
`nsIPresShell`.  This patch makes it.

Unfortunately, `nsPresContext` and `nsIFrame` have `PresShell()`.  Therefore,
we cannot use `PresShell*` in its methods so that this patch uses `mozilla::`
namespace prefix.

It might be better to rename them as `PresShellPtr()` in another bug.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 12:40:26 +00:00
Neil Deakin b5b280bfa8 Bug 1519955, Don't use boxobject properties in accessibility, r=jteh
--HG--
extra : rebase_source : 07d7bf9f4fec981f9f3c0c6ed52e78fdddedca5c
2019-03-01 12:26:37 -05:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Neil Deakin d30462861e Bug 1482389, remove methods of XULTreeElement that return unused nsresults. In addition, change GetView to return the nsITreeView instead of using an out-parameter, r=paolo 2018-12-04 11:25:41 -05:00
Neil Deakin cb10352f4b Bug 1482389, replace TreeBoxObject with XULTreeElement inherited from XULElement, r=peterv,paolo
--HG--
rename : dom/webidl/TreeBoxObject.webidl => dom/chrome-webidl/XULTreeElement.webidl
rename : layout/xul/tree/TreeBoxObject.cpp => dom/xul/XULTreeElement.cpp
rename : layout/xul/tree/TreeBoxObject.h => dom/xul/XULTreeElement.h
2018-12-04 11:25:30 -05:00
James Teh 5dc4d81ca1 Bug 1514687 - Allow accessibility code to focus XUL radio buttons without selecting them. r=bgrins,smaug,MarcoZ,paolo
1. This requires exposing radiogroup's focusedItem property to C++.
Unfortunately, there's no existing equivalent in nsIDOMXULSelectControlItemElement.
radiogroup is the only element that needs this, so a new interface has been created for it.

2. Accessibility uses focusedItem instead of selectedItem when setting focus.

3. When an item is focused, accessibility needs to be notified.
This is done using a DOMMenuItemActive event.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 04:52:50 +00:00
Paolo Amadini a61bfb98fb Bug 1472558 - Convert "richlistbox" to Custom Element. r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D15502

--HG--
rename : toolkit/content/widgets/richlistbox.xml => toolkit/content/widgets/richlistbox.js
extra : rebase_source : 7517e9d0760589a3df426aef4fa1c9c33f5355aa
2018-12-31 07:54:10 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Neil Deakin 0e5b436454 Bug 1513332, add some null-pointer checks on elements in XULListboxAccessible, r=marcoz 2018-12-17 20:02:11 -05:00
Dorel Luca 32bb40cfd8 Backed out 2 changesets (bug 1513332, bug 1445942) for browser-chrome failures in browser/base/content/test/permissions/browser_reservedkey.js
Backed out changeset 648648a60190 (bug 1445942)
Backed out changeset 003adae62f33 (bug 1513332)
2018-12-18 00:01:19 +02:00
Neil Deakin 49daaf7581 Bug 1513332, add some null-pointer checks on elements in XULListboxAccessible, r=marcoz 2018-12-17 15:43:51 -05:00
Marco Zehe 0a23cd946b Bug 1512411 - Don't expose broken label children accessibles on a XUL toolbarbutton which specifies the label attribute, r=Jamie
In bug 1507365, we introduced the ability of nested label children of toolbar buttons to provide the accessible name for a xul:toolbarbutton element. However, the XBL of xul:toolbarbutton causes the creation of a label accessible even if no xul:label child is present, and only the label attribute is being used. The nsIAccessibleText interface on such labels is, however, completely broken. This causes NVDA's mouse tracking, which always uses the deepest nested child, to fail. As a result, when hovering over Hamburger menu items, the announcement would be wrong, e. g., lag one behind the actual button the mouse is hovering over.

To fix this, we only accept xul:label children if they come from real XUL markup, not from the label attribute and the XBL creating the label. This means that some of the test changes from bug 1507365 have to be reverted to accommodate the new old behavior. But the new test for an actual label child still passes.

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

--HG--
extra : moz-landing-system : lando
2018-12-14 08:20:02 +00:00
Neil Deakin 9397165b4e Bug 1492326, use Element helper methods in accessibility instead of QueryInterface to get interface implementations that might be implemented by custom elements, r=surkov 2018-12-04 11:32:15 -05:00
Neil Deakin d2ed932b7c Bug 1492326, change methods of nsIDOMXUL* interfaces so that they return Elements to reduce usages as most callers want the return values as elements, r=peterv 2018-12-04 11:25:41 -05:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Marco Zehe 36b5ca6aa6 Bug 1509222 - XUL toolbarbutton with checked="true' but not type="checkbox" doesn't get the pressed state, r=Jamie
Simply decouple the check for the checked attribute from the one for the type attribute.

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

--HG--
extra : moz-landing-system : lando
2018-11-22 22:39:51 +00:00
Marco Zehe 2d841c76b1 Bug 1507365 - Allow labels inside toolbarbuttons to participate in accessible name calculation, r=Jamie
Toolbar buttons in XUL can now have labels inside them to provide the actual caption for the button. Adjust the accessibility module to allow label elements as acceptable children for the toolbarbutton element so the algorithm can pick up their text for the button's name.

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

--HG--
extra : moz-landing-system : lando
2018-11-22 05:57:48 +00:00
Paolo Amadini 37ad34fc88 Bug 1429940 - Null-check the GetContent call on the parent. r=Jamie
--HG--
extra : rebase_source : 1f2692152b608d9283990a6051091410ad0f6fea
2018-11-21 15:24:13 +00:00
Paolo Amadini 4d52da3cb2 Bug 1429940 - Part 1 - Use the first "label" element instead of the one inside "caption" to describe the "groupbox" element. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D11793

--HG--
extra : rebase_source : eec887ae45eb1a2b1356cef2f6cbbf24a5427f39
2018-11-15 12:05:09 +00:00
Paolo Amadini b2a83ffc85 Bug 1499947 - Part 1 - Remove XULProgressMeterAccessible and its base template class. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D12144

--HG--
extra : rebase_source : 81275b233770a7e9716a2b811a08060fc5006e1b
2018-11-20 14:10:38 +00:00
Tim Nguyen 6e26790a43 Bug 1416363 - Remove colorpicker binding and related code. r=bgrins,surkov
Depends on D7575

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

--HG--
extra : moz-landing-system : lando
2018-10-04 01:03:19 +00:00
Nicholas Nethercote 36c48819d1 Bug 1451169 - Use `nsStaticAtom*` instead of `nsStaticAtom**` in Element.h. r=baku
--HG--
extra : rebase_source : db09f7ab93a1c41ace03a645623f78a27ecfff8c
2018-04-03 13:21:06 +10:00
Eitan Isaacson 8a0557e2dd Bug 1479033 - Introduce Android accessibility directory. r=Jamie 2018-09-18 10:43:18 -07:00
Ehsan Akhgari 5d9d4af0cd Bug 1491574 - Part 2: Remove the XPCOM registration for nsPersistentProperties; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5950
2018-09-18 00:58:52 -04:00