Commit Graph

6214 Commits

Author SHA1 Message Date
Wes Kocher
c8a2033f35 Merge m-c to inbound, a=merge 2017-04-13 17:33:39 -07:00
Wes Kocher
514e230373 Merge inbound to central, a=merge 2017-04-13 17:24:01 -07:00
Eugen Sawin
0b1bae9e19 Bug 1355542 - [2.0] Remove unused web progress callbacks and add missing progress filters. r=felipe 2017-04-13 23:20:17 +02:00
Aaron Klotz
ea028675c9 Bug 1354333: Use call_as to produce a non-null vtable entry for ISimpleDOMNode::get_localInterface; r=tbsaunde
MozReview-Commit-ID: vglI4a6vNJ

--HG--
extra : rebase_source : 70dc83b0670319b1fc021c94c1c2ddec44819abd
2017-04-06 15:56:42 -06:00
Ryan VanderMeulen
cae23d0f9a Bug 1354293 - Don't try to build a11y IPC code that depends on accessibility being enabled. r=aklotz 2017-04-06 18:51:02 -04:00
Brian Birtles
33041d1214 Bug 1315874 - Drop 'ForElement' from GetStyleContextForElementXXX methods; r=heycam
In the next patch we want to add a method called
GetUnanimatedStyleContextForElementNoFlush but that's much too long. Instead it
seems better to just drop 'ForElement' from all these methods since it should be
fairly obvious we are getting the style context for an element given that the
first argument is an element.

MozReview-Commit-ID: JQKaEuCKV2F

--HG--
extra : rebase_source : 3ba51f3b00d1ec7bc91102629d9c0abb88992fef
2017-04-05 14:39:23 +09:00
Aaron Klotz
0a1611cdcd Bug 1303060: Build system changes for implementation of the caching COM handler for a11y; r=mshal
MozReview-Commit-ID: KBe1bw6xnhD

--HG--
extra : rebase_source : ea5f60be13f5ff6c0d295b4704646ceb44eb5794
2017-03-27 19:13:40 -06:00
Aaron Klotz
54c8ab6c9e Bug 1303060: Implementation of the caching COM handler for a11y; r=tbsaunde
MozReview-Commit-ID: HkiIgDQURtK

The a11y COM handler consists of two classes. AccessibleHandler is the one that
is actually interposed by COM between the client and the proxy. It implements
IAccessible2_3, IServiceProvider, and IProvideClassInfo. It is derived from
mscom::Handler which takes care of most of the COM boilerplate for handler
instantiation. AccessibleHandler must override a few virtual functions from
mscom::Handler:

* QueryHandlerInterface - mscom::Handler must implement the "real" QI. This is
  the method that mscom::Handler uses to delegate to the implementer.
* ReadHandlerPayload - deserializing the payload. This uses
  mscom::StructFromStream and the IA2Data_Decode function that was generated by
  midl. It should essentially be the inverse of the serialization code in the
  IHandlerProvider implementation inside Gecko.
* MarshalAs - identical to IHandlerProvider::MarshalAs
* GetHandlerPayloadSize and WriteHandlerPayload - it sucks that we have to
  include these, but they are neccessary for the scenario when COM wants to
  make a proxy of a proxy. When that happens, we need to get COM to serialize
  the payload again; it isn't smart enough to recognize payloads in existing
  proxies and copy them itself.

In order to reduce round trips, AccessibleHandler implements the most
sophisticated IA2 interface. This way the client has access to any of those
interfaces from IDispatch all the way down to IAccessible2_3 without needing to
incur additional round-trips to obtain them.

We also implement IServiceProvider so that a client may QueryService for an IA2
interface without needing to incur more round trips. In addition, we maintain
a list of service IDs that we definitely do not support, and handle those
locally instead of incurring an IPC round-trip.

We also implement IProvideClassInfo because NVDA's python code (and presumably
other ATs that use interpreted languages) supports using that interface to
assist its FFI library with resolution of our COM objects.

COM wraps each instance of an IAccessible* proxy with an AccessibleHandler
object. Proxies whose interfaces are not part of the IDispatch ... IAccessible2_3
hierarchy are not wrapped with handlers (though this might change in the future
if we need to expand coverage). AccessibleHandler implements IAccessible2_3 such
that, if we have cached data available for a particular IA2 method, we provide
that cached data to the client. Otherwise we pass on the request to the COM
proxy for retrieval via IPC.

The other class in the handler dll is AccessibleHandlerControl. This class
implements the IHandlerControl interface that is provided to IGeckoBackChannel.
Gecko dispatches cache invalidation events using this interface. This class
is a singleton within the handler dll and manages shared, handler-wide resources.

