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

708 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru 96da5036ad Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-28 09:30:05 +00:00
Emilio Cobos Álvarez e67a519741 Bug 1546697 - followup: Fix a typo introduced in the last commit. r=a11y-orange 2019-04-26 02:29:04 +02:00
Emilio Cobos Álvarez 11ea945833 Bug 1546697 - Use a consistent style for enum classes in layout. r=dholbert
Per the discussion in:

  https://groups.google.com/d/msg/mozilla.dev.platform/P79pwa9z5m8/iPYPAWPHCAAJ

They should be CamelCase, and that's what most of them already do. This converts
the rest, which are a few.

For the ones that already used `e` or `k` prefixes, I've mostly done:

 for file in $(rg Type::e layout | cut -d : -f 1 | sort | uniq); do sed -i 's#Type::e#Type::#g' $file; done

For the ones that used uppercase, I've removed the prefix if it was already in
the type name, and turn them into CamelCase.

Depends on D28680

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

--HG--
extra : moz-landing-system : lando
2019-04-25 23:03:04 +00:00
Masayuki Nakano 3622509485 Bug 1545342 - part 2: Make some public enum of nsIPresShell move to mozilla namespace and defined as enum class in PresShellForwards.h r=smaug
This patch moves some `enum` in `nsIPresShell` which are in public scope into
`mozilla` namespace and change them as `enum class`es.

Unfortunately, only "where to scroll" enum is just defines constants of
percentages of scroll destination.  Therefore, this patch makes only them
as `static const`.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 05:04:15 +00:00
Ryan Hunt d6509bb237 Bug 1534395 - Rename TabChild to BrowserChild. r=nika
This commit renames TabChild to BrowserChild.

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

--HG--
rename : dom/base/InProcessTabChildMessageManager.cpp => dom/base/InProcessBrowserChildMessageManager.cpp
rename : dom/base/InProcessTabChildMessageManager.h => dom/base/InProcessBrowserChildMessageManager.h
rename : dom/ipc/TabChild.cpp => dom/ipc/BrowserChild.cpp
rename : dom/ipc/TabChild.h => dom/ipc/BrowserChild.h
extra : rebase_source : e7fcfb845a971a2760e73d517e24da18ce2551b5
extra : histedit_source : d1991334ccb107fe56e478865f22fd97b041a317
2019-04-09 17:39:01 -05:00
Ryan Hunt 0eeced87be Bug 1534395 - Rename TabParent to BrowserParent. r=nika
This commit renames TabParent to BrowserParent.

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

--HG--
rename : dom/ipc/TabParent.cpp => dom/ipc/BrowserParent.cpp
rename : dom/ipc/TabParent.h => dom/ipc/BrowserParent.h
extra : rebase_source : d2706b9f42177d8de16068b7b1d088a44b8720a4
extra : histedit_source : a617ddac45c58050ef799116a67d2d983f2a8f6d%2C1d1dabd8761a32d548a6fbf1027be960698f6a5e
2019-04-09 16:38:15 -05:00
Ryan Hunt 3675f2449b Bug 1534395 - Rename nsITabParent to nsIRemoteTab. r=nika,mconley
nsITabParent is exposed to frontend code and is generally used as a representation of a remote tab. We could just rename the interface to nsIBrowserParent and worry about it later, but I think it's better to rename the interface to nsIRemoteTab so that we can later work on splitting the interface away from the PBrowser protocol.

Note: Some frontend code refers to a TabParentId. This commit renames this to RemoteTabId. We need to figure out the purpose of TabId with fission.

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

--HG--
rename : dom/interfaces/base/nsITabParent.idl => dom/interfaces/base/nsIRemoteTab.idl
extra : rebase_source : 9d8a1790a7bb10195ad063644d1a93d63b2afb72
2019-04-09 15:59:37 -05:00
Magnus Melin 3f542151f4 Bug 1530207 - fix crash [@ InvalidArrayIndex_CRASH | mozilla::a11y::Accessible::InsertChildAt] . r=surkov
For XULTreeAccessible, the ChildCount() is not only the mChildren, so check mChildren directly to make sure we stay within bounds

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

--HG--
extra : moz-landing-system : lando
2019-04-18 09:39:59 +00:00
Emilio Cobos Álvarez baf580cdfa Bug 1545107 - Remove nsIDocumentObserver::DocumentStatesChanged. r=smaug
It's a bit useless, only has one implementation. Call into the shell directly
instead.

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

--HG--
extra : moz-landing-system : lando
2019-04-17 19:29:59 +00:00
James Teh 5abb32cecd Bug 1543561: Expose the focusable state on a node focused by aria-activedescendant, even if that node isn't a descendant. r=eeejay
Sometimes, we use aria-activedescendant targeting something which isn't actually a descendant.
This is technically a spec violation, but it's a useful hack which makes certain things much easier.
For example, we use this for "fake focus" for multi select browser tabs and Quantumbar autocomplete suggestions.

This already worked previously; the accessible received a focus event and the focused state.
However, it did *not* receive the focusable state.
This is because the code which applies the focusable state for potential active descendants only works for descendants.

It really doesn't make sense for something to be focused when it isn't focusable.
In fact, this is an a11y test failure when it occurs.
So, if the active item has the focused state, ensure we expose the focusable state too.

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

--HG--
extra : moz-landing-system : lando
2019-04-17 23:13:10 +00:00
Masayuki Nakano d8d0bcab65 Bug 1543013 - part 2: Make accessible use mozilla::PresShell directly rather than via nsIPresShell r=Jamie
This patch makes accessible module use `mozilla::PresShell` directly rather
than via `nsIPresShell`.  Additionally, renames `DocAccessible::PresShell()`
to `DocAccessible::PresShellPtr()` for avoiding conflict with using
`PresShell` in it and its sub classes.

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

--HG--
extra : moz-landing-system : lando
2019-04-13 12:13:15 +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 0986fb819b Bug 1542506 - Make nsDocShell use mozilla::PresShell* directly rather than nsIPresShell* r=bzbarsky
This patch makes `nsDocShell::GetPresShell()` and
`nsDocShell::GetEldestPresShell()` return `mozilla::PresShell*` and
some non-public methods use `mozilla::PresShell*` directly.

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

