added important rule support

This commit is contained in:
peterl%netscape.com 1998-09-11 02:07:46 +00:00
parent bfc7f2ffe1
commit 282eb4c3bb
6 changed files with 42 additions and 0 deletions

View File

@ -525,6 +525,12 @@ void ContentEnumFunc(nsICSSStyleRule* aRule, void* aData)
data->mResults->AppendElement(iRule);
data->mCount++;
NS_RELEASE(iRule);
iRule = aRule->GetImportantRule();
if (nsnull != iRule) {
data->mResults->AppendElement(iRule);
data->mCount++;
NS_RELEASE(iRule);
}
}
}
}
@ -650,6 +656,12 @@ void PseudoEnumFunc(nsICSSStyleRule* aRule, void* aData)
data->mResults->AppendElement(iRule);
data->mCount++;
NS_RELEASE(iRule);
iRule = aRule->GetImportantRule();
if (nsnull != iRule) {
data->mResults->AppendElement(iRule);
data->mCount++;
NS_RELEASE(iRule);
}
}
}
}

View File

@ -63,6 +63,8 @@ public:
virtual PRInt32 GetWeight(void) const = 0;
virtual void SetWeight(PRInt32 aWeight) = 0;
virtual nsIStyleRule* GetImportantRule(void) = 0;
};
extern NS_HTML nsresult

View File

@ -525,6 +525,12 @@ void ContentEnumFunc(nsICSSStyleRule* aRule, void* aData)
data->mResults->AppendElement(iRule);
data->mCount++;
NS_RELEASE(iRule);
iRule = aRule->GetImportantRule();
if (nsnull != iRule) {
data->mResults->AppendElement(iRule);
data->mCount++;
NS_RELEASE(iRule);
}
}
}
}
@ -650,6 +656,12 @@ void PseudoEnumFunc(nsICSSStyleRule* aRule, void* aData)
data->mResults->AppendElement(iRule);
data->mCount++;
NS_RELEASE(iRule);
iRule = aRule->GetImportantRule();
if (nsnull != iRule) {
data->mResults->AppendElement(iRule);
data->mCount++;
NS_RELEASE(iRule);
}
}
}
}

View File

@ -63,6 +63,8 @@ public:
virtual PRInt32 GetWeight(void) const = 0;
virtual void SetWeight(PRInt32 aWeight) = 0;
virtual nsIStyleRule* GetImportantRule(void) = 0;
};
extern NS_HTML nsresult

View File

@ -525,6 +525,12 @@ void ContentEnumFunc(nsICSSStyleRule* aRule, void* aData)
data->mResults->AppendElement(iRule);
data->mCount++;
NS_RELEASE(iRule);
iRule = aRule->GetImportantRule();
if (nsnull != iRule) {
data->mResults->AppendElement(iRule);
data->mCount++;
NS_RELEASE(iRule);
}
}
}
}
@ -650,6 +656,12 @@ void PseudoEnumFunc(nsICSSStyleRule* aRule, void* aData)
data->mResults->AppendElement(iRule);
data->mCount++;
NS_RELEASE(iRule);
iRule = aRule->GetImportantRule();
if (nsnull != iRule) {
data->mResults->AppendElement(iRule);
data->mCount++;
NS_RELEASE(iRule);
}
}
}
}

View File

@ -63,6 +63,8 @@ public:
virtual PRInt32 GetWeight(void) const = 0;
virtual void SetWeight(PRInt32 aWeight) = 0;
virtual nsIStyleRule* GetImportantRule(void) = 0;
};
extern NS_HTML nsresult