--HG--
extra : rebase_source : 4fc3910f789b0ed92c90655344ffb89f576ca5bd
2017-03-27 19:13:34 -06:00
Aaron Klotz
d8b6197f8b Bug 1303060: Build system changes for a11y to enable the serving of a COM handler; r=mshal
MozReview-Commit-ID: 51r9ezFwDGE

--HG--
extra : rebase_source : cdc96a1c5f2c021c407d7c634036dd8cae7c04c6
2017-03-27 19:13:07 -06:00
Aaron Klotz
b836337e81 Bug 1303060: Changes to a11y to enable the serving of a COM handler; r=tbsaunde
MozReview-Commit-ID: GTQF3x1pBtX

A general outline of the COM handler (a.k.a. the "smart proxy"):

COM handlers are pieces of code that are loaded by the COM runtime along with
a proxy and are layered above that proxy. This enables the COM handler to
interpose itself between the caller and the proxy, thus providing the
opportunity for the handler to manipulate an interface's method calls before
those calls reach the proxy.

Handlers are regular COM components that live in DLLs and are declared in the
Windows registry. In order to allow for the specifying of a handler (and an
optional payload to be sent with the proxy), the mscom library allows its
clients to specify an implementation of the IHandlerProvider interface.

IHandlerProvider consists of 5 functions:

* GetHandler returns the CLSID of the component that should be loaded into
  the COM client's process. If GetHandler returns a failure code, then no
  handler is loaded.
* GetHandlerPayloadSize and WriteHandlerPayload are for obtaining the payload
  data. These calls are made on a background thread but need to do their work
  on the main thread. We declare the payload struct in IDL. MIDL generates two
  functions, IA2Payload_Encode and IA2Payload_Decode, which are used by
  mscom::StructToStream to read and write that struct to and from buffers.
* The a11y payload struct also includes an interface, IGeckoBackChannel, that
  allows the handler to communicate directly with Gecko. IGeckoBackChannel
  currently provides two methods: one to allow the handler to request fresh
  cache information, and the other to provide Gecko with its IHandlerControl
  interface.
* MarshalAs accepts an IID that specifies the interface that is about to be
  proxied. We may want to send a more sophisticated proxy than the one that
  is requested. The desired IID is returned by this function. In the case of
  a11y interfaces, we should always return IAccessible2_3 if we are asked for
  one of its parent interfaces. This allows us to eliminate round trips to
  resolve more sophisticated interfaces later on.
* NewInstance, which is needed to ensure that all descendent proxies are also
  imbued with the same handler code.

The main focus of this patch is as follows:

1. Provide an implementation of the IHandlerProvider interface;
2. Populate the handler payload (ie, the cache) with data;
3. Modify CreateHolderFromAccessible to specify the HandlerPayload object;
4. Receive the IHandlerControl interface from the handler DLL and move it
   into the chrome process.

Some more information about IHandlerControl:

There is one IHandlerControl per handler DLL instance. It is the interface that
we call in Gecko when we need to dispatch an event to the handler. In order to
ensure that events are dispatched in the correct order, we need to dispatch
those events from the chrome main thread so that they occur in sequential order
with calls to NotifyWinEvent.

--HG--
extra : rebase_source : acb44dead7cc5488424720e1bf58862b7b30374f
2017-04-04 15:23:55 -06:00
Dan Banner
cdf987089d Bug 1107904 - Remove packed.js and references to it as it is unused. r=standard8
MozReview-Commit-ID: K5TLF92pHq4

--HG--
extra : rebase_source : 295bf325a07fa8ec4c55a8babf5418588308dca6
2017-04-12 11:10:00 +01:00
Paul Bignier
ff2e59d1cd Bug 1352802 - Typo fixes around 'accessible'. r=MattN
MozReview-Commit-ID: 27CyNOMXkRq

--HG--
extra : rebase_source : 30e8891fa40cb497ab695e72b179c850a3a5c8d9
2017-04-03 09:47:00 -07:00
Alexander Surkov
c528975ed0 Bug 1349160 - Dismissing Print dialogue crashes Firefox, r=yzen 2017-04-03 15:21:05 -04:00
Alexander Surkov
696f8370cf Bug 1351414 - shutdown a moving accessible if it has no insertion point, r=yzen 2017-03-30 15:56:22 -04:00
Trevor Saunders
772b2cc2a5 bug 1351475 - allow the windows ProxyDestroyed() function to called with a proxy with no wrapper.
unfortunately because creating a DocAccessibleParent is not atomic one can be
created by AllocPDocAccessible(), but then RecvPDocAccessibleConstructor() can
fail.  If that happens we will call actor destroyed on the new
DocAccessibleParent, however because the constructor messaged failed it will
not have a wrapper.  That means this assert does not necessarily hold.
2017-03-29 15:32:28 -04:00
Alexander Surkov
19acce02d8 Bug 1347075 - validate insertion index for a child move, r=yzen 2017-03-29 12:08:10 -04:00
David Parks
55dc6b7f68 Bug 1332690 - Assign Managers to DocAccessibleChilds. r=tbsaunde
The Manager is set by IPDL for remotely constructed objects but our DocAccessibleChilds are created on the child process side, so we need to assign a manager in the constructor so that we can find it when needed.

