Bug 566808 - "DeCOMtaminate nsIStyleRule method signatures" [r=dbaron]

This commit is contained in:
Craig Topper 2010-05-19 22:28:00 -04:00
parent 0057ffc70d
commit 63db5e6a96
22 changed files with 92 additions and 119 deletions

View File

@ -195,17 +195,16 @@ nsMappedAttributes::SetStyleSheet(nsHTMLStyleSheet* aSheet)
mSheet = aSheet; // not ref counted
}
NS_IMETHODIMP
/* virtual */ void
nsMappedAttributes::MapRuleInfoInto(nsRuleData* aRuleData)
{
if (mRuleMapper) {
(*mRuleMapper)(this, aRuleData);
}
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
/* virtual */ void
nsMappedAttributes::List(FILE* out, PRInt32 aIndent) const
{
nsAutoString buffer;
@ -228,8 +227,6 @@ nsMappedAttributes::List(FILE* out, PRInt32 aIndent) const
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
fputs("\n", out);
}
return NS_OK;
}
#endif

View File

@ -103,9 +103,9 @@ public:
// nsIStyleRule
NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
virtual void MapRuleInfoInto(nsRuleData* aRuleData);
#ifdef DEBUG
NS_METHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
private:

View File

@ -69,9 +69,9 @@ public:
NS_DECL_ISUPPORTS
// nsIStyleRule interface
NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
virtual void MapRuleInfoInto(nsRuleData* aRuleData);
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsHTMLBodyElement* mPart; // not ref-counted, cleared by content
@ -132,11 +132,11 @@ BodyRule::~BodyRule()
NS_IMPL_ISUPPORTS1(BodyRule, nsIStyleRule)
NS_IMETHODIMP
/* virtual */ void
BodyRule::MapRuleInfoInto(nsRuleData* aData)
{
if (!aData || !(aData->mSIDs & NS_STYLE_INHERIT_BIT(Margin)) || !aData->mMarginData || !mPart)
return NS_OK; // We only care about margins.
return; // We only care about margins.
PRInt32 bodyMarginWidth = -1;
PRInt32 bodyMarginHeight = -1;
@ -261,14 +261,12 @@ BodyRule::MapRuleInfoInto(nsRuleData* aData)
}
}
}
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
/* virtual */ void
BodyRule::List(FILE* out, PRInt32 aIndent) const
{
return NS_OK;
}
#endif

View File

@ -70,6 +70,7 @@ struct nsSVGEnumMapping;
class nsSVGViewBox;
class nsSVGPreserveAspectRatio;
class nsSVGString;
struct gfxMatrix;
typedef nsStyledElement nsSVGElementBase;

View File

@ -218,7 +218,7 @@ ShouldStartImageLoads(nsRuleData *aRuleData, nsCSSProperty aProperty)
nsCSSProps::PropHasFlags(aProperty, CSS_PROPERTY_START_IMAGE_LOADS);
}
nsresult
void
nsCSSCompressedDataBlock::MapRuleInfoInto(nsRuleData *aRuleData) const
{
// If we have no data for these structs, then return immediately.
@ -226,7 +226,7 @@ nsCSSCompressedDataBlock::MapRuleInfoInto(nsRuleData *aRuleData) const
// have to worry much less (although still some) about the speed of
// the rest of the function.
if (!(aRuleData->mSIDs & mStyleBits))
return NS_OK;
return;
nsIDocument* doc = aRuleData->mPresContext->Document();
@ -358,8 +358,6 @@ nsCSSCompressedDataBlock::MapRuleInfoInto(nsRuleData *aRuleData) const
}
}
NS_ASSERTION(cursor == cursor_end, "inconsistent data");
return NS_OK;
}
const void*

View File

@ -72,7 +72,7 @@ public:
* Do what |nsIStyleRule::MapRuleInfoInto| needs to do for a style
* rule using this block for storage.
*/
nsresult MapRuleInfoInto(nsRuleData *aRuleData) const;
void MapRuleInfoInto(nsRuleData *aRuleData) const;
/**
* Return the location at which the *value* for the property is

View File

@ -89,10 +89,9 @@ nsCSSRule::SetParentRule(nsICSSGroupRule* aRule)
return NS_OK;
}
NS_IMETHODIMP
/* virtual */ void
nsCSSRule::MapRuleInfoInto(nsRuleData* aRuleData)
{
// The nsIStyleRule contract is not appropriate for all CSS rules.
NS_NOTREACHED("nsCSSRule::MapRuleInfoInto");
return NS_OK;
}

