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

369 Коммитов

Автор SHA1 Сообщение Дата
James Teh 31c03e927b Bug 1421873: Fix infinite loop in HandlerProvider::GetAllTextInfoMainThread when invalid attribute offsets are returned. r=MarcoZ
When querying text attributes, Gecko can return an end offset less than the requested offset in some rare cases, which isn't valid.
This is perhaps because the text mutated during the attribute fetching loop for some reason, making the requested offset invalid.
We now check the end offset and break out of the loop in this case.
This fixes a freeze after sending a message in OX Mail with NVDA.

MozReview-Commit-ID: 1lVSLAdOcS7

--HG--
extra : rebase_source : 048fbed8ddc591f62c17d559483bfe2f1542431c
2017-11-30 16:44:02 +10:00
James Teh abec79ee0b Bug 1421209 part 1: Fix incorrect iid in AccessibleHandler::ResolveIAHypertext. r=MarcoZ
Previously, it was querying for IID_IAccessibleHypertext, but this is actually an IAccessibleHypertext2 pointer.
This meant we were crashing when trying to call an IAccessibleHypertext2 method.
This was a regression introduced in bug 1419362.

MozReview-Commit-ID: 7akjIfNuIh3

--HG--
extra : rebase_source : 18e126e3b47bc5a8f486870a285668a7f85e95c9
2017-11-29 14:39:00 +10:00
James Teh e9098869dd Bug 1421478: Clarify comment in handlerDataCleanup.h. r=aklotz
MozReview-Commit-ID: EVzuqVMl7Ck

--HG--
extra : rebase_source : ebcad7cbc5ed49417ece2d9b220d52488ee28732
2017-11-29 10:18:01 +10:00
James Teh 2cb46a14be Bug 1418448 part 3: Accessible Handler/Provider: Unify release of interfaces in StaticIA2Data. r=aklotz
Both Provider and Handler need to release the interfaces in StaticIA2Data.
Therefore, move this into a common function to avoid duplication pain in future.

MozReview-Commit-ID: 7J4iuvDa8m2

--HG--
extra : rebase_source : 98c97b51c27c318ba987787518cfd70bda8967d4
2017-11-24 15:10:41 +10:00
James Teh f7fcce5742 Bug 1418448 part 2: AccessibleHandler: Clean up DynamicIA2Data. r=aklotz
We need to clean up the VARIANT and BSTRs in DynamicIA2Data in the handler as well.
We do this in two places:
1. Before reading a new payload (because we need to clean up the existing payload); and
2. When we're being destroyed.

MozReview-Commit-ID: GvO7csuxtwZ

--HG--
extra : rebase_source : 92cc9a64deddee07bbbc77e53117c15351816778
2017-11-24 15:14:04 +10:00
James Teh f81d8d0130 Bug 1418448 part 1: Accessible HandlerProvider: Clean up DynamicIA2Data correctly. r=aklotz
DynamicIA2Data contains several BSTRs that need to be freed with SysFreeString.
Previously, we just did a ZeroMemory without actually freeing them.
This cleanup code is placed in a header file so it can be used by AccessibleHandler as well.

MozReview-Commit-ID: 4SWuK9oMRYZ

--HG--
extra : rebase_source : e7358752e7eee1bae000e4005832bfc48c9342af
2017-11-24 15:12:37 +10:00
James Teh 242aa87f1a Bug 1419362 part 4: AccessibleHandler: When a caller asks for all text, cache hyperlinks and text attributes in the same call. r=MarcoZ
If a client requests all text (via IAccessibleText::text with IA2_TEXT_OFFSET_LENGTH), it's quite likely they will want all other information about the text as well; i.e. embedded objects and attributes.
Therefore, fetch all of this using a single cross-process call.
The text is immediately returned to the client.
The hyperlinks and attributes are cached for later return to the client when they call the appropriate methods.
They are only cached for one call; i.e. after the client retrieves them, the cache is dropped.
This makes memory management simpler and lowers the risk of cache invalidation problems.

MozReview-Commit-ID: FgFkX8J7wg1

--HG--
extra : rebase_source : e521d6ca7b00fcf1aad1f0ada299bac4c4b85c50
2017-11-22 21:32:28 +10:00
James Teh f5aa51e880 Bug 1419362 part 3: Accessible HandlerProvider: Implement a method to retrieve all text, hyperlinks and attributes at once. r=aklotz,MarcoZ
This allows the handler to fetch all text information in a single cross-process call when appropriate.
Normally, it would be a minimum of 3 calls, plus one call for each additional attribute run.

