For example, this can happen when choosing File menu -> new Tab.
Focus briefly returns to the document in the original tab, so we ask that document to restore focus.
The remote document then sends a focus event to the parent.
However, before the parent can process that event, focus has already moved to the address bar for the new tab.
With this check, we discover that focus is now in the chrome and thus avoid firing the event for the remote accessible.
MozReview-Commit-ID: 7k58dzREqZD
--HG--
extra : rebase_source : 51303f54293957f562e8540c8bf98f821694be54
For example, this can happen when choosing File menu -> new Tab.
Focus briefly returns to the document in the original tab, so we ask that document to restore focus.
The remote document then sends a focus event to the parent.
However, before the parent can process that event, focus has already moved to the address bar for the new tab.
With this check, we discover that focus is now in the chrome and thus avoid firing the event for the remote accessible.
MozReview-Commit-ID: 7k58dzREqZD
--HG--
extra : rebase_source : 070d3a6b5032bd6d4cd36fb054be04509bb0faae
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
Everything that goes in a PLDHashtable (and its derivatives, like
nsTHashtable) needs to inherit from PLDHashEntryHdr. But through a lack
of enforcement, copy constructors for these derived classes didn't
explicitly invoke the copy constructor for PLDHashEntryHdr (and the
compiler didn't invoke the copy constructor for us). Instead,
PLDHashTable explicitly copied around the bits that the copy constructor
would have.
The current setup has two problems:
1) Derived classes should be using move construction, not copy
construction, since anything that's shuffling hash table keys/entries
around will be using move construction.
2) Derived classes should take responsibility for transferring bits of
superclass state around, and not rely on something else to handle
that.
The second point is not a huge problem for PLDHashTable (PLDHashTable
only has to copy PLDHashEntryHdr's bits in a single place), but future
hash table implementations that might move entries around more
aggressively would have to insert compensation code all over the place.
Additionally, if moving entries is implemented via memcpy (which is
quite common), PLDHashTable copying around bits *again* is inefficient.
Let's fix all these problems in one go, by:
1) Explicitly declaring the set of constructors that PLDHashEntryHdr
implements (and does not implement). In particular, the copy
constructor is deleted, so any derived classes that attempt to make
themselves copyable will be detected at compile time: the compiler
will complain that the superclass type is not copyable.
This change on its own will result in many compiler errors, so...
2) Change any derived classes to implement move constructors instead
of copy constructors. Note that some of these move constructors are,
strictly speaking, unnecessary, since the relevant classes are moved
via memcpy in nsTHashtable and its derivatives.
Summary:
This patch allows parsing generic types, such as Sequence<T>, in XPIDL. It does
this by introducing a new type, TypeId, which contains both the name string and
an optional list of generic parameters.
Various places which use the xpidl.py library had to be updated to construct one
of these TypeId objects, as TypeId and `str` are not compatible types.
Depends On D2106
Reviewers: mccr8!
Tags: #secure-revision
Bug #: 1474369
Differential Revision: https://phabricator.services.mozilla.com/D2109
Cache AccessibleNode and make it able to operate the same instance by nsINode::GetAccessibleNode
--HG--
extra : rebase_source : 063eec8658af020f5408260d7d581ee76a04bd37
* Create BLOCKQUOTE internal role (also needed for correct exposure of
blockquote element on ATK)
* Add new ARIA roles to internal ARIA map
* Add new roles to existing ARIA roles mochitest and update blockquote
element test to reflect mapping to the new internal role
* Create BLOCKQUOTE internal role (also needed for correct exposure of
blockquote element on ATK)
* Add new ARIA roles to internal ARIA map
* Add new roles to existing ARIA roles mochitest and update blockquote
element test to reflect mapping to the new internal role
There is one actual behavior change here, in the webidl version of
TreeBoxObject::GetCellAt. I believe this change fixes a leak of the
nsTreeColumn, but could use careful review.
I tried to avoid changes not needed to get this compiling. There will be a lot
more cleanup in the next few changesets.
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:
s/mozilla::Forward/std::forward/
s/Forward</std::forward</
The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)
MozReview-Commit-ID: A88qFG5AccP
We expose the relevant APIs on textarea and input elements anyway
(chromeonly). The QIs will throw on a non-input or non-textarea element, but
none of these consumers expect that to happen.
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
There are some places where we have a thing which may not even be a node, and
we end up hardcoding the value of DOCUMENT_NODE there, because
"foo.nodeType == foo.DOCUMENT_NODE" will test true if foo is not a node: both
sides will be undefined.
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
Move from nsStyleColor::CalcComplexColor to StyleComplexColor::CalcColor.
MozReview-Commit-ID: FkYovvPZLc8
--HG--
extra : rebase_source : 54f1966e0ef9258f20e954cd6250774008eca04c
Also fixes existing code which fails the rule.
MozReview-Commit-ID: CkLFgsspGMU
--HG--
extra : rebase_source : 86a43837659aa2ad83a87eab53b7aa8d39ccf55b
None of the C++ callers of RemoveSelectionListener care about whether the
listener was already-added, and the only JS caller is in a test and knows the
listener was added. So the behavior change to no-op instead of throwing when
trying to remove a nonexistent listener is OK. Furthermore, the removal is
null-safe, so there's no point to explicitly failing if null is passed (which
it never is).
Since content can't directly add selection listeners, we can just use an
infallible append instead of returning errors callers don't check for anyway.
Also, no one passes null to AddSelectionListener, so we don't have to worry
about that part.
Bug 1421144 fixed IAccessible::accFocus to work when focus is within a remote document.
Unfortunately, this causes mysterious intermittent crashes when called from a UIA client in Windows 7.
Ideally, we'd deal with the actual cause of the crashes, but they seem to be deep in Windows RPC code and all attempts at tracking this down have failed.
Clients don't seem to need this too often anyway (and it's a minor annoyance if it doesn't work when they do).
MozReview-Commit-ID: IxvbBGJ2wxA
--HG--
extra : rebase_source : 504909703718b75fffcabf1fbe56c0bbff089b58
This condition is rare and does indicate a problem which breaks accessibility.
However, we aren't getting any closer to diagnosing this as a result of this crash, so it causes user pain without any gain to us.
MozReview-Commit-ID: GacAQDbhB0h
--HG--
extra : rebase_source : 478ec67da378ff763c0e0d8a998de1956b51b85b
This also removes any redundant Ci.nsISupports elements in the interface
lists.
This was done using the following script:
acecb401b7/processors/chromeutils-generateQI.jsm
MozReview-Commit-ID: AIx10P8GpZY
--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
This is actually a workaround for the test not ignoring hidden windows. There is
ongoing work in bug 1440106 that will get rid of this issue altogether, but
for now, we need to add hidden windows ourselves.
MozReview-Commit-ID: 2rQoz4KLHv3
--HG--
extra : rebase_source : 265fcd5755339493f320357553407edc33093376
It doesn't make sense for a slider to have descendants and this confuses NVDA.
MozReview-Commit-ID: 2A3gqTSu38g
--HG--
extra : rebase_source : 8776da7b23601eb3f1ec9e9711f9f9cd9eedd849
This is used in JS via instanceof checks, and in C++ only to get the `inputField`
attribute (the actual HTML input or textarea). We can swap out instanceof by checking
the tag name, and we can directly query for the input field from C++.
MozReview-Commit-ID: 7xpHQMYzYhD
--HG--
extra : rebase_source : a5b62928665725133eb52e4df2fb6659a6109ffd
This is actually a workaround for the test not ignoring hidden windows. There is
ongoing work in bug 1440106 that will get rid of this issue altogether, but
for now, we need to add hidden windows ourselves.
MozReview-Commit-ID: 2rQoz4KLHv3
--HG--
extra : rebase_source : dd97eefd09f50c630cbea33dd7738e1bb3b462c3
These issues were previously ignored due to the nature of our global import
rules. They need to be fixed before that rule can be updated.
MozReview-Commit-ID: DCChktTc5TW
--HG--
extra : rebase_source : cffb1c9762191c579d1397c8169e6e7635d229da
extra : histedit_source : dea59ddd2daaae52069c5faceae9149a4f08dd73
According to existing comments, TextEditor::TypedText() and
HTMLEditor::TypedText() are intentional bottleneck to debug. However, only
for that purpose, it and its internal methods are made virtual. This really
doesn't make sense.
So, this patch creates TextEditor::OnInputText() for callers of TypedText()
with non-empty string, TextEditor::OnInputParagraphSeparator() for callers
of TypedText() with eTypeBreak (Enter key or insertParagraphSeparator),
HTMLEditor::OnInputLineBreak() for callers of TypedText() with eTypeBR
(Shift + Enter or insertLineBreak). Additionally, this creates internal
non-virtual methods for XPCOM methods which are used as internal methods of
TypedText(). One is InsertTextAsAction() for nsIPlatintextEditor.insertText().
the other is InsertParagraphSeparator() for nsIPlaintextEditor.insertLineBreak().
Although those new methods are not have "WithTransaction" postfix, they must
be clearer they'll use transactions since user input and actions should be
undo-able.
MozReview-Commit-ID: AmOkMqovIKA
--HG--
extra : rebase_source : 9c0f4b25fa2a36ad2f3394f72eb290824c31d82a
First, EditorBase::DeleteSelection() is never used since
TextEditor::DeleteSelection() overrides it but does not call it. So, this patch
makes EditorBase::DeleteSelection() only returns NS_ERROR_NOT_IMPLEMENTED.
Next, EditorBase::DeleteSelectionImpl() actually removes content for
TextEditor::DeleteSelection(). So, it should be named as
DeleteSelectionWithTransaction(). However, it'll be done in the following
patch. On the other hand, its callers are EditorBase::HandleKeyPressEvent()
and EditorBase::DeleteSelectionAndPrepareToCreateNode(). Fortunately, they
can be moved to TextEditor simply. Therefore this patch moves the methods
to TextEditor for making related methods in a place.
Then, we can make the implementation of nsIEditor::TextEditor() as a non-virtual
method, TextEditor::DeleteSelectionAsAction().
MozReview-Commit-ID: KXFDhW3G9lA
--HG--
extra : rebase_source : 15986979279b2cae3b61cda1bf6bf3d9e4987f3f
There aren't any consumers for the third state, so `checked` is enough.
MozReview-Commit-ID: BpcQX2acA6C
--HG--
extra : rebase_source : f43c9fbe8d774208d203e4d819f39d3d99da05ff
Bug 1421018 intended to block the Ask.Com Toolbar (tbnotifier.exe).
This is basically malware and is responsible for a huge number of unnecessary accessibility instantiations.
However, there seems to have been some confusion and we ended up blocking tbnnotifier.exe instead.
This changes that block to tbnotifier.exe.
MozReview-Commit-ID: 2gZF8sYeGtb
--HG--
extra : rebase_source : 3d14a24c12748edfc31ddf7dac51bca491abd744
This method is not a virtual call, and also looks nicer.
This patch was mostly generated by a Python script, but I manually
cleaned up the code in a few places where statements didn't need to be
split across multiple lines any more.
MozReview-Commit-ID: 8JExxqSRc59
--HG--
extra : rebase_source : df6330a89e8d65dfe7a6fda0c8cb9f9732302efc
These events were a hack implemented in bug 703198.
At that time, JAWS required focus events for selection changes in a collapsed combo box.
However, these events also fire for expanded combo boxes.
This is problematic with e10s because now, for an expanded combo box, the real focus events come from the XUL dropdown implemented in the parent process, which is not associated with the document a11y tree in any way.
JAWS seems to cope just fine with value changes for Firefox combo boxes now and VFO have agreed that this is the correct path forward.
MozReview-Commit-ID: Iefop25bFe0
--HG--
extra : rebase_source : a86e5d73d560853bb50e1d8e3bbd11431aba8eb0
In the e10s implementation, Accessible::NativeState for the options doesn't include the invisible state. (It does with e10s disabled.)
In HTMLSelectOptionAccessible::NativeState, rather than just flipping (xor) the invisible state, absolutely ensure it gets removed. We don't want to *add* the invisible state if it isn't there.
This allows group position info to be calculated correctly.
MozReview-Commit-ID: LPEVhOOm2NT
--HG--
extra : rebase_source : 3091ca1826b216bb7c91eb62aafc16f79b786272
Much in the spirit of bug 1442207.
They're not only unneeded, and cheap to get, but also we call them
inconsistently with the light DOM and flattened tree parent (like ContentRemoved
for display: contents), so they're really confusing, and kind of a footgun.
MozReview-Commit-ID: 9u3Kp8Kpp5i
Also switch the XPCOM-y version of EventTarget::AddEventListner to a
Nullable<bool> for aWantsUntrusted.
The three-arg overload of AddEventListener in ContentFrameMessageManager was
never called, so all the AddEventListener overloads there are not needed.
MozReview-Commit-ID: 4IhqHmPVWzE
We can't have a null content in
ScrollbarActivity::StopListeningForScrollAreaEvents, because only viewport
frames have a null GetContent().
MozReview-Commit-ID: 9iAg0ivVqqG
And then fix up everything else that needs to change as well.
MozReview-Commit-ID: GDMfERqdQAc
--HG--
extra : rebase_source : 01fe06c3182245a409099a53383d92bf4fa0155c
And likewise for AttrCharacteristics::attributeName.
MozReview-Commit-ID: DwGzWCCKcVP
--HG--
extra : rebase_source : ac595af0b0da2cee36b5aecf4474880fbe993f11
I moved the IgnoreErrors decl so it would come after the OOMReporter decl and I
could add the new conversion operator.
MozReview-Commit-ID: B1S6DXmZfvE
The singleton AccessibleHandlerControl maintains a global cache generation counter which is incremented whenever any node is changed.
The handler for each node tracks the cache generation at the time its cache was initialized.
To check whether the cache needs to be updated, the handler compares its generation against the global generation from AccessibleHandlerControl.
If they differ, it refreshes the cache.
Previously, the handler didn't update its cache generation after refreshing.
This meant that every single query after the first change would refresh the whole cache, even if there wasn't a second change.
This resulted in a huge number of wasted cache updates for clients such as JAWS which hold onto accessibles, rather than releasing them and fetching them again for each update.
MozReview-Commit-ID: 80d4n1cIjzQ
--HG--
extra : rebase_source : a0903ddb33eba5381a232a661deaa3754b92406f
BuildDynamicIA2Data can't return an HRESULT; failure is communicated by the fact that the unique id in the data is set to 0.
However, IGeckoBackChannel::Refresh returned S_OK even if BuildDynamicIA2Data failed.
We now check the unique id and return an appropriate error code if it's 0.
Among other things, this means that the handler will return an error when querying dead objects instead of returning stale cache data.
MozReview-Commit-ID: IorDRHCItD8
--HG--
extra : rebase_source : 1b3b8393309ccefac27d0228aa528cd6fa55ad35
A typo meant we were checking the address of mChildCount, not the value.
MozReview-Commit-ID: 7Hit3FBy9pr
--HG--
extra : amend_source : edb85b8e73184e47cd9ff42c0442f89d5f3c5152
Now that the handler implements IEnumVARIANT itself (and uses our own internal method to retrieve the children), caching this remote interface is pointless.
MozReview-Commit-ID: FyagiEcHMP2
--HG--
extra : rebase_source : 267568164fb46d98c8cde22dfbb4f36f2afceb8c
This implements IEnumVARIANT locally using the new method provided by HandlerProvider.
This avoids marshaling full objects for text leaf accessibles (instead using HandlerTextLeaf), which is much faster.
It also avoids a pointless cross-process call to IEnumVARIANT::Reset (and possibly IEnumVARIANT::Clone).
Finally, it caches children after the first query so that clients (such as UI Automation) which walk children one by one don't incur separate cross-process calls for every child.
MozReview-Commit-ID: KUIXQoXxInQ
--HG--
extra : rebase_source : a6c0a56c2bb65e227f7c45eb1b767e7df19efa49
For text leaf accessibles, the HandlerProvider::AllChildren property provides text and other necessary information in an AccChildData struct, rather than providing the full accessible object.
Therefore, we must provide a specific local implementation of IAccessible2 which answers queries based on the data provided in this struct.
MozReview-Commit-ID: 8BYMF59EoTe
--HG--
extra : rebase_source : 0cdc01158f7fd1a04b0751a0a1703f9aa03cbe4c
When considering a large document, a huge number of the children we return are text leaf nodes.
Marshaling full objects is expensive, but for text leaf nodes, the client is only interested in the text and a few other pieces of information.
Therefore, rather than returning the full object for text leaf accessibles, we just return the text and other necessary information.
For other non-text children, we return the full object as usual.
In addition, clients normally use the IEnumVARIANT interface to retrieve children in a single call.
However, it doesn't allow you to specify a starting index.
Therefore, you must first call the Reset method to reset the starting point to 0.
Practically, this means an extra cross-process call whenever the caller fetches children.
When dealing with a large document, this can be a significant number of wasted calls.
This new method retrieves all children always starting at the first using a single call.
MozReview-Commit-ID: A9lc7BBTWdb
--HG--
extra : rebase_source : d50507c182ab7760c17c5e7bb9956f46a3dc188c
nsFrameLoader is on WebIDL bindings, so those QIs are no-ops anyway, unless the given object is no a frameloader to start with.
MozReview-Commit-ID: IPiW70H5NPc
Some of the definitions are needed for the headers removal in
following patches.
MozReview-Commit-ID: BCj7U7RgBLj
--HG--
extra : rebase_source : e8e437f76c4db6ec930ea0481b6c1a38129a5477
extra : source : a1c42220e5070fa4beea438859ab0daec3f3fe7b
If a handlerProvider call is pending on another thread, CoDisconnectObject won't release this HandlerProvider immediately.
However, the interceptor and its target might be destroyed.
MozReview-Commit-ID: 75SyPMIpit0
--HG--
extra : amend_source : a80f50f754c9be171e9262b13136e95005bc62af