sync to nsIStyledContent API change

This commit is contained in:
peterl%netscape.com 1999-05-26 23:55:49 +00:00
Родитель f548cec11d
Коммит 6c150bc6c8
6 изменённых файлов: 39 добавлений и 30 удалений

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

@ -429,9 +429,13 @@ PRInt32 HTMLCSSStyleSheetImpl::RulesMatching(nsIPresContext* aPresContext,
// just get the one and only style rule from the content's STYLE attribute
if (NS_SUCCEEDED(aContent->QueryInterface(nsIStyledContent::GetIID(), (void**)&styledContent))) {
nsIStyleRule* rule = nsnull;
if (NS_SUCCEEDED(styledContent->GetInlineStyleRule(rule))) {
if (nsnull != rule) {
aResults->AppendElement(rule);
PRUint32 index = 0;
aResults->Count(&index);
if (NS_SUCCEEDED(styledContent->GetInlineStyleRules(aResults))) {
PRUint32 postCount = 0;
aResults->Count(&postCount);
while (index < postCount) {
nsIStyleRule* rule = (nsIStyleRule*)aResults->ElementAt(index++);
matchCount++;
nsICSSStyleRule* cssRule;
if (NS_SUCCEEDED(rule->QueryInterface(kICSSStyleRuleIID, (void**)&cssRule))) {

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

@ -506,13 +506,12 @@ PRInt32 HTMLStyleSheetImpl::RulesMatching(nsIPresContext* aPresContext,
} // end html namespace
// just get the one and only style rule from the content
nsIStyleRule* rule;
styledContent->GetContentStyleRule(rule);
if (nsnull != rule) {
aResults->AppendElement(rule);
NS_RELEASE(rule);
matchCount++;
}
PRUint32 preCount = 0;
PRUint32 postCount = 0;
aResults->Count(&preCount);
styledContent->GetContentStyleRules(aResults);
aResults->Count(&postCount);
matchCount += (postCount - preCount);
NS_RELEASE(styledContent);
}

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

@ -429,9 +429,13 @@ PRInt32 HTMLCSSStyleSheetImpl::RulesMatching(nsIPresContext* aPresContext,
// just get the one and only style rule from the content's STYLE attribute
if (NS_SUCCEEDED(aContent->QueryInterface(nsIStyledContent::GetIID(), (void**)&styledContent))) {
nsIStyleRule* rule = nsnull;
if (NS_SUCCEEDED(styledContent->GetInlineStyleRule(rule))) {
if (nsnull != rule) {
aResults->AppendElement(rule);
PRUint32 index = 0;
aResults->Count(&index);
if (NS_SUCCEEDED(styledContent->GetInlineStyleRules(aResults))) {
PRUint32 postCount = 0;
aResults->Count(&postCount);
while (index < postCount) {
nsIStyleRule* rule = (nsIStyleRule*)aResults->ElementAt(index++);
matchCount++;
nsICSSStyleRule* cssRule;
if (NS_SUCCEEDED(rule->QueryInterface(kICSSStyleRuleIID, (void**)&cssRule))) {

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

@ -506,13 +506,12 @@ PRInt32 HTMLStyleSheetImpl::RulesMatching(nsIPresContext* aPresContext,
} // end html namespace
// just get the one and only style rule from the content
nsIStyleRule* rule;
styledContent->GetContentStyleRule(rule);
if (nsnull != rule) {
aResults->AppendElement(rule);
NS_RELEASE(rule);
matchCount++;
}
PRUint32 preCount = 0;
PRUint32 postCount = 0;
aResults->Count(&preCount);
styledContent->GetContentStyleRules(aResults);
aResults->Count(&postCount);
matchCount += (postCount - preCount);
NS_RELEASE(styledContent);
}

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

@ -429,9 +429,13 @@ PRInt32 HTMLCSSStyleSheetImpl::RulesMatching(nsIPresContext* aPresContext,
// just get the one and only style rule from the content's STYLE attribute
if (NS_SUCCEEDED(aContent->QueryInterface(nsIStyledContent::GetIID(), (void**)&styledContent))) {
nsIStyleRule* rule = nsnull;
if (NS_SUCCEEDED(styledContent->GetInlineStyleRule(rule))) {
if (nsnull != rule) {
aResults->AppendElement(rule);
PRUint32 index = 0;
aResults->Count(&index);
if (NS_SUCCEEDED(styledContent->GetInlineStyleRules(aResults))) {
PRUint32 postCount = 0;
aResults->Count(&postCount);
while (index < postCount) {
nsIStyleRule* rule = (nsIStyleRule*)aResults->ElementAt(index++);
matchCount++;
nsICSSStyleRule* cssRule;
if (NS_SUCCEEDED(rule->QueryInterface(kICSSStyleRuleIID, (void**)&cssRule))) {

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

@ -506,13 +506,12 @@ PRInt32 HTMLStyleSheetImpl::RulesMatching(nsIPresContext* aPresContext,
} // end html namespace
// just get the one and only style rule from the content
nsIStyleRule* rule;
styledContent->GetContentStyleRule(rule);
if (nsnull != rule) {
aResults->AppendElement(rule);
NS_RELEASE(rule);
matchCount++;
}
PRUint32 preCount = 0;
PRUint32 postCount = 0;
aResults->Count(&preCount);
styledContent->GetContentStyleRules(aResults);
aResults->Count(&postCount);
matchCount += (postCount - preCount);
NS_RELEASE(styledContent);
}