MozReview-Commit-ID: K5x9bAWiWWJ

--HG--
extra : rebase_source : fbf89ff79d7afcff6bcc32ff940f9e06c1e7f136
2017-11-22 16:08:11 +10:00
James Teh 29ed5a05ed Bug 1419362 part 2: Move AccessibleTextTearoff into AccessibleHandler. r=MarcoZ
We want to be able to cache data related to both IAccessibleText and IAccessibleHypertext2 in a single call.
This is difficult with the tearoff because separate instances of the tearoff get created for the two interfaces.
Ensuring we use the same instance means working around reference cycles.
We could maintain a separate cache object, but that makes things more complex.
Therefore, it's much simpler to get rid of the tearoff.

A few things to note:

1. ResolveAccHypertext has been renamed to ResolveIAHypertext for consistency with the rest of AccessibleHandler.
2. mAccHypertextProxy has been renamed to mIAHypertextPassThru for consistency with the rest of AccessibleHandler.
3. mIAHypertextPassThru is a weak reference (just like the rest of the passthru pointers) because it refers to a proxy interface and the proxy aggregates the handler.
  Thus, we release it immediately to avoid reference cycles.
  When it was a tearoff, this was not the case; it was a strong reference.

MozReview-Commit-ID: 8NwPA0T1MFX

--HG--
extra : rebase_source : 57c4d19516d01b820bb3b4c1a9974ff3b889ed64
2017-11-22 12:16:18 +10:00
James Teh f08015a587 Bug 1417327 part 3: Accessible handler: Fix cache for IAccessible::accDefaultAction and use it for IAccessibleAction::name(0). r=MarcoZ
1. Bug 1363595 added support for retrieving accDefaultAction from the cache, but the value was never cached in the first place.
This would have meant that accDefaultAction was returning nothing to clients.

2. Since accDefaultAction is the name of the first action, we can also use this cached value for IAccessibleAction::name for index 0.

MozReview-Commit-ID: 6PGRH45kKdB

--HG--
extra : rebase_source : 52688f1e44ad7613c5dd14903b6240a51aa2d4eb
2017-11-16 16:51:28 +10:00
James Teh 2d3278eb8f Bug 1417327 part 2: Accessible handler: Cache IAccessibleTableCell row/column indexes/extents. r=MarcoZ
MozReview-Commit-ID: 8hMzyJZ5zFI

--HG--
extra : rebase_source : dd66de5e37cc1abdbb5e0e7bb6d3bf67ad65edbb
2017-11-16 11:47:28 +10:00
James Teh c743f90376 Bug 1417327 part 1: Accessible handler: Cache IAccessibleAction::nActions. r=MarcoZ
MozReview-Commit-ID: EJIhSxSiQGq

--HG--
extra : rebase_source : 89b73bd626f93c17a467c5ad06b391bffa534ced
2017-11-15 17:27:05 +10:00
James Teh fb7c94c665 Bug 1416986 part 4: AccessibleHandler: Don't fall through to the proxy for IAccessibleHyperlink. r=aklotz
The handler's implementation of IAHyperlink just forwards calls through to the proxy.
However, it exists because we want the cache to be used when a hyperlink is retrieved.
When querying from the handler to IAHyperlink, we should use the same implementation.
This is mostly about consistency/correctness, especially as we're increasing complexity.

MozReview-Commit-ID: AwYibrFzUyf

--HG--
extra : rebase_source : 3d8f33639190a4220a21d0a6eeac401829d8345c
2017-11-15 12:32:52 +10:00
James Teh ff41c00a3e Bug 1416986 part 3: AccessibleHandler: Avoid cross-process QI calls for interfaces which we know don't exist. r=aklotz
The proxy manager caches interfaces marshaled in the payload and returns them on QI without a cross-process call.
However, it doesn't know about interfaces which don't exist.
We can determine this from the payload, since interfaces which don't exist will have a null pointer.
We use this information to avoid querying the proxy in this case.

MozReview-Commit-ID: FnzDetmTiPP