--HG--
extra : rebase_source : 8bf76534860ed73fbdc71df494130f6028400fa3
2017-03-27 10:03:43 -07:00
Alexander Surkov
1309e3f824 Bug 1330484 - crash in NotificationController::WillRefresh, r=yzen 2017-03-23 13:59:16 -04:00
Alexander Surkov
7d7b3c1dbe Bug 1346518 - extend Accessible::RemoveChild debugging assertions, part2, r=yzen 2017-03-22 18:31:18 -04:00
Jeff Muizelaar
49eb5ba0b6 Bug 1285533. Remove non-fontconfig platform fontlist codepath. r=lsalzman
This has been disabled for two years. It's time for it to die.
2017-03-22 14:58:19 -04:00
Mark Banner
bd625e4e9f Bug 1347712 - Change the testing configurations into ESLint configurations within eslint-plugin-mozilla - automatically update .eslintrc.js test config files for new config locations. r=jaws
MozReview-Commit-ID: LH0CQOPfoe6

--HG--
extra : rebase_source : 83eaf40c5cbb5e25cfb3f3b5afadf4fbf0422c92
2017-03-20 12:36:37 +01:00
Alexander Surkov
f276097163 Bug 1346518 - extend Accessible::RemoveChild debugging assertions, r=yzen 2017-03-21 10:13:32 -04:00
Alexander Surkov
c9ee99780d Bug 1347667 - unlink accessible's parent before accessible's shutdown when document shutdowns, r=yzen 2017-03-20 09:42:39 -04:00
Trevor Saunders
f0cd2a2c68 bug 1346439 - fixup linked list manipulation in CoalesceMutationEvents() r=davidb
Its possible to coalesce away events such that the first two events in the
  queue are reorder events where the second reorder can be coalesced with the
  first.  In that case there's no point in shuffling the list before removing
  the second reorder event.
2017-03-17 14:03:44 -04:00
Alexander Surkov
a7177b01b4 Bug 1342433 - onclick changes shouldn't recreate the tree, r=yzen 2017-03-15 15:19:26 -04:00
Sebastian Hengst
05e20910fa Backed out changeset 7c05090a2cd0 (bug 1342433) for failing browser_treeupdate_listener.js. r=backout 2017-03-15 19:11:12 +01:00
Alexander Surkov
34a4cbb7ac Bug 1342433 - don't recreate a tree on onclick changes, r=yzen 2017-03-14 14:29:08 -04:00
Aaron Klotz
0413a301e8 Bug 1346967: Generate metadata for all three ISimpleDOM interfaces via a single combined run of MIDL; r=tbsaunde
MozReview-Commit-ID: DGgXSbISujv

--HG--
extra : rebase_source : 32f6a76d3ba24b74d85470ce82c0c2b50ac79b8c
2017-03-13 16:39:28 -06:00
Boris Zbarsky
5ae7da9d14 Bug 1343037 part 6. Simplify the setup around the editor state's GetSelectionRange function. r=ehsan
Really, there are only two cases we need to worry about.  Either
IsSelectionCached(), and then our SelectionProperties has the data we want, or
not and then we have a non-null mSelCon which has the data we want.

Since we are now using cached selection state a lot more (instead of
initializing the editor whenever someone asks for selection state), we need to
actually update it more correctly when .value is set.

And since we now update the cached selection state for the case when .value has
been set (to point to the end of the text), we need to change
HTMLInputElement::HasCachedSelection to return false for that case.  Otherwise
we will always do eager editor init on value set.  We handle that by not doing
eager init if the cached selection is collapsed.

The web platform test changes test the "update on .value set" behavior.  They
fail without this patch, pass with it.

