Backout 5d59a9ec28f4 for Linux PGO compile errors
authorNick Thomas <nthomas@mozilla.com>
Thu, 20 Dec 2012 23:26:32 +1300
changeset 116612 40adf72fd612c2e7bc939403c3bc011fe32e7924
parent 116611 a6c22df818695e30eb9618a6d753f78b0ee30497
child 116613 216d556025d1a009f0189f9d2b6370ba25bc41e2
push id20028
push usernthomas@mozilla.com
push dateThu, 20 Dec 2012 10:26:38 +0000
treeherdermozilla-inbound@40adf72fd612 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone20.0a1
backs out5d59a9ec28f443c2c0897bd1df863e8740d01d08
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backout 5d59a9ec28f4 for Linux PGO compile errors
accessible/src/base/AccIterator.cpp
accessible/src/base/nsARIAMap.h
accessible/src/generic/Accessible-inl.h
accessible/src/generic/Accessible.h
accessible/src/generic/OuterDocAccessible.cpp
accessible/src/mac/mozHTMLAccessible.mm
accessible/src/mac/mozTextAccessible.mm
accessible/src/xul/XULAlertAccessible.cpp
accessible/src/xul/XULTreeAccessible.cpp
--- a/accessible/src/base/AccIterator.cpp
+++ b/accessible/src/base/AccIterator.cpp
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "AccIterator.h"
 
 #include "nsAccessibilityService.h"
-#include "Accessible-inl.h"
+#include "Accessible.h"
 
 #include "mozilla/dom/Element.h"
 #include "nsBindingManager.h"
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 
 ////////////////////////////////////////////////////////////////////////////////
--- a/accessible/src/base/nsARIAMap.h
+++ b/accessible/src/base/nsARIAMap.h
@@ -4,17 +4,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef _nsARIAMap_H_
 #define _nsARIAMap_H_
 
 #include "ARIAStateMap.h"
