Commit 7d1df404 authored by Phil Ringnalda's avatar Phil Ringnalda
Browse files

Merge m-c to b-i

CLOSED TREE
parents 73cbd428 f4b6f2a2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,4 +18,4 @@
# Modifying this file will now automatically clobber the buildbot machines \o/
#

Bug 922160 needs a clobber due to WebIDL binding dependency issues (bug 928195).
Bug 914270 needs a clobber since moving variables to moz.build always requires a clobber (bug 852814)
+16 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ interface nsIAccessible;
/**
 * This interface gives access to an accessible's set of relations.
 */
[scriptable, uuid(9f85fc0d-2969-48e6-b822-68140f7e5770)]
[scriptable, uuid(55b308c4-2ae4-46bc-b4cd-4d4370e0a660)]
interface nsIAccessibleRelation : nsISupports
{
  /**
@@ -109,6 +109,21 @@ interface nsIAccessibleRelation : nsISupports
   */
  const unsigned long RELATION_DEFAULT_BUTTON = 0x10;

  /**
   * The target object is the containing document object.
   */
  const unsigned long RELATION_CONTAINING_DOCUMENT = 0x11;

  /**
   * The target object is the topmost containing document object in the tab pane.
   */
  const unsigned long RELATION_CONTAINING_TAB_PANE = 0x12;

  /**
   * The target object is the containing application object.
   */
  const unsigned long RELATION_CONTAINING_APPLICATION = 0x14;

  /**
   * Returns the type of the relation.
   */
+21 −1
Original line number Diff line number Diff line
@@ -109,7 +109,27 @@ MOZ_BEGIN_ENUM_CLASS(RelationType)
   */
  DEFAULT_BUTTON = 0x10,

  LAST = DEFAULT_BUTTON
  /**
   * The target object is the containing document object.
   */
  CONTAINING_DOCUMENT = 0x11,

  /**
   * The target object is the topmost containing document object in the tab pane.
   */
  CONTAINING_TAB_PANE = 0x12,

  /**
   * The target object is the containing window object.
   */
  CONTAINING_WINDOW = 0x13,

  /**
   * The target object is the containing application object.
   */
  CONTAINING_APPLICATION = 0x14,

  LAST = CONTAINING_APPLICATION

MOZ_END_ENUM_CLASS(RelationType)

+18 −0
Original line number Diff line number Diff line
@@ -110,3 +110,21 @@ RELATIONTYPE(DEFAULT_BUTTON,
             ATK_RELATION_NULL,
             NAVRELATION_DEFAULT_BUTTON,
             IA2_RELATION_NULL)

RELATIONTYPE(CONTAINING_DOCUMENT,
             "containing document",
             ATK_RELATION_NULL,
             NAVRELATION_CONTAINING_DOCUMENT,
             IA2_RELATION_CONTAINING_DOCUMENT)

RELATIONTYPE(CONTAINING_TAB_PANE,
             "containing tab pane",
             ATK_RELATION_NULL,
             NAVRELATION_CONTAINING_TAB_PANE,
             IA2_RELATION_CONTAINING_TAB_PANE)

RELATIONTYPE(CONTAINING_APPLICATION,
             "containing application",
             ATK_RELATION_NULL,
             NAVRELATION_CONTAINING_APPLICATION,
             IA2_RELATION_CONTAINING_APPLICATION)
+33 −1
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@
#include "nsAccUtils.h"
#include "nsAccessibleRelation.h"
#include "nsAccessibilityService.h"
#include "ApplicationAccessible.h"
#include "nsCoreUtils.h"
#include "nsIAccessibleRelation.h"
#include "nsIAccessibleRole.h"
#include "nsEventShell.h"
@@ -2180,6 +2182,33 @@ Accessible::RelationByType(RelationType aType)
      return Relation();
    }

    case RelationType::CONTAINING_DOCUMENT:
      return Relation(mDoc);

    case RelationType::CONTAINING_TAB_PANE: {
      nsCOMPtr<nsIDocShell> docShell =
        nsCoreUtils::GetDocShellFor(GetNode());
      if (docShell) {
        // Walk up the parent chain without crossing the boundary at which item
        // types change, preventing us from walking up out of tab content.
        nsCOMPtr<nsIDocShellTreeItem> root;
        docShell->GetSameTypeRootTreeItem(getter_AddRefs(root));
        if (root) {
          // If the item type is typeContent, we assume we are in browser tab
          // content. Note, this includes content such as about:addons,
          // for consistency.
          int32_t itemType = 0;
          root->GetItemType(&itemType);
          if (itemType == nsIDocShellTreeItem::typeContent)
            return Relation(nsAccUtils::GetDocAccessibleFor(root));
        }
      }
      return  Relation();
    }

    case RelationType::CONTAINING_APPLICATION:
      return Relation(ApplicationAcc());

    default:
      return Relation();
  }
@@ -2214,7 +2243,10 @@ Accessible::GetRelations(nsIArray **aRelations)
    nsIAccessibleRelation::RELATION_EMBEDDED_BY,
    nsIAccessibleRelation::RELATION_POPUP_FOR,
    nsIAccessibleRelation::RELATION_PARENT_WINDOW_OF,
    nsIAccessibleRelation::RELATION_DEFAULT_BUTTON
    nsIAccessibleRelation::RELATION_DEFAULT_BUTTON,
    nsIAccessibleRelation::RELATION_CONTAINING_DOCUMENT,
    nsIAccessibleRelation::RELATION_CONTAINING_TAB_PANE,
    nsIAccessibleRelation::RELATION_CONTAINING_APPLICATION
  };

  for (uint32_t idx = 0; idx < ArrayLength(relationTypes); idx++) {
Loading