--HG--
extra : moz-landing-system : lando
2019-04-13 01:03:13 +00:00
Brian Grinstead dd5a4c95c6 Bug 1495861 - Convert <radio> to a Custom Element r=surkov
Differential Revision: https://phabricator.services.mozilla.com/D8121

--HG--
extra : moz-landing-system : lando
2019-04-05 21:16:24 +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 8329e8382e Bug 1540962 - Make nsICommandManager builtinclass and make users use nsCommandManager directly r=bzbarsky
`nsICommandManager` isn't implemented by JS even in comm-central nor
BlueGriffon.  Therefore, we can make it a builtinclass.

Additionally, this patch makes all users in C++ use `nsCommandManager` which is
the only implementation of `nsICommandManager`.  This avoids QI from
`nsICommandManager` to `nsPICommandUpdater`.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 12:51: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
Masayuki Nakano de2d589e58 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 15:12:47 +00:00
Dorel Luca 5a0fa68b78 Backed out 3 changesets (bug 1540015) for build bustage. CLOSED TREE
Backed out changeset 7b71c9da0214 (bug 1540015)
Backed out changeset 5723ddbc5c44 (bug 1540015)
Backed out changeset 9561d2c36fa5 (bug 1540015)
2019-03-29 16:14:26 +02:00
Masayuki Nakano 9273f25ce2 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 13:09:26 +00:00
James Teh ef2bda893e Bug 1473234: make a11y listen to DOM events from iframes and shadow DOM. r=eeejay
1. Register with the root document window's parent target, since this receives events for iframes and shadow DOM. (The root document itself doesn't.)
2. Hold onto the target node when scheduling processing of the DOM event, as GetOriginalTarget returns null when we process shadow DOM events async.

Depends on D21349

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

--HG--
extra : moz-landing-system : lando
2019-03-25 05:04:36 +00:00
James Teh 1911fb04f0 Bug 1530931: Correctly handle retrieving a container accessible for a shadow root. r=eeejay
This can happen, for example, when GetAccessibleOrContainer is called within SelectionManager::ProcessSelectionChanged due to focusing a direct child of a shadow root.
In this case, the common ancestor is the shadow root itself.
Previously, we returned null in this case because GetFlattenedTreeParent doesn't work on the shadow root itself.
Now, we check if the given node is the shadow root, and if so, we use the shadow host instead.
This prevents the "We must reach document accessible implementing text interface!" assertion in SelectionManager::ProcessSelectionChanged when a direct child of a shadow root gets focus.

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

--HG--
extra : moz-landing-system : lando
2019-03-25 05:04:29 +00:00
Narcis Beleuzu 8f2eeb4b40 Backed out 2 changesets (bug 1530931, bug 1473234) for crashtest failures on RootAccessible::RemoveEventListeners . CLOSED TREE
Backed out changeset 54057e1121b5 (bug 1473234)
Backed out changeset faa43bdd3347 (bug 1530931)
2019-03-21 05:53:57 +02:00
James Teh 44f8fe46e4 Bug 1473234: make a11y listen to DOM events from iframes and shadow DOM. r=eeejay
1. Register with the root document window's parent target, since this receives events for iframes and shadow DOM. (The root document itself doesn't.)
2. Hold onto the target node when scheduling processing of the DOM event, as GetOriginalTarget returns null when we process shadow DOM events async.

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

--HG--
extra : moz-landing-system : lando
2019-03-01 02:48:47 +00:00
James Teh d4b9670c0d Bug 1530931: Correctly handle retrieving a container accessible for a shadow root. r=eeejay
This can happen, for example, when GetAccessibleOrContainer is called within SelectionManager::ProcessSelectionChanged due to focusing a direct child of a shadow root.
In this case, the common ancestor is the shadow root itself.
Previously, we returned null in this case because GetFlattenedTreeParent doesn't work on the shadow root itself.
Now, we check if the given node is the shadow root, and if so, we use the shadow host instead.

This prevents the "We must reach document accessible implementing text interface!" assertion in SelectionManager::ProcessSelectionChanged when a direct child of a shadow root gets focus.

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

--HG--
extra : moz-landing-system : lando
2019-03-20 15:19:44 +00:00
Boris Zbarsky 9a4ba73134 Bug 1534370 part 3. Mark InsertFromTransferable as MOZ_CAN_RUN_SCRIPT. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D23042

--HG--
extra : moz-landing-system : lando
2019-03-12 01:55:03 +00:00
Eitan Isaacson 9559a7c4a2 Bug 1531346 - Check for cyclical relationship with aria-activedescendant. r=MarcoZ
Differential Revision: https://phabricator.services.mozilla.com/D22633

--HG--
extra : moz-landing-system : lando
2019-03-08 07:55:13 +00:00
Eitan Isaacson 130d8fe6b2 Bug 1512567 - Check that we didn't already create an IPCDoc for the DocAccessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D20594

--HG--
extra : moz-landing-system : lando
2019-02-26 17:05:47 +00:00
Samuel Thibault fb05007f2c Bug 919508 - layout: Do not trim spaces when inspected from accessibility layer r=jfkthame
--HG--
extra : histedit_source : 3fbe469291ddca0344d6fd88dcadb6282f1ca846
2019-02-22 22:12:48 +01:00
Masatoshi Kimura e25fbce870 Bug 1528651 - Re-enable warnings-as-errors on Windows in some directories. r=dmajor
--HG--
extra : source : ba86ea25070b37f4725834e1c2d9ec4c0783e119
2019-02-17 15:03:02 +09:00
Markus Stange 0b151b8c2b Bug 1500692 - Centralize profiling category definition and add infrastructure for subcategories. r=njn
The actual subcategories will be added in later patches, so that there are no
unused categories.

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

--HG--
extra : moz-landing-system : lando
2019-02-16 17:37:43 +00:00
Eitan Isaacson 773b9d611a Bug 1525980 - Make announcement events work over IPC. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D19061

