[Mwinapi-commits] SF.net SVN: mwinapi:[125] trunk/ManagedWinapi/Accessibility/ SystemAccessibleObje
Status: Beta
Brought to you by:
schierlm
|
From: <zi...@us...> - 2014-11-26 12:04:12
|
Revision: 125
http://sourceforge.net/p/mwinapi/code/125
Author: ziewer
Date: 2014-11-26 12:04:08 +0000 (Wed, 26 Nov 2014)
Log Message:
-----------
Avoid failure of accessibility API of Internet Explorer after requesting parent object
Modified Paths:
--------------
trunk/ManagedWinapi/Accessibility/SystemAccessibleObject.cs
Modified: trunk/ManagedWinapi/Accessibility/SystemAccessibleObject.cs
===================================================================
--- trunk/ManagedWinapi/Accessibility/SystemAccessibleObject.cs 2014-11-26 10:31:31 UTC (rev 124)
+++ trunk/ManagedWinapi/Accessibility/SystemAccessibleObject.cs 2014-11-26 12:04:08 UTC (rev 125)
@@ -358,6 +358,31 @@
{
get
{
+ try
+ {
+ // Internet Explorer recognition sometimes is stuck (permanently returning RPC_E_SERVERFAULT)
+ // after requesting SAO that corresponds to a frame of an HTML frameset.
+ // Such a frame is a RoleSystemClient with Name=<URI> and Description="MSAAHTML Registered Handler".
+ // The child is a RoleSystemPane with Value=<URI>.
+ // Hence stop requesting for parent when RoleSystemPane with URI value is found
+ //
+ // see also:
+ // About IE crashes after querying "MSAAHTML Registered Handler":
+ // http://community.nvda-project.org/changeset/96cd890c7878fd4f8805409dd83f3dde5c996b4f
+ // Some hint to ignore "MSAAHTML Registered Handler" in accessible ancestry:
+ // http://community.nvda-project.org/changeset/88c491d954743a6a02f14b1f144e234587f68430
+ // similar special case handling and ignoring of "MSAAHTML Registered Handler":
+ // http://www.projky.com/dotnet/4.5.1/MS/Internal/AutomationProxies/Accessible.cs.html
+
+ Uri uri = null;
+ if (RoleIndex == (int)AccRoles.ROLE_SYSTEM_PANE && Uri.TryCreate(Value, UriKind.Absolute, out uri)
+ && string.Equals(Window.Process.ProcessName, "iexplore", StringComparison.OrdinalIgnoreCase))
+ {
+ // do not call parent
+ return null;
+ }
+ }
+ catch { }
if (childID != 0) return new SystemAccessibleObject(iacc, 0);
IAccessible p = (IAccessible)iacc.accParent;
if (p == null) return null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|