View File

@ -68,7 +68,7 @@ public:
// nsIStyleRule methods
// The new mapping function.
NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
virtual void MapRuleInfoInto(nsRuleData* aRuleData);
protected:
nsCSSStyleSheet* mSheet;

View File

@ -78,12 +78,12 @@ NS_IMETHODIMP _class::GetStyleSheet(nsIStyleSheet*& aSheet) const { return super
NS_IMETHODIMP _class::SetStyleSheet(nsCSSStyleSheet* aSheet) { return super::SetStyleSheet(aSheet); } \
NS_IMETHODIMP _class::SetParentRule(nsICSSGroupRule* aRule) { return super::SetParentRule(aRule); } \
nsIDOMCSSRule* _class::GetDOMRuleWeak(nsresult *aResult) { *aResult = NS_OK; return this; } \
NS_IMETHODIMP _class::MapRuleInfoInto(nsRuleData* aRuleData) { return NS_OK; }
/* virtual */ void _class::MapRuleInfoInto(nsRuleData* aRuleData) { }
#define IMPL_STYLE_RULE_INHERIT2(_class, super) \
NS_IMETHODIMP _class::GetStyleSheet(nsIStyleSheet*& aSheet) const { return super::GetStyleSheet(aSheet); } \
NS_IMETHODIMP _class::SetParentRule(nsICSSGroupRule* aRule) { return super::SetParentRule(aRule); } \
NS_IMETHODIMP _class::MapRuleInfoInto(nsRuleData* aRuleData) { return NS_OK; }
/* virtual */ void _class::MapRuleInfoInto(nsRuleData* aRuleData) { }
// -------------------------------
// Style Rule List for group rules
@ -200,7 +200,7 @@ public:
// nsIStyleRule methods
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
// nsICSSRule methods
@ -252,7 +252,7 @@ NS_INTERFACE_MAP_END
IMPL_STYLE_RULE_INHERIT(CSSCharsetRuleImpl, nsCSSRule)
#ifdef DEBUG
NS_IMETHODIMP
/* virtual */ void
CSSCharsetRuleImpl::List(FILE* out, PRInt32 aIndent) const
{
// Indent
@ -261,8 +261,6 @@ CSSCharsetRuleImpl::List(FILE* out, PRInt32 aIndent) const
fputs("@charset \"", out);
fputs(NS_LossyConvertUTF16toASCII(mEncoding).get(), out);
fputs("\"\n", out);
return NS_OK;
}
#endif
@ -376,7 +374,7 @@ public:
// nsIStyleRule methods
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
// nsICSSRule methods
@ -452,7 +450,7 @@ NS_INTERFACE_MAP_END
IMPL_STYLE_RULE_INHERIT(CSSImportRuleImpl, nsCSSRule)
#ifdef DEBUG
NS_IMETHODIMP
/* virtual */ void
CSSImportRuleImpl::List(FILE* out, PRInt32 aIndent) const
{
// Indent
@ -466,8 +464,6 @@ CSSImportRuleImpl::List(FILE* out, PRInt32 aIndent) const
mMedia->GetText(mediaText);
fputs(NS_LossyConvertUTF16toASCII(mediaText).get(), out);
fputs("\n", out);
return NS_OK;
}
#endif
@ -700,7 +696,7 @@ nsCSSGroupRule::SetStyleSheet(nsCSSStyleSheet* aSheet)
}
#ifdef DEBUG
NS_IMETHODIMP
/* virtual */ void
nsCSSGroupRule::List(FILE* out, PRInt32 aIndent) const
{
fputs(" {\n", out);
@ -709,7 +705,6 @@ nsCSSGroupRule::List(FILE* out, PRInt32 aIndent) const
mRules.ObjectAt(index)->List(out, aIndent + 1);
}
fputs("}\n", out);
return NS_OK;
}
#endif
@ -934,7 +929,7 @@ nsCSSMediaRule::SetStyleSheet(nsCSSStyleSheet* aSheet)
}
#ifdef DEBUG
NS_IMETHODIMP
/* virtual */ void
nsCSSMediaRule::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 indent = aIndent; --indent >= 0; ) fputs(" ", out);
@ -949,7 +944,7 @@ nsCSSMediaRule::List(FILE* out, PRInt32 aIndent) const
fputs(NS_LossyConvertUTF16toASCII(mediaText).get(), out);
}
return nsCSSGroupRule::List(out, aIndent);
nsCSSGroupRule::List(out, aIndent);
}
#endif
@ -1094,7 +1089,7 @@ NS_INTERFACE_MAP_BEGIN(nsCSSDocumentRule)
NS_INTERFACE_MAP_END
#ifdef DEBUG
NS_IMETHODIMP
/* virtual */ void
nsCSSDocumentRule::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 indent = aIndent; --indent >= 0; ) fputs(" ", out);
@ -1121,7 +1116,7 @@ nsCSSDocumentRule::List(FILE* out, PRInt32 aIndent) const
str.Cut(str.Length() - 2, 1); // remove last ,
fputs(str.get(), out);
return nsCSSGroupRule::List(out, aIndent);
nsCSSGroupRule::List(out, aIndent);
}
#endif
@ -1276,7 +1271,7 @@ public:
// nsIStyleRule methods
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
// nsICSSRule methods
@ -1336,7 +1331,7 @@ NS_INTERFACE_MAP_END
IMPL_STYLE_RULE_INHERIT(CSSNameSpaceRuleImpl, nsCSSRule)
#ifdef DEBUG
NS_IMETHODIMP
/* virtual */ void
CSSNameSpaceRuleImpl::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 indent = aIndent; --indent >= 0; ) fputs(" ", out);
@ -1354,7 +1349,6 @@ CSSNameSpaceRuleImpl::List(FILE* out, PRInt32 aIndent) const
fputs("url(", out);
fputs(NS_LossyConvertUTF16toASCII(mURLSpec).get(), out);
fputs(")\n", out);
return NS_OK;
}
#endif
@ -1825,7 +1819,7 @@ NS_INTERFACE_MAP_END
IMPL_STYLE_RULE_INHERIT(nsCSSFontFaceRule, nsCSSRule)
#ifdef DEBUG
NS_IMETHODIMP
void
nsCSSFontFaceRule::List(FILE* out, PRInt32 aIndent) const
{
nsCString baseInd, descInd;
@ -1852,7 +1846,6 @@ nsCSSFontFaceRule::List(FILE* out, PRInt32 aIndent) const
NS_ConvertUTF16toUTF8(descStr).get());
}
fprintf(out, "%s}\n", baseInd.get());
return NS_OK;
}
#endif