--HG--
extra : moz-landing-system : lando
2019-02-14 17:42:47 +00:00
Eitan Isaacson baa769abf9 Bug 1525980 - Introduce nsIAccessibleAnnouncementEvent. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D19060

--HG--
extra : moz-landing-system : lando
2019-02-14 17:42:45 +00:00
Eitan Isaacson bb5af5a481 Bug 1527254 - Don't rely on tabpanels xul element in Android for offcreen state. r=MarcoZ
Differential Revision: https://phabricator.services.mozilla.com/D19710

--HG--
extra : moz-landing-system : lando
2019-02-14 08:01:36 +00:00
Marco Zehe c0bdc14cea Bug 1525849 - Guard against 0 columns or out of bounds indexes for ARIA grid accessibles, r=Jamie
When returning the column or row index of a given cell, guard against the column count being 0 or the given index being out of bounds of the current grid or table. The MSAA code already did this previously, but now the upper bounds check has been moved to the base classes and an additional guard for the column count been put in place so a division by 0 crash canot happen.

A return value for RowIndexAt and ColIndexAt of -1 indicates an error condition. ATK will automatically deal with this, and the IA2 code has been adjusted to check for this and return an invalid argument error in such cases, too.

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

--HG--
extra : moz-landing-system : lando
2019-02-07 21:06:42 +00:00
Marco Zehe 91fe1bab37 Bug 1524919 - When getting the cell-index object attribute, make sure to only return positive values, r=Jamie
When getting the cell-index object attribute, now take into account that the row index might be invalid, and bail if that's the case. This should prevent negative index values which were one of the causes of Occasional crashes on Linux with weirdly formed tables like in Gmail.

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

--HG--
extra : moz-landing-system : lando
2019-02-07 01:12:22 +00:00
garvitdelhi 6bd950c37a Bug 1519185: Remove AttributeWillChange aNewValue parameter r=emilio,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D17073
2019-01-29 17:59:38 +01:00
Cosmin Sabou 6b126c3ff0 Backed out 2 changesets (bug 1519185) build bustages on nsMenuGroupOwnerX.mm. CLOSED TREE
Backed out changeset e1de5282e21a (bug 1519185)
Backed out changeset 00d8afb01890 (bug 1519185)

--HG--
extra : rebase_source : d92a7d4606992503f24c66093d35676e12a84ff0
2019-01-29 18:22:46 +02:00
garvitdelhi 3b6550b93f Bug 1519185: Remove AttributeWillChange aNewValue parameter r=emilio,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D17073

--HG--
extra : moz-landing-system : lando
2019-01-29 15:27:02 +00:00
Cosmin Sabou 7ccc9d8b0b Merge mozilla-inbound to mozilla-central. a=merge 2019-01-19 11:57:49 +02:00
Greg Tatum 7042c8f1c3 Bug 1520526 - Add categories to all profiler markers; r=mstange
This commit adds categories to all markers. This way the profiler's
marker categories and frame label categories agree. There are a few
duplicate category properties on some of the marker payloads, but
this could be cleaned up in a follow-up if needed.

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

--HG--
extra : moz-landing-system : lando
2019-01-18 15:40:15 +00:00
Marco Zehe b4ebbe90ae Bug 1515186 - Always calculate group position for all children of an accessible after a tree mutation, r=Jamie
Previously, if we had children a, b, c, and d, then removed b, the group position for c and d would potentially be marked as dirty, but a would not. This caused the check for the availability of previous group info to return outdated information.

This patch now always forces the update of all children's group position when a children move has occurred, since it potentially affects all the children, not just the ones after it. In addition, accGroupInfo::Update() now checks if the previous and next siblings that are being used as shortcuts have dirty group info, and are being used only if they do not.

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

--HG--
extra : moz-landing-system : lando
2019-01-10 05:59:01 +00: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
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
James Teh 850ee9ea2b Bug 1515294: Only use SendSyncTextChangeEvent for live regions. r=MarcoZ
In order to support IA2 live regions with e10s (bug 1322532), text change events sent from the child process to the parent process use sync IPC.
That comes at a slight performance cost: the content process is blocked until the parent returns from sending and handling the event.
However, there is no reason to do this if the event is not for an accessible inside a live region; current clients don't need the sync behaviour outside of live regions.

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

--HG--
extra : source : 415f827cb9ce211c48b0c6625e917582bc81fd3a
2018-12-21 09:16:38 +00:00
arthur.iakab 70a4778dd8 Backed out changeset 415f827cb9ce (bug 1515294) on suspicion of causing content process hangs a=backout CLOSED TREE 2018-12-23 00:04:39 +02:00
James Teh f9cba89c57 Bug 1515294: Only use SendSyncTextChangeEvent for live regions. r=MarcoZ
In order to support IA2 live regions with e10s (bug 1322532), text change events sent from the child process to the parent process use sync IPC.
That comes at a slight performance cost: the content process is blocked until the parent returns from sending and handling the event.
However, there is no reason to do this if the event is not for an accessible inside a live region; current clients don't need the sync behaviour outside of live regions.

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

--HG--
extra : moz-landing-system : lando
2018-12-21 09:16:38 +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
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
Eitan Isaacson 00ea13b8d5 Bug 1502061 - Check if origTargetNode still exists in ProcessDOMEvent. r=Jamie 2018-11-29 09:35:00 +02:00
Razvan Maries 99a5f987b3 Merge mozilla-inbound to mozilla-central a=merge 2018-11-27 19:32:31 +02:00
Ehsan Akhgari 6099c9f67b Bug 1508472 - Part 1: First batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-27 10:08:58 +00:00
Emilio Cobos Álvarez 9ed36d7ba6 Bug 1506547 - Align user-select behavior more with other UAs. r=mats
There's a few subtle behavior changes here, which I'll try to break down in the
commit message.

