From 915b913107832155e17e3e6c093195b5f80ef13b Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 3 Apr 2018 22:15:30 +1000 Subject: [PATCH] Bug 1451169 - Reduce indirection for static atom pointers in nsCSSFrameConstructor.h. r=xidorn --HG-- extra : rebase_source : c0fc2365461d1fd9a7480911bce0bb66555ab7e1 --- layout/base/nsCSSFrameConstructor.cpp | 5 ++--- layout/base/nsCSSFrameConstructor.h | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index e78df7ddf9fd..518dbeafaac0 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -396,7 +396,7 @@ GetFieldSetBlockFrame(nsIFrame* aFieldsetFrame) { _flags, { (FrameCreationFunc)_func }, nullptr, nullptr } #define FCDATA_WITH_WRAPPING_BLOCK(_flags, _func, _anon_box) \ { _flags | FCDATA_CREATE_BLOCK_WRAPPER_FOR_ALL_KIDS, \ - { (FrameCreationFunc)_func }, nullptr, &_anon_box } + { (FrameCreationFunc)_func }, nullptr, _anon_box } #define UNREACHABLE_FCDATA() \ { 0, { (FrameCreationFunc)nullptr }, nullptr, nullptr } @@ -3838,8 +3838,7 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt nsIFrame* possiblyLeafFrame = newFrame; if (bits & FCDATA_CREATE_BLOCK_WRAPPER_FOR_ALL_KIDS) { RefPtr outerSC = mPresShell->StyleSet()-> - ResolveInheritingAnonymousBoxStyle(*data->mAnonBoxPseudo, - computedStyle); + ResolveInheritingAnonymousBoxStyle(data->mAnonBoxPseudo, computedStyle); #ifdef DEBUG nsContainerFrame* containerFrame = do_QueryFrame(newFrame); MOZ_ASSERT(containerFrame); diff --git a/layout/base/nsCSSFrameConstructor.h b/layout/base/nsCSSFrameConstructor.h index 8910e87577b2..4a955ac3626c 100644 --- a/layout/base/nsCSSFrameConstructor.h +++ b/layout/base/nsCSSFrameConstructor.h @@ -742,7 +742,7 @@ private: FrameFullConstructor mFullConstructor; // For cases when FCDATA_CREATE_BLOCK_WRAPPER_FOR_ALL_KIDS is set, the // anonymous box type to use for that wrapper. - nsICSSAnonBoxPseudo * const * const mAnonBoxPseudo; + nsICSSAnonBoxPseudo* const mAnonBoxPseudo; }; /* Structure representing a mapping of an atom to a FrameConstructionData. @@ -752,7 +752,7 @@ private: struct FrameConstructionDataByTag { // Pointer to nsStaticAtom* is used because we want to initialize this // statically, so before our atom tables are set up. - const nsStaticAtom * const * const mTag; + const nsStaticAtom* const* mTag; const FrameConstructionData mData; }; @@ -783,7 +783,7 @@ private: for a table pseudo-frame */ struct PseudoParentData { const FrameConstructionData mFCData; - nsICSSAnonBoxPseudo * const * const mPseudoType; + nsICSSAnonBoxPseudo * const* mPseudoType; }; /* Array of such structures that we use to properly construct table pseudo-frames as needed */