-#include "mozilla/a11y/AccTypes.h"
 #include "mozilla/a11y/Role.h"
 
 #include "nsIAtom.h"
 #include "nsIContent.h"
 
 class nsINode;
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -146,22 +145,16 @@ struct nsRoleMapEntry
 {
   /**
    * Return true if matches to the given ARIA role.
    */
   bool Is(nsIAtom* aARIARole) const
     { return *roleAtom == aARIARole; }
 
   /**
-   * Return true if ARIA role has the given accessible type.
-   */
-  bool IsOfType(mozilla::a11y::AccGenericType aType) const
-    { return accTypes & aType; }
-
-  /**
    * Return ARIA role.
    */
   const nsDependentAtomString ARIARoleString() const
     { return nsDependentAtomString(*roleAtom); }
 
   // ARIA role: string representation such as "button"
   nsIAtom** roleAtom;
 
--- a/accessible/src/generic/Accessible-inl.h
+++ b/accessible/src/generic/Accessible-inl.h
@@ -26,21 +26,22 @@ inline mozilla::a11y::role
 Accessible::ARIARole()
 {
   if (!mRoleMapEntry || mRoleMapEntry->roleRule != kUseMapRole)
     return mozilla::a11y::roles::NOTHING;
 
   return ARIATransformRole(mRoleMapEntry->role);
 }
 
-inline bool
-Accessible::HasGenericType(AccGenericType aType) const
+inline void
+Accessible::SetRoleMapEntry(nsRoleMapEntry* aRoleMapEntry)
 {
-  return (mGenericTypes & aType) ||
-    (mRoleMapEntry && mRoleMapEntry->IsOfType(aType));
+  mRoleMapEntry = aRoleMapEntry;
+  if (mRoleMapEntry)
+    mGenericTypes |= mRoleMapEntry->accTypes;
 }
 
 inline bool
 Accessible::HasNumericValue() const
 {
   if (mStateFlags & eHasNumericValue)
     return true;
 
--- a/accessible/src/generic/Accessible.h
+++ b/accessible/src/generic/Accessible.h
@@ -299,18 +299,17 @@ public:
   virtual mozilla::a11y::Relation RelationByType(uint32_t aType);
 
   //////////////////////////////////////////////////////////////////////////////
   // Initializing methods
 
   /**
    * Set the ARIA role map entry for a new accessible.
    */
-  void SetRoleMapEntry(nsRoleMapEntry* aRoleMapEntry)
-    { mRoleMapEntry = aRoleMapEntry; }
+  void SetRoleMapEntry(nsRoleMapEntry* aRoleMapEntry);
 
   /**
    * Update the children cache.
    */
   inline bool UpdateChildren()
   {
     InvalidateChildren();
     return EnsureChildren();
@@ -464,77 +463,72 @@ public:
   inline bool IsAbbreviation() const
   {
     return mContent->IsHTML() &&
       (mContent->Tag() == nsGkAtoms::abbr || mContent->Tag() == nsGkAtoms::acronym);
   }
 
   bool IsApplication() const { return mType == eApplicationType; }
 
-  bool IsAutoComplete() const { return HasGenericType(eAutoComplete); }
+  bool IsAutoComplete() const { return mGenericTypes & eAutoComplete; }
 
   bool IsAutoCompletePopup() const
-    { return HasGenericType(eAutoCompletePopup); }
+    { return mGenericTypes & eAutoCompletePopup; }
 
-  bool IsCombobox() const { return HasGenericType(eCombobox); }
+  bool IsCombobox() const { return mGenericTypes & eCombobox; }
 
-  bool IsDoc() const { return HasGenericType(eDocument); }
+  bool IsDoc() const { return mGenericTypes & eDocument; }
   DocAccessible* AsDoc();
 
-  bool IsHyperText() const { return HasGenericType(eHyperText); }
+  bool IsHyperText() const { return mGenericTypes & eHyperText; }
   HyperTextAccessible* AsHyperText();
 
   bool IsHTMLFileInput() const { return mType == eHTMLFileInputType; }
 
   bool IsHTMLListItem() const { return mType == eHTMLLiType; }
   HTMLLIAccessible* AsHTMLListItem();
 
   bool IsHTMLTableRow() const { return mType == eHTMLTableRowType; }
 
   bool IsImage() const { return mType == eImageType; }
   ImageAccessible* AsImage();
 
   bool IsImageMap() const { return mType == eImageMapType; }
   HTMLImageMapAccessible* AsImageMap();
 
-  bool IsList() const { return HasGenericType(eList); }
+  bool IsList() const { return mGenericTypes & eList; }
 
-  bool IsListControl() const { return HasGenericType(eListControl); }
+  bool IsListControl() const { return mGenericTypes & eListControl; }
 
-  bool IsMenuButton() const { return HasGenericType(eMenuButton); }
+  bool IsMenuButton() const { return mGenericTypes & eMenuButton; }
 
   bool IsMenuPopup() const { return mType == eMenuPopupType; }
 
   bool IsProgress() const { return mType == eProgressType; }
 
   bool IsRoot() const { return mType == eRootType; }
   a11y::RootAccessible* AsRoot();
 
-  bool IsSelect() const { return HasGenericType(eSelect); }
+  bool IsSelect() const { return mGenericTypes & eSelect; }
 
-  bool IsTable() const { return HasGenericType(eTable); }
+  bool IsTable() const { return mGenericTypes & eTable; }
   virtual TableAccessible* AsTable() { return nullptr; }
 
   virtual TableCellAccessible* AsTableCell() { return nullptr; }
 
-  bool IsTableRow() const { return HasGenericType(eTableRow); }
+  bool IsTableRow() const { return mGenericTypes & eTableRow; }
 
   bool IsTextLeaf() const { return mType == eTextLeafType; }
   TextLeafAccessible* AsTextLeaf();
 
   bool IsXULDeck() const { return mType == eXULDeckType; }
 
   bool IsXULTree() const { return mType == eXULTreeType; }
   XULTreeAccessible* AsXULTree();
 
-  /**
-   * Return true if the accessible belongs to the given accessible type.
-   */
-  bool HasGenericType(AccGenericType aType) const;
-
   //////////////////////////////////////////////////////////////////////////////
   // ActionAccessible
 
   /**
    * Return the number of actions that can be performed on this accessible.
    */
   virtual uint8_t ActionCount();
 
--- a/accessible/src/generic/OuterDocAccessible.cpp
+++ b/accessible/src/generic/OuterDocAccessible.cpp
@@ -1,16 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "OuterDocAccessible.h"
 
-#include "Accessible-inl.h"
 #include "nsAccUtils.h"
 #include "DocAccessible.h"
 #include "Role.h"
 #include "States.h"
 
 #ifdef A11Y_LOG
 #include "Logging.h"
 #endif
--- a/accessible/src/mac/mozHTMLAccessible.mm
+++ b/accessible/src/mac/mozHTMLAccessible.mm
@@ -2,17 +2,16 @@
 /* vim:expandtab:shiftwidth=2:tabstop=2:
  */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #import "mozHTMLAccessible.h"
 
-#import "Accessible-inl.h"
 #import "HyperTextAccessible.h"
 
 #import "nsCocoaUtils.h"
 
 @implementation mozHeadingAccessible
 
 - (NSString*)title
 {
--- a/accessible/src/mac/mozTextAccessible.mm
+++ b/accessible/src/mac/mozTextAccessible.mm
@@ -1,14 +1,14 @@
 /* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "Accessible-inl.h"
+
 #include "AccessibleWrap.h"
 #include "TextLeafAccessible.h"
 
 #include "nsCocoaUtils.h"
 #include "nsObjCExceptions.h"
 
 #import "mozTextAccessible.h"
 
--- a/accessible/src/xul/XULAlertAccessible.cpp
+++ b/accessible/src/xul/XULAlertAccessible.cpp
@@ -1,16 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "XULAlertAccessible.h"
 
-#include "Accessible-inl.h"
 #include "Role.h"
 #include "States.h"
 
 using namespace mozilla::a11y;
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULAlertAccessible
 ////////////////////////////////////////////////////////////////////////////////
--- a/accessible/src/xul/XULTreeAccessible.cpp
+++ b/accessible/src/xul/XULTreeAccessible.cpp
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "XULTreeAccessible.h"
 
-#include "Accessible-inl.h"
 #include "DocAccessible-inl.h"
 #include "nsAccCache.h"
 #include "nsAccUtils.h"
 #include "nsCoreUtils.h"
 #include "nsEventShell.h"
 #include "DocAccessible.h"
 #include "Relation.h"
 #include "Role.h"