The biggest one is the EditableDescendantCount stuff going away. This
was added in bug 1181130, to prevent clicking on the non-editable div from
selecting the editable div inside. This is problematic for multiple reasons:

 * First, I don't think non-editable regions of an editable element should
   be user-select: all.

 * Second, it just doesn't work in Shadow DOM (the editable descendant count is
   not kept up-to-date when not in the uncomposed doc), so nested
   contenteditables behave differently inside vs. outside a Shadow Tree.

 * Third, I think it's user hostile to just entirely disable selection if you
   have a contenteditable descendant as a child of a user-select: all thing.

   WebKit behaves like this patch in the following test-case (though not Blink):

     https://crisal.io/tmp/user-select-all-contenteditable-descendant.html

   Edge doesn't seem to support user-select: all at all (no pun intended).

   But we don't allow to select anything at all which looks wrong.

 * Fourth, it's not tested at all (which explains how we broke it in Shadow DOM
   and not even notice...).

In any case I've verified that this doesn't regress the editor from that bug. If
this regresses anything we can fix it as outlined in the first bullet point
above, which should also make us more compatible with other UAs in that
test-case.

The other change is `all` not overriding everything else. So, something like:

  <div style="-webkit-user-select: all">All <div style="-webkit-user-select: none">None</div></div>

Totally ignores the -webkit-user-select: none declaration in Firefox before this
change. This doesn't match any other UA nor the spec, and this patch aligns us
with WebKit / Blink.

This in turn makes us not need -moz-text anymore, whose only purpose was to
avoid this.

This also fixes a variety of bugs uncovered by the previous changes, like the
SetIgnoreUserModify(false) call in editor being completely useless, since
presShell->SetCaretEnabled ended in nsCaret::SetVisible, which overrode it.

This in turn uncovered even more bugs, from bugs in the caret painting code,
like not checking -moz-user-modify on the right frame if you're the last frame
of a line, to even funnier bits where before this patch you show the caret but
can't write at all...

In any case, the new setup I came up with is that when you're editing (the
selection is focused on an editable node) moving the caret forces it to end up
in an editable node, thus jumping over non-editable ones.

This has the nice effect of not completely disabling selection of
-moz-user-select: all elements that have editable descendants (which was a very
ad-hoc hack for bug 1181130, and somewhat broken per the above), and also
not needing the -moz-user-select: all for non-editable bits in contenteditable.css
at all.

This also fixes issues with br-skipping like not being able to insert content in
the following test-case:

  <div contenteditable="true"><span contenteditable="false">xyz </span><br>editable</div>

If you start moving to the left from the second line, for example.

I think this yields way better behavior in all the relevant test-cases from bug
1181130 / bug 1109968 / bug 1132768, shouldn't cause any regression, and the
complexity is significantly reduced in some places.

There's still some other broken bits that this patch doesn't fix, but I'll file
follow-ups for those.

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

--HG--
extra : moz-landing-system : lando
2018-11-26 09:21:37 +00:00
Brindusan Cristian 31f0c21cca Backed out changeset 1575904619b5 (bug 1506547) for mochitest failures on test_reftests_with_caret.html. 2018-11-26 03:03:14 +02:00
Emilio Cobos Álvarez b74c31e4d9 Bug 1506547 - Align user-select behavior more with other UAs. r=mats
There's a few subtle behavior changes here, which I'll try to break down in the
commit message.

The biggest one is the EditableDescendantCount stuff going away. This
was added in bug 1181130, to prevent clicking on the non-editable div from
selecting the editable div inside. This is problematic for multiple reasons:

 * First, I don't think non-editable regions of an editable element should
   be user-select: all.

 * Second, it just doesn't work in Shadow DOM (the editable descendant count is
   not kept up-to-date when not in the uncomposed doc), so nested
   contenteditables behave differently inside vs. outside a Shadow Tree.

 * Third, I think it's user hostile to just entirely disable selection if you
   have a contenteditable descendant as a child of a user-select: all thing.

   WebKit behaves like this patch in the following test-case (though not Blink):

     https://crisal.io/tmp/user-select-all-contenteditable-descendant.html

   Edge doesn't seem to support user-select: all at all (no pun intended).

   But we don't allow to select anything at all which looks wrong.

 * Fourth, it's not tested at all (which explains how we broke it in Shadow DOM
   and not even notice...).

In any case I've verified that this doesn't regress the editor from that bug. If
this regresses anything we can fix it as outlined in the first bullet point
above, which should also make us more compatible with other UAs in that
test-case.

The other change is `all` not overriding everything else. So, something like:

  <div style="-webkit-user-select: all">All <div style="-webkit-user-select: none">None</div></div>

Totally ignores the -webkit-user-select: none declaration in Firefox before this
change. This doesn't match any other UA nor the spec, and this patch aligns us
with WebKit / Blink.

This in turn makes us not need -moz-text anymore, whose only purpose was to
avoid this.

This also fixes a variety of bugs uncovered by the previous changes, like the
SetIgnoreUserModify(false) call in editor being completely useless, since
presShell->SetCaretEnabled ended in nsCaret::SetVisible, which overrode it.

This in turn uncovered even more bugs, from bugs in the caret painting code,
like not checking -moz-user-modify on the right frame if you're the last frame
of a line, to even funnier bits where before this patch you show the caret but
can't write at all...

In any case, the new setup I came up with is that when you're editing (the
selection is focused on an editable node) moving the caret forces it to end up
in an editable node, thus jumping over non-editable ones.

This has the nice effect of not completely disabling selection of
-moz-user-select: all elements that have editable descendants (which was a very
ad-hoc hack for bug 1181130, and somewhat broken per the above), and also
not needing the -moz-user-select: all for non-editable bits in contenteditable.css
at all.

This also fixes issues with br-skipping like not being able to insert content in
the following test-case:

  <div contenteditable="true"><span contenteditable="false">xyz </span><br>editable</div>

If you start moving to the left from the second line, for example.

I think this yields way better behavior in all the relevant test-cases from bug
1181130 / bug 1109968 / bug 1132768, shouldn't cause any regression, and the
complexity is significantly reduced in some places.

There's still some other broken bits that this patch doesn't fix, but I'll file
follow-ups for those.

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

--HG--
extra : moz-landing-system : lando
2018-11-25 20:01:07 +00:00
Gerald Squelart 1bd6a1fd4e Bug 1435091 - p4. Use profiler_thread_is_being_profiled() instead of profiler_is_active() around profiler_add_marker()s - r=mstange
(Unless there were other profiler actions, as I'm not sure yet whether it would
be safe to skip them when the profiler is paused; another bug should
investigate that.)

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