View File

@ -60,7 +60,7 @@ class nsMediaList;
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const; \
NS_IMETHOD SetStyleSheet(nsCSSStyleSheet* aSheet); \
NS_IMETHOD SetParentRule(nsICSSGroupRule* aRule); \
NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
virtual void MapRuleInfoInto(nsRuleData* aRuleData);
#define DECL_STYLE_RULE_INHERIT \
DECL_STYLE_RULE_INHERIT_NO_DOMRULE \
@ -80,7 +80,7 @@ protected:
// to help implement nsIStyleRule
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
public:
@ -124,7 +124,7 @@ public:
// nsIStyleRule methods
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
// nsICSSRule methods
@ -166,7 +166,7 @@ public:
// nsIStyleRule methods
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
// nsICSSRule methods
@ -255,7 +255,7 @@ public:
// nsIStyleRule methods
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
// nsICSSRule methods

View File

@ -903,9 +903,9 @@ public:
NS_DECL_ISUPPORTS
// nsIStyleRule interface
NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
virtual void MapRuleInfoInto(nsRuleData* aRuleData);
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
protected:
@ -927,14 +927,14 @@ CSSImportantRule::~CSSImportantRule(void)
NS_IMPL_ISUPPORTS1(CSSImportantRule, nsIStyleRule)
NS_IMETHODIMP
/* virtual */ void
CSSImportantRule::MapRuleInfoInto(nsRuleData* aRuleData)
{
return mImportantBlock->MapRuleInfoInto(aRuleData);
mImportantBlock->MapRuleInfoInto(aRuleData);
}
#ifdef DEBUG
NS_IMETHODIMP
/* virtual */ void
CSSImportantRule::List(FILE* out, PRInt32 aIndent) const
{
// Indent
@ -942,7 +942,6 @@ CSSImportantRule::List(FILE* out, PRInt32 aIndent) const
fprintf(out, "! Important rule block=%p\n",
static_cast<void*>(mImportantBlock.get()));
return NS_OK;
}
#endif
@ -1319,10 +1318,10 @@ public:
DeclarationChanged(PRBool aHandleContainer);
// The new mapping function.
NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
virtual void MapRuleInfoInto(nsRuleData* aRuleData);
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
private:
@ -1550,16 +1549,16 @@ CSSStyleRuleImpl::DeclarationChanged(PRBool aHandleContainer)
return clone;
}
NS_IMETHODIMP
/* virtual */ void
CSSStyleRuleImpl::MapRuleInfoInto(nsRuleData* aRuleData)
{
NS_ABORT_IF_FALSE(mNormalBlock,
"somebody forgot to call nsICSSStyleRule::RuleMatched");
return mNormalBlock->MapRuleInfoInto(aRuleData);
mNormalBlock->MapRuleInfoInto(aRuleData);
}
#ifdef DEBUG
NS_IMETHODIMP
/* virtual */ void
CSSStyleRuleImpl::List(FILE* out, PRInt32 aIndent) const
{
// Indent
@ -1578,8 +1577,6 @@ CSSStyleRuleImpl::List(FILE* out, PRInt32 aIndent) const
fputs("{ null declaration }", out);
}
fputs("\n", out);
return NS_OK;
}
#endif

