Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre

# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
This commit is contained in:
Ehsan Akhgari 2019-01-18 10:16:18 +01:00
parent 06c3d29113
commit e5e885ae31
1736 changed files with 15112 additions and 15029 deletions

View File

@ -24,3 +24,4 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED|\
NS_QUERYFRAME_TAIL.*$" NS_QUERYFRAME_TAIL.*$"
SortIncludes: false SortIncludes: false
IndentPPDirectives: AfterHash

View File

@ -20,13 +20,13 @@
#include "mozilla/a11y/DocManager.h" #include "mozilla/a11y/DocManager.h"
#ifdef DEBUG #ifdef DEBUG
#include <android/log.h> # include <android/log.h>
#define AALOG(args...) \ # define AALOG(args...) \
__android_log_print(ANDROID_LOG_INFO, "GeckoAccessibilityNative", ##args) __android_log_print(ANDROID_LOG_INFO, "GeckoAccessibilityNative", ##args)
#else #else
#define AALOG(args...) \ # define AALOG(args...) \
do { \ do { \
} while (0) } while (0)
#endif #endif
template <> template <>

View File

@ -15,7 +15,7 @@
#include "prlink.h" #include "prlink.h"
#ifdef MOZ_ENABLE_DBUS #ifdef MOZ_ENABLE_DBUS
#include <dbus/dbus.h> # include <dbus/dbus.h>
#endif #endif
#include <gtk/gtk.h> #include <gtk/gtk.h>

View File

@ -6,7 +6,7 @@
#include "AccGroupInfo.h" #include "AccGroupInfo.h"
#ifdef MOZ_XUL #ifdef MOZ_XUL
#include "XULTreeAccessible.h" # include "XULTreeAccessible.h"
#endif #endif
#include "mozilla/dom/HTMLLabelElement.h" #include "mozilla/dom/HTMLLabelElement.h"

View File

@ -17,7 +17,7 @@
#include "xpcAccessibleDocument.h" #include "xpcAccessibleDocument.h"
#ifdef A11Y_LOG #ifdef A11Y_LOG
#include "Logging.h" # include "Logging.h"
#endif #endif
#include "mozilla/EventListenerManager.h" #include "mozilla/EventListenerManager.h"

View File

@ -12,7 +12,7 @@
#include "nsAccessibilityService.h" #include "nsAccessibilityService.h"
#include "nsTextEquivUtils.h" #include "nsTextEquivUtils.h"
#ifdef A11Y_LOG #ifdef A11Y_LOG
#include "Logging.h" # include "Logging.h"
#endif #endif
using namespace mozilla; using namespace mozilla;

View File

@ -11,7 +11,7 @@
#include "nsEventShell.h" #include "nsEventShell.h"
#include "DocAccessible.h" #include "DocAccessible.h"
#ifdef A11Y_LOG #ifdef A11Y_LOG
#include "Logging.h" # include "Logging.h"
#endif #endif
#include "mozilla/UniquePtr.h" #include "mozilla/UniquePtr.h"

View File

@ -16,7 +16,7 @@
#include <utility> #include <utility>
#ifdef A11Y_LOG #ifdef A11Y_LOG
#include "Logging.h" # include "Logging.h"
#endif #endif
namespace mozilla { namespace mozilla {

View File

@ -11,8 +11,8 @@
#include "nsStringFwd.h" #include "nsStringFwd.h"
#if defined(ANDROID) #if defined(ANDROID)
#include "nsTArray.h" # include "nsTArray.h"
#include "nsRect.h" # include "nsRect.h"
#endif #endif
namespace mozilla { namespace mozilla {

View File

@ -30,7 +30,7 @@
#include "OuterDocAccessible.h" #include "OuterDocAccessible.h"
#include "Role.h" #include "Role.h"
#ifdef MOZ_ACCESSIBILITY_ATK #ifdef MOZ_ACCESSIBILITY_ATK
#include "RootAccessibleWrap.h" # include "RootAccessibleWrap.h"
#endif #endif
#include "States.h" #include "States.h"
#include "Statistics.h" #include "Statistics.h"
@ -40,18 +40,18 @@
#include "xpcAccessibleDocument.h" #include "xpcAccessibleDocument.h"
#ifdef MOZ_ACCESSIBILITY_ATK #ifdef MOZ_ACCESSIBILITY_ATK
#include "AtkSocketAccessible.h" # include "AtkSocketAccessible.h"
#endif #endif
#ifdef XP_WIN #ifdef XP_WIN
#include "mozilla/a11y/Compatibility.h" # include "mozilla/a11y/Compatibility.h"
#include "mozilla/dom/ContentChild.h" # include "mozilla/dom/ContentChild.h"
#include "HTMLWin32ObjectAccessible.h" # include "HTMLWin32ObjectAccessible.h"
#include "mozilla/StaticPtr.h" # include "mozilla/StaticPtr.h"
#endif #endif
#ifdef A11Y_LOG #ifdef A11Y_LOG
#include "Logging.h" # include "Logging.h"
#endif #endif
#include "nsExceptionHandler.h" #include "nsExceptionHandler.h"
@ -75,18 +75,18 @@
#include "nsDeckFrame.h" #include "nsDeckFrame.h"
#ifdef MOZ_XUL #ifdef MOZ_XUL
#include "XULAlertAccessible.h" # include "XULAlertAccessible.h"
#include "XULComboboxAccessible.h" # include "XULComboboxAccessible.h"
#include "XULElementAccessibles.h" # include "XULElementAccessibles.h"
#include "XULFormControlAccessible.h" # include "XULFormControlAccessible.h"
#include "XULListboxAccessibleWrap.h" # include "XULListboxAccessibleWrap.h"
#include "XULMenuAccessibleWrap.h" # include "XULMenuAccessibleWrap.h"
#include "XULTabAccessible.h" # include "XULTabAccessible.h"
#include "XULTreeGridAccessibleWrap.h" # include "XULTreeGridAccessibleWrap.h"
#endif #endif
#if defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK) #if defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK)
#include "nsNPAPIPluginInstance.h" # include "nsNPAPIPluginInstance.h"
#endif #endif
using namespace mozilla; using namespace mozilla;
@ -148,7 +148,7 @@ static bool MustBeAccessible(nsIContent* aContent, DocAccessible* aDocument) {
*/ */
#ifdef MOZ_XUL #ifdef MOZ_XUL
Accessible* CreateMenupopupAccessible(Element* aElement, Accessible* aContext) { 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 // ATK considers this node to be redundant when within menubars, and it makes
// menu navigation with assistive technologies more difficult // menu navigation with assistive technologies more difficult
// XXX In the future we will should this for consistency across the // XXX In the future we will should this for consistency across the
@ -157,7 +157,7 @@ Accessible* CreateMenupopupAccessible(Element* aElement, Accessible* aContext) {
// class for each platform. // class for each platform.
nsIContent* parent = aElement->GetParent(); nsIContent* parent = aElement->GetParent();
if (parent && parent->IsXULElement(nsGkAtoms::menu)) return nullptr; if (parent && parent->IsXULElement(nsGkAtoms::menu)) return nullptr;
#endif # endif
return new XULMenupopupAccessible(aElement, aContext->Document()); return new XULMenupopupAccessible(aElement, aContext->Document());
} }
@ -212,19 +212,19 @@ static const HTMLMarkupMapInfo sHTMLMarkupMapList[] = {
#undef MARKUPMAP #undef MARKUPMAP
#ifdef MOZ_XUL #ifdef MOZ_XUL
#define XULMAP(atom, ...) {nsGkAtoms::atom, __VA_ARGS__}, # define XULMAP(atom, ...) {nsGkAtoms::atom, __VA_ARGS__},
#define XULMAP_TYPE(atom, new_type) \ # define XULMAP_TYPE(atom, new_type) \
XULMAP(atom, [](Element* aElement, Accessible* aContext) -> Accessible* { \ XULMAP(atom, [](Element* aElement, Accessible* aContext) -> Accessible* { \
return new new_type(aElement, aContext->Document()); \ return new new_type(aElement, aContext->Document()); \
}) })
static const XULMarkupMapInfo sXULMarkupMapList[] = { static const XULMarkupMapInfo sXULMarkupMapList[] = {
#include "XULMap.h" # include "XULMap.h"
}; };
#undef XULMAP_TYPE # undef XULMAP_TYPE
#undef XULMAP # undef XULMAP
#endif #endif
#undef Attr #undef Attr
@ -406,7 +406,7 @@ already_AddRefed<Accessible> nsAccessibilityService::CreatePluginAccessible(
#if defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK) #if defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK)
RefPtr<nsNPAPIPluginInstance> pluginInstance = aFrame->GetPluginInstance(); RefPtr<nsNPAPIPluginInstance> pluginInstance = aFrame->GetPluginInstance();
if (pluginInstance) { if (pluginInstance) {
#ifdef XP_WIN # ifdef XP_WIN
if (!sPendingPlugins->Contains(aContent) && if (!sPendingPlugins->Contains(aContent) &&
(Preferences::GetBool("accessibility.delay_plugins") || (Preferences::GetBool("accessibility.delay_plugins") ||
Compatibility::IsJAWS() || Compatibility::IsWE())) { Compatibility::IsJAWS() || Compatibility::IsWE())) {
@ -434,7 +434,7 @@ already_AddRefed<Accessible> nsAccessibilityService::CreatePluginAccessible(
aContent, aContext->Document(), pluginPort); aContent, aContext->Document(), pluginPort);
return accessible.forget(); return accessible.forget();
#elif MOZ_ACCESSIBILITY_ATK # elif MOZ_ACCESSIBILITY_ATK
if (!AtkSocketAccessible::gCanEmbed) return nullptr; if (!AtkSocketAccessible::gCanEmbed) return nullptr;
// Note this calls into the plugin, so crazy things may happen and aFrame // Note this calls into the plugin, so crazy things may happen and aFrame
@ -448,7 +448,7 @@ already_AddRefed<Accessible> nsAccessibilityService::CreatePluginAccessible(
return socketAccessible.forget(); return socketAccessible.forget();
} }
#endif # endif
} }
#endif #endif

View File

@ -12,7 +12,7 @@
#include "nsCoreUtils.h" #include "nsCoreUtils.h"
#ifdef A11Y_LOG #ifdef A11Y_LOG
#include "Logging.h" # include "Logging.h"
#endif #endif
namespace mozilla { namespace mozilla {

View File

@ -16,7 +16,7 @@
#include "mozilla/dom/DocumentInlines.h" #include "mozilla/dom/DocumentInlines.h"
#ifdef A11Y_LOG #ifdef A11Y_LOG
#include "Logging.h" # include "Logging.h"
#endif #endif
namespace mozilla { namespace mozilla {

View File

@ -14,7 +14,7 @@
#include "States.h" #include "States.h"
#ifdef A11Y_LOG #ifdef A11Y_LOG
#include "Logging.h" # include "Logging.h"
#endif #endif
using namespace mozilla; using namespace mozilla;

View File

@ -19,7 +19,7 @@
#include "Role.h" #include "Role.h"
#include "States.h" #include "States.h"
#ifdef MOZ_XUL #ifdef MOZ_XUL
#include "XULTreeAccessible.h" # include "XULTreeAccessible.h"
#endif #endif
#include "mozilla/dom/BindingUtils.h" #include "mozilla/dom/BindingUtils.h"
@ -43,7 +43,7 @@
#include "nsGlobalWindow.h" #include "nsGlobalWindow.h"
#ifdef MOZ_XUL #ifdef MOZ_XUL
#include "nsIXULWindow.h" # include "nsIXULWindow.h"
#endif #endif
using namespace mozilla; using namespace mozilla;

View File

@ -27,16 +27,16 @@ bool TableAccessible::IsProbablyLayoutTable() {
// the algorithm. Integrate it into Logging. // the algorithm. Integrate it into Logging.
// Change to |#define SHOW_LAYOUT_HEURISTIC DEBUG| before final release // Change to |#define SHOW_LAYOUT_HEURISTIC DEBUG| before final release
#ifdef SHOW_LAYOUT_HEURISTIC #ifdef SHOW_LAYOUT_HEURISTIC
#define RETURN_LAYOUT_ANSWER(isLayout, heuristic) \ # define RETURN_LAYOUT_ANSWER(isLayout, heuristic) \
{ \ { \
mLayoutHeuristic = isLayout \ mLayoutHeuristic = isLayout \
? NS_LITERAL_STRING("layout table: " heuristic) \ ? NS_LITERAL_STRING("layout table: " heuristic) \
: NS_LITERAL_STRING("data table: " heuristic); \ : NS_LITERAL_STRING("data table: " heuristic); \
return isLayout; \ return isLayout; \
} }
#else #else
#define RETURN_LAYOUT_ANSWER(isLayout, heuristic) \ # define RETURN_LAYOUT_ANSWER(isLayout, heuristic) \
{ return isLayout; } { return isLayout; }
#endif #endif
Accessible* thisacc = AsAccessible(); Accessible* thisacc = AsAccessible();

View File

@ -13,12 +13,12 @@
#include "nsCoreUtils.h" #include "nsCoreUtils.h"
#if defined(XP_WIN) #if defined(XP_WIN)
#include "AccessibleWrap.h" # include "AccessibleWrap.h"
#include "Compatibility.h" # include "Compatibility.h"
#include "mozilla/mscom/PassthruProxy.h" # include "mozilla/mscom/PassthruProxy.h"
#include "mozilla/mscom/Ptr.h" # include "mozilla/mscom/Ptr.h"
#include "nsWinUtils.h" # include "nsWinUtils.h"
#include "RootAccessible.h" # include "RootAccessible.h"
#endif #endif
namespace mozilla { namespace mozilla {
@ -702,9 +702,9 @@ void DocAccessibleParent::SendParentCOMProxy() {
return; return;
} }
#if defined(MOZ_CONTENT_SANDBOX) # if defined(MOZ_CONTENT_SANDBOX)
mParentProxyStream = holder.GetPreservedStream(); mParentProxyStream = holder.GetPreservedStream();
#endif // defined(MOZ_CONTENT_SANDBOX) # endif // defined(MOZ_CONTENT_SANDBOX)
} }
void DocAccessibleParent::SetEmulatedWindowHandle(HWND aWindowHandle) { void DocAccessibleParent::SetEmulatedWindowHandle(HWND aWindowHandle) {
@ -716,7 +716,7 @@ void DocAccessibleParent::SetEmulatedWindowHandle(HWND aWindowHandle) {
mozilla::ipc::IPCResult DocAccessibleParent::RecvGetWindowedPluginIAccessible( mozilla::ipc::IPCResult DocAccessibleParent::RecvGetWindowedPluginIAccessible(
const WindowsHandle& aHwnd, IAccessibleHolder* aPluginCOMProxy) { 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 // We don't actually want the accessible object for aHwnd, but rather the
// one that belongs to its child (see HTMLWin32ObjectAccessible). // one that belongs to its child (see HTMLWin32ObjectAccessible).
HWND childWnd = ::GetWindow(reinterpret_cast<HWND>(aHwnd), GW_CHILD); HWND childWnd = ::GetWindow(reinterpret_cast<HWND>(aHwnd), GW_CHILD);
@ -738,9 +738,9 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvGetWindowedPluginIAccessible(
aPluginCOMProxy->Set(IAccessibleHolder::COMPtrType(rawAccPlugin)); aPluginCOMProxy->Set(IAccessibleHolder::COMPtrType(rawAccPlugin));
return IPC_OK(); return IPC_OK();
#else # else
return IPC_FAIL(this, "Message unsupported in this build configuration"); return IPC_FAIL(this, "Message unsupported in this build configuration");
#endif # endif
} }
mozilla::ipc::IPCResult DocAccessibleParent::RecvFocusEvent( mozilla::ipc::IPCResult DocAccessibleParent::RecvFocusEvent(
@ -779,7 +779,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvBatch(
const uint64_t& aBatchType, nsTArray<BatchData>&& aData) { const uint64_t& aBatchType, nsTArray<BatchData>&& aData) {
// Only do something in Android. We can't ifdef the entire protocol out in // Only do something in Android. We can't ifdef the entire protocol out in
// the ipdl because it doesn't allow preprocessing. // the ipdl because it doesn't allow preprocessing.
#if defined(ANDROID) # if defined(ANDROID)
nsTArray<ProxyAccessible*> proxies(aData.Length()); nsTArray<ProxyAccessible*> proxies(aData.Length());
for (size_t i = 0; i < aData.Length(); i++) { for (size_t i = 0; i < aData.Length(); i++) {
DocAccessibleParent* doc = static_cast<DocAccessibleParent*>( DocAccessibleParent* doc = static_cast<DocAccessibleParent*>(
@ -790,7 +790,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvBatch(
proxies.AppendElement(proxy); proxies.AppendElement(proxy);
} }
ProxyBatch(this, aBatchType, proxies, aData); ProxyBatch(this, aBatchType, proxies, aData);
#endif // defined(XP_WIN) # endif // defined(XP_WIN)
return IPC_OK(); return IPC_OK();
} }
#endif // !defined(XP_WIN) #endif // !defined(XP_WIN)

View File

@ -251,10 +251,10 @@ class DocAccessibleParent : public ProxyAccessible,
// The handle associated with the emulated window that contains this document // The handle associated with the emulated window that contains this document
HWND mEmulatedWindowHandle; HWND mEmulatedWindowHandle;
#if defined(MOZ_CONTENT_SANDBOX) # if defined(MOZ_CONTENT_SANDBOX)
mscom::PreservedStreamPtr mParentProxyStream; mscom::PreservedStreamPtr mParentProxyStream;
#endif // defined(MOZ_CONTENT_SANDBOX) # endif // defined(MOZ_CONTENT_SANDBOX)
#endif // defined(XP_WIN) #endif // defined(XP_WIN)
/* /*
* Conceptually this is a map from IDs to proxies, but we store the ID in the * Conceptually this is a map from IDs to proxies, but we store the ID in the

View File

@ -8,7 +8,7 @@
#define mozilla_a11y_IPCTypes_h #define mozilla_a11y_IPCTypes_h
#ifdef ACCESSIBILITY #ifdef ACCESSIBILITY
#include "mozilla/a11y/Role.h" # include "mozilla/a11y/Role.h"
namespace IPC { namespace IPC {
@ -36,25 +36,25 @@ typedef uint32_t role;
#if defined(XP_WIN) && defined(ACCESSIBILITY) #if defined(XP_WIN) && defined(ACCESSIBILITY)
// So that we don't include a bunch of other Windows junk. // So that we don't include a bunch of other Windows junk.
#if !defined(COM_NO_WINDOWS_H) # if !defined(COM_NO_WINDOWS_H)
#define COM_NO_WINDOWS_H # define COM_NO_WINDOWS_H
#endif // !defined(COM_NO_WINDOWS_H) # endif // !defined(COM_NO_WINDOWS_H)
// COM headers pull in MSXML which conflicts with our own XMLDocument class. // COM headers pull in MSXML which conflicts with our own XMLDocument class.
// This define excludes those conflicting definitions. // This define excludes those conflicting definitions.
#if !defined(__XMLDocument_FWD_DEFINED__) # if !defined(__XMLDocument_FWD_DEFINED__)
#define __XMLDocument_FWD_DEFINED__ # define __XMLDocument_FWD_DEFINED__
#endif // !defined(__XMLDocument_FWD_DEFINED__) # endif // !defined(__XMLDocument_FWD_DEFINED__)
#include <combaseapi.h> # include <combaseapi.h>
#include "mozilla/a11y/COMPtrTypes.h" # include "mozilla/a11y/COMPtrTypes.h"
// This define in rpcndr.h messes up our code, so we must undefine it after // This define in rpcndr.h messes up our code, so we must undefine it after
// COMPtrTypes.h has been included. // COMPtrTypes.h has been included.
#if defined(small) # if defined(small)
#undef small # undef small
#endif // defined(small) # endif // defined(small)
#else #else

View File

@ -19,7 +19,7 @@
#include "nsISimpleEnumerator.h" #include "nsISimpleEnumerator.h"
#include "nsAccUtils.h" #include "nsAccUtils.h"
#ifdef MOZ_ACCESSIBILITY_ATK #ifdef MOZ_ACCESSIBILITY_ATK
#include "AccessibleWrap.h" # include "AccessibleWrap.h"
#endif #endif
namespace mozilla { namespace mozilla {

View File

@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#if defined(MOZILLA_INTERNAL_API) #if defined(MOZILLA_INTERNAL_API)
#error This code is NOT for internal Gecko use! # error This code is NOT for internal Gecko use!
#endif // defined(MOZILLA_INTERNAL_API) #endif // defined(MOZILLA_INTERNAL_API)
#include "AccessibleHandler.h" #include "AccessibleHandler.h"

View File

@ -28,22 +28,22 @@ import NEWEST_IA2_IDL;
#else #else
#include "HandlerData.h" # include "HandlerData.h"
#include <windows.h> # include <windows.h>
#if !defined(MOZILLA_INTERNAL_API) # if !defined(MOZILLA_INTERNAL_API)
#include "Accessible2_3.h" # include "Accessible2_3.h"
#include "AccessibleHyperlink.h" # include "AccessibleHyperlink.h"
#include "AccessibleHypertext2.h" # include "AccessibleHypertext2.h"
#include "AccessibleTableCell.h" # include "AccessibleTableCell.h"
#include "Handler.h" # include "Handler.h"
#include "mozilla/mscom/StructStream.h" # include "mozilla/mscom/StructStream.h"
#include "mozilla/UniquePtr.h" # include "mozilla/UniquePtr.h"
#include <ocidl.h> # include <ocidl.h>
#include <servprov.h> # include <servprov.h>
namespace mozilla { namespace mozilla {
namespace a11y { namespace a11y {
@ -306,7 +306,7 @@ inline static BSTR CopyBSTR(BSTR aSrc) {
} // namespace a11y } // namespace a11y
} // namespace mozilla } // namespace mozilla
#endif // !defined(MOZILLA_INTERNAL_API) # endif // !defined(MOZILLA_INTERNAL_API)
#endif // defined(__midl) #endif // defined(__midl)

View File

@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#if defined(MOZILLA_INTERNAL_API) #if defined(MOZILLA_INTERNAL_API)
#error This code is NOT for internal Gecko use! # error This code is NOT for internal Gecko use!
#endif // defined(MOZILLA_INTERNAL_API) #endif // defined(MOZILLA_INTERNAL_API)
#include "AccessibleHandlerControl.h" #include "AccessibleHandlerControl.h"

View File

@ -5,17 +5,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#if defined(MOZILLA_INTERNAL_API) #if defined(MOZILLA_INTERNAL_API)
#error This code is NOT for internal Gecko use! # error This code is NOT for internal Gecko use!
#endif // defined(MOZILLA_INTERNAL_API) #endif // defined(MOZILLA_INTERNAL_API)
#ifndef mozilla_a11y_AccessibleHandlerControl_h #ifndef mozilla_a11y_AccessibleHandlerControl_h
#define mozilla_a11y_AccessibleHandlerControl_h # define mozilla_a11y_AccessibleHandlerControl_h
#include "Factory.h" # include "Factory.h"
#include "HandlerData.h" # include "HandlerData.h"
#include "IUnknownImpl.h" # include "IUnknownImpl.h"
#include "mozilla/mscom/Registration.h" # include "mozilla/mscom/Registration.h"
#include "mozilla/NotNull.h" # include "mozilla/NotNull.h"
namespace mozilla { namespace mozilla {
namespace a11y { namespace a11y {

View File

@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#if defined(MOZILLA_INTERNAL_API) #if defined(MOZILLA_INTERNAL_API)
#error This code is NOT for internal Gecko use! # error This code is NOT for internal Gecko use!
#endif // defined(MOZILLA_INTERNAL_API) #endif // defined(MOZILLA_INTERNAL_API)
#include "HandlerChildEnumerator.h" #include "HandlerChildEnumerator.h"

View File

@ -5,15 +5,15 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#if defined(MOZILLA_INTERNAL_API) #if defined(MOZILLA_INTERNAL_API)
#error This code is NOT for internal Gecko use! # error This code is NOT for internal Gecko use!
#endif // defined(MOZILLA_INTERNAL_API) #endif // defined(MOZILLA_INTERNAL_API)
#ifndef mozilla_a11y_HandlerChildEnumerator_h #ifndef mozilla_a11y_HandlerChildEnumerator_h
#define mozilla_a11y_HandlerChildEnumerator_h # define mozilla_a11y_HandlerChildEnumerator_h
#include "AccessibleHandler.h" # include "AccessibleHandler.h"
#include "IUnknownImpl.h" # include "IUnknownImpl.h"
#include "mozilla/RefPtr.h" # include "mozilla/RefPtr.h"
namespace mozilla { namespace mozilla {
namespace a11y { namespace a11y {

View File

@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#if defined(MOZILLA_INTERNAL_API) #if defined(MOZILLA_INTERNAL_API)
#error This code is NOT for internal Gecko use! # error This code is NOT for internal Gecko use!
#endif // defined(MOZILLA_INTERNAL_API) #endif // defined(MOZILLA_INTERNAL_API)
#include "HandlerRelation.h" #include "HandlerRelation.h"

View File

@ -5,15 +5,15 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#if defined(MOZILLA_INTERNAL_API) #if defined(MOZILLA_INTERNAL_API)
#error This code is NOT for internal Gecko use! # error This code is NOT for internal Gecko use!
#endif // defined(MOZILLA_INTERNAL_API) #endif // defined(MOZILLA_INTERNAL_API)
#ifndef mozilla_a11y_HandlerRelation_h #ifndef mozilla_a11y_HandlerRelation_h
#define mozilla_a11y_HandlerRelation_h # define mozilla_a11y_HandlerRelation_h
#include "AccessibleHandler.h" # include "AccessibleHandler.h"
#include "IUnknownImpl.h" # include "IUnknownImpl.h"
#include "mozilla/RefPtr.h" # include "mozilla/RefPtr.h"
namespace mozilla { namespace mozilla {
namespace a11y { namespace a11y {

View File

@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#if defined(MOZILLA_INTERNAL_API) #if defined(MOZILLA_INTERNAL_API)
#error This code is NOT for internal Gecko use! # error This code is NOT for internal Gecko use!
#endif // defined(MOZILLA_INTERNAL_API) #endif // defined(MOZILLA_INTERNAL_API)
#include "HandlerTextLeaf.h" #include "HandlerTextLeaf.h"

View File

@ -5,15 +5,15 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#if defined(MOZILLA_INTERNAL_API) #if defined(MOZILLA_INTERNAL_API)
#error This code is NOT for internal Gecko use! # error This code is NOT for internal Gecko use!
#endif // defined(MOZILLA_INTERNAL_API) #endif // defined(MOZILLA_INTERNAL_API)
#ifndef mozilla_a11y_HandlerTextLeaf_h #ifndef mozilla_a11y_HandlerTextLeaf_h
#define mozilla_a11y_HandlerTextLeaf_h # define mozilla_a11y_HandlerTextLeaf_h
#include "AccessibleHandler.h" # include "AccessibleHandler.h"
#include "IUnknownImpl.h" # include "IUnknownImpl.h"
#include "mozilla/RefPtr.h" # include "mozilla/RefPtr.h"
namespace mozilla { namespace mozilla {
namespace a11y { namespace a11y {

View File

@ -27,7 +27,7 @@
#include "States.h" #include "States.h"
#ifdef A11Y_LOG #ifdef A11Y_LOG
#include "Logging.h" # include "Logging.h"
#endif #endif
#include "nsIMutableArray.h" #include "nsIMutableArray.h"

View File

@ -24,7 +24,7 @@
// Inheriting from both XPCOM and MSCOM interfaces causes a lot of warnings // Inheriting from both XPCOM and MSCOM interfaces causes a lot of warnings
// about virtual functions being hidden by each other. This is done by // about virtual functions being hidden by each other. This is done by
// design, so silence the warning. // design, so silence the warning.
#pragma GCC diagnostic ignored "-Woverloaded-virtual" # pragma GCC diagnostic ignored "-Woverloaded-virtual"
#endif #endif
namespace mozilla { namespace mozilla {
@ -301,11 +301,11 @@ static inline AccessibleWrap *WrapperFor(const ProxyAccessible *aProxy) {
#ifdef XP_WIN #ifdef XP_WIN
// Undo the windows.h damage // Undo the windows.h damage
#undef GetMessage # undef GetMessage
#undef CreateEvent # undef CreateEvent
#undef GetClassName # undef GetClassName
#undef GetBinaryType # undef GetBinaryType
#undef RemoveDirectory # undef RemoveDirectory
#endif #endif
#endif #endif

View File

@ -86,12 +86,12 @@ static bool sInSendMessageExHackEnabled = false;
static PVOID sVectoredExceptionHandler = nullptr; static PVOID sVectoredExceptionHandler = nullptr;
#if defined(_MSC_VER) #if defined(_MSC_VER)
#include <intrin.h> # include <intrin.h>
#pragma intrinsic(_ReturnAddress) # pragma intrinsic(_ReturnAddress)
#define RETURN_ADDRESS() _ReturnAddress() # define RETURN_ADDRESS() _ReturnAddress()
#elif defined(__GNUC__) || defined(__clang__) #elif defined(__GNUC__) || defined(__clang__)
#define RETURN_ADDRESS() \ # define RETURN_ADDRESS() \
__builtin_extract_return_addr(__builtin_return_address(0)) __builtin_extract_return_addr(__builtin_return_address(0))
#endif #endif
static inline bool IsCurrentThreadInBlockingMessageSend( static inline bool IsCurrentThreadInBlockingMessageSend(

View File

@ -22,16 +22,16 @@
#if defined(UIA_LOGGING) #if defined(UIA_LOGGING)
#define LOG_ERROR(FuncName) \ # define LOG_ERROR(FuncName) \
{ \ { \
DWORD err = ::GetLastError(); \ DWORD err = ::GetLastError(); \
nsPrintfCString msg(#FuncName " failed with code %u\n", err); \ nsPrintfCString msg(#FuncName " failed with code %u\n", err); \
::OutputDebugStringA(msg.get()); \ ::OutputDebugStringA(msg.get()); \
} }
#else #else
#define LOG_ERROR(FuncName) # define LOG_ERROR(FuncName)
#endif // defined(UIA_LOGGING) #endif // defined(UIA_LOGGING)

View File

@ -9,7 +9,7 @@
#include "BaseAccessibles.h" #include "BaseAccessibles.h"
#if defined(MOZ_CONTENT_SANDBOX) #if defined(MOZ_CONTENT_SANDBOX)
#include "mozilla/mscom/Ptr.h" # include "mozilla/mscom/Ptr.h"
#endif #endif
struct IAccessible; struct IAccessible;

View File

@ -17,13 +17,13 @@
// At this point we're catching a crash which is of much greater // At this point we're catching a crash which is of much greater
// importance than the missing dereference for the nsCOMPtr<> // importance than the missing dereference for the nsCOMPtr<>
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(disable : 4509) # pragma warning(disable : 4509)
#endif #endif
#if defined(__GNUC__) || defined(__clang__) #if defined(__GNUC__) || defined(__clang__)
#define ATTRIBUTE_UNUSED __attribute__((unused)) # define ATTRIBUTE_UNUSED __attribute__((unused))
#else #else
#define ATTRIBUTE_UNUSED # define ATTRIBUTE_UNUSED
#endif #endif
namespace mozilla { namespace mozilla {

View File

@ -25,7 +25,7 @@
#include <oaidl.h> #include <oaidl.h>
#if !defined(STATE_SYSTEM_NORMAL) #if !defined(STATE_SYSTEM_NORMAL)
#define STATE_SYSTEM_NORMAL (0) # define STATE_SYSTEM_NORMAL (0)
#endif // !defined(STATE_SYSTEM_NORMAL) #endif // !defined(STATE_SYSTEM_NORMAL)
namespace mozilla { namespace mozilla {

View File

@ -14,15 +14,15 @@ extern "C" {
#endif #endif
#ifndef STATUS_INFO_LENGTH_MISMATCH #ifndef STATUS_INFO_LENGTH_MISMATCH
#define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L) # define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L)
#endif #endif
#ifndef STATUS_BUFFER_TOO_SMALL #ifndef STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_TOO_SMALL ((NTSTATUS)0xC0000023L) # define STATUS_BUFFER_TOO_SMALL ((NTSTATUS)0xC0000023L)
#endif #endif
#ifndef STATUS_MORE_ENTRIES #ifndef STATUS_MORE_ENTRIES
#define STATUS_MORE_ENTRIES ((NTSTATUS)0x00000105L) # define STATUS_MORE_ENTRIES ((NTSTATUS)0x00000105L)
#endif #endif
enum UndocSystemInformationClass { SystemExtendedHandleInformation = 64 }; enum UndocSystemInformationClass { SystemExtendedHandleInformation = 64 };

View File

@ -25,7 +25,7 @@
#include "ProxyWrappers.h" #include "ProxyWrappers.h"
#if defined(MOZ_TELEMETRY_REPORTING) #if defined(MOZ_TELEMETRY_REPORTING)
#include "mozilla/Telemetry.h" # include "mozilla/Telemetry.h"
#endif // defined(MOZ_TELEMETRY_REPORTING) #endif // defined(MOZ_TELEMETRY_REPORTING)
using namespace mozilla; using namespace mozilla;
@ -322,14 +322,14 @@ static void AccumulateInstantiatorTelemetry(const nsAString& aValue) {
MOZ_ASSERT(NS_IsMainThread()); MOZ_ASSERT(NS_IsMainThread());
if (!aValue.IsEmpty()) { if (!aValue.IsEmpty()) {
#if defined(MOZ_TELEMETRY_REPORTING) # if defined(MOZ_TELEMETRY_REPORTING)
Telemetry::ScalarSet(Telemetry::ScalarID::A11Y_INSTANTIATORS, aValue); Telemetry::ScalarSet(Telemetry::ScalarID::A11Y_INSTANTIATORS, aValue);
#endif // defined(MOZ_TELEMETRY_REPORTING) # endif // defined(MOZ_TELEMETRY_REPORTING)
#if defined(MOZ_CRASHREPORTER) # if defined(MOZ_CRASHREPORTER)
CrashReporter::AnnotateCrashReport( CrashReporter::AnnotateCrashReport(
CrashReporter::Annotation::AccessibilityClient, CrashReporter::Annotation::AccessibilityClient,
NS_ConvertUTF16toUTF8(aValue)); NS_ConvertUTF16toUTF8(aValue));
#endif // defined(MOZ_CRASHREPORTER) # endif // defined(MOZ_CRASHREPORTER)
} }
} }

View File

@ -9,7 +9,7 @@
#include "Platform.h" #include "Platform.h"
#ifdef A11Y_LOG #ifdef A11Y_LOG
#include "Logging.h" # include "Logging.h"
#endif #endif
using namespace mozilla; using namespace mozilla;

View File

@ -17,7 +17,7 @@
#include "TextUpdater.h" #include "TextUpdater.h"
#ifdef A11Y_LOG #ifdef A11Y_LOG
#include "Logging.h" # include "Logging.h"
#endif #endif
#include "nsNameSpaceManager.h" #include "nsNameSpaceManager.h"

View File

@ -8,11 +8,11 @@
#include "application.ini.h" #include "application.ini.h"
#include "mozilla/Bootstrap.h" #include "mozilla/Bootstrap.h"
#if defined(XP_WIN) #if defined(XP_WIN)
#include <windows.h> # include <windows.h>
#include <stdlib.h> # include <stdlib.h>
#elif defined(XP_UNIX) #elif defined(XP_UNIX)
#include <sys/resource.h> # include <sys/resource.h>
#include <unistd.h> # include <unistd.h>
#endif #endif
#include <stdio.h> #include <stdio.h>
@ -23,13 +23,13 @@
#include "nsIFile.h" #include "nsIFile.h"
#ifdef XP_WIN #ifdef XP_WIN
#include "LauncherProcessWin.h" # include "LauncherProcessWin.h"
#define XRE_WANT_ENVIRON # define XRE_WANT_ENVIRON
#define strcasecmp _stricmp # define strcasecmp _stricmp
#ifdef MOZ_SANDBOX # ifdef MOZ_SANDBOX
#include "mozilla/sandboxing/SandboxInitialization.h" # include "mozilla/sandboxing/SandboxInitialization.h"
#endif # endif
#endif #endif
#include "BinaryPath.h" #include "BinaryPath.h"
@ -40,12 +40,12 @@
#include "mozilla/WindowsDllBlocklist.h" #include "mozilla/WindowsDllBlocklist.h"
#ifdef LIBFUZZER #ifdef LIBFUZZER
#include "FuzzerDefs.h" # include "FuzzerDefs.h"
#endif #endif
#ifdef MOZ_LINUX_32_SSE2_STARTUP_ERROR #ifdef MOZ_LINUX_32_SSE2_STARTUP_ERROR
#include <cpuid.h> # include <cpuid.h>
#include "mozilla/Unused.h" # include "mozilla/Unused.h"
static bool IsSSE2Available() { static bool IsSSE2Available() {
// The rest of the app has been compiled to assume that SSE2 is present // The rest of the app has been compiled to assume that SSE2 is present
@ -84,14 +84,14 @@ __attribute__((constructor)) static void SSE2Check() {
#endif #endif
#if !defined(MOZ_WIDGET_COCOA) && !defined(MOZ_WIDGET_ANDROID) #if !defined(MOZ_WIDGET_COCOA) && !defined(MOZ_WIDGET_ANDROID)
#define MOZ_BROWSER_CAN_BE_CONTENTPROC # define MOZ_BROWSER_CAN_BE_CONTENTPROC
#include "../../ipc/contentproc/plugin-container.cpp" # include "../../ipc/contentproc/plugin-container.cpp"
#endif #endif
using namespace mozilla; using namespace mozilla;
#ifdef XP_MACOSX #ifdef XP_MACOSX
#define kOSXResourcesFolder "Resources" # define kOSXResourcesFolder "Resources"
#endif #endif
#define kDesktopFolder "browser" #define kDesktopFolder "browser"
@ -107,9 +107,9 @@ static MOZ_FORMAT_PRINTF(1, 2) void Output(const char* fmt, ...) {
wchar_t wide_msg[2048]; wchar_t wide_msg[2048];
MultiByteToWideChar(CP_UTF8, 0, msg, -1, wide_msg, _countof(wide_msg)); MultiByteToWideChar(CP_UTF8, 0, msg, -1, wide_msg, _countof(wide_msg));
#if MOZ_WINCONSOLE # if MOZ_WINCONSOLE
fwprintf_s(stderr, wide_msg); fwprintf_s(stderr, wide_msg);
#else # else
// Linking user32 at load-time interferes with the DLL blocklist (bug 932100). // Linking user32 at load-time interferes with the DLL blocklist (bug 932100).
// This is a rare codepath, so we can load user32 at run-time instead. // This is a rare codepath, so we can load user32 at run-time instead.
HMODULE user32 = LoadLibraryW(L"user32.dll"); HMODULE user32 = LoadLibraryW(L"user32.dll");
@ -122,7 +122,7 @@ static MOZ_FORMAT_PRINTF(1, 2) void Output(const char* fmt, ...) {
} }
FreeLibrary(user32); FreeLibrary(user32);
} }
#endif # endif
#endif #endif
va_end(ap); va_end(ap);
@ -196,12 +196,12 @@ static int do_main(int argc, char* argv[], char* envp[]) {
sandboxing::GetInitializedBrokerServices(); sandboxing::GetInitializedBrokerServices();
sandboxing::PermissionsService* permissionsService = sandboxing::PermissionsService* permissionsService =
sandboxing::GetPermissionsService(); sandboxing::GetPermissionsService();
#if defined(MOZ_CONTENT_SANDBOX) # if defined(MOZ_CONTENT_SANDBOX)
if (!brokerServices) { if (!brokerServices) {
Output("Couldn't initialize the broker services.\n"); Output("Couldn't initialize the broker services.\n");
return 255; return 255;
} }
#endif # endif
config.sandboxBrokerServices = brokerServices; config.sandboxBrokerServices = brokerServices;
config.sandboxPermissionsService = permissionsService; config.sandboxPermissionsService = permissionsService;
#endif #endif
@ -245,17 +245,17 @@ int main(int argc, char* argv[], char* envp[]) {
// We are launching as a content process, delegate to the appropriate // We are launching as a content process, delegate to the appropriate
// main // main
if (argc > 1 && IsArg(argv[1], "contentproc")) { if (argc > 1 && IsArg(argv[1], "contentproc")) {
#ifdef HAS_DLL_BLOCKLIST # ifdef HAS_DLL_BLOCKLIST
DllBlocklist_Initialize(eDllBlocklistInitFlagIsChildProcess); DllBlocklist_Initialize(eDllBlocklistInitFlagIsChildProcess);
#endif # endif
#if defined(XP_WIN) && defined(MOZ_SANDBOX) # if defined(XP_WIN) && defined(MOZ_SANDBOX)
// We need to initialize the sandbox TargetServices before InitXPCOMGlue // We need to initialize the sandbox TargetServices before InitXPCOMGlue
// because we might need the sandbox broker to give access to some files. // because we might need the sandbox broker to give access to some files.
if (IsSandboxedProcess() && !sandboxing::GetInitializedTargetServices()) { if (IsSandboxedProcess() && !sandboxing::GetInitializedTargetServices()) {
Output("Failed to initialize the sandbox target services."); Output("Failed to initialize the sandbox target services.");
return 255; return 255;
} }
#endif # endif
nsresult rv = InitXPCOMGlue(); nsresult rv = InitXPCOMGlue();
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
@ -264,9 +264,9 @@ int main(int argc, char* argv[], char* envp[]) {
int result = content_process_main(gBootstrap.get(), argc, argv); int result = content_process_main(gBootstrap.get(), argc, argv);
#if defined(DEBUG) && defined(HAS_DLL_BLOCKLIST) # if defined(DEBUG) && defined(HAS_DLL_BLOCKLIST)
DllBlocklist_Shutdown(); DllBlocklist_Shutdown();
#endif # endif
// InitXPCOMGlue calls NS_LogInit, so we need to balance it here. // InitXPCOMGlue calls NS_LogInit, so we need to balance it here.
gBootstrap->NS_LogTerm(); gBootstrap->NS_LogTerm();

View File

@ -26,9 +26,9 @@
#define DLL_BLOCKLIST_STRING_TYPE UNICODE_STRING #define DLL_BLOCKLIST_STRING_TYPE UNICODE_STRING
#if defined(MOZ_LAUNCHER_PROCESS) || defined(NIGHTLY_BUILD) #if defined(MOZ_LAUNCHER_PROCESS) || defined(NIGHTLY_BUILD)
#include "mozilla/WindowsDllBlocklistDefs.h" # include "mozilla/WindowsDllBlocklistDefs.h"
#else #else
#include "mozilla/WindowsDllBlocklistCommon.h" # include "mozilla/WindowsDllBlocklistCommon.h"
DLL_BLOCKLIST_DEFINITIONS_BEGIN DLL_BLOCKLIST_DEFINITIONS_BEGIN
DLL_BLOCKLIST_DEFINITIONS_END DLL_BLOCKLIST_DEFINITIONS_END
#endif #endif

View File

@ -32,7 +32,7 @@
#include "ProcThreadAttributes.h" #include "ProcThreadAttributes.h"
#if defined(MOZ_LAUNCHER_PROCESS) #if defined(MOZ_LAUNCHER_PROCESS)
#include "SameBinary.h" # include "SameBinary.h"
#endif // defined(MOZ_LAUNCHER_PROCESS) #endif // defined(MOZ_LAUNCHER_PROCESS)
/** /**
@ -56,8 +56,8 @@ static mozilla::LauncherVoidResult PostCreationSetup(HANDLE aChildProcess,
#if !defined( \ #if !defined( \
PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON) PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON)
#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON \ # define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON \
(0x00000001ULL << 60) (0x00000001ULL << 60)
#endif // !defined(PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON) #endif // !defined(PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON)
#if (_WIN32_WINNT < 0x0602) #if (_WIN32_WINNT < 0x0602)

View File

@ -5,15 +5,15 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef XP_WIN #ifdef XP_WIN
#define NS_WINIEHISTORYENUMERATOR_CID \ # define NS_WINIEHISTORYENUMERATOR_CID \
{ \ { \
0x93480624, 0x806e, 0x4756, { \ 0x93480624, 0x806e, 0x4756, { \
0xb7, 0xcb, 0x0f, 0xb7, 0xdd, 0x74, 0x6a, 0x8f \ 0xb7, 0xcb, 0x0f, 0xb7, 0xdd, 0x74, 0x6a, 0x8f \
} \ } \
} }
#define NS_IEHISTORYENUMERATOR_CONTRACTID \ # define NS_IEHISTORYENUMERATOR_CONTRACTID \
"@mozilla.org/profile/migrator/iehistoryenumerator;1" "@mozilla.org/profile/migrator/iehistoryenumerator;1"
#endif #endif
#define NS_SHELLSERVICE_CID \ #define NS_SHELLSERVICE_CID \
@ -57,12 +57,12 @@
} }
#if defined(MOZ_WIDGET_COCOA) #if defined(MOZ_WIDGET_COCOA)
#define NS_MACATTRIBUTIONSERVICE_CONTRACTID "@mozilla.org/mac-attribution;1" # define NS_MACATTRIBUTIONSERVICE_CONTRACTID "@mozilla.org/mac-attribution;1"
#define NS_MACATTRIBUTIONSERVICE_CID \ # define NS_MACATTRIBUTIONSERVICE_CID \
{ \ { \
0x6FC66A78, 0x6CBC, 0x4B3F, { \ 0x6FC66A78, 0x6CBC, 0x4B3F, { \
0xB7, 0xBA, 0x37, 0x92, 0x89, 0xB2, 0x92, 0x76 \ 0xB7, 0xBA, 0x37, 0x92, 0x89, 0xB2, 0x92, 0x76 \
} \ } \
} }
#endif #endif

View File

@ -9,19 +9,19 @@
#include "DirectoryProvider.h" #include "DirectoryProvider.h"
#if defined(XP_WIN) #if defined(XP_WIN)
#include "nsWindowsShellService.h" # include "nsWindowsShellService.h"
#elif defined(XP_MACOSX) #elif defined(XP_MACOSX)
#include "nsMacShellService.h" # include "nsMacShellService.h"
#elif defined(MOZ_WIDGET_GTK) #elif defined(MOZ_WIDGET_GTK)
#include "nsGNOMEShellService.h" # include "nsGNOMEShellService.h"
#endif #endif
#if defined(MOZ_WIDGET_COCOA) #if defined(MOZ_WIDGET_COCOA)
#include "nsMacAttribution.h" # include "nsMacAttribution.h"
#endif #endif
#if defined(XP_WIN) #if defined(XP_WIN)
#include "nsIEHistoryEnumerator.h" # include "nsIEHistoryEnumerator.h"
#endif #endif
#include "AboutRedirector.h" #include "AboutRedirector.h"

View File

@ -29,7 +29,7 @@
#include "mozilla/Sprintf.h" #include "mozilla/Sprintf.h"
#include "mozilla/dom/Element.h" #include "mozilla/dom/Element.h"
#if defined(MOZ_WIDGET_GTK) #if defined(MOZ_WIDGET_GTK)
#include "nsIImageToPixbuf.h" # include "nsIImageToPixbuf.h"
#endif #endif
#include "nsXULAppAPI.h" #include "nsXULAppAPI.h"
#include "gfxPlatform.h" #include "gfxPlatform.h"

View File

@ -36,7 +36,7 @@
#include "shellapi.h" #include "shellapi.h"
#ifdef _WIN32_WINNT #ifdef _WIN32_WINNT
#undef _WIN32_WINNT # undef _WIN32_WINNT
#endif #endif
#define _WIN32_WINNT 0x0600 #define _WIN32_WINNT 0x0600
#define INITGUID #define INITGUID
@ -53,7 +53,7 @@
#undef ACCESS_READ #undef ACCESS_READ
#ifndef MAX_BUF #ifndef MAX_BUF
#define MAX_BUF 4096 # define MAX_BUF 4096
#endif #endif
#define REG_SUCCEEDED(val) (val == ERROR_SUCCESS) #define REG_SUCCEEDED(val) (val == ERROR_SUCCESS)

View File

@ -15,16 +15,16 @@
#define elfhack_text ".elfhack.text.v" ver #define elfhack_text ".elfhack.text.v" ver
#ifndef R_ARM_V4BX #ifndef R_ARM_V4BX
#define R_ARM_V4BX 0x28 # define R_ARM_V4BX 0x28
#endif #endif
#ifndef R_ARM_CALL #ifndef R_ARM_CALL
#define R_ARM_CALL 0x1c # define R_ARM_CALL 0x1c
#endif #endif
#ifndef R_ARM_JUMP24 #ifndef R_ARM_JUMP24
#define R_ARM_JUMP24 0x1d # define R_ARM_JUMP24 0x1d
#endif #endif
#ifndef R_ARM_THM_JUMP24 #ifndef R_ARM_THM_JUMP24
#define R_ARM_THM_JUMP24 0x1e # define R_ARM_THM_JUMP24 0x1e
#endif #endif
char *rundir = nullptr; char *rundir = nullptr;

View File

@ -13,11 +13,11 @@
#undef Elf_Addr #undef Elf_Addr
#if defined(__LP64__) #if defined(__LP64__)
#define Elf_Ehdr Elf64_Ehdr # define Elf_Ehdr Elf64_Ehdr
#define Elf_Addr Elf64_Addr # define Elf_Addr Elf64_Addr
#else #else
#define Elf_Ehdr Elf32_Ehdr # define Elf_Ehdr Elf32_Ehdr
#define Elf_Addr Elf32_Addr # define Elf_Addr Elf32_Addr
#endif #endif
extern __attribute__((visibility("hidden"))) void original_init(int argc, extern __attribute__((visibility("hidden"))) void original_init(int argc,

View File

@ -83,31 +83,31 @@ DEF(several)
DEF(times) DEF(times)
#else #else
#pragma GCC visibility push(default) # pragma GCC visibility push(default)
#include <stdlib.h> # include <stdlib.h>
#include <stdio.h> # include <stdio.h>
#define DEF(w) static const char str_##w[] = #w; # define DEF(w) static const char str_##w[] = # w;
#include "test.c" # include "test.c"
#undef DEF # undef DEF
const char *strings[] = { const char *strings[] = {
#define DEF(w) str_##w, # define DEF(w) str_##w,
#include "test.c" # include "test.c"
#include "test.c" # include "test.c"
#include "test.c" # include "test.c"
}; };
/* Create a hole between two zones of relative relocations */ /* Create a hole between two zones of relative relocations */
const int hole[] = {42, 42, 42, 42}; const int hole[] = {42, 42, 42, 42};
const char *strings2[] = { const char *strings2[] = {
#include "test.c" # include "test.c"
#include "test.c" # include "test.c"
#include "test.c" # include "test.c"
#include "test.c" # include "test.c"
#include "test.c" # include "test.c"
#undef DEF # undef DEF
}; };
static int ret = 1; static int ret = 1;
@ -144,25 +144,25 @@ void end_test() {
void test() { void test() {
int i = 0, j = 0; int i = 0, j = 0;
#define DEF_(a, i, w) \ # define DEF_(a, i, w) \
if (a[i++] != str_##w) return; if (a[i++] != str_##w) return;
#define DEF(w) DEF_(strings, i, w) # define DEF(w) DEF_(strings, i, w)
#include "test.c" # include "test.c"
#include "test.c" # include "test.c"
#include "test.c" # include "test.c"
#undef DEF # undef DEF
#define DEF(w) DEF_(strings2, j, w) # define DEF(w) DEF_(strings2, j, w)
#include "test.c" # include "test.c"
#include "test.c" # include "test.c"
#include "test.c" # include "test.c"
#include "test.c" # include "test.c"
#include "test.c" # include "test.c"
#undef DEF # undef DEF
if (i != sizeof(strings) / sizeof(strings[0]) && if (i != sizeof(strings) / sizeof(strings[0]) &&
j != sizeof(strings2) / sizeof(strings2[0])) j != sizeof(strings2) / sizeof(strings2[0]))
fprintf(stderr, "WARNING: Test doesn't cover the whole array\n"); fprintf(stderr, "WARNING: Test doesn't cover the whole array\n");
end_test(); end_test();
} }
#pragma GCC visibility pop # pragma GCC visibility pop
#endif #endif

View File

@ -38,8 +38,8 @@ overlap with libstdc++.
#if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 18) #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 18)
// Implementation of utility functions for the prime rehash policy used in // Implementation of utility functions for the prime rehash policy used in
// unordered_map and unordered_set. // unordered_map and unordered_set.
#include <unordered_map> # include <unordered_map>
#include <tr1/unordered_map> # include <tr1/unordered_map>
namespace std { namespace std {
size_t __attribute__((weak)) size_t __attribute__((weak))
__detail::_Prime_rehash_policy::_M_next_bkt(size_t __n) const { __detail::_Prime_rehash_policy::_M_next_bkt(size_t __n) const {
@ -103,8 +103,8 @@ __attribute__((weak)) runtime_error::runtime_error(char const* s)
#if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 21) #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 21)
/* Expose the definitions for the old ABI, allowing us to call its functions */ /* Expose the definitions for the old ABI, allowing us to call its functions */
#define _GLIBCXX_THREAD_ABI_COMPAT 1 # define _GLIBCXX_THREAD_ABI_COMPAT 1
#include <thread> # include <thread>
namespace std { namespace std {
/* The old ABI has a thread::_M_start_thread(shared_ptr<_Impl_base>), /* The old ABI has a thread::_M_start_thread(shared_ptr<_Impl_base>),
@ -121,7 +121,7 @@ __attribute__((weak)) void thread::_M_start_thread(shared_ptr<_Impl_base> impl,
_M_start_thread(std::move(impl)); _M_start_thread(std::move(impl));
} }
#if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 22) # if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 22)
/* We need a _Impl_base-derived class wrapping a _State to call the old ABI /* We need a _Impl_base-derived class wrapping a _State to call the old ABI
* from what we got by diverting the new API */ * from what we got by diverting the new API */
struct StateWrapper : public thread::_Impl_base { struct StateWrapper : public thread::_Impl_base {
@ -141,7 +141,7 @@ __attribute__((weak)) void thread::_M_start_thread(unique_ptr<_State> aState,
/* For some reason this is a symbol exported by new versions of libstdc++, /* For some reason this is a symbol exported by new versions of libstdc++,
* even though the destructor is default there too */ * even though the destructor is default there too */
__attribute__((weak)) thread::_State::~_State() = default; __attribute__((weak)) thread::_State::~_State() = default;
#endif # endif
} // namespace std } // namespace std
#endif #endif

View File

@ -11,9 +11,9 @@
#include "nsChromeRegistryChrome.h" #include "nsChromeRegistryChrome.h"
#if defined(XP_WIN) #if defined(XP_WIN)
#include <windows.h> # include <windows.h>
#elif defined(XP_MACOSX) #elif defined(XP_MACOSX)
#include <CoreServices/CoreServices.h> # include <CoreServices/CoreServices.h>
#endif #endif
#include "nsArrayEnumerator.h" #include "nsArrayEnumerator.h"

View File

@ -11,21 +11,21 @@
* system as well as NSS' build system for now. * system as well as NSS' build system for now.
*/ */
#if defined(XP_DARWIN) || defined(DARWIN) #if defined(XP_DARWIN) || defined(DARWIN)
#include "md/_darwin.cfg" # include "md/_darwin.cfg"
#elif defined(XP_WIN) || defined(_WINDOWS) #elif defined(XP_WIN) || defined(_WINDOWS)
#include "md/_win95.cfg" # include "md/_win95.cfg"
#elif defined(__FreeBSD__) #elif defined(__FreeBSD__)
#include "md/_freebsd.cfg" # include "md/_freebsd.cfg"
#elif defined(__NetBSD__) #elif defined(__NetBSD__)
#include "md/_netbsd.cfg" # include "md/_netbsd.cfg"
#elif defined(__OpenBSD__) #elif defined(__OpenBSD__)
#include "md/_openbsd.cfg" # include "md/_openbsd.cfg"
#elif defined(__linux__) #elif defined(__linux__)
#include "md/_linux.cfg" # include "md/_linux.cfg"
#elif defined(__sun__) #elif defined(__sun__)
#include "md/_solaris.cfg" # include "md/_solaris.cfg"
#else #else
#error "Unsupported platform!" # error "Unsupported platform!"
#endif #endif
#endif /* NSPR_PRCPUCFG_H_ */ #endif /* NSPR_PRCPUCFG_H_ */

View File

@ -25,29 +25,29 @@
#include "pathsub.h" #include "pathsub.h"
#ifdef HAVE_GETOPT_H #ifdef HAVE_GETOPT_H
#include <getopt.h> # include <getopt.h>
#endif #endif
#ifdef SUNOS4 #ifdef SUNOS4
#include "sunos4.h" # include "sunos4.h"
#endif #endif
#ifdef NEXTSTEP #ifdef NEXTSTEP
#include <bsd/libc.h> # include <bsd/libc.h>
#endif #endif
#ifdef __QNX__ #ifdef __QNX__
#include <unix.h> # include <unix.h>
#endif #endif
#ifdef NEED_S_ISLNK #ifdef NEED_S_ISLNK
#if !defined(S_ISLNK) && defined(S_IFLNK) # if !defined(S_ISLNK) && defined(S_IFLNK)
#define S_ISLNK(a) (((a)&S_IFMT) == S_IFLNK) # define S_ISLNK(a) (((a)&S_IFMT) == S_IFLNK)
#endif # endif
#endif #endif
#ifndef _DIRECTORY_SEPARATOR #ifndef _DIRECTORY_SEPARATOR
#define _DIRECTORY_SEPARATOR "/" # define _DIRECTORY_SEPARATOR "/"
#endif /* _DIRECTORY_SEPARATOR */ #endif /* _DIRECTORY_SEPARATOR */
#ifdef NEED_FCHMOD_PROTO #ifdef NEED_FCHMOD_PROTO
@ -157,11 +157,11 @@ static void copyfile(char *name, char *toname, mode_t mode, char *group,
utb.modtime = sb.st_mtime; utb.modtime = sb.st_mtime;
if (utime(toname, &utb) < 0) fail("cannot set times of %s", toname); if (utime(toname, &utb) < 0) fail("cannot set times of %s", toname);
} }
#ifdef HAVE_FCHMOD # ifdef HAVE_FCHMOD
if (fchmod(tofd, mode) < 0) if (fchmod(tofd, mode) < 0)
#else # else
if (chmod(toname, mode) < 0) if (chmod(toname, mode) < 0)
#endif # endif
fail("cannot change mode of %s", toname); fail("cannot change mode of %s", toname);
#endif #endif
if ((owner || group) && fchown(tofd, uid, gid) < 0) if ((owner || group) && fchown(tofd, uid, gid) < 0)
@ -290,12 +290,12 @@ int main(int argc, char **argv) {
if (!cwd) { if (!cwd) {
#ifndef NEEDS_GETCWD #ifndef NEEDS_GETCWD
#ifndef GETCWD_CANT_MALLOC # ifndef GETCWD_CANT_MALLOC
cwd = getcwd(0, PATH_MAX); cwd = getcwd(0, PATH_MAX);
#else # else
cwd = malloc(PATH_MAX + 1); cwd = malloc(PATH_MAX + 1);
cwd = getcwd(cwd, PATH_MAX); cwd = getcwd(cwd, PATH_MAX);
#endif # endif
#else #else
cwd = malloc(PATH_MAX + 1); cwd = malloc(PATH_MAX + 1);
cwd = getwd(cwd); cwd = getwd(cwd);
@ -304,12 +304,12 @@ int main(int argc, char **argv) {
xchdir(todir); xchdir(todir);
#ifndef NEEDS_GETCWD #ifndef NEEDS_GETCWD
#ifndef GETCWD_CANT_MALLOC # ifndef GETCWD_CANT_MALLOC
todir = getcwd(0, PATH_MAX); todir = getcwd(0, PATH_MAX);
#else # else
todir = malloc(PATH_MAX + 1); todir = malloc(PATH_MAX + 1);
todir = getcwd(todir, PATH_MAX); todir = getcwd(todir, PATH_MAX);
#endif # endif
#else #else
todir = malloc(PATH_MAX + 1); todir = malloc(PATH_MAX + 1);
todir = getwd(todir); todir = getwd(todir);

View File

@ -20,11 +20,11 @@
#include "pathsub.h" #include "pathsub.h"
#ifdef USE_REENTRANT_LIBC #ifdef USE_REENTRANT_LIBC
#include <libc_r.h> # include <libc_r.h>
#endif #endif
#ifdef SUNOS4 #ifdef SUNOS4
#include "sunos4.h" # include "sunos4.h"
#endif #endif
char *program; char *program;
@ -70,7 +70,7 @@ char *getcomponent(char *path, char *name) {
} }
#ifdef LAME_READDIR #ifdef LAME_READDIR
#include <sys/param.h> # include <sys/param.h>
/* /*
** The static buffer in Unixware's readdir is too small. ** The static buffer in Unixware's readdir is too small.
*/ */

View File

@ -14,7 +14,7 @@
#include <sys/types.h> #include <sys/types.h>
#ifndef PATH_MAX #ifndef PATH_MAX
#define PATH_MAX 1024 # define PATH_MAX 1024
#endif #endif
/* /*

View File

@ -12,11 +12,11 @@
#include "nsIProtocolHandler.h" #include "nsIProtocolHandler.h"
#if defined(MOZ_WIDGET_ANDROID) && defined(RELEASE_OR_BETA) #if defined(MOZ_WIDGET_ANDROID) && defined(RELEASE_OR_BETA)
#define ABOUT_CONFIG_BLOCKED_GV # define ABOUT_CONFIG_BLOCKED_GV
#endif #endif
#ifdef ABOUT_CONFIG_BLOCKED_GV #ifdef ABOUT_CONFIG_BLOCKED_GV
#include "mozilla/jni/Utils.h" // for mozilla::jni::IsFennec() # include "mozilla/jni/Utils.h" // for mozilla::jni::IsFennec()
#endif #endif
NS_IMPL_ISUPPORTS(nsAboutRedirector, nsIAboutModule) NS_IMPL_ISUPPORTS(nsAboutRedirector, nsIAboutModule)

View File

@ -12,7 +12,7 @@
#include <algorithm> #include <algorithm>
#ifdef MOZ_TOOLKIT_SEARCH #ifdef MOZ_TOOLKIT_SEARCH
#include "nsIBrowserSearchService.h" # include "nsIBrowserSearchService.h"
#endif #endif
#include "nsIURIFixup.h" #include "nsIURIFixup.h"

View File

@ -9,10 +9,10 @@
#include <algorithm> #include <algorithm>
#ifdef XP_WIN #ifdef XP_WIN
#include <process.h> # include <process.h>
#define getpid _getpid # define getpid _getpid
#else #else
#include <unistd.h> // for getpid() # include <unistd.h> // for getpid()
#endif #endif
#include "mozilla/ArrayUtils.h" #include "mozilla/ArrayUtils.h"
@ -209,17 +209,17 @@
#include "timeline/JavascriptTimelineMarker.h" #include "timeline/JavascriptTimelineMarker.h"
#ifdef MOZ_PLACES #ifdef MOZ_PLACES
#include "nsIFaviconService.h" # include "nsIFaviconService.h"
#include "mozIPlacesPendingOperation.h" # include "mozIPlacesPendingOperation.h"
#endif #endif
#if NS_PRINT_PREVIEW #if NS_PRINT_PREVIEW
#include "nsIDocumentViewerPrint.h" # include "nsIDocumentViewerPrint.h"
#include "nsIWebBrowserPrint.h" # include "nsIWebBrowserPrint.h"
#endif #endif
#ifdef MOZ_TOOLKIT_SEARCH #ifdef MOZ_TOOLKIT_SEARCH
#include "nsIBrowserSearchService.h" # include "nsIBrowserSearchService.h"
#endif #endif
using namespace mozilla; using namespace mozilla;

View File

@ -7,7 +7,7 @@
#define nsDocShellEditorData_h__ #define nsDocShellEditorData_h__
#ifndef nsCOMPtr_h___ #ifndef nsCOMPtr_h___
#include "nsCOMPtr.h" # include "nsCOMPtr.h"
#endif #endif
#include "mozilla/HTMLEditor.h" #include "mozilla/HTMLEditor.h"

View File

@ -9,18 +9,18 @@
#ifdef MOZILLA_INTERNAL_API #ifdef MOZILLA_INTERNAL_API
#include "nsDOMNavigationTiming.h" # include "nsDOMNavigationTiming.h"
#include "nsIDocShell.h" # include "nsIDocShell.h"
#include "nsIWebNavigation.h" # include "nsIWebNavigation.h"
/** /**
* Load flag for error pages. This uses one of the reserved flag * Load flag for error pages. This uses one of the reserved flag
* values from nsIWebNavigation. * values from nsIWebNavigation.
*/ */
#define LOAD_FLAGS_ERROR_PAGE 0x0001U # define LOAD_FLAGS_ERROR_PAGE 0x0001U
#define MAKE_LOAD_TYPE(type, flags) ((type) | ((flags) << 16)) # define MAKE_LOAD_TYPE(type, flags) ((type) | ((flags) << 16))
#define LOAD_TYPE_HAS_FLAGS(type, flags) ((type) & ((flags) << 16)) # define LOAD_TYPE_HAS_FLAGS(type, flags) ((type) & ((flags) << 16))
/** /**
* These are flags that confuse ConvertLoadTypeToDocShellLoadInfo and should * These are flags that confuse ConvertLoadTypeToDocShellLoadInfo and should
@ -28,8 +28,8 @@
* above 0xffff (e.g. LOAD_FLAGS_BYPASS_CLASSIFIER), since MAKE_LOAD_TYPE would * above 0xffff (e.g. LOAD_FLAGS_BYPASS_CLASSIFIER), since MAKE_LOAD_TYPE would
* just shift them out anyway. * just shift them out anyway.
*/ */
#define EXTRA_LOAD_FLAGS \ # define EXTRA_LOAD_FLAGS \
(LOAD_FLAGS_FIRST_LOAD | LOAD_FLAGS_ALLOW_POPUPS | 0xffff0000) (LOAD_FLAGS_FIRST_LOAD | LOAD_FLAGS_ALLOW_POPUPS | 0xffff0000)
/* load types are legal combinations of load commands and flags /* load types are legal combinations of load commands and flags
* *

View File

@ -26,10 +26,10 @@
#include "nsLocalHandlerApp.h" #include "nsLocalHandlerApp.h"
#include "ContentHandlerService.h" #include "ContentHandlerService.h"
#ifdef MOZ_ENABLE_DBUS #ifdef MOZ_ENABLE_DBUS
#include "nsDBusHandlerApp.h" # include "nsDBusHandlerApp.h"
#endif #endif
#if defined(MOZ_WIDGET_ANDROID) #if defined(MOZ_WIDGET_ANDROID)
#include "nsExternalURLHandlerService.h" # include "nsExternalURLHandlerService.h"
#endif #endif
// session history // session history

View File

@ -225,9 +225,9 @@ uint32_t nsSHistory::CalcMaxTotalViewers() {
// This value allows tweaking how fast the allowed amount of content viewers // This value allows tweaking how fast the allowed amount of content viewers
// grows with increasing amounts of memory. Larger values mean slower growth. // grows with increasing amounts of memory. Larger values mean slower growth.
#ifdef ANDROID #ifdef ANDROID
#define MAX_TOTAL_VIEWERS_BIAS 15.9 # define MAX_TOTAL_VIEWERS_BIAS 15.9
#else #else
#define MAX_TOTAL_VIEWERS_BIAS 14 # define MAX_TOTAL_VIEWERS_BIAS 14
#endif #endif
// Calculate an estimate of how many ContentViewers we should cache based // Calculate an estimate of how many ContentViewers we should cache based
@ -660,7 +660,7 @@ nsresult nsSHistory::PrintHistory() {
nsString title; nsString title;
entry->GetTitle(title); entry->GetTitle(title);
#if 0 # if 0
nsAutoCString url; nsAutoCString url;
if (uri) { if (uri) {
uri->GetSpec(url); uri->GetSpec(url);
@ -671,7 +671,7 @@ nsresult nsSHistory::PrintHistory() {
printf("\t\t Title = %s\n", NS_LossyConvertUTF16toASCII(title).get()); printf("\t\t Title = %s\n", NS_LossyConvertUTF16toASCII(title).get());
printf("\t\t layout History Data = %x\n", layoutHistoryState.get()); printf("\t\t layout History Data = %x\n", layoutHistoryState.get());
#endif # endif
} }
return NS_OK; return NS_OK;

View File

@ -25,7 +25,7 @@
// X11 has a #define for CurrentTime. // X11 has a #define for CurrentTime.
#ifdef CurrentTime #ifdef CurrentTime
#undef CurrentTime # undef CurrentTime
#endif #endif
struct JSContext; struct JSContext;

View File

@ -169,8 +169,8 @@ class AttrArray {
#ifdef _MSC_VER #ifdef _MSC_VER
// Disable MSVC warning 'nonstandard extension used: zero-sized array in // Disable MSVC warning 'nonstandard extension used: zero-sized array in
// struct/union' // struct/union'
#pragma warning(push) # pragma warning(push)
#pragma warning(disable : 4200) # pragma warning(disable : 4200)
#endif #endif
class Impl { class Impl {
public: public:
@ -201,7 +201,7 @@ class AttrArray {
InternalAttr mBuffer[0]; InternalAttr mBuffer[0];
}; };
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(pop) # pragma warning(pop)
#endif #endif
mozilla::Span<InternalAttr> NonMappedAttrs() { mozilla::Span<InternalAttr> NonMappedAttrs() {

View File

@ -9,8 +9,8 @@
// We intentionally shadow non-virtual methods, but gcc gets confused. // We intentionally shadow non-virtual methods, but gcc gets confused.
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic push # pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverloaded-virtual" # pragma GCC diagnostic ignored "-Woverloaded-virtual"
#endif #endif
#include <stdint.h> #include <stdint.h>
@ -177,7 +177,7 @@ class DOMException : public Exception {
} // namespace mozilla } // namespace mozilla
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic pop # pragma GCC diagnostic pop
#endif #endif
#endif #endif

View File

@ -13,10 +13,10 @@
#include "nsIDocShell.h" #include "nsIDocShell.h"
#include "nsDOMMutationObserver.h" #include "nsDOMMutationObserver.h"
#if defined(XP_WIN) #if defined(XP_WIN)
#include <processthreadsapi.h> // for GetCurrentProcessId() # include <processthreadsapi.h> // for GetCurrentProcessId()
#else #else
#include <unistd.h> // for getpid() # include <unistd.h> // for getpid()
#endif // defined(XP_WIN) #endif // defined(XP_WIN)
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {

View File

@ -266,12 +266,12 @@
#include "mozilla/dom/DocGroup.h" #include "mozilla/dom/DocGroup.h"
#include "mozilla/dom/TabGroup.h" #include "mozilla/dom/TabGroup.h"
#ifdef MOZ_XUL #ifdef MOZ_XUL
#include "mozilla/dom/XULBroadcastManager.h" # include "mozilla/dom/XULBroadcastManager.h"
#include "mozilla/dom/XULPersist.h" # include "mozilla/dom/XULPersist.h"
#include "nsIXULWindow.h" # include "nsIXULWindow.h"
#include "nsXULCommandDispatcher.h" # include "nsXULCommandDispatcher.h"
#include "nsXULPopupManager.h" # include "nsXULPopupManager.h"
#include "nsIDocShellTreeOwner.h" # include "nsIDocShellTreeOwner.h"
#endif #endif
#include "nsIPresShellInlines.h" #include "nsIPresShellInlines.h"
#include "mozilla/dom/BoxObject.h" #include "mozilla/dom/BoxObject.h"
@ -7337,7 +7337,7 @@ void Document::CollectDescendantDocuments(
} }
#ifdef DEBUG_bryner #ifdef DEBUG_bryner
#define DEBUG_PAGE_CACHE # define DEBUG_PAGE_CACHE
#endif #endif
bool Document::CanSavePresentation(nsIRequest* aNewRequest) { bool Document::CanSavePresentation(nsIRequest* aNewRequest) {

View File

@ -63,11 +63,11 @@
// windows.h #defines CreateEvent // windows.h #defines CreateEvent
#ifdef CreateEvent #ifdef CreateEvent
#undef CreateEvent # undef CreateEvent
#endif #endif
#ifdef MOZILLA_INTERNAL_API #ifdef MOZILLA_INTERNAL_API
#include "mozilla/dom/DocumentBinding.h" # include "mozilla/dom/DocumentBinding.h"
#else #else
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {

View File

@ -81,12 +81,12 @@
#include "nsCSSPseudoElements.h" #include "nsCSSPseudoElements.h"
#include "nsWindowSizes.h" #include "nsWindowSizes.h"
#ifdef MOZ_XUL #ifdef MOZ_XUL
#include "nsXULElement.h" # include "nsXULElement.h"
#endif /* MOZ_XUL */ #endif /* MOZ_XUL */
#include "SVGElement.h" #include "SVGElement.h"
#include "nsFrameSelection.h" #include "nsFrameSelection.h"
#ifdef DEBUG #ifdef DEBUG
#include "nsRange.h" # include "nsRange.h"
#endif #endif
#include "nsBindingManager.h" #include "nsBindingManager.h"
@ -179,9 +179,9 @@ namespace dom {
// thread pointer that comes with the non-threadsafe refcount on // thread pointer that comes with the non-threadsafe refcount on
// nsIContent. // nsIContent.
#ifdef MOZ_THREAD_SAFETY_OWNERSHIP_CHECKS_SUPPORTED #ifdef MOZ_THREAD_SAFETY_OWNERSHIP_CHECKS_SUPPORTED
#define EXTRA_DOM_NODE_BYTES 8 # define EXTRA_DOM_NODE_BYTES 8
#else #else
#define EXTRA_DOM_NODE_BYTES 0 # define EXTRA_DOM_NODE_BYTES 0
#endif #endif
#define ASSERT_NODE_SIZE(type, opt_size_64, opt_size_32) \ #define ASSERT_NODE_SIZE(type, opt_size_64, opt_size_32) \

View File

@ -64,11 +64,11 @@
#include "nsAttrValueOrString.h" #include "nsAttrValueOrString.h"
#include "nsQueryObject.h" #include "nsQueryObject.h"
#ifdef MOZ_XUL #ifdef MOZ_XUL
#include "nsXULElement.h" # include "nsXULElement.h"
#endif /* MOZ_XUL */ #endif /* MOZ_XUL */
#include "nsFrameSelection.h" #include "nsFrameSelection.h"
#ifdef DEBUG #ifdef DEBUG
#include "nsRange.h" # include "nsRange.h"
#endif #endif
#include "nsBindingManager.h" #include "nsBindingManager.h"

View File

@ -16,7 +16,7 @@ namespace mozilla {
namespace dom { namespace dom {
#ifdef XP_WIN #ifdef XP_WIN
#undef GetLocaleInfo # undef GetLocaleInfo
#endif #endif
class IntlUtils final : public nsISupports, public nsWrapperCache { class IntlUtils final : public nsISupports, public nsWrapperCache {

View File

@ -10,9 +10,9 @@
#include "mozilla/MemoryReporting.h" #include "mozilla/MemoryReporting.h"
#include "mozilla/dom/Element.h" #include "mozilla/dom/Element.h"
#if defined(MOZ_PLACES) #if defined(MOZ_PLACES)
#include "mozilla/places/History.h" # include "mozilla/places/History.h"
#else #else
#include "mozilla/IHistory.h" # include "mozilla/IHistory.h"
#endif #endif
#include "nsIURL.h" #include "nsIURL.h"
#include "nsIURIMutator.h" #include "nsIURIMutator.h"

View File

@ -10,10 +10,10 @@
#include "nsContentUtils.h" #include "nsContentUtils.h"
#ifdef ANDROID #ifdef ANDROID
#include <android/log.h> # include <android/log.h>
#endif #endif
#ifdef XP_WIN #ifdef XP_WIN
#include <windows.h> # include <windows.h>
#endif #endif
namespace mozilla { namespace mozilla {

View File

@ -95,7 +95,7 @@
#include "mozilla/dom/WorkerRunnable.h" #include "mozilla/dom/WorkerRunnable.h"
#if defined(XP_LINUX) #if defined(XP_LINUX)
#include "mozilla/Hal.h" # include "mozilla/Hal.h"
#endif #endif
#include "mozilla/EMEUtils.h" #include "mozilla/EMEUtils.h"

View File

@ -61,9 +61,9 @@ class PopupBlocker final {
} // namespace mozilla } // namespace mozilla
#ifdef MOZILLA_INTERNAL_API #ifdef MOZILLA_INTERNAL_API
#define NS_AUTO_POPUP_STATE_PUSHER nsAutoPopupStatePusherInternal # define NS_AUTO_POPUP_STATE_PUSHER nsAutoPopupStatePusherInternal
#else #else
#define NS_AUTO_POPUP_STATE_PUSHER nsAutoPopupStatePusherExternal # define NS_AUTO_POPUP_STATE_PUSHER nsAutoPopupStatePusherExternal
#endif #endif
// Helper class that helps with pushing and popping popup control // Helper class that helps with pushing and popping popup control

View File

@ -81,9 +81,9 @@ static bool IsValidSelectionPoint(nsFrameSelection* aFrameSel, nsINode* aNode);
#ifdef PRINT_RANGE #ifdef PRINT_RANGE
static void printRange(nsRange* aDomRange); static void printRange(nsRange* aDomRange);
#define DEBUG_OUT_RANGE(x) printRange(x) # define DEBUG_OUT_RANGE(x) printRange(x)
#else #else
#define DEBUG_OUT_RANGE(x) # define DEBUG_OUT_RANGE(x)
#endif // PRINT_RANGE #endif // PRINT_RANGE
/****************************************************************************** /******************************************************************************

View File

@ -44,8 +44,8 @@
#include "nsQueryObject.h" #include "nsQueryObject.h"
#ifdef MOZ_WEBRTC #ifdef MOZ_WEBRTC
#include "mozilla/dom/RTCCertificate.h" # include "mozilla/dom/RTCCertificate.h"
#include "mozilla/dom/RTCCertificateBinding.h" # include "mozilla/dom/RTCCertificateBinding.h"
#endif #endif
using namespace mozilla::ipc; using namespace mozilla::ipc;

View File

@ -17,7 +17,7 @@
#include "nsTArray.h" #include "nsTArray.h"
#ifdef DEBUG #ifdef DEBUG
#include "nsIThread.h" # include "nsIThread.h"
#endif #endif
class nsIInputStream; class nsIInputStream;

View File

@ -51,7 +51,7 @@ static bool sInited = 0;
// to dom::TraceBlackJS(). // to dom::TraceBlackJS().
uint32_t nsCCUncollectableMarker::sGeneration = 1; uint32_t nsCCUncollectableMarker::sGeneration = 1;
#ifdef MOZ_XUL #ifdef MOZ_XUL
#include "nsXULPrototypeCache.h" # include "nsXULPrototypeCache.h"
#endif #endif
NS_IMPL_ISUPPORTS(nsCCUncollectableMarker, nsIObserver) NS_IMPL_ISUPPORTS(nsCCUncollectableMarker, nsIObserver)

View File

@ -31,9 +31,9 @@
#include "PLDHashTable.h" #include "PLDHashTable.h"
#ifdef DEBUG_CONTENT_LIST #ifdef DEBUG_CONTENT_LIST
#define ASSERT_IN_SYNC AssertInSync() # define ASSERT_IN_SYNC AssertInSync()
#else #else
#define ASSERT_IN_SYNC PR_BEGIN_MACRO PR_END_MACRO # define ASSERT_IN_SYNC PR_BEGIN_MACRO PR_END_MACRO
#endif #endif
using namespace mozilla; using namespace mozilla;

View File

@ -46,20 +46,20 @@ nsContentPolicy::nsContentPolicy() : mPolicies(NS_CONTENTPOLICY_CATEGORY) {}
nsContentPolicy::~nsContentPolicy() {} nsContentPolicy::~nsContentPolicy() {}
#ifdef DEBUG #ifdef DEBUG
#define WARN_IF_URI_UNINITIALIZED(uri, name) \ # define WARN_IF_URI_UNINITIALIZED(uri, name) \
PR_BEGIN_MACRO \ PR_BEGIN_MACRO \
if ((uri)) { \ if ((uri)) { \
nsAutoCString spec; \ nsAutoCString spec; \
(uri)->GetAsciiSpec(spec); \ (uri)->GetAsciiSpec(spec); \
if (spec.IsEmpty()) { \ if (spec.IsEmpty()) { \
NS_WARNING(name " is uninitialized, fix caller"); \ NS_WARNING(name " is uninitialized, fix caller"); \
} \ } \
} \ } \
PR_END_MACRO PR_END_MACRO
#else // ! defined(DEBUG) #else // ! defined(DEBUG)
#define WARN_IF_URI_UNINITIALIZED(uri, name) # define WARN_IF_URI_UNINITIALIZED(uri, name)
#endif // defined(DEBUG) #endif // defined(DEBUG)

View File

@ -52,21 +52,21 @@ class ScriptLoader;
extern mozilla::LazyLogModule gContentSinkLogModuleInfo; extern mozilla::LazyLogModule gContentSinkLogModuleInfo;
#define SINK_TRACE_CALLS 0x1 # define SINK_TRACE_CALLS 0x1
#define SINK_TRACE_REFLOW 0x2 # define SINK_TRACE_REFLOW 0x2
#define SINK_ALWAYS_REFLOW 0x4 # define SINK_ALWAYS_REFLOW 0x4
#define SINK_LOG_TEST(_lm, _bit) (int((_lm)->Level()) & (_bit)) # define SINK_LOG_TEST(_lm, _bit) (int((_lm)->Level()) & (_bit))
#define SINK_TRACE(_lm, _bit, _args) \ # define SINK_TRACE(_lm, _bit, _args) \
do { \ do { \
if (SINK_LOG_TEST(_lm, _bit)) { \ if (SINK_LOG_TEST(_lm, _bit)) { \
printf_stderr _args; \ printf_stderr _args; \
} \ } \
} while (0) } while (0)
#else #else
#define SINK_TRACE(_lm, _bit, _args) # define SINK_TRACE(_lm, _bit, _args)
#endif #endif
#undef SINK_NO_INCREMENTAL #undef SINK_NO_INCREMENTAL

View File

@ -242,7 +242,7 @@
#if defined(XP_WIN) #if defined(XP_WIN)
// Undefine LoadImage to prevent naming conflict with Windows. // Undefine LoadImage to prevent naming conflict with Windows.
#undef LoadImage # undef LoadImage
#endif #endif
extern "C" int MOZ_XMLTranslateEntity(const char* ptr, const char* end, extern "C" int MOZ_XMLTranslateEntity(const char* ptr, const char* end,

View File

@ -10,11 +10,11 @@
#define nsContentUtils_h___ #define nsContentUtils_h___
#if defined(XP_WIN) #if defined(XP_WIN)
#include <float.h> # include <float.h>
#endif #endif
#if defined(SOLARIS) #if defined(SOLARIS)
#include <ieeefp.h> # include <ieeefp.h>
#endif #endif
#include "js/TypeDecls.h" #include "js/TypeDecls.h"
@ -50,7 +50,7 @@
#if defined(XP_WIN) #if defined(XP_WIN)
// Undefine LoadImage to prevent naming conflict with Windows. // Undefine LoadImage to prevent naming conflict with Windows.
#undef LoadImage # undef LoadImage
#endif #endif
class imgICache; class imgICache;

View File

@ -43,13 +43,13 @@
#include "nsContentCID.h" #include "nsContentCID.h"
#ifdef XP_WIN #ifdef XP_WIN
#include "nsCExternalHandlerService.h" # include "nsCExternalHandlerService.h"
#include "nsEscape.h" # include "nsEscape.h"
#include "nsIMIMEInfo.h" # include "nsIMIMEInfo.h"
#include "nsIMIMEService.h" # include "nsIMIMEService.h"
#include "nsIURL.h" # include "nsIURL.h"
#include "nsReadableUtils.h" # include "nsReadableUtils.h"
#include "nsXULAppAPI.h" # include "nsXULAppAPI.h"
#endif #endif
#include "mozilla/ContentEvents.h" #include "mozilla/ContentEvents.h"

View File

@ -33,7 +33,7 @@
// Since we've moved the windows.h include down here, we have to explicitly // Since we've moved the windows.h include down here, we have to explicitly
// undef GetBinaryType, otherwise we'll get really odd conflicts // undef GetBinaryType, otherwise we'll get really odd conflicts
#ifdef GetBinaryType #ifdef GetBinaryType
#undef GetBinaryType # undef GetBinaryType
#endif #endif
using namespace mozilla; using namespace mozilla;

View File

@ -20,7 +20,7 @@
#include "mozilla/TimeStamp.h" #include "mozilla/TimeStamp.h"
#include "mozilla/Telemetry.h" #include "mozilla/Telemetry.h"
#ifdef MOZ_GECKO_PROFILER #ifdef MOZ_GECKO_PROFILER
#include "ProfilerMarkerPayload.h" # include "ProfilerMarkerPayload.h"
#endif #endif
using namespace mozilla; using namespace mozilla;

View File

@ -64,8 +64,8 @@
#include <algorithm> #include <algorithm>
#if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK) #if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK)
#include <gdk/gdk.h> # include <gdk/gdk.h>
#include <gdk/gdkx.h> # include <gdk/gdkx.h>
#endif #endif
#include "Layers.h" #include "Layers.h"
@ -117,7 +117,7 @@
#include "mozilla/layers/WebRenderLayerManager.h" #include "mozilla/layers/WebRenderLayerManager.h"
#ifdef XP_WIN #ifdef XP_WIN
#undef GetClassName # undef GetClassName
#endif #endif
using namespace mozilla; using namespace mozilla;

View File

@ -64,15 +64,15 @@
#include <algorithm> #include <algorithm>
#ifdef MOZ_XUL #ifdef MOZ_XUL
#include "nsIDOMXULMenuListElement.h" # include "nsIDOMXULMenuListElement.h"
#endif #endif
#ifdef ACCESSIBILITY #ifdef ACCESSIBILITY
#include "nsAccessibilityService.h" # include "nsAccessibilityService.h"
#endif #endif
#ifndef XP_MACOSX #ifndef XP_MACOSX
#include "nsIScriptError.h" # include "nsIScriptError.h"
#endif #endif
using namespace mozilla; using namespace mozilla;

View File

@ -107,17 +107,17 @@
#include "mozilla/ContentPrincipal.h" #include "mozilla/ContentPrincipal.h"
#ifdef XP_WIN #ifdef XP_WIN
#include "mozilla/plugins/PPluginWidgetParent.h" # include "mozilla/plugins/PPluginWidgetParent.h"
#include "../plugins/ipc/PluginWidgetParent.h" # include "../plugins/ipc/PluginWidgetParent.h"
#endif #endif
#ifdef MOZ_XUL #ifdef MOZ_XUL
#include "nsXULPopupManager.h" # include "nsXULPopupManager.h"
#endif #endif
#ifdef NS_PRINTING #ifdef NS_PRINTING
#include "mozilla/embedding/printingui/PrintingParent.h" # include "mozilla/embedding/printingui/PrintingParent.h"
#include "nsIWebBrowserPrint.h" # include "nsIWebBrowserPrint.h"
#endif #endif
using namespace mozilla; using namespace mozilla;

View File

@ -63,13 +63,13 @@
#include "chrome/common/ipc_channel.h" // for IPC::Channel::kMaximumMessageSize #include "chrome/common/ipc_channel.h" // for IPC::Channel::kMaximumMessageSize
#ifdef XP_WIN #ifdef XP_WIN
#if defined(SendMessage) # if defined(SendMessage)
#undef SendMessage # undef SendMessage
#endif # endif
#endif #endif
#ifdef FUZZING #ifdef FUZZING
#include "MessageManagerFuzzer.h" # include "MessageManagerFuzzer.h"
#endif #endif
using namespace mozilla; using namespace mozilla;

View File

@ -107,7 +107,7 @@ constexpr const char *sSelectUp2String = "cmd_selectUp2";
constexpr const char *sSelectDown2String = "cmd_selectDown2"; constexpr const char *sSelectDown2String = "cmd_selectDown2";
#if 0 #if 0
#pragma mark - # pragma mark -
#endif #endif
// a base class for selection-related commands, for code sharing // a base class for selection-related commands, for code sharing
@ -173,7 +173,7 @@ class nsPhysicalSelectCommand : public nsSelectionCommandsBase {
}; };
#if 0 #if 0
#pragma mark - # pragma mark -
#endif #endif
NS_IMPL_ISUPPORTS(nsSelectionCommandsBase, nsIControllerCommand) NS_IMPL_ISUPPORTS(nsSelectionCommandsBase, nsIControllerCommand)
@ -229,7 +229,7 @@ nsresult nsSelectionCommandsBase::GetSelectionControllerFromWindow(
} }
#if 0 #if 0
#pragma mark - # pragma mark -
#endif #endif
// Helpers for nsSelectMoveScrollCommand and nsPhysicalSelectMoveScrollCommand // Helpers for nsSelectMoveScrollCommand and nsPhysicalSelectMoveScrollCommand
@ -384,7 +384,7 @@ nsresult nsPhysicalSelectMoveScrollCommand::DoCommand(
} }
#if 0 #if 0
#pragma mark - # pragma mark -
#endif #endif
static const struct SelectCommand { static const struct SelectCommand {
@ -422,7 +422,7 @@ nsresult nsSelectCommand::DoCommand(const char *aCommandName,
} }
#if 0 #if 0
#pragma mark - # pragma mark -
#endif #endif
static const struct PhysicalSelectCommand { static const struct PhysicalSelectCommand {
@ -456,7 +456,7 @@ nsresult nsPhysicalSelectCommand::DoCommand(const char *aCommandName,
} }
#if 0 #if 0
#pragma mark - # pragma mark -
#endif #endif
class nsClipboardCommand final : public nsIControllerCommand { class nsClipboardCommand final : public nsIControllerCommand {
@ -550,7 +550,7 @@ nsresult nsClipboardCommand::DoCommandParams(const char *aCommandName,
} }
#if 0 #if 0
#pragma mark - # pragma mark -
#endif #endif
class nsSelectionCommand : public nsIControllerCommand { class nsSelectionCommand : public nsIControllerCommand {
@ -645,7 +645,7 @@ nsresult nsSelectionCommand::GetContentViewerEditFromContext(
} }
#if 0 #if 0
#pragma mark - # pragma mark -
#endif #endif
#define NS_DECL_CLIPBOARD_COMMAND(_cmd) \ #define NS_DECL_CLIPBOARD_COMMAND(_cmd) \
@ -678,7 +678,7 @@ nsresult nsClipboardCopyLinkCommand::DoClipboardCommand(
} }
#if 0 #if 0
#pragma mark - # pragma mark -
#endif #endif
nsresult nsClipboardImageCommands::IsClipboardCommandEnabled( nsresult nsClipboardImageCommands::IsClipboardCommandEnabled(
@ -703,7 +703,7 @@ nsresult nsClipboardImageCommands::DoClipboardCommand(
} }
#if 0 #if 0
#pragma mark - # pragma mark -
#endif #endif
nsresult nsClipboardSelectAllNoneCommands::IsClipboardCommandEnabled( nsresult nsClipboardSelectAllNoneCommands::IsClipboardCommandEnabled(
@ -722,7 +722,7 @@ nsresult nsClipboardSelectAllNoneCommands::DoClipboardCommand(
} }
#if 0 #if 0
#pragma mark - # pragma mark -
#endif #endif
nsresult nsClipboardGetContentsCommand::IsClipboardCommandEnabled( nsresult nsClipboardGetContentsCommand::IsClipboardCommandEnabled(

View File

@ -39,7 +39,7 @@
#include "mozilla/dom/WindowProxyHolder.h" #include "mozilla/dom/WindowProxyHolder.h"
#include "mozilla/IntegerPrintfMacros.h" #include "mozilla/IntegerPrintfMacros.h"
#if defined(MOZ_WIDGET_ANDROID) #if defined(MOZ_WIDGET_ANDROID)
#include "mozilla/dom/WindowOrientationObserver.h" # include "mozilla/dom/WindowOrientationObserver.h"
#endif #endif
#include "nsDOMOfflineResourceList.h" #include "nsDOMOfflineResourceList.h"
#include "nsError.h" #include "nsError.h"
@ -150,8 +150,8 @@
#include "nsCSSProps.h" #include "nsCSSProps.h"
#include "nsIURIFixup.h" #include "nsIURIFixup.h"
#ifndef DEBUG #ifndef DEBUG
#include "nsIAppStartup.h" # include "nsIAppStartup.h"
#include "nsToolkitCompsCID.h" # include "nsToolkitCompsCID.h"
#endif #endif
#include "nsCDefaultURIFixup.h" #include "nsCDefaultURIFixup.h"
#include "mozilla/EventDispatcher.h" #include "mozilla/EventDispatcher.h"
@ -162,8 +162,8 @@
#include "nsITimedChannel.h" #include "nsITimedChannel.h"
#include "nsServiceManagerUtils.h" #include "nsServiceManagerUtils.h"
#ifdef MOZ_XUL #ifdef MOZ_XUL
#include "nsIDOMXULControlElement.h" # include "nsIDOMXULControlElement.h"
#include "nsMenuPopupFrame.h" # include "nsMenuPopupFrame.h"
#endif #endif
#include "mozilla/dom/CustomEvent.h" #include "mozilla/dom/CustomEvent.h"
#include "nsIJARChannel.h" #include "nsIJARChannel.h"
@ -174,9 +174,9 @@
#include "xpcprivate.h" #include "xpcprivate.h"
#ifdef NS_PRINTING #ifdef NS_PRINTING
#include "nsIPrintSettings.h" # include "nsIPrintSettings.h"
#include "nsIPrintSettingsService.h" # include "nsIPrintSettingsService.h"
#include "nsIWebBrowserPrint.h" # include "nsIWebBrowserPrint.h"
#endif #endif
#include "nsWindowRoot.h" #include "nsWindowRoot.h"
@ -251,11 +251,11 @@
#include "mozilla/dom/WebIDLGlobalNameHash.h" #include "mozilla/dom/WebIDLGlobalNameHash.h"
#include "mozilla/dom/Worklet.h" #include "mozilla/dom/Worklet.h"
#ifdef HAVE_SIDEBAR #ifdef HAVE_SIDEBAR
#include "mozilla/dom/ExternalBinding.h" # include "mozilla/dom/ExternalBinding.h"
#endif #endif
#ifdef MOZ_WEBSPEECH #ifdef MOZ_WEBSPEECH
#include "mozilla/dom/SpeechSynthesis.h" # include "mozilla/dom/SpeechSynthesis.h"
#endif #endif
#include "mozilla/dom/ClientManager.h" #include "mozilla/dom/ClientManager.h"
@ -267,19 +267,19 @@
// Apple system headers seem to have a check() macro. <sigh> // Apple system headers seem to have a check() macro. <sigh>
#ifdef check #ifdef check
class nsIScriptTimeoutHandler; class nsIScriptTimeoutHandler;
#undef check # undef check
#endif // check #endif // check
#include "AccessCheck.h" #include "AccessCheck.h"
#ifdef ANDROID #ifdef ANDROID
#include <android/log.h> # include <android/log.h>
#endif #endif
#ifdef XP_WIN #ifdef XP_WIN
#include <process.h> # include <process.h>
#define getpid _getpid # define getpid _getpid
#else #else
#include <unistd.h> // for getpid() # include <unistd.h> // for getpid()
#endif #endif
using namespace mozilla; using namespace mozilla;
@ -2750,7 +2750,7 @@ bool nsGlobalWindowInner::ResolveComponentsShim(
} }
#ifdef RELEASE_OR_BETA #ifdef RELEASE_OR_BETA
#define USE_CONTROLLERS_SHIM # define USE_CONTROLLERS_SHIM
#endif #endif
#ifdef USE_CONTROLLERS_SHIM #ifdef USE_CONTROLLERS_SHIM
@ -7106,8 +7106,9 @@ void nsGlobalWindowInner::FireOnNewGlobalObject() {
} }
#if defined(_WINDOWS_) && !defined(MOZ_WRAPPED_WINDOWS_H) #if defined(_WINDOWS_) && !defined(MOZ_WRAPPED_WINDOWS_H)
#pragma message("wrapper failure reason: " MOZ_WINDOWS_WRAPPER_DISABLED_REASON) # pragma message( \
#error "Never include unwrapped windows.h in this file!" "wrapper failure reason: " MOZ_WINDOWS_WRAPPER_DISABLED_REASON)
# error "Never include unwrapped windows.h in this file!"
#endif #endif
already_AddRefed<Promise> nsGlobalWindowInner::CreateImageBitmap( already_AddRefed<Promise> nsGlobalWindowInner::CreateImageBitmap(

View File

@ -41,7 +41,7 @@
#include "mozilla/dom/WindowProxyHolder.h" #include "mozilla/dom/WindowProxyHolder.h"
#include "mozilla/IntegerPrintfMacros.h" #include "mozilla/IntegerPrintfMacros.h"
#if defined(MOZ_WIDGET_ANDROID) #if defined(MOZ_WIDGET_ANDROID)
#include "mozilla/dom/WindowOrientationObserver.h" # include "mozilla/dom/WindowOrientationObserver.h"
#endif #endif
#include "nsError.h" #include "nsError.h"
#include "nsIIdleService.h" #include "nsIIdleService.h"
@ -153,8 +153,8 @@
#include "nsIURIFixup.h" #include "nsIURIFixup.h"
#include "nsIURIMutator.h" #include "nsIURIMutator.h"
#ifndef DEBUG #ifndef DEBUG
#include "nsIAppStartup.h" # include "nsIAppStartup.h"
#include "nsToolkitCompsCID.h" # include "nsToolkitCompsCID.h"
#endif #endif
#include "nsCDefaultURIFixup.h" #include "nsCDefaultURIFixup.h"
#include "mozilla/EventDispatcher.h" #include "mozilla/EventDispatcher.h"
@ -172,9 +172,9 @@
#include "xpcprivate.h" #include "xpcprivate.h"
#ifdef NS_PRINTING #ifdef NS_PRINTING
#include "nsIPrintSettings.h" # include "nsIPrintSettings.h"
#include "nsIPrintSettingsService.h" # include "nsIPrintSettingsService.h"
#include "nsIWebBrowserPrint.h" # include "nsIWebBrowserPrint.h"
#endif #endif
#include "nsWindowRoot.h" #include "nsWindowRoot.h"
@ -246,29 +246,29 @@
#include "mozilla/dom/WebIDLGlobalNameHash.h" #include "mozilla/dom/WebIDLGlobalNameHash.h"
#include "mozilla/dom/Worklet.h" #include "mozilla/dom/Worklet.h"
#ifdef HAVE_SIDEBAR #ifdef HAVE_SIDEBAR
#include "mozilla/dom/ExternalBinding.h" # include "mozilla/dom/ExternalBinding.h"
#endif #endif
#ifdef MOZ_WEBSPEECH #ifdef MOZ_WEBSPEECH
#include "mozilla/dom/SpeechSynthesis.h" # include "mozilla/dom/SpeechSynthesis.h"
#endif #endif
// Apple system headers seem to have a check() macro. <sigh> // Apple system headers seem to have a check() macro. <sigh>
#ifdef check #ifdef check
class nsIScriptTimeoutHandler; class nsIScriptTimeoutHandler;
#undef check # undef check
#endif // check #endif // check
#include "AccessCheck.h" #include "AccessCheck.h"
#ifdef ANDROID #ifdef ANDROID
#include <android/log.h> # include <android/log.h>
#endif #endif
#ifdef XP_WIN #ifdef XP_WIN
#include <process.h> # include <process.h>
#define getpid _getpid # define getpid _getpid
#else #else
#include <unistd.h> // for getpid() # include <unistd.h> // for getpid()
#endif #endif
using namespace mozilla; using namespace mozilla;
@ -4702,7 +4702,7 @@ void nsGlobalWindowOuter::PrintOuter(ErrorResult& aError) {
printSettings->GetPrinterName(printerName); printSettings->GetPrinterName(printerName);
bool shouldGetDefaultPrinterName = printerName.IsEmpty(); bool shouldGetDefaultPrinterName = printerName.IsEmpty();
#ifdef MOZ_X11 # ifdef MOZ_X11
// In Linux, GTK backend does not support per printer settings. // In Linux, GTK backend does not support per printer settings.
// Calling GetDefaultPrinterName causes a sandbox violation (see Bug // Calling GetDefaultPrinterName causes a sandbox violation (see Bug
// 1329216). The printer name is not needed anywhere else on Linux // 1329216). The printer name is not needed anywhere else on Linux
@ -4712,7 +4712,7 @@ void nsGlobalWindowOuter::PrintOuter(ErrorResult& aError) {
if (!XRE_IsParentProcess()) { if (!XRE_IsParentProcess()) {
shouldGetDefaultPrinterName = false; shouldGetDefaultPrinterName = false;
} }
#endif # endif
if (shouldGetDefaultPrinterName) { if (shouldGetDefaultPrinterName) {
printSettingsService->GetDefaultPrinterName(printerName); printSettingsService->GetDefaultPrinterName(printerName);
printSettings->SetPrinterName(printerName); printSettings->SetPrinterName(printerName);
@ -7244,8 +7244,9 @@ void nsGlobalWindowOuter::ReportLargeAllocStatus() {
} }
#if defined(_WINDOWS_) && !defined(MOZ_WRAPPED_WINDOWS_H) #if defined(_WINDOWS_) && !defined(MOZ_WRAPPED_WINDOWS_H)
#pragma message("wrapper failure reason: " MOZ_WINDOWS_WRAPPER_DISABLED_REASON) # pragma message( \
#error "Never include unwrapped windows.h in this file!" "wrapper failure reason: " MOZ_WINDOWS_WRAPPER_DISABLED_REASON)
# error "Never include unwrapped windows.h in this file!"
#endif #endif
// Helper called by methods that move/resize the window, // Helper called by methods that move/resize the window,

View File

@ -110,7 +110,7 @@
#include "XPathGenerator.h" #include "XPathGenerator.h"
#ifdef ACCESSIBILITY #ifdef ACCESSIBILITY
#include "mozilla/dom/AccessibleNode.h" # include "mozilla/dom/AccessibleNode.h"
#endif #endif
using namespace mozilla; using namespace mozilla;
@ -145,10 +145,10 @@ void nsINode::nsSlots::Unlink() {
nsINode::nsINode(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo) nsINode::nsINode(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: mNodeInfo(std::move(aNodeInfo)), : mNodeInfo(std::move(aNodeInfo)),
mParent(nullptr) mParent(nullptr)
#ifndef BOOL_FLAGS_ON_WRAPPER_CACHE # ifndef BOOL_FLAGS_ON_WRAPPER_CACHE
, ,
mBoolFlags(0) mBoolFlags(0)
#endif # endif
, ,
mChildCount(0), mChildCount(0),
mPreviousOrLastSibling(nullptr), mPreviousOrLastSibling(nullptr),

View File

@ -30,9 +30,9 @@
// Including 'windows.h' will #define GetClassInfo to something else. // Including 'windows.h' will #define GetClassInfo to something else.
#ifdef XP_WIN #ifdef XP_WIN
#ifdef GetClassInfo # ifdef GetClassInfo
#undef GetClassInfo # undef GetClassInfo
#endif # endif
#endif #endif
class AttrArray; class AttrArray;

View File

@ -55,7 +55,7 @@
#ifdef LoadImage #ifdef LoadImage
// Undefine LoadImage to prevent naming conflict with Windows. // Undefine LoadImage to prevent naming conflict with Windows.
#undef LoadImage # undef LoadImage
#endif #endif
using namespace mozilla; using namespace mozilla;

View File

@ -41,7 +41,7 @@ class Element;
#ifdef LoadImage #ifdef LoadImage
// Undefine LoadImage to prevent naming conflict with Windows. // Undefine LoadImage to prevent naming conflict with Windows.
#undef LoadImage # undef LoadImage
#endif #endif
class nsImageLoadingContent : public nsIImageLoadingContent { class nsImageLoadingContent : public nsIImageLoadingContent {

View File

@ -38,10 +38,10 @@
#include "nsIXULRuntime.h" #include "nsIXULRuntime.h"
#include "nsTextFormatter.h" #include "nsTextFormatter.h"
#ifdef XP_WIN #ifdef XP_WIN
#include <process.h> # include <process.h>
#define getpid _getpid # define getpid _getpid
#else #else
#include <unistd.h> // for getpid() # include <unistd.h> // for getpid()
#endif #endif
#include "xpcpublic.h" #include "xpcpublic.h"
@ -71,7 +71,7 @@
#ifdef XP_MACOSX #ifdef XP_MACOSX
// AssertMacros.h defines 'check' and conflicts with AccessCheck.h // AssertMacros.h defines 'check' and conflicts with AccessCheck.h
#undef check # undef check
#endif #endif
#include "AccessCheck.h" #include "AccessCheck.h"
@ -101,7 +101,7 @@ const size_t gStackSize = 8192;
// Thank you Microsoft! // Thank you Microsoft!
#ifdef CompareString #ifdef CompareString
#undef CompareString # undef CompareString
#endif #endif
#define NS_SHRINK_GC_BUFFERS_DELAY 4000 // ms #define NS_SHRINK_GC_BUFFERS_DELAY 4000 // ms
@ -961,7 +961,7 @@ nsresult nsJSContext::AddSupportsPrimitiveTojsvals(nsISupports* aArg,
#ifdef MOZ_JPROF #ifdef MOZ_JPROF
#include <signal.h> # include <signal.h>
inline bool IsJProfAction(struct sigaction* action) { inline bool IsJProfAction(struct sigaction* action) {
return (action->sa_sigaction && return (action->sa_sigaction &&

Some files were not shown because too many files have changed in this diff Show More