--HG--
extra : moz-landing-system : lando
2018-11-19 06:29:15 +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
Jonathan Watt 181d407b43 Bug 1510167. Mark some nsGkAtom* arguments as const in DOM code. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D13049

--HG--
extra : rebase_source : 66db700ce58e88ab95c24e9dbc70ba4815e94df1
2018-11-13 12:48:21 +00:00
Marco Zehe b96e455eb6 Bug 1503964 - Prevent crashes when dealing with crazy table row and column role constructs, r=Jamie
Made IsTableCell() only check the generic type, not the ARIA map entry that gets checked in HasGenericType. This prevents the crash and also fixes IsTableCell() and AsTableCell() not being in sync.

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

--HG--
extra : moz-landing-system : lando
2018-11-08 10:54:09 +00:00
Marco Zehe a7b776042d Bug 1501273 - Expose an html:form element as a landmark role if it has an accessible name, r=Jamie
If html:form has a name given via ARIA, expose it as a landmark to platform APIS that require it. At the time of this submission, this is the case for ATK.

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

--HG--
extra : moz-landing-system : lando
2018-11-02 01:06:56 +00:00
Alexander Surkov 08eb9dff6a Bug 1487311 - accessibility doesn't assosiate ids in shadow DOM, r=jamie, sr=smaug 2018-10-30 08:17:04 +08:00
Alexander Surkov 4536232292 Bug 1052866 - Expose IAccessibleText on tables, rows, etc., r=tbsaunde. Bustage fix by MarcoZ. 2018-10-26 11:07:27 +02:00
Brindusan Cristian a663055a3b Backed out changeset a69a426bdb14 (bug 1052866) for mochitest failures on test_selection.html. CLOSED TREE 2018-10-26 11:51:22 +03:00
Alexander Surkov cda4486cbb Bug 1052866 - Expose IAccessibleText on tables, rows, etc., r=tbsaunde
--HG--
extra : rebase_source : 993e03d0f304a02654e11d1c3d7c9abfd85da273
2018-10-26 09:54:20 +02:00
Margareta Eliza Balazs 72b1e834f3 Backed out changeset 02d8210b8904 (bug 1501353) on request from MarcoZ a=backout
--HG--
extra : source : 0fe678bdcf595a848a25f423825ac6387bd19f1b
2018-10-24 11:36:25 +03:00
Marco Zehe c5581dfc0f Bug 1210630 - Section elements with accessible names should be mapped the same as ARIA role region, r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D9480

--HG--
extra : moz-landing-system : lando
2018-10-24 05:34:22 +00:00
Marco Zehe 5104d78a7d Bug 1501353 - Change the exposed accessible role for a named region from region to landmark, r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D9554

--HG--
extra : moz-landing-system : lando
2018-10-24 00:34:21 +00:00
Daniel Varga 9a610a8759 Merge mozilla-central to mozilla-inbound. a=merge
--HG--
rename : mobile/android/extensions/webcompat/webextension/background.js => mobile/android/extensions/webcompat/injections.js
rename : mobile/android/extensions/webcompat/webextension/injections/js/bug0000000-dummy-js-injection.js => mobile/android/extensions/webcompat/injections/js/bug0000000-dummy-js-injection.js
rename : mobile/android/extensions/webcompat/webextension/injections/js/bug1452707-window.controllers-shim-ib.absa.co.za.js => mobile/android/extensions/webcompat/injections/js/bug1452707-window.controllers-shim-ib.absa.co.za.js
rename : mobile/android/extensions/webcompat/webextension/injections/js/bug1457335-histography.io-ua-change.js => mobile/android/extensions/webcompat/injections/js/bug1457335-histography.io-ua-change.js
rename : mobile/android/extensions/webcompat/webextension/injections/js/bug1472075-bankofamerica.com-ua-change.js => mobile/android/extensions/webcompat/injections/js/bug1472075-bankofamerica.com-ua-change.js
rename : mobile/android/extensions/webcompat/webextension/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js => mobile/android/extensions/webcompat/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js
rename : mobile/android/extensions/webcompat/webextension/injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js => mobile/android/extensions/webcompat/injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js
2018-10-20 13:32:54 +03:00
Emilio Cobos Álvarez 5ebe7949ae Bug 1487312 - Fix content insertion accessibility notifications in Shadow DOM. r=Jamie,surkov
The issue was specific to content insertion directly under a shadow root, the
rest should work (see bug 1427825 for the fix for other similar occurrences).

The removal of the aContainer argument follows the same pattern as bug 1442207.

Differential Revision: https://phabricator.services.mozilla.com/D6431
2018-10-20 01:19:08 +02:00
Marco Zehe c90a496216 Bug 1492393 - Make our table index methods aware of cells spanning multiple columns, r=surkov
Sometimes, when cells have display:block, and a different cell in the same row has a column span, our index methods did not take these into account. Also, when regular tables encounter such a cell, index calculation failed.

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

--HG--
extra : moz-landing-system : lando
2018-10-19 08:18:04 +00:00
Eitan Isaacson 3bb071595c Bug 1479037 - Introduce native event support 4/4. r=jchen,yzen?jamie
Depends on D6683

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

--HG--
extra : moz-landing-system : lando
2018-10-11 16:22:11 +00:00
Daniel Varga 4f26bbce63 Merge autoland to mozilla-central. a=merge 2018-10-10 19:07:16 +03:00
Dorel Luca 92a3152cee Backed out 4 changesets (bug 1479037) on dev's request for causing android crashes. a=backout
Backed out changeset 85f8ca59f747 (bug 1479037)
Backed out changeset 630601f0663e (bug 1479037)
Backed out changeset c926c6470235 (bug 1479037)
Backed out changeset f8a20bd86895 (bug 1479037)
2018-10-10 18:52:59 +03:00
Masayuki Nakano 9b40433ef6 Bug 1461708 - part 7: Make EventStateManager::HandleMiddleClickPaste() dispatch ePaste event by itself r=smaug
This is preparation of the last patch.  Even if no editor is clicked with
middle button, we need to do:
- collapse Selection at the clicked point.
- dispatch "paste" event.

