Skip to content

Commit

Permalink
Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces…
Browse files Browse the repository at this point in the history
… after the hash for nested preprocessor directives r=sylvestre

# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
  • Loading branch information
ehsan committed Jan 18, 2019
1 parent 06c3d29 commit e5e885a
Show file tree
Hide file tree
Showing 1,736 changed files with 15,272 additions and 15,189 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED|\
NS_QUERYFRAME_TAIL.*$"

SortIncludes: false
IndentPPDirectives: AfterHash
12 changes: 6 additions & 6 deletions accessible/android/SessionAccessibility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
#include "mozilla/a11y/DocManager.h"

#ifdef DEBUG
#include <android/log.h>
#define AALOG(args...) \
__android_log_print(ANDROID_LOG_INFO, "GeckoAccessibilityNative", ##args)
# include <android/log.h>
# define AALOG(args...) \
__android_log_print(ANDROID_LOG_INFO, "GeckoAccessibilityNative", ##args)
#else
#define AALOG(args...) \
do { \
} while (0)
# define AALOG(args...) \
do { \
} while (0)
#endif

template <>
Expand Down
2 changes: 1 addition & 1 deletion accessible/atk/Platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "prlink.h"

#ifdef MOZ_ENABLE_DBUS
#include <dbus/dbus.h>
# include <dbus/dbus.h>
#endif
#include <gtk/gtk.h>

Expand Down
2 changes: 1 addition & 1 deletion accessible/base/AccIterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "AccGroupInfo.h"
#ifdef MOZ_XUL
#include "XULTreeAccessible.h"
# include "XULTreeAccessible.h"
#endif

#include "mozilla/dom/HTMLLabelElement.h"
Expand Down
2 changes: 1 addition & 1 deletion accessible/base/DocManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "xpcAccessibleDocument.h"

#ifdef A11Y_LOG
#include "Logging.h"
# include "Logging.h"
#endif

#include "mozilla/EventListenerManager.h"
Expand Down
2 changes: 1 addition & 1 deletion accessible/base/EventQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "nsAccessibilityService.h"
#include "nsTextEquivUtils.h"
#ifdef A11Y_LOG
#include "Logging.h"
# include "Logging.h"
#endif

using namespace mozilla;
Expand Down
2 changes: 1 addition & 1 deletion accessible/base/EventTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "nsEventShell.h"
#include "DocAccessible.h"
#ifdef A11Y_LOG
#include "Logging.h"
# include "Logging.h"
#endif

#include "mozilla/UniquePtr.h"
Expand Down
2 changes: 1 addition & 1 deletion accessible/base/NotificationController.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <utility>

#ifdef A11Y_LOG
#include "Logging.h"
# include "Logging.h"
#endif

namespace mozilla {
Expand Down
4 changes: 2 additions & 2 deletions accessible/base/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include "nsStringFwd.h"

#if defined(ANDROID)
#include "nsTArray.h"
#include "nsRect.h"
# include "nsTArray.h"
# include "nsRect.h"
#endif

namespace mozilla {
Expand Down
58 changes: 29 additions & 29 deletions accessible/base/nsAccessibilityService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "OuterDocAccessible.h"
#include "Role.h"
#ifdef MOZ_ACCESSIBILITY_ATK
#include "RootAccessibleWrap.h"
# include "RootAccessibleWrap.h"
#endif
#include "States.h"
#include "Statistics.h"
Expand All @@ -40,18 +40,18 @@
#include "xpcAccessibleDocument.h"

#ifdef MOZ_ACCESSIBILITY_ATK
#include "AtkSocketAccessible.h"
# include "AtkSocketAccessible.h"
#endif

#ifdef XP_WIN
#include "mozilla/a11y/Compatibility.h"
#include "mozilla/dom/ContentChild.h"
#include "HTMLWin32ObjectAccessible.h"
#include "mozilla/StaticPtr.h"
# include "mozilla/a11y/Compatibility.h"
# include "mozilla/dom/ContentChild.h"
# include "HTMLWin32ObjectAccessible.h"
# include "mozilla/StaticPtr.h"
#endif

#ifdef A11Y_LOG
#include "Logging.h"
# include "Logging.h"
#endif

#include "nsExceptionHandler.h"
Expand All @@ -75,18 +75,18 @@
#include "nsDeckFrame.h"

#ifdef MOZ_XUL
#include "XULAlertAccessible.h"
#include "XULComboboxAccessible.h"
#include "XULElementAccessibles.h"
#include "XULFormControlAccessible.h"
#include "XULListboxAccessibleWrap.h"
#include "XULMenuAccessibleWrap.h"
#include "XULTabAccessible.h"
#include "XULTreeGridAccessibleWrap.h"
# include "XULAlertAccessible.h"
# include "XULComboboxAccessible.h"
# include "XULElementAccessibles.h"
# include "XULFormControlAccessible.h"
# include "XULListboxAccessibleWrap.h"
# include "XULMenuAccessibleWrap.h"
# include "XULTabAccessible.h"
# include "XULTreeGridAccessibleWrap.h"
#endif

#if defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK)
#include "nsNPAPIPluginInstance.h"
# include "nsNPAPIPluginInstance.h"
#endif

using namespace mozilla;
Expand Down Expand Up @@ -148,7 +148,7 @@ static bool MustBeAccessible(nsIContent* aContent, DocAccessible* aDocument) {
*/
#ifdef MOZ_XUL
Accessible* CreateMenupopupAccessible(Element* aElement, Accessible* aContext) {
#ifdef MOZ_ACCESSIBILITY_ATK
# ifdef MOZ_ACCESSIBILITY_ATK
// ATK considers this node to be redundant when within menubars, and it makes
// menu navigation with assistive technologies more difficult
// XXX In the future we will should this for consistency across the
Expand All @@ -157,7 +157,7 @@ Accessible* CreateMenupopupAccessible(Element* aElement, Accessible* aContext) {
// class for each platform.
nsIContent* parent = aElement->GetParent();
if (parent && parent->IsXULElement(nsGkAtoms::menu)) return nullptr;
#endif
# endif

return new XULMenupopupAccessible(aElement, aContext->Document());
}
Expand Down Expand Up @@ -212,19 +212,19 @@ static const HTMLMarkupMapInfo sHTMLMarkupMapList[] = {
#undef MARKUPMAP

#ifdef MOZ_XUL
#define XULMAP(atom, ...) {nsGkAtoms::atom, __VA_ARGS__},
# define XULMAP(atom, ...) {nsGkAtoms::atom, __VA_ARGS__},

#define XULMAP_TYPE(atom, new_type) \
XULMAP(atom, [](Element* aElement, Accessible* aContext) -> Accessible* { \
return new new_type(aElement, aContext->Document()); \
})
# define XULMAP_TYPE(atom, new_type) \
XULMAP(atom, [](Element* aElement, Accessible* aContext) -> Accessible* { \
return new new_type(aElement, aContext->Document()); \
})

static const XULMarkupMapInfo sXULMarkupMapList[] = {
#include "XULMap.h"
# include "XULMap.h"
};

#undef XULMAP_TYPE
#undef XULMAP
# undef XULMAP_TYPE
# undef XULMAP
#endif

#undef Attr
Expand Down Expand Up @@ -406,7 +406,7 @@ already_AddRefed<Accessible> nsAccessibilityService::CreatePluginAccessible(
#if defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK)
RefPtr<nsNPAPIPluginInstance> pluginInstance = aFrame->GetPluginInstance();
if (pluginInstance) {
#ifdef XP_WIN
# ifdef XP_WIN
if (!sPendingPlugins->Contains(aContent) &&
(Preferences::GetBool("accessibility.delay_plugins") ||
Compatibility::IsJAWS() || Compatibility::IsWE())) {
Expand Down Expand Up @@ -434,7 +434,7 @@ already_AddRefed<Accessible> nsAccessibilityService::CreatePluginAccessible(
aContent, aContext->Document(), pluginPort);
return accessible.forget();

#elif MOZ_ACCESSIBILITY_ATK
# elif MOZ_ACCESSIBILITY_ATK
if (!AtkSocketAccessible::gCanEmbed) return nullptr;

// Note this calls into the plugin, so crazy things may happen and aFrame
Expand All @@ -448,7 +448,7 @@ already_AddRefed<Accessible> nsAccessibilityService::CreatePluginAccessible(

return socketAccessible.forget();
}
#endif
# endif
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion accessible/generic/Accessible-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "nsCoreUtils.h"

#ifdef A11Y_LOG
#include "Logging.h"
# include "Logging.h"
#endif

namespace mozilla {
Expand Down
2 changes: 1 addition & 1 deletion accessible/generic/DocAccessible-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "mozilla/dom/DocumentInlines.h"

#ifdef A11Y_LOG
#include "Logging.h"
# include "Logging.h"
#endif

namespace mozilla {
Expand Down
2 changes: 1 addition & 1 deletion accessible/generic/OuterDocAccessible.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "States.h"

#ifdef A11Y_LOG
#include "Logging.h"
# include "Logging.h"
#endif

using namespace mozilla;
Expand Down
4 changes: 2 additions & 2 deletions accessible/generic/RootAccessible.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "Role.h"
#include "States.h"
#ifdef MOZ_XUL
#include "XULTreeAccessible.h"
# include "XULTreeAccessible.h"
#endif

#include "mozilla/dom/BindingUtils.h"
Expand All @@ -43,7 +43,7 @@
#include "nsGlobalWindow.h"

#ifdef MOZ_XUL
#include "nsIXULWindow.h"
# include "nsIXULWindow.h"
#endif

using namespace mozilla;
Expand Down
18 changes: 9 additions & 9 deletions accessible/generic/TableAccessible.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ bool TableAccessible::IsProbablyLayoutTable() {
// the algorithm. Integrate it into Logging.
// Change to |#define SHOW_LAYOUT_HEURISTIC DEBUG| before final release
#ifdef SHOW_LAYOUT_HEURISTIC
#define RETURN_LAYOUT_ANSWER(isLayout, heuristic) \
{ \
mLayoutHeuristic = isLayout \
? NS_LITERAL_STRING("layout table: " heuristic) \
: NS_LITERAL_STRING("data table: " heuristic); \
return isLayout; \
}
# define RETURN_LAYOUT_ANSWER(isLayout, heuristic) \
{ \
mLayoutHeuristic = isLayout \
? NS_LITERAL_STRING("layout table: " heuristic) \
: NS_LITERAL_STRING("data table: " heuristic); \
return isLayout; \
}
#else
#define RETURN_LAYOUT_ANSWER(isLayout, heuristic) \
{ return isLayout; }
# define RETURN_LAYOUT_ANSWER(isLayout, heuristic) \
{ return isLayout; }
#endif

Accessible* thisacc = AsAccessible();
Expand Down
26 changes: 13 additions & 13 deletions accessible/ipc/DocAccessibleParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
#include "nsCoreUtils.h"

#if defined(XP_WIN)
#include "AccessibleWrap.h"
#include "Compatibility.h"
#include "mozilla/mscom/PassthruProxy.h"
#include "mozilla/mscom/Ptr.h"
#include "nsWinUtils.h"
#include "RootAccessible.h"
# include "AccessibleWrap.h"
# include "Compatibility.h"
# include "mozilla/mscom/PassthruProxy.h"
# include "mozilla/mscom/Ptr.h"
# include "nsWinUtils.h"
# include "RootAccessible.h"
#endif

namespace mozilla {
Expand Down Expand Up @@ -702,9 +702,9 @@ void DocAccessibleParent::SendParentCOMProxy() {
return;
}

#if defined(MOZ_CONTENT_SANDBOX)
# if defined(MOZ_CONTENT_SANDBOX)
mParentProxyStream = holder.GetPreservedStream();
#endif // defined(MOZ_CONTENT_SANDBOX)
# endif // defined(MOZ_CONTENT_SANDBOX)
}

void DocAccessibleParent::SetEmulatedWindowHandle(HWND aWindowHandle) {
Expand All @@ -716,7 +716,7 @@ void DocAccessibleParent::SetEmulatedWindowHandle(HWND aWindowHandle) {

mozilla::ipc::IPCResult DocAccessibleParent::RecvGetWindowedPluginIAccessible(
const WindowsHandle& aHwnd, IAccessibleHolder* aPluginCOMProxy) {
#if defined(MOZ_CONTENT_SANDBOX)
# if defined(MOZ_CONTENT_SANDBOX)
// We don't actually want the accessible object for aHwnd, but rather the
// one that belongs to its child (see HTMLWin32ObjectAccessible).
HWND childWnd = ::GetWindow(reinterpret_cast<HWND>(aHwnd), GW_CHILD);
Expand All @@ -738,9 +738,9 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvGetWindowedPluginIAccessible(
aPluginCOMProxy->Set(IAccessibleHolder::COMPtrType(rawAccPlugin));

return IPC_OK();
#else
# else
return IPC_FAIL(this, "Message unsupported in this build configuration");
#endif
# endif
}

mozilla::ipc::IPCResult DocAccessibleParent::RecvFocusEvent(
Expand Down Expand Up @@ -779,7 +779,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvBatch(
const uint64_t& aBatchType, nsTArray<BatchData>&& aData) {
// Only do something in Android. We can't ifdef the entire protocol out in
// the ipdl because it doesn't allow preprocessing.
#if defined(ANDROID)
# if defined(ANDROID)
nsTArray<ProxyAccessible*> proxies(aData.Length());
for (size_t i = 0; i < aData.Length(); i++) {
DocAccessibleParent* doc = static_cast<DocAccessibleParent*>(
Expand All @@ -790,7 +790,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvBatch(
proxies.AppendElement(proxy);
}
ProxyBatch(this, aBatchType, proxies, aData);
#endif // defined(XP_WIN)
# endif // defined(XP_WIN)
return IPC_OK();
}
#endif // !defined(XP_WIN)
Expand Down
6 changes: 3 additions & 3 deletions accessible/ipc/DocAccessibleParent.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@ class DocAccessibleParent : public ProxyAccessible,
// The handle associated with the emulated window that contains this document
HWND mEmulatedWindowHandle;

#if defined(MOZ_CONTENT_SANDBOX)
# if defined(MOZ_CONTENT_SANDBOX)
mscom::PreservedStreamPtr mParentProxyStream;
#endif // defined(MOZ_CONTENT_SANDBOX)
#endif // defined(XP_WIN)
# endif // defined(MOZ_CONTENT_SANDBOX)
#endif // defined(XP_WIN)

/*
* Conceptually this is a map from IDs to proxies, but we store the ID in the
Expand Down
Loading

0 comments on commit e5e885a

Please sign in to comment.