View File

@ -76,7 +76,7 @@ using namespace mozilla::dom;
NS_IMPL_ISUPPORTS1(nsHTMLStyleSheet::HTMLColorRule, nsIStyleRule)
NS_IMETHODIMP
/* virtual */ void
nsHTMLStyleSheet::HTMLColorRule::MapRuleInfoInto(nsRuleData* aRuleData)
{
if (aRuleData->mSIDs & NS_STYLE_INHERIT_BIT(Color)) {
@ -84,36 +84,32 @@ nsHTMLStyleSheet::HTMLColorRule::MapRuleInfoInto(nsRuleData* aRuleData)
aRuleData->mPresContext->UseDocumentColors())
aRuleData->mColorData->mColor.SetColorValue(mColor);
}
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
/* virtual */ void
nsHTMLStyleSheet::HTMLColorRule::List(FILE* out, PRInt32 aIndent) const
{
return NS_OK;
}
#endif
NS_IMPL_ISUPPORTS1(nsHTMLStyleSheet::GenericTableRule, nsIStyleRule)
NS_IMETHODIMP
/* virtual */ void
nsHTMLStyleSheet::GenericTableRule::MapRuleInfoInto(nsRuleData* aRuleData)
{
// Nothing to do.
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
/* virtual */ void
nsHTMLStyleSheet::GenericTableRule::List(FILE* out, PRInt32 aIndent) const
{
return NS_OK;
}
#endif
NS_IMETHODIMP
/* virtual */ void
nsHTMLStyleSheet::TableTHRule::MapRuleInfoInto(nsRuleData* aRuleData)
{
if (aRuleData->mSIDs & NS_STYLE_INHERIT_BIT(Text)) {
@ -123,7 +119,6 @@ nsHTMLStyleSheet::TableTHRule::MapRuleInfoInto(nsRuleData* aRuleData)
eCSSUnit_Enumerated);
}
}
return NS_OK;
}
// -----------------------------------------------------------

View File

@ -119,9 +119,9 @@ private:
NS_DECL_ISUPPORTS
// nsIStyleRule interface
NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
virtual void MapRuleInfoInto(nsRuleData* aRuleData);
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nscolor mColor;
@ -137,9 +137,9 @@ private:
NS_DECL_ISUPPORTS
// nsIStyleRule interface
NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
virtual void MapRuleInfoInto(nsRuleData* aRuleData);
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
};
@ -150,7 +150,7 @@ private:
public:
TableTHRule() {}
NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
virtual void MapRuleInfoInto(nsRuleData* aRuleData);
};
nsCOMPtr<nsIURI> mURL;

View File

