Bug 1454628 - fixed compilation with --disable-accessibility builds; r?aklotz draft
authorAlex Gaynor <agaynor@mozilla.com>
Tue, 17 Apr 2018 13:01:19 -0400
changeset 783778 82d41e05a0fa84d85cba2dbb8913c2215e7c1d3c
parent 783549 f94b64e0020225c71701930f193bd96c3ad1d150
push id106772
push userbmo:agaynor@mozilla.com
push dateTue, 17 Apr 2018 17:14:33 +0000
reviewersaklotz
bugs1454628, 1453979
milestone61.0a1
Bug 1454628 - fixed compilation with --disable-accessibility builds; r?aklotz This was broken by bug 1453979. MozReview-Commit-ID: JtJqICb2vBP
accessible/ipc/IPCTypes.h
accessible/ipc/other/PDocAccessible.ipdl
accessible/ipc/win/PDocAccessible.ipdl
--- a/accessible/ipc/IPCTypes.h
+++ b/accessible/ipc/IPCTypes.h
@@ -2,28 +2,37 @@
 /* vim: set ts=8 sts=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/. */
 
 #ifndef mozilla_a11y_IPCTypes_h
 #define mozilla_a11y_IPCTypes_h
 
+#ifdef ACCESSIBILITY
 #include "mozilla/a11y/Role.h"
 
 namespace IPC {
 
 template<>
 struct ParamTraits<mozilla::a11y::role>
   : public ContiguousEnumSerializerInclusive<mozilla::a11y::role,
                                              mozilla::a11y::role::NOTHING,
                                              mozilla::a11y::role::LAST_ROLE>
 {
 };
-};
+
+} // namespace IPC
+#else
+namespace mozilla {
+namespace a11y {
+typedef uint32_t role;
+} // namespace a11y
+} // namespace mozilla
+#endif // ACCESSIBILITY
 
 /**
  * Since IPDL does not support preprocessing, this header file allows us to
  * define types used by PDocAccessible differently depending on platform.
  */
 
 #if defined(XP_WIN) && defined(ACCESSIBILITY)
 
--- a/accessible/ipc/other/PDocAccessible.ipdl
+++ b/accessible/ipc/other/PDocAccessible.ipdl
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include protocol PFileDescriptorSet;
 include protocol PBrowser;
 
 include "mozilla/GfxMessageUtils.h";
 
 using nsIntRect from "nsRect.h";
-using mozilla::a11y::role from "mozilla/a11y/Role.h";
+using mozilla::a11y::role from "mozilla/a11y/IPCTypes.h";
 using mozilla::gfx::IntSize from "mozilla/gfx/Point.h";
 using mozilla::gfx::IntPoint from "mozilla/gfx/Point.h";
 
 namespace mozilla {
 namespace a11y {
 
 struct AccessibleData
 {
--- a/accessible/ipc/win/PDocAccessible.ipdl
+++ b/accessible/ipc/win/PDocAccessible.ipdl
@@ -2,17 +2,17 @@
 /* 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 protocol PFileDescriptorSet;
 include protocol PBrowser;
 
-using mozilla::a11y::role from "mozilla/a11y/Role.h";
+using mozilla::a11y::role from "mozilla/a11y/IPCTypes.h";
 using mozilla::a11y::IAccessibleHolder from "mozilla/a11y/IPCTypes.h";
 using mozilla::a11y::IDispatchHolder from "mozilla/a11y/IPCTypes.h";
 using mozilla::WindowsHandle from "ipc/IPCMessageUtils.h";
 using mozilla::LayoutDeviceIntRect from "Units.h";
 
 namespace mozilla {
 namespace a11y {