MozReview-Commit-ID: DDU8U4MGb23
2017-03-09 14:44:04 -05:00
Wes Kocher
f7f40f39ec Backed out 19 changesets (bug 1343037) for OSX failures in test_form_autocomplete.html a=backout CLOSED TREE
Backed out changeset 45f9d9f47222 (bug 1343037)
Backed out changeset 77c26865ce8e (bug 1343037)
Backed out changeset 4c4ec6e6b168 (bug 1343037)
Backed out changeset 1d0da4f3c82b (bug 1343037)
Backed out changeset 67d29abbbd53 (bug 1343037)
Backed out changeset a6833ad9712f (bug 1343037)
Backed out changeset 202a7b464808 (bug 1343037)
Backed out changeset 271e63cd7bfa (bug 1343037)
Backed out changeset 77c3b36269a4 (bug 1343037)
Backed out changeset 73198c9c3975 (bug 1343037)
Backed out changeset 5fc2e304113b (bug 1343037)
Backed out changeset b7de9c9c1c31 (bug 1343037)
Backed out changeset 08b01e3c03f8 (bug 1343037)
Backed out changeset de068e5a963b (bug 1343037)
Backed out changeset 23164576aaf5 (bug 1343037)
Backed out changeset 1034463cb379 (bug 1343037)
Backed out changeset 7fb2aacfc644 (bug 1343037)
Backed out changeset 6dcb7090fd33 (bug 1343037)
Backed out changeset cad4522cee16 (bug 1343037)

MozReview-Commit-ID: I37k9bJBwsw
2017-03-09 15:29:05 -08:00
Alexander Surkov
bc2c7e65ad Bug 1321384 - add debuggin assert for Accessible::RemoveChild, r=yzen 2017-03-09 14:55:54 -05:00
Boris Zbarsky
77e7a5575a Bug 1343037 part 6. Simplify the setup around the editor state's GetSelectionRange function. r=ehsan
Really, there are only two cases we need to worry about.  Either
IsSelectionCached(), and then our SelectionProperties has the data we want, or
not and then we have a non-null mSelCon which has the data we want.

Since we are now using cached selection state a lot more (instead of
initializing the editor whenever someone asks for selection state), we need to
actually update it more correctly when .value is set.

And since we now update the cached selection state for the case when .value has
been set (to point to the end of the text), we need to change
HTMLInputElement::HasCachedSelection to return false for that case.  Otherwise
we will always do eager editor init on value set.  We handle that by not doing
eager init if the cached selection is collapsed.

The web platform test changes test the "update on .value set" behavior.  They
fail without this patch, pass with it.

MozReview-Commit-ID: DDU8U4MGb23
2017-03-09 14:44:04 -05:00
Andreas Farre
85536fcfc4 Bug 1337392 - Update test cases to match new cursor behavior. r=smaug
MozReview-Commit-ID: 4BdZyeqTBAx
2017-03-08 16:41:42 +01:00
Florian Quèze
9d62681259 Bug 1345253 - Use element.firstChild.remove() instead of element.removeChild(element.firstChild), r=jaws. 2017-03-08 10:17:52 +01:00
Michael Layzell
6cb8b40272 Bug 1331434 - Part 4: Return early after throwing in AccessibleNode::Get, r=surkov
MozReview-Commit-ID: GmzIhdwVjPj
2017-03-07 19:06:48 -05:00
Jim Chen
1294cccf48 Bug 1337467 - Convert observers to bundle events; r=rbarker r=sebastian
Bug 1337467 - 1. Convert "Window:Resize" observer to event; r=rbarker

Bug 1337467 - 2. Convert "ScrollTo:FocusedInput" observer to event; r=rbarker

Bug 1337467 - 3. Convert "Update:CheckResult" observer to event; r=sebastian

Also remove notifyCheckUpdateResult from GeckoInterface.

Bug 1337467 - 4. Convert "GeckoView:ImportScript" observer to event; r=sebastian

Bug 1337467 - 5. Convert accessibility observers to events; r=sebastian

Bug 1337467 - 6. Convert media/casting observers to events; r=sebastian

Bug 1337467 - 7. Convert "Sanitize:ClearData" observer to event; r=sebastian

Bug 1337467 - 8. Convert "Notification:Event" observer to event; r=sebastian

Bug 1337467 - 9. Convert BrowserApp observers to events; r=sebastian

Bug 1337467 - 10. Convert Tab observers to events; r=sebastian

Bug 1337467 - 11. Convert "Passwords:Init" and "FormHistory:Init" observers to events; r=sebastian

Bug 1337467 - 12. Convert Reader observers to events; r=sebastian

Bug 1337467 - 13. Convert Distribution observers to events; r=sebastian

Bug 1337467 - 14. Convert "Fonts:Reload" observer to event; r=sebastian

Bug 1337467 - 15. Convert RecentTabsAdapter observers to events; r=sebastian

