From 59fcd38f0ae0bb6b1e14a1ec4dd5e03865f99af7 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Wed, 31 Jul 2013 19:15:19 -0700 Subject: [PATCH] Bug 900284: Use #ifdef ACCESSIBILITY around member variables only used inside #ifdef ACCESSIBILITY, to avoid clang warnings (and reduce object size with --disable-accessibility). r=dbaron --- layout/base/RestyleManager.cpp | 6 ++++++ layout/base/RestyleManager.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp index 185293ab3bd..85b9999f5f6 100644 --- a/layout/base/RestyleManager.cpp +++ b/layout/base/RestyleManager.cpp @@ -1921,10 +1921,12 @@ ElementRestyler::ElementRestyler(nsPresContext* aPresContext, , mRestyleTracker(aRestyleTracker) , mTreeMatchContext(aTreeMatchContext) , mResolvedChild(nullptr) +#ifdef ACCESSIBILITY , mDesiredA11yNotifications(eSendAllNotifications) , mKidsDesiredA11yNotifications(mDesiredA11yNotifications) , mOurA11yNotification(eDontNotify) , mVisibleKidsOfHiddenElement(aVisibleKidsOfHiddenElement) +#endif { } @@ -1946,10 +1948,12 @@ ElementRestyler::ElementRestyler(const ElementRestyler& aParentRestyler, , mRestyleTracker(aParentRestyler.mRestyleTracker) , mTreeMatchContext(aParentRestyler.mTreeMatchContext) , mResolvedChild(nullptr) +#ifdef ACCESSIBILITY , mDesiredA11yNotifications(aParentRestyler.mKidsDesiredA11yNotifications) , mKidsDesiredA11yNotifications(mDesiredA11yNotifications) , mOurA11yNotification(eDontNotify) , mVisibleKidsOfHiddenElement(aParentRestyler.mVisibleKidsOfHiddenElement) +#endif { if (aConstructorFlags & FOR_OUT_OF_FLOW_CHILD) { mHintsHandled = NS_SubtractHint(mHintsHandled, nsChangeHint_AllReflowHints); @@ -1975,10 +1979,12 @@ ElementRestyler::ElementRestyler(ParentContextFromChildFrame, , mRestyleTracker(aParentRestyler.mRestyleTracker) , mTreeMatchContext(aParentRestyler.mTreeMatchContext) , mResolvedChild(nullptr) +#ifdef ACCESSIBILITY , mDesiredA11yNotifications(aParentRestyler.mDesiredA11yNotifications) , mKidsDesiredA11yNotifications(mDesiredA11yNotifications) , mOurA11yNotification(eDontNotify) , mVisibleKidsOfHiddenElement(aParentRestyler.mVisibleKidsOfHiddenElement) +#endif { } diff --git a/layout/base/RestyleManager.h b/layout/base/RestyleManager.h index 012f6731829..ab27c33e161 100644 --- a/layout/base/RestyleManager.h +++ b/layout/base/RestyleManager.h @@ -382,11 +382,13 @@ private: TreeMatchContext& mTreeMatchContext; nsIFrame* mResolvedChild; // child that provides our parent style context +#ifdef ACCESSIBILITY const DesiredA11yNotifications mDesiredA11yNotifications; DesiredA11yNotifications mKidsDesiredA11yNotifications; A11yNotificationType mOurA11yNotification; nsTArray& mVisibleKidsOfHiddenElement; bool mWasFrameVisible; +#endif }; } // namespace mozilla