Therefore, HandleMiddleClickPaste() should dispatch ePaste event by itself
and each editor methods should have a bool argument which the caller wants
ePaste event automatically.

Note that Chromium dispatches "paste" event and pastes clipboard content
into clicked editor even if preceding "auxclick" event is consumed.
However, our traditional behavior is not dispatching "paste" event nor
pasting clipboard content.  Unless Chromium developer keeps their odd
behavior, we should keep our traditional behavior since our behavior is
conforming to DOM event model.

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

--HG--
extra : moz-landing-system : lando
2018-10-10 12:05:39 +00:00
Eitan Isaacson 8102b1e502 Bug 1479037 - Introduce native event support 4/4. r=jchen,yzen?jamie
Depends on D6683

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

--HG--
extra : moz-landing-system : lando
2018-10-09 17:21:01 +00:00
Nicholas Nethercote fb0c912a86 Bug 1451169 - Use `nsStaticAtom* const` instead of `nsStaticAtom**` in DocAccessible.cpp. r=davidb
--HG--
extra : rebase_source : fb518d946f193c5237fb3fb7e28a8b1f7e3559e3
2018-04-03 22:15:30 +10:00
Nicholas Nethercote 7de7b7aae3 Bug 1451169 - Change nsRoleMapEntry::roleAtom from `nsStaticAtom**` to `nsStaticAtom* const`. r=davidb
--HG--
extra : rebase_source : 3a7101328e9ffcb6adeef42c98afa26d0531ca1c
2018-04-03 10:55:33 +10:00
Marco Zehe aa436fb77a Bug 1486668 - <td> with display: block doesn't get table cell semantics, r=surkov
Differential Revision: https://phabricator.services.mozilla.com/D6158

--HG--
extra : moz-landing-system : lando
2018-09-26 08:47:35 +00:00
Eitan Isaacson dc59a7f112 Bug 1489324 - Add 'child-item-count' and 'hierarchical' attributes to collection containers. r=Jamie 2018-09-21 13:02:20 -07:00
Alexander Surkov af50d56f28 Bug 1491742 - UBSan: load of value which is not a valid value for type 'bool' in ImageAccessible.cpp, r=jamie 2018-09-21 13:52:50 +08:00
Eitan Isaacson c712a2aaaa Bug 1490840 - Only delete text in ReplaceText if the string is empty. r=Jamie 2018-09-18 16:16:00 -04:00
Narcis Beleuzu 94e37e71ff Merge inbound to mozilla-central. a=merge 2018-09-19 13:00:20 +03:00
James Teh 1999ca1f89 Bug 1485097: When handling aria-owns relocation and an owned child doesn't yet have an accessible, skip it if the owned child is actually an ancestor of its owner. r=surkov
This can easily be reproduced if the ancestor being owned has role="presentation", but there are other cases as well.
If we don't prevent this, we end up with a loop.

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

--HG--
extra : moz-landing-system : lando
2018-09-19 02:15:55 +00:00
Alexander Surkov ed5f3a33f3 Bug 1491210 - stop using nsIDOMXULLabeledControlElement, r=jamie 2018-09-19 09:06:31 +08: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
Coroiu Cristina 40028657f0 Backed out 3 changesets (bug 1491574) for build bustage at builds/worker/workspace/build/src/netwerk/base/nsNetUtil.cpp on a CLOSED TREE
Backed out changeset 5390b485f7e4 (bug 1491574)
Backed out changeset 3d11b69de826 (bug 1491574)
Backed out changeset e7e8f3f70f8b (bug 1491574)
2018-09-18 07:10:20 +03:00
Ehsan Akhgari 9b9060a876 Bug 1491574 - Part 2: Remove the XPCOM registration for nsPersistentProperties; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5950
2018-09-17 22:05:34 -04:00
Sylvestre Ledru aa37bde79b Bug 1489454 - Remove all trailing whitespaces (again) r=Ehsan
This also includes moving some files to the regular format.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 14:47:51 +00:00
James Teh 5fad83caf4 Bug 1488109: If the focused element has aria-activedescendant and the target id is moved to another node, move accessible focus to the new target. r=surkov
Differential Revision: https://phabricator.services.mozilla.com/D4832

--HG--
extra : moz-landing-system : lando
2018-09-05 04:43:18 +00:00
James Teh fca9213cd0 Bug 1322621: If aria-activedescendant is removed or changed to an invalid id while an element is focused, move accessible focus to the element itself. r=surkov
Differential Revision: https://phabricator.services.mozilla.com/D4732

--HG--
extra : moz-landing-system : lando
2018-08-31 07:00:59 +00:00
Alexander Surkov ef0cc6d04c Bug 1487313 - stop using nsIDOMXULLabelElement and nsIDOMXULDescriptionElement in a11y, r=jamie 2018-08-31 09:17:38 +08:00
Alexander Surkov e36505da67 Bug 1486671 - stop using nsIDOMXULCheckboxElement, r=jamie 2018-08-29 15:42:31 +08:00
Tiberius Oros 2ee9341d01 Merge inbound to mozilla-central. a=merge 2018-08-24 12:43:45 +03:00
James Teh 2a8cad4bfc Bug 1479678: Fix incorrect start offset when retrieving accessible text attributes if the last spelling error is not within this accessible. r=surkov
When dealing with an editor which contains multiple accessibles, the previous spelling error range might be in a previous accessible, not the accessible currently being queried.
In this case, DOMPointToOffset will return the length of this accessible.
Previously, we weren't checking for this and were overriding the start offset of the returned range regardless, resulting in broken offsets.
Now, we leave the start offset alone in this case.

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