Bug 1337467 - 16. Convert "Session:Prefetch" observer to event; r=sebastian

Bug 1337467 - 17. Convert "Browser:Quit" and "FullScreen:Exit" observers to events; r=sebastian

Bug 1337467 - 18. Convert SessionStore observers to events; r=sebastian

The "Session:NotifyLocationChange" observer is sent by browser.js and
requires passing a browser reference, so it's left as an observer.

Bug 1337467 - 19. Remove unused "Tab:Screenshot:Cancel" notifyObserver call; r=me

Bug 1337467 - 20. Convert "Session:Navigate" observer to event; r=sebastian

Bug 1337467 - 21. Convert "Locale:*" observers to events; r=sebastian

Bug 1337467 - Add log for unhandled events; r=me

Add back the log indicating no listener for an event, which can be
useful when reading logcat. r=me for trivial change.

Bug 1337467 - Don't return error from EventDispatcher when OnEvent fails; r=me

When a listener's OnEvent method returns an error, continue to dispatch
to other listeners and don't return an error from the dispatch function.
This avoids unexpected errors when dispatching events. r=me for trivial
patch.
2017-03-07 12:34:04 -05:00
Florian Quèze
37bbced84d Bug 1344711 - hand cleanup of remaining useless try blocks around get*Pref calls identified by eslint, r=jaws.
--HG--
extra : rebase_source : 18c027010838faba91f0ac699f9bde07f85500e7
2017-03-07 15:29:48 +01:00
David Major
ed0b8f8653 Bug 1344615: Remove nsXPCOMStrings.{h,cpp} r=bsmedberg
These are now dead code.

MozReview-Commit-ID: AClU0Qx3kmN

--HG--
extra : rebase_source : df83cf89292da1519bb26027c11e14923d5c54a0
2017-03-06 17:52:54 +13:00
Trevor Saunders
502b0f327c bug 1332690 - don't try and bind child docs to a shutdown DocAccessibleParent r=yzen
a BindChildDoc message can race with the parent process shutting down a tab.
The result of that is that RecvBindChildDoc() can be called on a
DocAccessibleParent that has already been shut down by the destruction of the
owning TabParent.
2017-03-05 23:12:13 -05:00
Trevor Saunders
26401c70e6 bug 1340579 - fixup werror bustage landing on a CLOSED TREE 2017-03-01 17:45:04 -05:00
Trevor Saunders
e8562200c5 bug 1340579 - look up this DocAccessibleParent in live docs instead of using this in DocAccessibleParent::Destroy() r=davidb 2017-03-01 17:23:48 -05:00
Mats Palmgren
6ef6efaea3 Bug 1340771 part 2 - Introduce a WeakFrame class for heap allocated weak frame pointers, stored in a hashtable for fast lookup. r=tn
* * *
Bug 1340771 part 3 - Change existing heap allocated AutoWeakFrame instances to use WeakFrame instead.  r=tn

MozReview-Commit-ID: GSuUiy98jBa
2017-03-01 18:03:14 +01:00
Mats Palmgren
d13aaf9ce0 Bug 1340771 part 1 - Rename nsWeakFrame to AutoWeakFrame (automated change). r=tn
MozReview-Commit-ID: 8pl4nyeGEkr
2017-03-01 18:03:14 +01:00
Yura Zenevich
bc54871520 Bug 1339779 - bail early if ipcDoc is not yet created. r=tbsaunde
MozReview-Commit-ID: 1Wm6n7zba35
2017-02-25 17:18:30 -05:00
Phil Ringnalda
75522649b2 Backed out changeset eb97347c9690 (bug 1340579) for a11y assertion failures and PLDHashTable crashes
CLOSED TREE
2017-02-24 20:56:38 -08:00
Trevor Saunders
617ef9aa4c bug 1340579 - look up this DocAccessibleParent in live docs instead of using this in DocAccessibleParent::Destroy() r=eeejay 2017-02-24 16:55:06 -05:00
Aaron Klotz
9e3522ce1d Bug 1310166: Register ISimpleDOMNode typelib in content process; r=tbsaunde
MozReview-Commit-ID: 2JcIHJbHDgT
2017-02-23 11:32:06 -07:00
Trevor Saunders
b7a422448c Bug 1341731 - fixup werror bustage. r=bustage-fix on a CLOSED TREE 2017-02-24 17:02:12 +01:00
Trevor Saunders
7e05a50676 bug 1341731 - propagate failures before working around them r=yzen 2017-02-24 10:26:27 -05:00
Alexander Surkov
8e74a46ec6 Bug 1321384 - add diagnostics to Accessible::Move, r=eeejay 2017-02-22 13:45:21 -05:00