@ -46,13 +46,13 @@
#include "nsICSSRule.h"
#include "nsCOMArray.h"
class nsIAtom;
class nsPresContext;
class nsMediaQueryResultCacheKey;
// IID for the nsICSSGroupRule interface {d0f07b17-e9c7-4a54-aaa4-622425b38d27}
// IID for the nsICSSGroupRule interface {4d5e7eca-433e-491a-b226-39a200390ea1}
#define NS_ICSS_GROUP_RULE_IID \
{0xd0f07b17, 0xe9c7, 0x4a54, {0xaa, 0xa4, 0x62, 0x24, 0x25, 0xb3, 0x8d, 0x27}}
{0x4d5e7eca, 0x433e, 0x491a, {0xb2, 0x26, 0x39, 0xa2, 0x00, 0x39, 0x0e, 0xa1}}
class nsICSSGroupRule : public nsICSSRule {
public:

View File

@ -41,15 +41,14 @@
#define nsICSSImportRule_h___
#include "nsICSSRule.h"
#include "nsString.h"
class nsIAtom;
class nsIURI;
class nsMediaList;
class nsString;
// IID for the nsICSSImportRule interface {b2e65d15-6673-4548-a65a-c45ce87304f2}
// IID for the nsICSSImportRule interface {1d7a658b-2f7b-423d-a3d9-dd5b553f69a9}
#define NS_ICSS_IMPORT_RULE_IID \
{0xb2e65d15, 0x6673, 0x4548, {0xa6, 0x5a, 0xc4, 0x5c, 0xe8, 0x73, 0x04, 0xf2}}
{0x1d7a658b, 0x2f7b, 0x423d, {0xa3, 0xd9, 0xdd, 0x5b, 0x55, 0x3f, 0x69, 0xa9}}
class nsICSSImportRule : public nsICSSRule {
public:

View File

@ -41,13 +41,13 @@
#define nsICSSNameSpaceRule_h___
#include "nsICSSRule.h"
//#include "nsString.h"
class nsIAtom;
// IID for the nsICSSNameSpaceRule interface {c2116a9f-370d-458a-80c1-c6445089a8b7}
// IID for the nsICSSNameSpaceRule interface {153392d4-90bb-424e-b737-1bf5bc775394}
#define NS_ICSS_NAMESPACE_RULE_IID \
{0xc2116a9f, 0x370d, 0x458a, {0x80, 0xc1, 0xc6, 0x44, 0x50, 0x89, 0xa8, 0xb7}}
{0x153392d4, 0x90bb, 0x424e, {0xb7, 0x37, 0x1b, 0xf5, 0xbc, 0x77, 0x53, 0x94}}
class nsICSSNameSpaceRule : public nsICSSRule {
public:

View File

@ -47,10 +47,11 @@ class nsCSSStyleSheet;
class nsICSSGroupRule;
class nsAString;
// IID for the nsICSSRule interface {72250d73-dbb2-4409-90fe-e8e0283a2510}
// IID for the nsICSSRule interface {2a1fef35-eee9-4a5d-bc87-e2228acc926b}
#define NS_ICSS_RULE_IID \
{ 0x72250d73, 0xdbb2, 0x4409, \
{ 0x90, 0xfe, 0xe8, 0xe0, 0x28, 0x3a, 0x25, 0x10 } }
{ 0x2a1fef35, 0xeee9, 0x4a5d, \
{ 0xbc, 0x87, 0xe2, 0x22, 0x8a, 0xcc, 0x92, 0x6b } }
// inheriting from nsIStyleRule is only for style rules, not other rule types
class nsICSSRule : public nsIStyleRule {

View File

@ -49,9 +49,7 @@
#include "nsICSSRule.h"
#include "nsString.h"
#include "nsCOMPtr.h"
#include "nsCSSProps.h"
#include "nsCSSValue.h"
#include "nsIAtom.h"
#include "nsCSSPseudoElements.h"
#include "nsCSSPseudoClasses.h"
@ -289,10 +287,11 @@ private:
nsCSSSelectorList& operator=(const nsCSSSelectorList& aCopy);
};
// 1aae9e9d-21c3-4993-90b1-66aa6809f597
// c6065b5e-4870-4dc5-9be3-747b6e317b25
#define NS_ICSS_STYLE_RULE_IID \
{ 0x1aae9e9d, 0x21c3, 0x4993, \
{ 0x90, 0xb1, 0x66, 0xaa, 0x68, 0x09, 0xf5, 0x97 } }
{ 0xc6065b5e, 0x4870, 0x4dc5, \
{ 0x9b, 0xe3, 0x74, 0x7b, 0x6e, 0x31, 0x7b, 0x25 } }
class nsICSSStyleRule : public nsICSSRule {
public:

View File

@ -103,12 +103,12 @@ public:
* all needed data are found. Thus overwriting non-empty data will
* break CSS cascading rules.
*/
NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData)=0;
virtual void MapRuleInfoInto(nsRuleData* aRuleData)=0;
virtual nsIStyleRule* GetImportantRule(void) { return nsnull; }
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const = 0;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const = 0;
#endif
};

View File

@ -66,17 +66,15 @@ using namespace mozilla::dom;
NS_IMPL_ISUPPORTS1(nsEmptyStyleRule, nsIStyleRule)
NS_IMETHODIMP
/* virtual */ void
nsEmptyStyleRule::MapRuleInfoInto(nsRuleData* aRuleData)
{
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
/* virtual */ void
nsEmptyStyleRule::List(FILE* out, PRInt32 aIndent) const
{
return NS_OK;
}
#endif

View File

@ -66,9 +66,9 @@ struct RuleProcessorData;
class nsEmptyStyleRule : public nsIStyleRule
{
NS_DECL_ISUPPORTS
NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
virtual void MapRuleInfoInto(nsRuleData* aRuleData);
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
};

View File

@ -106,9 +106,9 @@ public:
NS_DECL_ISUPPORTS
// nsIStyleRule implementation
NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
virtual void MapRuleInfoInto(nsRuleData* aRuleData);
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
ElementTransitionsStyleRule(ElementTransitions *aOwner,
@ -142,9 +142,9 @@ public:
NS_DECL_ISUPPORTS
// nsIStyleRule implementation
NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
virtual void MapRuleInfoInto(nsRuleData* aRuleData);
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
void CoverValue(nsCSSProperty aProperty, nsStyleAnimation::Value &aStartValue)
@ -217,18 +217,22 @@ ElementTransitionsPropertyDtor(void *aObject,
NS_IMPL_ISUPPORTS1(ElementTransitionsStyleRule, nsIStyleRule)
NS_IMETHODIMP
/* virtual */ void
ElementTransitionsStyleRule::MapRuleInfoInto(nsRuleData* aRuleData)
{
nsStyleContext *contextParent = aRuleData->mStyleContext->GetParent();
if (contextParent && contextParent->HasPseudoElementData()) {
// Don't apply transitions to things inside of pseudo-elements.
// FIXME (Bug 522599): Add tests for this.
return NS_OK;
return;
}
ElementTransitions *et = ElementData();
NS_ENSURE_TRUE(et, NS_OK); // FIXME (Bug 522597): Why can this be null?
if (NS_UNLIKELY(!et)) { // FIXME (Bug 522597): Why can this be null?
NS_WARNING("ElementData returned null");
return;
}
for (PRUint32 i = 0, i_end = et->mPropertyTransitions.Length();
i < i_end; ++i)
{
@ -267,16 +271,13 @@ ElementTransitionsStyleRule::MapRuleInfoInto(nsRuleData* aRuleData)
NS_ABORT_IF_FALSE(ok, "could not store computed value");
}
}
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
/* virtual */ void
ElementTransitionsStyleRule::List(FILE* out, PRInt32 aIndent) const
{
// WRITE ME?
return NS_OK;
}
#endif
@ -310,7 +311,7 @@ ElementTransitions::EnsureStyleRuleFor(TimeStamp aRefreshTime)
NS_IMPL_ISUPPORTS1(CoverTransitionStartStyleRule, nsIStyleRule)
NS_IMETHODIMP
/* virtual */ void
CoverTransitionStartStyleRule::MapRuleInfoInto(nsRuleData* aRuleData)
{
for (PRUint32 i = 0, i_end = mCoveredValues.Length(); i < i_end; ++i) {
@ -328,16 +329,13 @@ CoverTransitionStartStyleRule::MapRuleInfoInto(nsRuleData* aRuleData)
NS_ABORT_IF_FALSE(ok, "could not store computed value");
}
}
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
/* virtual */ void
CoverTransitionStartStyleRule::List(FILE* out, PRInt32 aIndent) const
{
// WRITE ME?
return NS_OK;
}
#endif