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

This commit is contained in:
Alex Xu 2013-07-31 19:15:19 -07:00
parent 43ee09681b
commit 59fcd38f0a
2 changed files with 8 additions and 0 deletions

View File

@ -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
{
}

View File

@ -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<nsIContent*>& mVisibleKidsOfHiddenElement;
bool mWasFrameVisible;
#endif
};
} // namespace mozilla