Eliminate NS_HIDDEN and NS_HIDDEN_ from layout/style/. Search-and-replace plus formatting fixes. rs=bzbarsky, no bug.

This commit is contained in:
Zack Weinberg 2010-04-06 14:52:17 -07:00
parent a497cdf461
commit 8a88b3f08f
9 changed files with 250 additions and 257 deletions

View File

@ -65,9 +65,9 @@ namespace css {
class NS_STACK_CLASS nsCSSParser {
public:
NS_HIDDEN nsCSSParser(mozilla::css::Loader* aLoader = nsnull,
nsICSSStyleSheet* aSheet = nsnull);
NS_HIDDEN ~nsCSSParser();
nsCSSParser(mozilla::css::Loader* aLoader = nsnull,
nsICSSStyleSheet* aSheet = nsnull);
~nsCSSParser();
static void Shutdown();
@ -79,24 +79,24 @@ private:
public:
// If this is false, memory allocation failed in the constructor
// and all other methods will crash.
NS_HIDDEN operator bool() const
operator bool() const
{ return !!mImpl; }
// Set a style sheet for the parser to fill in. The style sheet must
// implement the nsICSSStyleSheet interface. Null can be passed in to clear
// out an existing stylesheet reference.
NS_HIDDEN_(nsresult) SetStyleSheet(nsICSSStyleSheet* aSheet);
nsresult SetStyleSheet(nsICSSStyleSheet* aSheet);
// Set whether or not to emulate Nav quirks
NS_HIDDEN_(nsresult) SetQuirkMode(PRBool aQuirkMode);
nsresult SetQuirkMode(PRBool aQuirkMode);
#ifdef MOZ_SVG
// Set whether or not we are in an SVG element
NS_HIDDEN_(nsresult) SetSVGMode(PRBool aSVGMode);
nsresult SetSVGMode(PRBool aSVGMode);
#endif
// Set loader to use for child sheets
NS_HIDDEN_(nsresult) SetChildLoader(mozilla::css::Loader* aChildLoader);
nsresult SetChildLoader(mozilla::css::Loader* aChildLoader);
/**
* Parse aInput into the stylesheet that was previously set by calling
@ -114,45 +114,45 @@ public:
* @param aAllowUnsafeRules see aEnableUnsafeRules in
* mozilla::css::Loader::LoadSheetSync
*/
NS_HIDDEN_(nsresult) Parse(nsIUnicharInputStream* aInput,
nsIURI* aSheetURL,
nsIURI* aBaseURI,
nsIPrincipal* aSheetPrincipal,
PRUint32 aLineNumber,
PRBool aAllowUnsafeRules);
nsresult Parse(nsIUnicharInputStream* aInput,
nsIURI* aSheetURL,
nsIURI* aBaseURI,
nsIPrincipal* aSheetPrincipal,
PRUint32 aLineNumber,
PRBool aAllowUnsafeRules);
// Parse HTML style attribute or its equivalent in other markup
// languages. aBaseURL is the base url to use for relative links in
// the declaration.
NS_HIDDEN_(nsresult) ParseStyleAttribute(const nsAString& aAttributeValue,
nsIURI* aDocURL,
nsIURI* aBaseURL,
nsIPrincipal* aNodePrincipal,
nsICSSStyleRule** aResult);
nsresult ParseStyleAttribute(const nsAString& aAttributeValue,
nsIURI* aDocURL,
nsIURI* aBaseURL,
nsIPrincipal* aNodePrincipal,
nsICSSStyleRule** aResult);
NS_HIDDEN_(nsresult) ParseAndAppendDeclaration(const nsAString& aBuffer,
nsIURI* aSheetURL,
nsIURI* aBaseURL,
nsIPrincipal* aSheetPrincipal,
nsCSSDeclaration* aDeclaration,
PRBool aParseOnlyOneDecl,
PRBool* aChanged,
PRBool aClearOldDecl);
nsresult ParseAndAppendDeclaration(const nsAString& aBuffer,
nsIURI* aSheetURL,
nsIURI* aBaseURL,
nsIPrincipal* aSheetPrincipal,
nsCSSDeclaration* aDeclaration,
PRBool aParseOnlyOneDecl,
PRBool* aChanged,
PRBool aClearOldDecl);
NS_HIDDEN_(nsresult) ParseRule(const nsAString& aRule,
nsIURI* aSheetURL,
nsIURI* aBaseURL,
nsIPrincipal* aSheetPrincipal,
nsCOMArray<nsICSSRule>& aResult);
nsresult ParseRule(const nsAString& aRule,
nsIURI* aSheetURL,
nsIURI* aBaseURL,
nsIPrincipal* aSheetPrincipal,
nsCOMArray<nsICSSRule>& aResult);
NS_HIDDEN_(nsresult) ParseProperty(const nsCSSProperty aPropID,
const nsAString& aPropValue,
nsIURI* aSheetURL,
nsIURI* aBaseURL,
nsIPrincipal* aSheetPrincipal,
nsCSSDeclaration* aDeclaration,
PRBool* aChanged,
PRBool aIsImportant);
nsresult ParseProperty(const nsCSSProperty aPropID,
const nsAString& aPropValue,
nsIURI* aSheetURL,
nsIURI* aBaseURL,
nsIPrincipal* aSheetPrincipal,
nsCSSDeclaration* aDeclaration,
PRBool* aChanged,
PRBool aIsImportant);
/**
* Parse aBuffer into a media list |aMediaList|, which must be
@ -162,11 +162,11 @@ public:
* parentheses and strings more important than commas. |aURL| and
* |aLineNumber| are used for error reporting.
*/
NS_HIDDEN_(nsresult) ParseMediaList(const nsSubstring& aBuffer,
nsIURI* aURL,
PRUint32 aLineNumber,
nsMediaList* aMediaList,
PRBool aHTMLMode);
nsresult ParseMediaList(const nsSubstring& aBuffer,
nsIURI* aURL,
PRUint32 aLineNumber,
nsMediaList* aMediaList,
PRBool aHTMLMode);
/**
* Parse aBuffer into a nscolor |aColor|. The alpha component of the
@ -177,19 +177,19 @@ public:
* self-contained (i.e. doesn't reference any external style state,
* such as "initial" or "inherit").
*/
NS_HIDDEN_(nsresult) ParseColorString(const nsSubstring& aBuffer,
nsIURI* aURL,
PRUint32 aLineNumber,
nscolor* aColor);
nsresult ParseColorString(const nsSubstring& aBuffer,
nsIURI* aURL,
PRUint32 aLineNumber,
nscolor* aColor);
/**
* Parse aBuffer into a selector list. On success, caller must
* delete *aSelectorList when done with it.
*/
NS_HIDDEN_(nsresult) ParseSelectorString(const nsSubstring& aSelectorString,
nsIURI* aURL,
PRUint32 aLineNumber,
nsCSSSelectorList** aSelectorList);
nsresult ParseSelectorString(const nsSubstring& aSelectorString,
nsIURI* aURL,
PRUint32 aLineNumber,
nsCSSSelectorList** aSelectorList);
protected:
// This is a CSSParserImpl*, but if we expose that type name in this

View File

@ -161,28 +161,27 @@ class nsCSSScanner {
#endif
#ifdef CSS_REPORT_PARSE_ERRORS
NS_HIDDEN_(void) AddToError(const nsSubstring& aErrorText);
NS_HIDDEN_(void) OutputError();
NS_HIDDEN_(void) ClearError();
void AddToError(const nsSubstring& aErrorText);
void OutputError();
void ClearError();
// aMessage must take no parameters
NS_HIDDEN_(void) ReportUnexpected(const char* aMessage);
NS_HIDDEN_(void) ReportUnexpectedParams(const char* aMessage,
const PRUnichar **aParams,
PRUint32 aParamsLength);
void ReportUnexpected(const char* aMessage);
void ReportUnexpectedParams(const char* aMessage,
const PRUnichar **aParams,
PRUint32 aParamsLength);
// aLookingFor is a plain string, not a format string
NS_HIDDEN_(void) ReportUnexpectedEOF(const char* aLookingFor);
void ReportUnexpectedEOF(const char* aLookingFor);
// aLookingFor is a single character
NS_HIDDEN_(void) ReportUnexpectedEOF(PRUnichar aLookingFor);
void ReportUnexpectedEOF(PRUnichar aLookingFor);
// aMessage must take 1 parameter (for the string representation of the
// unexpected token)
NS_HIDDEN_(void) ReportUnexpectedToken(nsCSSToken& tok,
const char *aMessage);
void ReportUnexpectedToken(nsCSSToken& tok, const char *aMessage);
// aParams's first entry must be null, and we'll fill in the token
NS_HIDDEN_(void) ReportUnexpectedTokenParams(nsCSSToken& tok,
const char* aMessage,
const PRUnichar **aParams,
PRUint32 aParamsLength);
void ReportUnexpectedTokenParams(nsCSSToken& tok,
const char* aMessage,
const PRUnichar **aParams,
PRUint32 aParamsLength);
#endif
PRUint32 GetLineNumber() { return mLineNumber; }

View File

@ -151,14 +151,14 @@ public:
NS_IMETHOD GetStyleSheetAt(PRInt32 aIndex, nsICSSStyleSheet*& aSheet) const;
NS_IMETHOD SetURIs(nsIURI* aSheetURI, nsIURI* aOriginalSheetURI,
nsIURI* aBaseURI);
virtual NS_HIDDEN_(void) SetPrincipal(nsIPrincipal* aPrincipal);
virtual NS_HIDDEN_(nsIPrincipal*) Principal() const;
virtual void SetPrincipal(nsIPrincipal* aPrincipal);
virtual nsIPrincipal* Principal() const;
NS_IMETHOD SetTitle(const nsAString& aTitle);
NS_IMETHOD SetMedia(nsMediaList* aMedia);
NS_IMETHOD SetOwningNode(nsIDOMNode* aOwningNode);
NS_IMETHOD SetOwnerRule(nsICSSImportRule* aOwnerRule);
NS_IMETHOD GetOwnerRule(nsICSSImportRule** aOwnerRule);
virtual NS_HIDDEN_(nsXMLNameSpaceMap*) GetNameSpaceMap() const;
virtual nsXMLNameSpaceMap* GetNameSpaceMap() const;
NS_IMETHOD Clone(nsICSSStyleSheet* aCloneParent,
nsICSSImportRule* aCloneOwnerRule,
nsIDocument* aCloneDocument,

View File

@ -181,18 +181,18 @@ public:
NS_ASSERTION(aUnit <= eCSSUnit_RectIsAuto, "not a valueless unit");
}
nsCSSValue(PRInt32 aValue, nsCSSUnit aUnit) NS_HIDDEN;
nsCSSValue(float aValue, nsCSSUnit aUnit) NS_HIDDEN;
nsCSSValue(const nsString& aValue, nsCSSUnit aUnit) NS_HIDDEN;
nsCSSValue(Array* aArray, nsCSSUnit aUnit) NS_HIDDEN;
explicit nsCSSValue(URL* aValue) NS_HIDDEN;
explicit nsCSSValue(Image* aValue) NS_HIDDEN;
explicit nsCSSValue(nsCSSValueGradient* aValue) NS_HIDDEN;
nsCSSValue(const nsCSSValue& aCopy) NS_HIDDEN;
nsCSSValue(PRInt32 aValue, nsCSSUnit aUnit);
nsCSSValue(float aValue, nsCSSUnit aUnit);
nsCSSValue(const nsString& aValue, nsCSSUnit aUnit);
nsCSSValue(Array* aArray, nsCSSUnit aUnit);
explicit nsCSSValue(URL* aValue);
explicit nsCSSValue(Image* aValue);
explicit nsCSSValue(nsCSSValueGradient* aValue);
nsCSSValue(const nsCSSValue& aCopy);
~nsCSSValue() { Reset(); }
NS_HIDDEN_(nsCSSValue&) operator=(const nsCSSValue& aCopy);
NS_HIDDEN_(PRBool) operator==(const nsCSSValue& aOther) const;
nsCSSValue& operator=(const nsCSSValue& aCopy);
PRBool operator==(const nsCSSValue& aOther) const;
PRBool operator!=(const nsCSSValue& aOther) const
{
@ -310,44 +310,43 @@ public:
// Not making this inline because that would force us to include
// imgIRequest.h, which leads to REQUIRES hell, since this header is included
// all over.
NS_HIDDEN_(imgIRequest*) GetImageValue() const;
imgIRequest* GetImageValue() const;
NS_HIDDEN_(nscoord) GetLengthTwips() const;
nscoord GetLengthTwips() const;
NS_HIDDEN_(void) Reset() // sets to null
void Reset() // sets to null
{
if (mUnit != eCSSUnit_Null)
DoReset();
}
private:
NS_HIDDEN_(void) DoReset();
void DoReset();
public:
NS_HIDDEN_(void) SetIntValue(PRInt32 aValue, nsCSSUnit aUnit);
NS_HIDDEN_(void) SetPercentValue(float aValue);
NS_HIDDEN_(void) SetFloatValue(float aValue, nsCSSUnit aUnit);
NS_HIDDEN_(void) SetStringValue(const nsString& aValue, nsCSSUnit aUnit);
NS_HIDDEN_(void) SetColorValue(nscolor aValue);
NS_HIDDEN_(void) SetArrayValue(nsCSSValue::Array* aArray, nsCSSUnit aUnit);
NS_HIDDEN_(void) SetURLValue(nsCSSValue::URL* aURI);
NS_HIDDEN_(void) SetImageValue(nsCSSValue::Image* aImage);
NS_HIDDEN_(void) SetGradientValue(nsCSSValueGradient* aGradient);
NS_HIDDEN_(void) SetAutoValue();
NS_HIDDEN_(void) SetInheritValue();
NS_HIDDEN_(void) SetInitialValue();
NS_HIDDEN_(void) SetNoneValue();
NS_HIDDEN_(void) SetAllValue();
NS_HIDDEN_(void) SetNormalValue();
NS_HIDDEN_(void) SetSystemFontValue();
NS_HIDDEN_(void) SetDummyValue();
NS_HIDDEN_(void) SetDummyInheritValue();
NS_HIDDEN_(void) StartImageLoad(nsIDocument* aDocument)
const; // Not really const, but pretending
void SetIntValue(PRInt32 aValue, nsCSSUnit aUnit);
void SetPercentValue(float aValue);
void SetFloatValue(float aValue, nsCSSUnit aUnit);
void SetStringValue(const nsString& aValue, nsCSSUnit aUnit);
void SetColorValue(nscolor aValue);
void SetArrayValue(nsCSSValue::Array* aArray, nsCSSUnit aUnit);
void SetURLValue(nsCSSValue::URL* aURI);
void SetImageValue(nsCSSValue::Image* aImage);
void SetGradientValue(nsCSSValueGradient* aGradient);
void SetAutoValue();
void SetInheritValue();
void SetInitialValue();
void SetNoneValue();
void SetAllValue();
void SetNormalValue();
void SetSystemFontValue();
void SetDummyValue();
void SetDummyInheritValue();
void StartImageLoad(nsIDocument* aDocument) const; // Only pretend const
// Initializes as a function value with the specified function id.
NS_HIDDEN_(Array*) InitFunction(nsCSSKeyword aFunctionId, PRUint32 aNumArgs);
Array* InitFunction(nsCSSKeyword aFunctionId, PRUint32 aNumArgs);
// Checks if this is a function value with the specified function id.
NS_HIDDEN_(PRBool) EqualsFunction(nsCSSKeyword aFunctionId) const;
PRBool EqualsFunction(nsCSSKeyword aFunctionId) const;
// Returns an already addrefed buffer. Can return null on allocation
// failure.
@ -361,17 +360,17 @@ public:
// aString must not be null.
// aOriginPrincipal must not be null.
URL(nsIURI* aURI, nsStringBuffer* aString, nsIURI* aReferrer,
nsIPrincipal* aOriginPrincipal) NS_HIDDEN;
nsIPrincipal* aOriginPrincipal);
~URL() NS_HIDDEN;
~URL();
NS_HIDDEN_(PRBool) operator==(const URL& aOther) const;
PRBool operator==(const URL& aOther) const;
// URIEquals only compares URIs and principals (unlike operator==, which
// also compares the original strings). URIEquals also assumes that the
// mURI member of both URL objects is non-null. Do NOT call this method
// unless you're sure this is the case.
NS_HIDDEN_(PRBool) URIEquals(const URL& aOther) const;
PRBool URIEquals(const URL& aOther) const;
nsCOMPtr<nsIURI> mURI; // null == invalid URL
nsStringBuffer* mString; // Could use nsRefPtr, but it'd add useless
@ -394,8 +393,8 @@ public:
// this header is included all over.
// aString must not be null.
Image(nsIURI* aURI, nsStringBuffer* aString, nsIURI* aReferrer,
nsIPrincipal* aOriginPrincipal, nsIDocument* aDocument) NS_HIDDEN;
~Image() NS_HIDDEN;
nsIPrincipal* aOriginPrincipal, nsIDocument* aDocument);
~Image();
// Inherit operator== from nsCSSValue::URL
@ -429,10 +428,10 @@ protected:
struct nsCSSValueGradientStop {
public:
nsCSSValueGradientStop() NS_HIDDEN;
nsCSSValueGradientStop();
// needed to keep bloat logs happy when we use the nsTArray in nsCSSValueGradient
nsCSSValueGradientStop(const nsCSSValueGradientStop& aOther) NS_HIDDEN;
~nsCSSValueGradientStop() NS_HIDDEN;
nsCSSValueGradientStop(const nsCSSValueGradientStop& aOther);
~nsCSSValueGradientStop();
nsCSSValue mLocation;
nsCSSValue mColor;
@ -450,8 +449,7 @@ public:
};
struct nsCSSValueGradient {
nsCSSValueGradient(PRBool aIsRadial,
PRBool aIsRepeating) NS_HIDDEN;
nsCSSValueGradient(PRBool aIsRadial, PRBool aIsRepeating);
// true if gradient is radial, false if it is linear
PRPackedBool mIsRadial;

View File

@ -93,10 +93,10 @@ public:
* This can only be called once with a non-null principal. Calling this with
* a null pointer is allowed and is treated as a no-op.
*/
virtual NS_HIDDEN_(void) SetPrincipal(nsIPrincipal* aPrincipal) = 0;
virtual void SetPrincipal(nsIPrincipal* aPrincipal) = 0;
// Principal() never returns a null pointer.
virtual NS_HIDDEN_(nsIPrincipal*) Principal() const = 0;
virtual nsIPrincipal* Principal() const = 0;
NS_IMETHOD SetTitle(const nsAString& aTitle) = 0;
NS_IMETHOD SetMedia(nsMediaList* aMedia) = 0;
@ -106,7 +106,7 @@ public:
NS_IMETHOD GetOwnerRule(nsICSSImportRule** aOwnerRule) = 0;
// get namespace map for sheet
virtual NS_HIDDEN_(nsXMLNameSpaceMap*) GetNameSpaceMap() const = 0;
virtual nsXMLNameSpaceMap* GetNameSpaceMap() const = 0;
NS_IMETHOD Clone(nsICSSStyleSheet* aCloneParent,
nsICSSImportRule* aCloneOwnerRule,

View File

@ -172,7 +172,7 @@ struct nsCachedStyleData
return 1 << aSID;
}
NS_HIDDEN_(void*) NS_FASTCALL GetStyleData(const nsStyleStructID& aSID) {
void* NS_FASTCALL GetStyleData(const nsStyleStructID& aSID) {
// Each struct is stored at this.m##type##Data->m##name##Data where
// |type| is either Inherit or Reset, and |name| is the name of the
// style struct. The |gInfo| stores the offset of the appropriate
@ -205,18 +205,18 @@ struct nsCachedStyleData
// Typesafe and faster versions of the above
#define STYLE_STRUCT_INHERITED(name_, checkdata_cb_, ctor_args_) \
NS_HIDDEN_(nsStyle##name_ *) NS_FASTCALL GetStyle##name_ () { \
nsStyle##name_ * NS_FASTCALL GetStyle##name_ () { \
return mInheritedData ? mInheritedData->m##name_##Data : nsnull; \
}
#define STYLE_STRUCT_RESET(name_, checkdata_cb_, ctor_args_) \
NS_HIDDEN_(nsStyle##name_ *) NS_FASTCALL GetStyle##name_ () { \
nsStyle##name_ * NS_FASTCALL GetStyle##name_ () { \
return mResetData ? mResetData->m##name_##Data : nsnull; \
}
#include "nsStyleStructList.h"
#undef STYLE_STRUCT_RESET
#undef STYLE_STRUCT_INHERITED
NS_HIDDEN_(void) Destroy(PRUint32 aBits, nsPresContext* aContext) {
void Destroy(PRUint32 aBits, nsPresContext* aContext) {
if (mResetData)
mResetData->Destroy(aBits, aContext);
if (mInheritedData)
@ -431,149 +431,148 @@ private:
public:
// Overloaded new operator. Initializes the memory to 0 and relies on an arena
// (which comes from the presShell) to perform the allocation.
NS_HIDDEN_(void*) operator new(size_t sz, nsPresContext* aContext) CPP_THROW_NEW;
NS_HIDDEN_(void) Destroy() { DestroyInternal(nsnull); }
static NS_HIDDEN_(nsILanguageAtomService*) gLangService;
void* operator new(size_t sz, nsPresContext* aContext) CPP_THROW_NEW;
void Destroy() { DestroyInternal(nsnull); }
static nsILanguageAtomService* gLangService;
// Implemented in nsStyleSet.h, since it needs to know about nsStyleSet.
inline NS_HIDDEN_(void) AddRef();
inline void AddRef();
// Implemented in nsStyleSet.h, since it needs to know about nsStyleSet.
inline NS_HIDDEN_(void) Release();
inline void Release();
protected:
NS_HIDDEN_(void) DestroyInternal(nsRuleNode ***aDestroyQueueTail);
NS_HIDDEN_(void) PropagateDependentBit(PRUint32 aBit,
nsRuleNode* aHighestNode);
NS_HIDDEN_(void) PropagateNoneBit(PRUint32 aBit, nsRuleNode* aHighestNode);
void DestroyInternal(nsRuleNode ***aDestroyQueueTail);
void PropagateDependentBit(PRUint32 aBit, nsRuleNode* aHighestNode);
void PropagateNoneBit(PRUint32 aBit, nsRuleNode* aHighestNode);
NS_HIDDEN_(const void*) SetDefaultOnRoot(const nsStyleStructID aSID,
nsStyleContext* aContext);
const void* SetDefaultOnRoot(const nsStyleStructID aSID,
nsStyleContext* aContext);
NS_HIDDEN_(const void*)
const void*
WalkRuleTree(const nsStyleStructID aSID, nsStyleContext* aContext,
nsRuleData* aRuleData, nsRuleDataStruct* aSpecificData);
NS_HIDDEN_(const void*)
const void*
ComputeDisplayData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeVisibilityData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeFontData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeColorData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeBackgroundData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeMarginData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeBorderData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputePaddingData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeOutlineData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeListData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputePositionData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeTableData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeTableBorderData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeContentData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeQuotesData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeTextData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeTextResetData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeUserInterfaceData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext,
@ -581,35 +580,35 @@ protected:
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeUIResetData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeXULData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeColumnData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeSVGData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
RuleDetail aRuleDetail,
const PRBool aCanStoreInRuleTree);
NS_HIDDEN_(const void*)
const void*
ComputeSVGResetData(void* aStartStruct,
const nsRuleDataStruct& aData,
nsStyleContext* aContext, nsRuleNode* aHighestNode,
@ -617,95 +616,94 @@ protected:
const PRBool aCanStoreInRuleTree);
// helpers for |ComputeFontData| that need access to |mNoneBits|:
static NS_HIDDEN_(void) SetFontSize(nsPresContext* aPresContext,
const nsRuleDataFont& aFontData,
const nsStyleFont* aFont,
const nsStyleFont* aParentFont,
nscoord* aSize,
const nsFont& aSystemFont,
nscoord aParentSize,
nscoord aScriptLevelAdjustedParentSize,
PRBool aUsedStartStruct,
PRBool aAtRoot,
PRBool& aCanStoreInRuleTree);
static void SetFontSize(nsPresContext* aPresContext,
const nsRuleDataFont& aFontData,
const nsStyleFont* aFont,
const nsStyleFont* aParentFont,
nscoord* aSize,
const nsFont& aSystemFont,
nscoord aParentSize,
nscoord aScriptLevelAdjustedParentSize,
PRBool aUsedStartStruct,
PRBool aAtRoot,
PRBool& aCanStoreInRuleTree);
static NS_HIDDEN_(void) SetFont(nsPresContext* aPresContext,
nsStyleContext* aContext,
nscoord aMinFontSize,
PRUint8 aGenericFontID,
const nsRuleDataFont& aFontData,
const nsStyleFont* aParentFont,
nsStyleFont* aFont,
PRBool aStartStruct,
PRBool& aCanStoreInRuleTree);
static void SetFont(nsPresContext* aPresContext,
nsStyleContext* aContext,
nscoord aMinFontSize,
PRUint8 aGenericFontID,
const nsRuleDataFont& aFontData,
const nsStyleFont* aParentFont,
nsStyleFont* aFont,
PRBool aStartStruct,
PRBool& aCanStoreInRuleTree);
static NS_HIDDEN_(void) SetGenericFont(nsPresContext* aPresContext,
nsStyleContext* aContext,
PRUint8 aGenericFontID,
nscoord aMinFontSize,
nsStyleFont* aFont);
static void SetGenericFont(nsPresContext* aPresContext,
nsStyleContext* aContext,
PRUint8 aGenericFontID,
nscoord aMinFontSize,
nsStyleFont* aFont);
NS_HIDDEN_(void) AdjustLogicalBoxProp(nsStyleContext* aContext,
const nsCSSValue& aLTRSource,
const nsCSSValue& aRTLSource,
const nsCSSValue& aLTRLogicalValue,
const nsCSSValue& aRTLLogicalValue,
PRUint8 aSide,
nsCSSRect& aValueRect,
PRBool& aCanStoreInRuleTree);
void AdjustLogicalBoxProp(nsStyleContext* aContext,
const nsCSSValue& aLTRSource,
const nsCSSValue& aRTLSource,
const nsCSSValue& aLTRLogicalValue,
const nsCSSValue& aRTLLogicalValue,
PRUint8 aSide,
nsCSSRect& aValueRect,
PRBool& aCanStoreInRuleTree);
inline RuleDetail CheckSpecifiedProperties(const nsStyleStructID aSID, const nsRuleDataStruct& aRuleDataStruct);
NS_HIDDEN_(const void*) GetParentData(const nsStyleStructID aSID);
const void* GetParentData(const nsStyleStructID aSID);
#define STYLE_STRUCT(name_, checkdata_cb_, ctor_args_) \
NS_HIDDEN_(const nsStyle##name_*) GetParent##name_();
const nsStyle##name_* GetParent##name_();
#include "nsStyleStructList.h"
#undef STYLE_STRUCT
NS_HIDDEN_(const void*) GetDisplayData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetVisibilityData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetFontData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetColorData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetBackgroundData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetMarginData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetBorderData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetPaddingData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetOutlineData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetListData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetPositionData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetTableData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetTableBorderData(nsStyleContext* aContext);
const void* GetDisplayData(nsStyleContext* aContext);
const void* GetVisibilityData(nsStyleContext* aContext);
const void* GetFontData(nsStyleContext* aContext);
const void* GetColorData(nsStyleContext* aContext);
const void* GetBackgroundData(nsStyleContext* aContext);
const void* GetMarginData(nsStyleContext* aContext);
const void* GetBorderData(nsStyleContext* aContext);
const void* GetPaddingData(nsStyleContext* aContext);
const void* GetOutlineData(nsStyleContext* aContext);
const void* GetListData(nsStyleContext* aContext);
const void* GetPositionData(nsStyleContext* aContext);
const void* GetTableData(nsStyleContext* aContext);
const void* GetTableBorderData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetContentData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetQuotesData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetTextData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetTextResetData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetUserInterfaceData(nsStyleContext* aContext);
const void* GetContentData(nsStyleContext* aContext);
const void* GetQuotesData(nsStyleContext* aContext);
const void* GetTextData(nsStyleContext* aContext);
const void* GetTextResetData(nsStyleContext* aContext);
const void* GetUserInterfaceData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetUIResetData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetXULData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetColumnData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetSVGData(nsStyleContext* aContext);
NS_HIDDEN_(const void*) GetSVGResetData(nsStyleContext* aContext);
const void* GetUIResetData(nsStyleContext* aContext);
const void* GetXULData(nsStyleContext* aContext);
const void* GetColumnData(nsStyleContext* aContext);
const void* GetSVGData(nsStyleContext* aContext);
const void* GetSVGResetData(nsStyleContext* aContext);
NS_HIDDEN_(already_AddRefed<nsCSSShadowArray>)
GetShadowData(nsCSSValueList* aList,
nsStyleContext* aContext,
PRBool aIsBoxShadow,
PRBool& inherited);
already_AddRefed<nsCSSShadowArray>
GetShadowData(nsCSSValueList* aList,
nsStyleContext* aContext,
PRBool aIsBoxShadow,
PRBool& inherited);
private:
nsRuleNode(nsPresContext* aPresContext, nsRuleNode* aParent,
nsIStyleRule* aRule, PRUint8 aLevel, PRBool aIsImportant)
NS_HIDDEN;
~nsRuleNode() NS_HIDDEN;
nsIStyleRule* aRule, PRUint8 aLevel, PRBool aIsImportant);
~nsRuleNode();
public:
static NS_HIDDEN_(nsRuleNode*) CreateRootNode(nsPresContext* aPresContext);
static nsRuleNode* CreateRootNode(nsPresContext* aPresContext);
// Transition never returns null; on out of memory it'll just return |this|.
NS_HIDDEN_(nsRuleNode*) Transition(nsIStyleRule* aRule, PRUint8 aLevel,
PRPackedBool aIsImportantRule);
nsRuleNode* Transition(nsIStyleRule* aRule, PRUint8 aLevel,
PRPackedBool aIsImportantRule);
nsRuleNode* GetParent() const { return mParent; }
PRBool IsRoot() const { return mParent == nsnull; }
@ -725,14 +723,13 @@ public:
// NOTE: Does not |AddRef|.
nsPresContext* GetPresContext() const { return mPresContext; }
NS_HIDDEN_(const void*) GetStyleData(nsStyleStructID aSID,
nsStyleContext* aContext,
PRBool aComputeData);
const void* GetStyleData(nsStyleStructID aSID,
nsStyleContext* aContext,
PRBool aComputeData);
#define STYLE_STRUCT(name_, checkdata_cb_, ctor_args_) \
NS_HIDDEN_(const nsStyle##name_*) \
GetStyle##name_(nsStyleContext* aContext, \
PRBool aComputeData);
const nsStyle##name_* GetStyle##name_(nsStyleContext* aContext, \
PRBool aComputeData);
#include "nsStyleStructList.h"
#undef STYLE_STRUCT
@ -742,8 +739,8 @@ public:
* the children, destroys any that are unmarked, and clears marks,
* returning true if the node on which it was called was destroyed.
*/
NS_HIDDEN_(void) Mark();
NS_HIDDEN_(PRBool) Sweep();
void Mark();
PRBool Sweep();
static PRBool
HasAuthorSpecifiedRules(nsStyleContext* aStyleContext,

View File

@ -75,11 +75,11 @@ class nsStyleContext
public:
nsStyleContext(nsStyleContext* aParent, nsIAtom* aPseudoTag,
nsCSSPseudoElements::Type aPseudoType,
nsRuleNode* aRuleNode, nsPresContext* aPresContext) NS_HIDDEN;
~nsStyleContext() NS_HIDDEN;
nsRuleNode* aRuleNode, nsPresContext* aPresContext);
~nsStyleContext();
NS_HIDDEN_(void*) operator new(size_t sz, nsPresContext* aPresContext) CPP_THROW_NEW;
NS_HIDDEN_(void) Destroy();
void* operator new(size_t sz, nsPresContext* aPresContext) CPP_THROW_NEW;
void Destroy();
nsrefcnt AddRef() {
if (mRefCnt == PR_UINT32_MAX) {
@ -122,7 +122,7 @@ public:
// * !GetStyleIfVisited() == !aRulesIfVisited, and, if they're
// non-null, GetStyleIfVisited()->GetRuleNode() == aRulesIfVisited
// * RelevantLinkVisited() == aRelevantLinkVisited
NS_HIDDEN_(already_AddRefed<nsStyleContext>)
already_AddRefed<nsStyleContext>
FindChildWithRules(const nsIAtom* aPseudoTag, nsRuleNode* aRules,
nsRuleNode* aRulesIfVisited,
PRBool aRelevantLinkVisited);
@ -197,7 +197,7 @@ public:
}
// Tell this style context to cache aStruct as the struct for aSID
NS_HIDDEN_(void) SetStyle(nsStyleStructID aSID, void* aStruct);
void SetStyle(nsStyleStructID aSID, void* aStruct);
// Setters for inherit structs only, since rulenode only sets those eagerly.
#define STYLE_STRUCT_INHERITED(name_, checkdata_cb_, ctor_args_) \
@ -220,7 +220,7 @@ public:
* Mark this style context's rule node (and its ancestors) to prevent
* it from being garbage collected.
*/
NS_HIDDEN_(void) Mark();
void Mark();
/*
* Get the style data for a style struct. This is the most important
@ -238,7 +238,7 @@ public:
* function, bothe because they're easier to read and because they're
* faster.
*/
NS_HIDDEN_(const void*) NS_FASTCALL GetStyleData(nsStyleStructID aSID);
const void* NS_FASTCALL GetStyleData(nsStyleStructID aSID);
/**
* Define typesafe getter functions for each style struct by
@ -268,9 +268,9 @@ public:
#include "nsStyleStructList.h"
#undef STYLE_STRUCT
NS_HIDDEN_(void*) GetUniqueStyleData(const nsStyleStructID& aSID);
void* GetUniqueStyleData(const nsStyleStructID& aSID);
NS_HIDDEN_(nsChangeHint) CalcStyleDifference(nsStyleContext* aOther);
nsChangeHint CalcStyleDifference(nsStyleContext* aOther);
/**
* Get a color that depends on link-visitedness using this and
@ -283,7 +283,7 @@ public:
* Note that if aProperty is eCSSProperty_border_*_color, this
* function handles -moz-use-text-color.
*/
NS_HIDDEN_(nscolor) GetVisitedDependentColor(nsCSSProperty aProperty);
nscolor GetVisitedDependentColor(nsCSSProperty aProperty);
/**
* aColors should be a two element array of nscolor in which the first
@ -296,14 +296,14 @@ public:
PRBool aLinkIsVisited);
#ifdef DEBUG
NS_HIDDEN_(void) List(FILE* out, PRInt32 aIndent);
void List(FILE* out, PRInt32 aIndent);
#endif
protected:
NS_HIDDEN_(void) AddChild(nsStyleContext* aChild);
NS_HIDDEN_(void) RemoveChild(nsStyleContext* aChild);
void AddChild(nsStyleContext* aChild);
void RemoveChild(nsStyleContext* aChild);
NS_HIDDEN_(void) ApplyStyleFixups(nsPresContext* aPresContext);
void ApplyStyleFixups(nsPresContext* aPresContext);
// Helper function that GetStyleData and GetUniqueStyleData use. Only
// returns the structs we cache ourselves; never consults the ruletree.
@ -378,7 +378,7 @@ protected:
PRUint32 mRefCnt;
};
NS_HIDDEN_(already_AddRefed<nsStyleContext>)
already_AddRefed<nsStyleContext>
NS_NewStyleContext(nsStyleContext* aParentContext,
nsIAtom* aPseudoTag,
nsCSSPseudoElements::Type aPseudoType,

View File

@ -389,7 +389,7 @@ class nsStyleSet
};
inline
NS_HIDDEN_(void) nsRuleNode::AddRef()
void nsRuleNode::AddRef()
{
if (mRefCnt++ == 0 && !IsRoot()) {
mPresContext->StyleSet()->RuleNodeInUse();
@ -397,7 +397,7 @@ NS_HIDDEN_(void) nsRuleNode::AddRef()
}
inline
NS_HIDDEN_(void) nsRuleNode::Release()
void nsRuleNode::Release()
{
if (--mRefCnt == 0 && !IsRoot()) {
mPresContext->StyleSet()->RuleNodeUnused();

View File

@ -144,8 +144,7 @@ public:
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
NS_HIDDEN_(void) CoverValue(nsCSSProperty aProperty,
nsStyleAnimation::Value &aStartValue)
void CoverValue(nsCSSProperty aProperty, nsStyleAnimation::Value &aStartValue)
{
CoveredValue v = { aProperty, aStartValue };
mCoveredValues.AppendElement(v);