--HG--
extra : rebase_source : 076ce714a69d3883a149487e5f9235ff495eedd0
2017-11-15 12:28:45 +10:00
James Teh aebc388fb6 Bug 1416986 part 2: Include interfaces the client is likely to request in the accessible handler payload. r=aklotz
Now that virtual buffers have to render across processes, we want to eliminate as many cross-process calls as possible.
This includes QueryInterface calls, since buffers query for several interfaces on every node they visit.
To avoid these cross-process QI calls, we include interfaces clients are likely to request in the handler payload.
This way, they get marshaled in the single call used to retrieve the object.

This patch does the following:

1. Passes the interceptor when building the payload.
We need this so we can get interceptors for other interfaces.

2. Splits the payload into two main parts: a static part and a dynamic part.
The (new) static part contains the interface pointers. The dynamic part contains the rest.
This is necessary because the refresh call cannot pass the interceptor, but the interceptor is needed to build the static part.
Also, re-building the static part is pointless when refreshing.

3. Includes the interface pointers in the payload (BuildStaticIA2Data).
The pointers also have to be cleaned up after marshaling.

4. Releases the interface pointers in the handler after the payload is received.
We do this because they're aggregated by the proxy manager as they're unmarshaled.

MozReview-Commit-ID: 6VRLMNScgwW

--HG--
extra : rebase_source : 249589643b7a69e870962ea55a44849bf03a2693
2017-11-15 12:18:18 +10:00
Chris Peterson 0c6b205207 Bug 1415470 - a11y: Fix VS2017 initializer list order warnings. r=yzen
Reorder DocAccessibleParent's and DocAccessibleChild's constructor initializer lists to fix these VS2017 warnings:

a11y/DocAccessibleParent.h(32): warning C5038: data member 'mozilla::a11y::DocAccessibleParent::mShutdown' will be initialized after data member 'mozilla::a11y::DocAccessibleParent::mEmulatedWindowHandle'

accessible/ipc/win/DocAccessibleChild.cpp(22): warning C5038: data member 'mozilla::a11y::DocAccessibleChild::mEmulatedWindowHandle' will be initialized after data member 'mozilla::a11y::DocAccessibleChild::mIsRemoteConstructed'

MozReview-Commit-ID: 8flWtpe13ob

--HG--
extra : rebase_source : 96528a886c099897df691623948d755eecda119f
2017-11-06 23:54:53 -08:00
James Teh 67c58fedf0 Bug 1414118: Update handler's AccessibleTextTearoff for IAccessibleHypertext2. r=MarcoZ
Bug 873444 implemented support for IAccessibleHypertext2.
AccessibleHandler's AccessibleTextTearoff needs to be updated accordingly, thus eliminating an additional cross-process QueryInterface for IAHypertext2 when the client also wants IAText.

MozReview-Commit-ID: EGqYX7jY9Cp

--HG--
extra : rebase_source : cc79b605bf75538bebc10b104e5f6771bc52d2f4
2017-10-30 21:24:15 +10:00
Aaron Klotz 5c0d27a5e4 Bug 1410159: Add additional IUnknown resolution to a11y::HandlerProvider; r=Jamie
MozReview-Commit-ID: 4duTGCN9xJ6

--HG--
extra : rebase_source : f3338181ac309a6255596a751ddeb7a7d70a3d1e
2017-11-02 15:37:57 -06:00
James Teh f95226e22b Bug 1413072: Eliminate pointless cross-process QueryInterface for IAccessibleText in AccessibleHandler. r=MarcoZ
AccessibleHandler's AccessibleTextTearoff currently makes separate queries for the IAccessibleText and IAccessibleHypertext interfaces.
However, IAccessibleHypertext inherits from IAccessibleText, and wherever one of these interfaces are present, Gecko always implements both.
Therefore, we should just query for and use IAccessibleHypertext for all of these methods, thus saving a cross-process call should a client want both interfaces.

MozReview-Commit-ID: Fb5P7IGDAZZ

--HG--
extra : rebase_source : 08c9484989eaf8b810ef6f9ababf354eee8fa7f8
2017-10-31 12:11:39 +10:00
James Teh 627fc4f0b6 Bug 1409928: Use e10s a11y handler cache for accessibles retrieved via IAccessibleHypertext. r=aklotz
IAccessibleHypertext::hyperlink returns an IAccessibleHyperlink, not an IAccessible2.
previously, the handler didn't know about this interface, so it wasn't used.
Thus, any accessibles retrieved in this way did not benefit from the cache.
This patch teaches the handler about IAccessibleHyperlink so the handler gets used in this case.

