bug 1262233 - add ProxyAccessible::IsEmbeddedObject() r=lsocks
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Mon, 04 Apr 2016 15:39:33 -0400
changeset 317707 6987bce671f5b70b99b2b7a7e0aee89e02faad11
parent 317706 dc6cc76f3c7e096d15b84bd7736c59723984dfec
child 317708 0efc1ab6080b7aa38f90050bc050790236e5c752
push id9480
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 17:12:58 +0000
treeherdermozilla-aurora@0d6a91c76a9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsocks
bugs1262233
milestone48.0a1
bug 1262233 - add ProxyAccessible::IsEmbeddedObject() r=lsocks
accessible/ipc/ProxyAccessible.h
--- a/accessible/ipc/ProxyAccessible.h
+++ b/accessible/ipc/ProxyAccessible.h
@@ -86,16 +86,27 @@ public:
 
   Accessible* OuterDocOfRemoteBrowser() const;
 
   /**
    * Get the role of the accessible we're proxying.
    */
   role Role() const { return mRole; }
 
+  /**
+   * Return true if this is an embedded object.
+   */
+  bool IsEmbeddedObject() const
+  {
+    role role = Role();
+    return role != roles::TEXT_LEAF &&
+           role != roles::WHITESPACE &&
+           role != roles::STATICTEXT;
+  }
+
   /*
    * Return the states for the proxied accessible.
    */
   uint64_t State() const;
 
   /*
    * Return the native states for the proxied accessible.
    */