--HG--
extra : moz-landing-system : lando
2018-08-24 03:08:28 +00:00
Eitan Isaacson 4cba5259d5 Bug 1484778 - Null-check scroll frame in DispatchScrollingEvent. r=surkov 2018-08-21 10:24:00 -04:00
Eitan Isaacson 8d5dad89ed Bug 1479591 - Introduced accessibility scrolling event and interface. r=surkov 2018-08-15 13:07:00 -04:00
Cosmin Sabou c2b1fcd31c Backed out changeset dad95d849302 (bug 1479591) for causing linux debug leaks and security issues. 2018-08-15 04:39:43 +03:00
Eitan Isaacson 0f281891a2 Bug 1479591 - Introduced accessibility scrolling event and interface. r=surkov 2018-08-14 11:46:00 +03:00
Ting-Yu Lin 48d02834a5 Bug 1482665 Part 2 - Remove nsPresContext::AppUnitsPerCSSPixel() and replace it with mozilla::AppUnitsPerCSSPixel(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D3155
2018-08-13 14:29:28 -07:00
Masayuki Nakano c0e869978e Bug 1482012 - part 2: Create TextEditor::PasteAsAction() as non-virtual method for outer C++ code r=m_kato
User may paste a lot with pressing Accel+V for a while (i.e., with auto repeat).
So, calling nsIEditor::Paste() may be in a hot path and we can now make
non-virtual public method with AsHTMLEditor().

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

--HG--
extra : moz-landing-system : lando
2018-08-13 04:37:56 +00:00
Masatoshi Kimura 3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Brian Hackett 05a7f56ce7 Bug 1479585 - Use replayable IDs in PDocAccessible IPC, r=davidb.
--HG--
extra : rebase_source : 40e1b80174483e5bce3a76f5a82c5b4951a38e63
2018-08-02 17:30:17 +00:00
Cosmin Sabou de8c2bd891 Backed out changeset 5950c9d63c3b (bug 1090497) for build bustages on several files. CLOSED TREE 2018-08-02 19:59:53 +03:00
Masatoshi Kimura feea19030c Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : a62521fdc66def4e4d5d7bf52e68365a786b5c55
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Brian Grinstead 6a6ca1a08c Bug 1475342 - Move document.getElementsByAttribute[NS] to ParentNode so it'll work for HTML document and elements;r=bz
It's currently only accessible on XULDocument and XULElement, but that makes porting existing
JS to run in an HTML document inconvenient. We could alternatively change calling JS, but
this can be easily moved and exposed in chrome contexts.

MozReview-Commit-ID: JitYET20NSE

--HG--
extra : rebase_source : 75d823c688cba8d84dc19705e83284be383962f2
2018-07-26 13:40:13 -07:00
Masayuki Nakano 2fa716ed4d Bug 1467799 - part 2: Stop using nsIEditor::GetDocumentIsEmpty() from C++ code r=m_kato
nsIEditor::GetDocumentIsEmpty() is a virtual code and there is non-virtual
method, TextEditor::IsEmpty().  So, any callers in C++ should use
TextEditor::IsEmpty() instead.

MozReview-Commit-ID: CQE8LP6XI96

--HG--
extra : rebase_source : e0027c3d71856adcd5fa7820bf936a6b405560c5
2018-07-18 17:51:49 +09:00
Eitan Isaacson 3fa0f4108f Bug 1475087 - Include boundaryType in vc change event. r=surkov 2018-07-16 13:56:00 +03:00
Gurzau Raul 117e86643a Backed out changeset ed8baebfeb78 (bug 1475087) for Windows build bustages on mozilla/a11y/DocAccessibleParent.h on a CLOSED TREE 2018-07-16 23:20:28 +03:00
Eitan Isaacson 95b1000eef Bug 1475087 - Include boundaryType in vc change event. r=surkov 2018-07-16 12:36:31 -07:00
James Teh e5a1c32097 Bug 1475376: Support aria-valuetext for implicit ARIA roles. r=MarcoZ
For example, <input type="range"> maps to role="slider", so aria-valuetext should be supported.

MozReview-Commit-ID: IYBVTHP3ZLo

--HG--
extra : rebase_source : 906dfacf92d040abf97b46ff67bafbabc5c9a1ea
2018-07-12 20:22:09 -04:00
Chris Peterson 16cc517cf9 Bug 1473453 - Part 1: a11y: assert `hitregion` property is always null or true. r=MarcoZ
Fix clang-tidy warning about bool pointers:

[misc-bool-pointer-implicit-conversion] accessible/generic/Accessible.cpp:644:9: warning: dubious check of 'bool *' against 'nullptr', did you mean to dereference it?

The `hitregion` property is always null or points to a true bool, set here:

https://searchfox.org/mozilla-central/rev/6ef785903fee6c0b16a1eab79d722373d940fd78/dom/canvas/CanvasRenderingContext2D.cpp#3936-3937

The `hitregion` property used to be an nsRect pointer:

https://searchfox.org/mozilla-central/diff/c797577640f306df87e8c32313c5b826d1e58a9b/accessible/src/generic/Accessible.cpp#928

MozReview-Commit-ID: HYlAnMyaitB

--HG--
extra : rebase_source : 2f8d9d151ebc382043c107517838ccdaa0ed7228
2018-07-04 14:39:57 -07:00
Eitan Isaacson 2cee1b8c81 Bug 1472274 - Alter selection direction according to the last change. r=surkov
nsIAccessibleText.setSelectionBounds should accept a start offset that is larger than an end offset. This is an indica tion that it is a reverse selection, and the caret should be at the start of the selection.

This should also be consistent with how multiple range selections work interactively - the caret should re
main at the last offset reached.
2018-07-05 15:19:00 +03:00
Alexander Surkov 32562a67f0 Bug 1349223 - cut aria-hidden tree, r=yzen 2018-07-04 10:20:49 -04:00
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Chris Peterson 2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Cosmin Sabou aeb2ada3aa Backed out changeset b2df5de436bd (bug 1349223) for permafailling marionette harness on test_accessibility.py. CLOSED TREE 2018-06-25 22:50:58 +03:00
Alexander Surkov 3da9b86da8 Bug 1349223 - cut aria-hidden tree, r=yzen 2018-06-25 14:17:01 -04:00
Eitan Isaacson 09ec9609fb Bug 1465823 - Add new position and offsets to pivot change notifications and vc events. r=surkov 2018-06-21 14:47:00 +03:00
Alexander Surkov 9b16d6de3d Bug 759650 - turn 'Called on accessible unbound from tree' assertion into moz_assert 2018-06-18 14:04:08 -04:00
Alexander Surkov 3364a60bed Bug 886215 - trun 'Children of not selected deck panel are not accessible' into moz_assert 2018-06-18 14:02:27 -04:00
Alexander Surkov 94ab51d46c Bug 687011 - aria-activedescendant change on inserted node doesn't fire focus change, r=jamie 2018-06-08 10:55:08 -04:00
Samuel Thibault 73a24b5b8a Bug 1319273 - Accessible: Make TextBounds return rect of whole frame if content is empty. r=surkov 2018-05-23 17:02:33 +02:00
Gurzau Raul ff15f3c828 Backed out changeset f585271d250d (bug 1319273) for eslint failures on /gecko/accessible/tests/browser/bounds/browser_test_zoom_text.js on a CLOSED TREE 2018-06-01 22:25:19 +03:00
Samuel Thibault fa531b0477 Bug 1319273 - Accessible: Make TextBounds return rect of whole frame if content is empty. r=surkov 2018-05-23 17:02:33 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Emilio Cobos Álvarez fe09ffd3af Bug 1465478: Introduce Element::FromNode. r=smaug
And use it in a couple places I noticed.

MozReview-Commit-ID: 8baSMrbdEbF
2018-05-31 02:46:10 +02:00
Alexander Surkov 246756a336 Bug 1460244 - Tables with CSS display properties no longer participate in layout table calculation, r=marcoz 2018-05-25 10:55:52 -04:00
Kris Maglione 8340513b0c Bug 1463287: Add QueryInterface helper macro for concrete class types. r=bz
Using concrete class types with static IIDs in QueryInterface methods is a
pretty common pattern which isn't supported by any existing helper macros.
That's lead to separate ad-hoc implementations, with varying degrees of
dodginess, being scattered around the tree.

This patch adds a helper macro with a canonical (and safe) implementation, and
updates existing ad-hoc users to use it.

MozReview-Commit-ID: HaTGF7MN5Cv

--HG--
extra : rebase_source : ace930129d85960d22bc3048ca3bb19bbbd4a63e
extra : histedit_source : 03a87f746d957789d41381e4e1bfcc4fd7eebaf2%2C9c5bae9feeeef7721105db67be0f83e0ded66bb7
2018-05-21 16:33:18 -07:00
Boris Zbarsky 2e09ba1f75 Bug 1377980 part 2. Remove most C++ use of nsIDOMRange. r=mccr8 2018-05-17 12:01:38 -04:00
Tokio Kajitsuka 55c94aedca Bug 1438193 - part11-9: NativeState r=surkov
turn NativeState into const functions
2018-05-16 03:04:50 +09:00
Tokio Kajitsuka 2b0e583f32 Bug 1438193 - part11-8: DoAction r=surkov
turn DoAction & ActionCount into const functions
2018-05-16 02:40:22 +09:00
Tokio Kajitsuka 4815618b61 Bug 1438193 - part11-7: TakeFocus r=surkov
turn TakeFocus & AnchorURIAt into const functions
2018-05-16 02:19:54 +09:00
Tokio Kajitsuka eb3d9b85ce Bug 1438193 - part11-6: Value r=surkov
turn Accessible::Value into a const function
2018-05-16 01:55:28 +09:00
Tokio Kajitsuka 0f609dc771 Bug 1438193 - part11-4: Name r=surkov
turn Name & ARIAName & NativeName into const functions
2018-05-16 01:13:02 +09:00
Tokio Kajitsuka 41078f48d3 Bug 1438193 - part11-2: RelationByType r=surkov
turn RelationByType into const functions
2018-05-15 22:47:10 +09:00
Tokio Kajitsuka 17d2e291d4 Bug 1438193 - part11-1: Role r=surkov
turn Accessible::Role into a const function
2018-05-15 21:50:38 +09:00
Dorel Luca 0d2ff9e60d Merge mozilla-inbound to mozilla-central. a=merge 2018-05-16 00:54:22 +03:00
Tokio Kajitsuka d4d0782393 Bug 1438193 - part10: SetCurrentItem r=surkov
turn SetCurrentItem & GetChromeFlags & HasChildren into const functions
2018-05-13 19:14:55 +09:00
Tokio Kajitsuka d50e800761 Bug 1438193 - part9: CurrentItem r=surkov
turn Accessible::CurrentItem into const functions
2018-05-13 18:26:02 +09:00
Alexander Surkov 6faf449ca5 Bug 1455357 - Setting grid item to display:contents resets its accessible role, patch=surkov,jamie, r=marcoz 2018-05-15 09:44:21 -04:00
Emilio Cobos Álvarez 29a24373d9 Bug 1459529: Remove some useless nsIDocumentObserver notifications. r=heycam
MozReview-Commit-ID: DzuiqVGKsiu
2018-05-15 18:44:28 +02:00
Narcis Beleuzu 932adad93d Merge inbound to mozilla-central. a=merge 2018-05-15 00:36:35 +03:00
Adrian Wielgosik aec99c32e5 Bug 1460940 - Remove nsIDOMDocument uses in accessible/. r=bz
MozReview-Commit-ID: LQ91rgrJIy

--HG--
extra : rebase_source : 143e2a3b8971aa1a4e604414c704d28deb1e5594
2018-05-11 19:46:15 +02:00
Tokio Kajitsuka 9b9c3780fe Bug 1438193 - part7: NativeRole r=surkov
turn NativeRole into const functions
2018-05-08 04:05:50 +09:00
Tokio Kajitsuka 005aa74ac6 Bug 1438193 - part6: DoCommand r=surkov
turn Accessible::DoCommand into a const function
2018-05-07 02:11:06 +09:00
Tokio Kajitsuka 80aa8d9625 Bug 1438193 - part5: IsMultiColumn r=surkov
turn ColCount and IsMultiColumn into const functions
2018-05-06 00:55:29 +09:00
Alexander Surkov 5d3b238323 Bug 1005271 - HTML table with display:block should expose table semantics, r=marcoz 2018-05-08 13:13:38 -04:00