MozReview-Commit-ID: 17CxxGyCLrE

--HG--
extra : rebase_source : 7f933bfd880c9ee009eafe8cee4ece4ef83004cd
2017-10-13 17:01:20 +10:00
James Teh d11dfce827 Bug 1409916: Eliminate pointless cross-process call for IAccessible2_2::get_attribute. r=aklotz
IAccessible2_2::get_attribute is not implemented yet in Gecko.
However, the handler still passes this through, thus resulting in a pointless cross-process call.
Instead, just return E_NOTIMPL in the handler for this method.

MozReview-Commit-ID: 5XHieUC4cuz

--HG--
extra : rebase_source : 814ceda6d9dd4ec26f05a4ff90bbd4af2a6eb84e
2017-10-19 09:22:44 +10:00
Aaron Klotz 5a394f86cf Bug 1411439: Pass reference to owning interceptor into HandlerProvider for payload creation; r=Jamie
MozReview-Commit-ID: GUW4DrsJEn

--HG--
extra : amend_source : 755ff37c8bc40de408f8668e9e44ebfd41bd9136
2017-10-24 17:48:51 -06:00
Aaron Klotz be5782c8e7 Bug 1412103: Use VARIANT for storing MSAA role in a11y handler cache; r=Jamie
MozReview-Commit-ID: 6dPxrckm8FM
2017-10-26 14:34:02 -06:00
Aaron Klotz b594b508ec Bug 1363595: Add support for COM handler invalidation events to msaa AccessibleWrap; r=eeejay
MozReview-Commit-ID: OIiUiILiEW

--HG--
extra : rebase_source : 457399a703b6daf0341fcdb3dd058cd21f5dfc8c
2017-03-27 15:45:44 -06:00
Aaron Klotz c7e3c01c5e Bug 1363595: Add additional fields to accessible handler cache; r=eeejay
MozReview-Commit-ID: GFNtt5MtPjx

--HG--
extra : rebase_source : 52bab1c8205266228e59d23a2db2a865884e6780
2017-08-08 15:12:46 -06:00
Aaron Klotz 7570c7a401 Bug 1409541 - Replace IID_IUnknown with expected interfaces for outparams in a11y content ArrayData. r=Jamie
MozReview-Commit-ID: 4t0h8zH2hsB
2017-10-17 15:03:40 -06:00
Aaron Klotz 743c2cb58b Bug 1406822: Implement a11y::HandlerProvider::GetEffectiveOutParamIid; r=Jamie
MozReview-Commit-ID: BKH3ooMQvN1

--HG--
extra : rebase_source : 50b666c3366e4f354b61ec2c3a37bf7f83c5f362
2017-10-17 15:01:27 -06:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Aaron Klotz aab52dc8f2 Bug 1383501 - Do not crash when TabParent::RecvPDocAccessibleConstructor receives a null COM proxy sent to the parent process. r=jimm
MozReview-Commit-ID: 5IOuLXc375T
2017-10-04 09:12:25 -06:00
Aaron Klotz aa44e53f36 Bug 1393600: Ensure that the handler sends a known interface to external clients; r=jimm
MozReview-Commit-ID: F5vxF2pB347
2017-09-24 14:32:36 -06:00
Alexander Surkov 848867821c Bug 1402951 - no show events for content on document load complete, r=aklotz, yzen 2017-10-03 10:58:27 -04:00
Aaron Klotz f88fa2ef6c Bug 1399557: Add Environment to mscom::ProxyStream and define it for IAccessible; r=jimm
MozReview-Commit-ID: 4wBjnFW9GRa

--HG--
extra : rebase_source : 43308d5c1d926300be222cb59d4913f61cc6c060
2017-09-29 15:41:28 -06:00
Aaron Klotz abc6376ae3 Bug 1403687: Prevent use of SendSyncTextChangeEvent when replaying text changes from DocAccessibleChild deferred event queue; r=Jamie
MozReview-Commit-ID: 6itBBycWb0h
2017-09-27 15:34:56 -04:00
Aaron Klotz c0a1a84af9 Bug 1399557: Add diagnostic asserts to interceptor creation code; r=jimm
MozReview-Commit-ID: 9fJxHbxCmgh
2017-09-18 10:49:15 -06:00
Chris Manchester c0a229d4c3 Bug 1386876 - Replace all uses of DISABLE_STL_WRAPPING with a template, remove DISABLE_STL_WRAPPING. r=glandium
MozReview-Commit-ID: FMEtb5PY7iP

