зеркало из https://github.com/mozilla/pjs.git
Remove unused Equals and HashValue methods (methods that were once on nsIStyleRule). b=163058 r=hyatt sr=kin
This commit is contained in:
Родитель
bf51892c34
Коммит
1170156805
|
@ -80,8 +80,6 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Equals(const nsIStyleRule* aRule, PRBool& aResult) const;
|
||||
NS_IMETHOD HashValue(PRUint32& aValue) const;
|
||||
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const;
|
||||
|
||||
// The new mapping function.
|
||||
|
@ -153,20 +151,6 @@ BodyRule::~BodyRule()
|
|||
|
||||
NS_IMPL_ISUPPORTS1(BodyRule, nsIStyleRule)
|
||||
|
||||
NS_IMETHODIMP
|
||||
BodyRule::Equals(const nsIStyleRule* aRule, PRBool& aResult) const
|
||||
{
|
||||
aResult = PRBool(this == aRule);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
BodyRule::HashValue(PRUint32& aValue) const
|
||||
{
|
||||
aValue = NS_PTR_TO_INT32(mPart);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
BodyRule::GetStyleSheet(nsIStyleSheet*& aSheet) const
|
||||
{
|
||||
|
|
|
@ -945,9 +945,6 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
// NS_IMETHOD Equals(const nsIStyleRule* aRule, PRBool& aResult) const;
|
||||
// NS_IMETHOD HashValue(PRUint32& aValue) const;
|
||||
|
||||
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const;
|
||||
|
||||
// The new mapping function.
|
||||
|
@ -982,22 +979,6 @@ CSSImportantRule::~CSSImportantRule(void)
|
|||
|
||||
NS_IMPL_ISUPPORTS1(CSSImportantRule, nsIStyleRule)
|
||||
|
||||
#if 0
|
||||
NS_IMETHODIMP
|
||||
CSSImportantRule::Equals(const nsIStyleRule* aRule, PRBool& aResult) const
|
||||
{
|
||||
aResult = PRBool(aRule == this);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSImportantRule::HashValue(PRUint32& aValue) const
|
||||
{
|
||||
aValue = PRUint32(mDeclaration);
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSImportantRule::GetStyleSheet(nsIStyleSheet*& aSheet) const
|
||||
{
|
||||
|
@ -1418,9 +1399,6 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// NS_IMETHOD Equals(const nsIStyleRule* aRule, PRBool& aResult) const;
|
||||
// NS_IMETHOD HashValue(PRUint32& aValue) const;
|
||||
|
||||
virtual nsCSSSelector* FirstSelector(void);
|
||||
virtual void AddSelector(const nsCSSSelector& aSelector);
|
||||
virtual void DeleteSelector(nsCSSSelector* aSelector);
|
||||
|
@ -1572,52 +1550,6 @@ NS_IMPL_ADDREF_INHERITED(CSSStyleRuleImpl, nsCSSRule);
|
|||
NS_IMPL_RELEASE_INHERITED(CSSStyleRuleImpl, nsCSSRule);
|
||||
|
||||
|
||||
#if 0
|
||||
NS_IMETHODIMP CSSStyleRuleImpl::Equals(const nsIStyleRule* aRule, PRBool& aResult) const
|
||||
{
|
||||
nsICSSStyleRule* iCSSRule;
|
||||
|
||||
if (this == aRule) {
|
||||
aResult = PR_TRUE;
|
||||
}
|
||||
else {
|
||||
aResult = PR_FALSE;
|
||||
if ((nsnull != aRule) &&
|
||||
(NS_OK == ((nsIStyleRule*)aRule)->QueryInterface(NS_GET_IID(nsICSSStyleRule), (void**) &iCSSRule))) {
|
||||
|
||||
CSSStyleRuleImpl* rule = (CSSStyleRuleImpl*)iCSSRule;
|
||||
const nsCSSSelector* local = &mSelector;
|
||||
const nsCSSSelector* other = &(rule->mSelector);
|
||||
aResult = PR_TRUE;
|
||||
|
||||
if ((rule->mDeclaration != mDeclaration) ||
|
||||
(rule->mWeight != mWeight)) {
|
||||
aResult = PR_FALSE;
|
||||
}
|
||||
while ((PR_TRUE == aResult) && (nsnull != local) && (nsnull != other)) {
|
||||
if (! local->Equals(other)) {
|
||||
aResult = PR_FALSE;
|
||||
}
|
||||
local = local->mNext;
|
||||
other = other->mNext;
|
||||
}
|
||||
if ((nsnull != local) || (nsnull != other)) { // more were left
|
||||
aResult = PR_FALSE;
|
||||
}
|
||||
NS_RELEASE(iCSSRule);
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSStyleRuleImpl::HashValue(PRUint32& aValue) const
|
||||
{
|
||||
aValue = (PRUint32)this;
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
nsCSSSelector* CSSStyleRuleImpl::FirstSelector(void)
|
||||
{
|
||||
return &mSelector;
|
||||
|
|
|
@ -67,8 +67,6 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Equals(const nsIStyleRule* aRule, PRBool& aValue) const;
|
||||
NS_IMETHOD HashValue(PRUint32& aValue) const;
|
||||
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const;
|
||||
|
||||
// The new mapping function.
|
||||
|
@ -95,20 +93,6 @@ CSSFirstLineRule::~CSSFirstLineRule()
|
|||
|
||||
NS_IMPL_ISUPPORTS1(CSSFirstLineRule, nsIStyleRule)
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSFirstLineRule::Equals(const nsIStyleRule* aRule, PRBool& aResult) const
|
||||
{
|
||||
aResult = PRBool(this == aRule);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSFirstLineRule::HashValue(PRUint32& aValue) const
|
||||
{
|
||||
aValue = (PRUint32)7; // XXX got a better suggestion?
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSFirstLineRule::GetStyleSheet(nsIStyleSheet*& aSheet) const
|
||||
{
|
||||
|
|
|
@ -71,8 +71,6 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Equals(const nsIStyleRule* aRule, PRBool& aValue) const;
|
||||
NS_IMETHOD HashValue(PRUint32& aValue) const;
|
||||
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const;
|
||||
|
||||
// The new mapping function.
|
||||
|
@ -121,20 +119,6 @@ HTMLColorRule::~HTMLColorRule()
|
|||
|
||||
NS_IMPL_ISUPPORTS1(HTMLColorRule, nsIStyleRule)
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLColorRule::Equals(const nsIStyleRule* aRule, PRBool& aResult) const
|
||||
{
|
||||
aResult = PRBool(this == aRule);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLColorRule::HashValue(PRUint32& aValue) const
|
||||
{
|
||||
aValue = (PRUint32)(mColor);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLColorRule::GetStyleSheet(nsIStyleSheet*& aSheet) const
|
||||
{
|
||||
|
@ -294,8 +278,6 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Equals(const nsIStyleRule* aRule, PRBool& aResult) const;
|
||||
NS_IMETHOD HashValue(PRUint32& aValue) const;
|
||||
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const;
|
||||
|
||||
// The new mapping function.
|
||||
|
@ -326,20 +308,6 @@ GenericTableRule::~GenericTableRule()
|
|||
|
||||
NS_IMPL_ISUPPORTS1(GenericTableRule, nsIStyleRule)
|
||||
|
||||
NS_IMETHODIMP
|
||||
GenericTableRule::Equals(const nsIStyleRule* aRule, PRBool& aResult) const
|
||||
{
|
||||
aResult = PRBool(this == aRule);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GenericTableRule::HashValue(PRUint32& aValue) const
|
||||
{
|
||||
aValue = 0;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GenericTableRule::GetStyleSheet(nsIStyleSheet*& aSheet) const
|
||||
{
|
||||
|
|
|
@ -945,9 +945,6 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
// NS_IMETHOD Equals(const nsIStyleRule* aRule, PRBool& aResult) const;
|
||||
// NS_IMETHOD HashValue(PRUint32& aValue) const;
|
||||
|
||||
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const;
|
||||
|
||||
// The new mapping function.
|
||||
|
@ -982,22 +979,6 @@ CSSImportantRule::~CSSImportantRule(void)
|
|||
|
||||
NS_IMPL_ISUPPORTS1(CSSImportantRule, nsIStyleRule)
|
||||
|
||||
#if 0
|
||||
NS_IMETHODIMP
|
||||
CSSImportantRule::Equals(const nsIStyleRule* aRule, PRBool& aResult) const
|
||||
{
|
||||
aResult = PRBool(aRule == this);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSImportantRule::HashValue(PRUint32& aValue) const
|
||||
{
|
||||
aValue = PRUint32(mDeclaration);
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSImportantRule::GetStyleSheet(nsIStyleSheet*& aSheet) const
|
||||
{
|
||||
|
@ -1418,9 +1399,6 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// NS_IMETHOD Equals(const nsIStyleRule* aRule, PRBool& aResult) const;
|
||||
// NS_IMETHOD HashValue(PRUint32& aValue) const;
|
||||
|
||||
virtual nsCSSSelector* FirstSelector(void);
|
||||
virtual void AddSelector(const nsCSSSelector& aSelector);
|
||||
virtual void DeleteSelector(nsCSSSelector* aSelector);
|
||||
|
@ -1572,52 +1550,6 @@ NS_IMPL_ADDREF_INHERITED(CSSStyleRuleImpl, nsCSSRule);
|
|||
NS_IMPL_RELEASE_INHERITED(CSSStyleRuleImpl, nsCSSRule);
|
||||
|
||||
|
||||
#if 0
|
||||
NS_IMETHODIMP CSSStyleRuleImpl::Equals(const nsIStyleRule* aRule, PRBool& aResult) const
|
||||
{
|
||||
nsICSSStyleRule* iCSSRule;
|
||||
|
||||
if (this == aRule) {
|
||||
aResult = PR_TRUE;
|
||||
}
|
||||
else {
|
||||
aResult = PR_FALSE;
|
||||
if ((nsnull != aRule) &&
|
||||
(NS_OK == ((nsIStyleRule*)aRule)->QueryInterface(NS_GET_IID(nsICSSStyleRule), (void**) &iCSSRule))) {
|
||||
|
||||
CSSStyleRuleImpl* rule = (CSSStyleRuleImpl*)iCSSRule;
|
||||
const nsCSSSelector* local = &mSelector;
|
||||
const nsCSSSelector* other = &(rule->mSelector);
|
||||
aResult = PR_TRUE;
|
||||
|
||||
if ((rule->mDeclaration != mDeclaration) ||
|
||||
(rule->mWeight != mWeight)) {
|
||||
aResult = PR_FALSE;
|
||||
}
|
||||
while ((PR_TRUE == aResult) && (nsnull != local) && (nsnull != other)) {
|
||||
if (! local->Equals(other)) {
|
||||
aResult = PR_FALSE;
|
||||
}
|
||||
local = local->mNext;
|
||||
other = other->mNext;
|
||||
}
|
||||
if ((nsnull != local) || (nsnull != other)) { // more were left
|
||||
aResult = PR_FALSE;
|
||||
}
|
||||
NS_RELEASE(iCSSRule);
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSStyleRuleImpl::HashValue(PRUint32& aValue) const
|
||||
{
|
||||
aValue = (PRUint32)this;
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
nsCSSSelector* CSSStyleRuleImpl::FirstSelector(void)
|
||||
{
|
||||
return &mSelector;
|
||||
|
|
|
@ -67,8 +67,6 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Equals(const nsIStyleRule* aRule, PRBool& aValue) const;
|
||||
NS_IMETHOD HashValue(PRUint32& aValue) const;
|
||||
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const;
|
||||
|
||||
// The new mapping function.
|
||||
|
@ -95,20 +93,6 @@ CSSFirstLineRule::~CSSFirstLineRule()
|
|||
|
||||
NS_IMPL_ISUPPORTS1(CSSFirstLineRule, nsIStyleRule)
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSFirstLineRule::Equals(const nsIStyleRule* aRule, PRBool& aResult) const
|
||||
{
|
||||
aResult = PRBool(this == aRule);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSFirstLineRule::HashValue(PRUint32& aValue) const
|
||||
{
|
||||
aValue = (PRUint32)7; // XXX got a better suggestion?
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSFirstLineRule::GetStyleSheet(nsIStyleSheet*& aSheet) const
|
||||
{
|
||||
|
|
|
@ -71,8 +71,6 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Equals(const nsIStyleRule* aRule, PRBool& aValue) const;
|
||||
NS_IMETHOD HashValue(PRUint32& aValue) const;
|
||||
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const;
|
||||
|
||||
// The new mapping function.
|
||||
|
@ -121,20 +119,6 @@ HTMLColorRule::~HTMLColorRule()
|
|||
|
||||
NS_IMPL_ISUPPORTS1(HTMLColorRule, nsIStyleRule)
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLColorRule::Equals(const nsIStyleRule* aRule, PRBool& aResult) const
|
||||
{
|
||||
aResult = PRBool(this == aRule);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLColorRule::HashValue(PRUint32& aValue) const
|
||||
{
|
||||
aValue = (PRUint32)(mColor);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLColorRule::GetStyleSheet(nsIStyleSheet*& aSheet) const
|
||||
{
|
||||
|
@ -294,8 +278,6 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Equals(const nsIStyleRule* aRule, PRBool& aResult) const;
|
||||
NS_IMETHOD HashValue(PRUint32& aValue) const;
|
||||
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const;
|
||||
|
||||
// The new mapping function.
|
||||
|
@ -326,20 +308,6 @@ GenericTableRule::~GenericTableRule()
|
|||
|
||||
NS_IMPL_ISUPPORTS1(GenericTableRule, nsIStyleRule)
|
||||
|
||||
NS_IMETHODIMP
|
||||
GenericTableRule::Equals(const nsIStyleRule* aRule, PRBool& aResult) const
|
||||
{
|
||||
aResult = PRBool(this == aRule);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GenericTableRule::HashValue(PRUint32& aValue) const
|
||||
{
|
||||
aValue = 0;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GenericTableRule::GetStyleSheet(nsIStyleSheet*& aSheet) const
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче