Bug 856108 - Port static analyses to clang, part 2e: use MOZ_STACK_CLASS in layout. r=mats

This commit is contained in:
Joshua Cranmer 2013-04-11 22:20:45 -05:00
Родитель 1c80dfa2a7
Коммит 1f24ef2b5e
28 изменённых файлов: 50 добавлений и 54 удалений

Просмотреть файл

@ -10,7 +10,7 @@
namespace mozilla {
class NS_STACK_CLASS PaintTracker
class MOZ_STACK_CLASS PaintTracker
{
public:
PaintTracker() {

Просмотреть файл

@ -63,7 +63,7 @@ private:
*
* The allocations cannot be for more than 4044 bytes.
*/
class NS_STACK_CLASS AutoStackArena {
class MOZ_STACK_CLASS AutoStackArena {
public:
AutoStackArena() : mOwnsStackArena(false) {
if (!gStackArena) {

Просмотреть файл

@ -1981,7 +1981,7 @@ nsresult nsBidiPresUtils::ProcessText(const PRUnichar* aText,
return NS_OK;
}
class NS_STACK_CLASS nsIRenderingContextBidiProcessor : public nsBidiPresUtils::BidiProcessor {
class MOZ_STACK_CLASS nsIRenderingContextBidiProcessor : public nsBidiPresUtils::BidiProcessor {
public:
nsIRenderingContextBidiProcessor(nsRenderingContext* aCtx,
nsRenderingContext* aTextRunConstructionContext,

Просмотреть файл

@ -680,7 +680,7 @@ nsAbsoluteItems::AddChild(nsIFrame* aChild)
// Structure for saving the existing state when pushing/poping containing
// blocks. The destructor restores the state to its previous state
class NS_STACK_CLASS nsFrameConstructorSaveState {
class MOZ_STACK_CLASS nsFrameConstructorSaveState {
public:
typedef nsIFrame::ChildListID ChildListID;
nsFrameConstructorSaveState();
@ -722,7 +722,7 @@ struct PendingBinding : public LinkedListElement<PendingBinding>
// Structure used for maintaining state information during the
// frame construction process
class NS_STACK_CLASS nsFrameConstructorState {
class MOZ_STACK_CLASS nsFrameConstructorState {
public:
typedef nsIFrame::ChildListID ChildListID;
@ -861,7 +861,7 @@ public:
*/
class PendingBindingAutoPusher;
friend class PendingBindingAutoPusher;
class NS_STACK_CLASS PendingBindingAutoPusher {
class MOZ_STACK_CLASS PendingBindingAutoPusher {
public:
PendingBindingAutoPusher(nsFrameConstructorState& aState,
PendingBinding* aPendingBinding) :

Просмотреть файл

@ -19,7 +19,7 @@
* node APIs, since it handles XBL-generated anonymous content as
* well.
*/
class NS_STACK_CLASS ChildIterator
class MOZ_STACK_CLASS ChildIterator
{
protected:
nsIContent* mContent;

Просмотреть файл

@ -913,7 +913,7 @@ public:
*/
class InterruptPreventer;
friend class InterruptPreventer;
class NS_STACK_CLASS InterruptPreventer {
class MOZ_STACK_CLASS InterruptPreventer {
public:
InterruptPreventer(nsPresContext* aCtx) :
mCtx(aCtx),

Просмотреть файл

@ -451,7 +451,7 @@ public:
PresShell* mShell;
};
class NS_STACK_CLASS nsPresShellEventCB : public nsDispatchingCallback
class MOZ_STACK_CLASS nsPresShellEventCB : public nsDispatchingCallback
{
public:
nsPresShellEventCB(PresShell* aPresShell) : mPresShell(aPresShell) {}

Просмотреть файл

@ -175,7 +175,7 @@ public: //for methods who access nsTextControlFrame directly
nsresult MaybeBeginSecureKeyboardInput();
void MaybeEndSecureKeyboardInput();
NS_STACK_CLASS class ValueSetter {
class MOZ_STACK_CLASS ValueSetter {
public:
ValueSetter(nsIEditor* aEditor)
: mEditor(aEditor)

Просмотреть файл

@ -61,7 +61,7 @@ class FrameChildList {
/**
* A class to iterate frame child lists.
*/
class NS_STACK_CLASS FrameChildListArrayIterator {
class MOZ_STACK_CLASS FrameChildListArrayIterator {
public:
FrameChildListArrayIterator(const nsTArray<FrameChildList>& aLists)
: mLists(aLists), mCurrentIndex(0) {}
@ -87,7 +87,7 @@ protected:
/**
* A class for retrieving a frame's child lists and iterate them.
*/
class NS_STACK_CLASS FrameChildListIterator
class MOZ_STACK_CLASS FrameChildListIterator
: public FrameChildListArrayIterator {
public:
FrameChildListIterator(const nsIFrame* aFrame);

Просмотреть файл

@ -162,7 +162,7 @@ MarginComponentForSide(nsMargin& aMargin, Side aSide)
}
// Encapsulates our flex container's main & cross axes.
NS_STACK_CLASS class FlexboxAxisTracker {
class MOZ_STACK_CLASS FlexboxAxisTracker {
public:
FlexboxAxisTracker(nsFlexContainerFrame* aFlexContainerFrame);
@ -840,8 +840,7 @@ FlexItem::GetNumAutoMarginsInAxis(AxisOrientationType aAxis) const
// corresponds to the 'start' edge of that axis).
// This class shouldn't be instantiated directly -- rather, it should only be
// instantiated via its subclasses defined below.
NS_STACK_CLASS
class PositionTracker {
class MOZ_STACK_CLASS PositionTracker {
public:
// Accessor for the current value of the position that we're tracking.
inline nscoord GetPosition() const { return mPosition; }
@ -904,8 +903,7 @@ protected:
};
// Tracks our position in the main axis, when we're laying out flex items.
NS_STACK_CLASS
class MainAxisPositionTracker : public PositionTracker {
class MOZ_STACK_CLASS MainAxisPositionTracker : public PositionTracker {
public:
MainAxisPositionTracker(nsFlexContainerFrame* aFlexContainerFrame,
const FlexboxAxisTracker& aAxisTracker,
@ -936,8 +934,7 @@ private:
// Utility class for managing our position along the cross axis along
// the whole flex container (at a higher level than a single line)
class SingleLineCrossAxisPositionTracker;
NS_STACK_CLASS
class CrossAxisPositionTracker : public PositionTracker {
class MOZ_STACK_CLASS CrossAxisPositionTracker : public PositionTracker {
public:
CrossAxisPositionTracker(nsFlexContainerFrame* aFlexContainerFrame,
const FlexboxAxisTracker& aAxisTracker,
@ -952,8 +949,7 @@ public:
// Utility class for managing our position along the cross axis, *within* a
// single flex line.
NS_STACK_CLASS
class SingleLineCrossAxisPositionTracker : public PositionTracker {
class MOZ_STACK_CLASS SingleLineCrossAxisPositionTracker : public PositionTracker {
public:
SingleLineCrossAxisPositionTracker(nsFlexContainerFrame* aFlexContainerFrame,
const FlexboxAxisTracker& aAxisTracker,

Просмотреть файл

@ -3095,7 +3095,7 @@ NS_IMETHODIMP nsFrame::HandleRelease(nsPresContext* aPresContext,
parentContent, aEvent, aEventStatus);
}
struct NS_STACK_CLASS FrameContentRange {
struct MOZ_STACK_CLASS FrameContentRange {
FrameContentRange(nsIContent* aContent, int32_t aStart, int32_t aEnd) :
content(aContent), start(aStart), end(aEnd) { }
nsCOMPtr<nsIContent> content;

Просмотреть файл

@ -58,7 +58,7 @@ enum EWordMovementType { eStartWord, eEndWord, eDefaultBehavior };
* that are passed to nsFrame::PeekOffset(). See below for the description of
* individual arguments.
*/
struct NS_STACK_CLASS nsPeekOffsetStruct
struct MOZ_STACK_CLASS nsPeekOffsetStruct
{
nsPeekOffsetStruct(nsSelectionAmount aAmount,
nsDirection aDirection,

Просмотреть файл

@ -160,7 +160,7 @@ nsHTMLScrollFrame::GetType() const
All other things being equal, we prefer layouts with fewer scrollbars showing.
*/
struct ScrollReflowState {
struct MOZ_STACK_CLASS ScrollReflowState {
const nsHTMLReflowState& mReflowState;
nsBoxLayoutState mBoxState;
nsGfxScrollFrameInner::ScrollbarStyles mStyles;

Просмотреть файл

@ -1322,7 +1322,7 @@ public:
// Note that the primary offset can be after the secondary offset; for places
// that need the beginning and end of the object, the StartOffset and
// EndOffset helpers can be used.
struct NS_STACK_CLASS ContentOffsets {
struct MOZ_STACK_CLASS ContentOffsets {
nsCOMPtr<nsIContent> content;
bool IsNull() { return !content; }
int32_t offset;
@ -1360,7 +1360,7 @@ public:
* loaded image that should be preferred. If it is not possible to use it, or
* if it is null, mCursor should be used.
*/
struct NS_STACK_CLASS Cursor {
struct MOZ_STACK_CLASS Cursor {
nsCOMPtr<imgIContainer> mContainer;
int32_t mCursor;
bool mHaveHotspot;

Просмотреть файл

@ -132,7 +132,7 @@ struct CachedOffsetForFrame {
static RangeData sEmptyData(nullptr);
// Stack-class to turn on/off selection batching for table selection
class NS_STACK_CLASS nsSelectionBatcher MOZ_FINAL
class MOZ_STACK_CLASS nsSelectionBatcher MOZ_FINAL
{
private:
nsCOMPtr<nsISelectionPrivate> mSelection;

Просмотреть файл

@ -2668,7 +2668,7 @@ static bool IsInBounds(const gfxSkipCharsIterator& aStart, int32_t aContentLengt
}
#endif
class NS_STACK_CLASS PropertyProvider : public gfxTextRun::PropertyProvider {
class MOZ_STACK_CLASS PropertyProvider : public gfxTextRun::PropertyProvider {
public:
/**
* Use this constructor for reflow, when we don't know what text is
@ -6566,7 +6566,7 @@ nsTextFrame::PeekOffsetNoAmount(bool aForward, int32_t* aOffset)
* is interpreted according to aDirection, so if aDirection is -1, "before"
* means actually *after* the cluster content.)
*/
class NS_STACK_CLASS ClusterIterator {
class MOZ_STACK_CLASS ClusterIterator {
public:
ClusterIterator(nsTextFrame* aTextFrame, int32_t aPosition, int32_t aDirection,
nsString& aContext);
@ -7624,7 +7624,7 @@ nsTextFrame::Reflow(nsPresContext* aPresContext,
/**
* Notifies accessibility about text reflow. Used by nsTextFrame::ReflowText.
*/
class NS_STACK_CLASS ReflowTextA11yNotifier
class MOZ_STACK_CLASS ReflowTextA11yNotifier
{
public:
ReflowTextA11yNotifier(nsPresContext* aPresContext, nsIContent* aContent) :

Просмотреть файл

@ -25,7 +25,7 @@ class Loader;
// If CSS_REPORT_PARSE_ERRORS is not defined, all of this class's
// methods become inline stubs.
class NS_STACK_CLASS ErrorReporter {
class MOZ_STACK_CLASS ErrorReporter {
public:
ErrorReporter(const nsCSSScanner &aScanner,
const nsCSSStyleSheet *aSheet,

Просмотреть файл

@ -6409,7 +6409,7 @@ CSSParserImpl::ParseSingleValueProperty(nsCSSValue& aValue,
}
// nsFont::EnumerateFamilies callback for ParseFontDescriptorValue
struct NS_STACK_CLASS ExtractFirstFamilyData {
struct MOZ_STACK_CLASS ExtractFirstFamilyData {
nsAutoString mFamilyName;
bool mGood;
ExtractFirstFamilyData() : mFamilyName(), mGood(false) {}

Просмотреть файл

@ -34,7 +34,7 @@ class StyleRule;
// Interface to the css parser.
class NS_STACK_CLASS nsCSSParser {
class MOZ_STACK_CLASS nsCSSParser {
public:
nsCSSParser(mozilla::css::Loader* aLoader = nullptr,
nsCSSStyleSheet* aSheet = nullptr);

Просмотреть файл

@ -99,7 +99,7 @@ enum nsCSSTokenType {
// meaningful; comments above describe which other fields are
// meaningful for which token types.
struct nsCSSToken {
nsAutoString mIdent NS_OKONHEAP;
nsAutoString mIdent;
float mNumber;
int32_t mInteger;
int32_t mInteger2;

Просмотреть файл

@ -34,7 +34,7 @@ struct TreeMatchContext;
* quickly tell that a particular selector is not relevant to a given
* element.
*/
class NS_STACK_CLASS AncestorFilter {
class MOZ_STACK_CLASS AncestorFilter {
friend struct TreeMatchContext;
public:
/* Maintenance of our ancestor state */
@ -97,7 +97,7 @@ class NS_STACK_CLASS AncestorFilter {
* ResetForVisitedMatching() and ResetForUnvisitedMatching() as
* needed.
*/
struct NS_STACK_CLASS TreeMatchContext {
struct MOZ_STACK_CLASS TreeMatchContext {
// Reset this context for matching for the style-if-:visited.
void ResetForVisitedMatching() {
NS_PRECONDITION(mForStyling, "Why is this being called?");
@ -212,7 +212,7 @@ struct NS_STACK_CLASS TreeMatchContext {
}
/* Helper class for maintaining the ancestor state */
class NS_STACK_CLASS AutoAncestorPusher {
class MOZ_STACK_CLASS AutoAncestorPusher {
public:
AutoAncestorPusher(bool aDoPush,
TreeMatchContext &aTreeMatchContext,
@ -250,7 +250,7 @@ struct NS_STACK_CLASS TreeMatchContext {
* in cases where we may or may not want to be skipping flex-item
* style fixup for a particular chunk of code).
*/
class NS_STACK_CLASS AutoFlexItemStyleFixupSkipper {
class MOZ_STACK_CLASS AutoFlexItemStyleFixupSkipper {
public:
AutoFlexItemStyleFixupSkipper(TreeMatchContext& aTreeMatchContext,
bool aSkipFlexItemStyleFixup = true
@ -369,7 +369,7 @@ struct NS_STACK_CLASS TreeMatchContext {
}
};
struct NS_STACK_CLASS RuleProcessorData {
struct MOZ_STACK_CLASS RuleProcessorData {
RuleProcessorData(nsPresContext* aPresContext,
nsRuleWalker* aRuleWalker)
: mPresContext(aPresContext),
@ -384,7 +384,7 @@ struct NS_STACK_CLASS RuleProcessorData {
mozilla::dom::Element* mScope;
};
struct NS_STACK_CLASS ElementDependentRuleProcessorData :
struct MOZ_STACK_CLASS ElementDependentRuleProcessorData :
public RuleProcessorData {
ElementDependentRuleProcessorData(nsPresContext* aPresContext,
mozilla::dom::Element* aElement,
@ -404,7 +404,7 @@ struct NS_STACK_CLASS ElementDependentRuleProcessorData :
TreeMatchContext& mTreeMatchContext;
};
struct NS_STACK_CLASS ElementRuleProcessorData :
struct MOZ_STACK_CLASS ElementRuleProcessorData :
public ElementDependentRuleProcessorData {
ElementRuleProcessorData(nsPresContext* aPresContext,
mozilla::dom::Element* aElement,
@ -418,7 +418,7 @@ struct NS_STACK_CLASS ElementRuleProcessorData :
}
};
struct NS_STACK_CLASS PseudoElementRuleProcessorData :
struct MOZ_STACK_CLASS PseudoElementRuleProcessorData :
public ElementDependentRuleProcessorData {
PseudoElementRuleProcessorData(nsPresContext* aPresContext,
mozilla::dom::Element* aParentElement,
@ -439,7 +439,7 @@ struct NS_STACK_CLASS PseudoElementRuleProcessorData :
nsCSSPseudoElements::Type mPseudoType;
};
struct NS_STACK_CLASS AnonBoxRuleProcessorData : public RuleProcessorData {
struct MOZ_STACK_CLASS AnonBoxRuleProcessorData : public RuleProcessorData {
AnonBoxRuleProcessorData(nsPresContext* aPresContext,
nsIAtom* aPseudoTag,
nsRuleWalker* aRuleWalker)
@ -454,7 +454,7 @@ struct NS_STACK_CLASS AnonBoxRuleProcessorData : public RuleProcessorData {
};
#ifdef MOZ_XUL
struct NS_STACK_CLASS XULTreeRuleProcessorData :
struct MOZ_STACK_CLASS XULTreeRuleProcessorData :
public ElementDependentRuleProcessorData {
XULTreeRuleProcessorData(nsPresContext* aPresContext,
mozilla::dom::Element* aParentElement,
@ -478,7 +478,7 @@ struct NS_STACK_CLASS XULTreeRuleProcessorData :
};
#endif
struct NS_STACK_CLASS StateRuleProcessorData :
struct MOZ_STACK_CLASS StateRuleProcessorData :
public ElementDependentRuleProcessorData {
StateRuleProcessorData(nsPresContext* aPresContext,
mozilla::dom::Element* aElement,
@ -494,7 +494,7 @@ struct NS_STACK_CLASS StateRuleProcessorData :
// Constants defined in nsEventStates.h .
};
struct NS_STACK_CLASS AttributeRuleProcessorData :
struct MOZ_STACK_CLASS AttributeRuleProcessorData :
public ElementDependentRuleProcessorData {
AttributeRuleProcessorData(nsPresContext* aPresContext,
mozilla::dom::Element* aElement,

Просмотреть файл

@ -1731,7 +1731,7 @@ nsStyleSet::ReparentStyleContext(nsStyleContext* aStyleContext,
aElement, flags);
}
struct StatefulData : public StateRuleProcessorData {
struct MOZ_STACK_CLASS StatefulData : public StateRuleProcessorData {
StatefulData(nsPresContext* aPresContext, Element* aElement,
nsEventStates aStateMask, TreeMatchContext& aTreeMatchContext)
: StateRuleProcessorData(aPresContext, aElement, aStateMask,
@ -1791,7 +1791,7 @@ nsStyleSet::HasStateDependentStyle(nsPresContext* aPresContext,
return data.mHint;
}
struct AttributeData : public AttributeRuleProcessorData {
struct MOZ_STACK_CLASS AttributeData : public AttributeRuleProcessorData {
AttributeData(nsPresContext* aPresContext,
Element* aElement, nsIAtom* aAttribute, int32_t aModType,
bool aAttrHasChanged, TreeMatchContext& aTreeMatchContext)

Просмотреть файл

@ -13,7 +13,7 @@ namespace mozilla {
// SVG image-specific rendering context. For imgIContainer::Draw.
// Used to pass information about overridden attributes from an SVG <image>
// element to the image's internal SVG document when it's drawn.
class NS_STACK_CLASS SVGImageContext
class MOZ_STACK_CLASS SVGImageContext
{
public:
SVGImageContext(SVGPreserveAspectRatio aPreserveAspectRatio)

Просмотреть файл

@ -113,7 +113,7 @@ private:
nsSVGFilterFrame *mFrame;
};
class NS_STACK_CLASS nsAutoFilterInstance {
class MOZ_STACK_CLASS nsAutoFilterInstance {
public:
nsAutoFilterInstance(nsIFrame *aTarget,
nsSVGFilterFrame *aFilterFrame,

Просмотреть файл

@ -47,7 +47,7 @@ class SVGFilterElement;
* The definition of "filter region" can be found here:
* http://www.w3.org/TR/SVG11/filters.html#FilterEffectsRegion
*/
class NS_STACK_CLASS nsSVGFilterInstance
class nsSVGFilterInstance
{
public:
/**

Просмотреть файл

@ -141,7 +141,7 @@ private:
// GRRR WINDOWS HATE HATE HATE
#undef CLIP_MASK
class NS_STACK_CLASS SVGAutoRenderState
class MOZ_STACK_CLASS SVGAutoRenderState
{
public:
enum RenderMode {

Просмотреть файл

@ -20,7 +20,7 @@ class nsIPresShell;
* from lowest number of columns spanned to highest. It does not use a
* stable sort (in fact, it currently reverses).
*/
class NS_STACK_CLASS SpanningCellSorter {
class MOZ_STACK_CLASS SpanningCellSorter {
public:
SpanningCellSorter();
~SpanningCellSorter();

Просмотреть файл

@ -24,7 +24,7 @@ struct nsHTMLReflowState;
class nsString;
class nsHTMLReflowCommand;
class NS_STACK_CLASS nsBoxLayoutState
class MOZ_STACK_CLASS nsBoxLayoutState
{
public:
nsBoxLayoutState(nsPresContext* aPresContext,