--HG--
extra : rebase_source : 3cdee7528846462c758e623d6bcd2e6e17dbabff
2017-09-11 11:33:26 -07:00
Aaron Klotz 5921c2115b Bug 1393589: Refactor NOPING marshaling into its own class, mscom::FastMarshaler, and use it with IGeckoBackChannel; r=jimm
MozReview-Commit-ID: 9osDoYcvtWV

--HG--
extra : rebase_source : 9ead42f1b0c79f11b15121274a996d33d7ad4830
2017-08-17 15:54:28 -06:00
Aaron Klotz d7d645f5c4 Bug 1390652: Part 3 - Add proxy wrapper that passes its inner proxy through content as a blob; r=jimm
MozReview-Commit-ID: A4pAyiuJUlz
2017-08-21 15:47:44 -06:00
Aaron Klotz 7319740647 Bug 1390652: Part 1 - Send parent COM proxies to content as IDispatch instead of IAccessible to match the outparam type of IAccessible::get_accParent; r=yzen
MozReview-Commit-ID: 1CplfZrIt6l
2017-08-16 10:56:00 -06:00
Aaron Klotz 24cb1e1776 Bug 1379643: When running under sandbox level >= 3, parent should retain IStream of marshaled interface to be destroyed later; r=jimm
MozReview-Commit-ID: Egb6Yahdbxm

--HG--
extra : rebase_source : a59cfdfdbd1203b89822e68765bd5a0f35b67ada
2017-07-19 12:07:45 -06:00
Aaron Klotz 5e6827da6d Bug 1380214: Ensure that if the handler payload fails to serialize that we may still marshal the accessible itself; r=eeejay
MozReview-Commit-ID: VH06GAR7Ph
2017-07-17 17:19:58 -06:00
Aaron Klotz 22d6b8c708 Bug 1380471: Move follow-up initialization for emulated windows into a callback invoked by the emulated window's WM_CREATE handler; r=yzen
--HG--
extra : rebase_source : d8742fc08cea75e994c9ee4f7c5eca50d40aeac1
2017-07-12 18:01:43 -06:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Aaron Klotz 6ac7e2f671 Bug 1378141: Make 32-bit a11y builds make more thorough checks to determine which manifest to load; r=eeejay
MozReview-Commit-ID: 6Hx7ggqt9Ck

--HG--
extra : histedit_source : 28db28e939c947361988cb8e3c8d7932787cf47e
2017-07-04 16:04:35 -07:00
Aaron Klotz 44e203215a Bug 1374792: Modify a11y handler to only invoke IGeckoBackChannel::put_HandlerControl once; r=eeejay
MozReview-Commit-ID: Bxo0IsAuhBh
2017-06-30 12:04:02 -07:00
Aaron Klotz a129f378f7 Bug 1377195: Remove redundant main thread activation context from a11y::PlatformChild; r=eeejay
--HG--
extra : rebase_source : f8ff2ab8ca7eaf7c0dea9b082af7180f1a6d9208
2017-06-29 10:47:15 -07:00
Aaron Klotz 091386062e Bug 1354077: Modify a11y platform initialization to select and enable appropriate IAccessible manifest; r=eeejay
MozReview-Commit-ID: 1ODOm4Vc4UH
2017-06-06 12:19:17 -06:00
Aaron Klotz 9db0de2b03 Bug 1354077: Add manifests for IAccessible variants: 32-bit and 64-bit; r=jimm
MozReview-Commit-ID: CoHASAsg5tf
2017-06-06 12:19:12 -06:00
Aaron Klotz d5cffb7895 Bug 1375590: Replace NS_ERROR + IPC_FAIL_NO_REASON with IPC_FAIL in DocAccessibleParent; r=eeejay
--HG--
extra : rebase_source : 3859abca294230d6bc7061ee8b807191790f822b
2017-06-27 11:52:55 -07:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Eitan Isaacson 71c52fe020 Bug 1375348 - Include last role as a good role to recieve from child. r=davidb 2017-06-23 08:55:38 -07:00