This commit is contained in:
peterl%netscape.com 1999-07-18 00:29:39 +00:00
Родитель c2b5a19ffd
Коммит 3120ce29b5
5 изменённых файлов: 6 добавлений и 9 удалений

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

@ -423,7 +423,7 @@ nsHTMLMappedAttributes::SetAttribute(nsIAtom* aAttrName, const nsString& aValue)
// add new attribute
// keep these arbitrarily sorted so they'll equal regardless of set order
if (aAttrName < mFirst.mAttribute) { // before first, move first down one
HTMLAttribute* attr = new HTMLAttribute(mFirst);
attr = new HTMLAttribute(mFirst);
if (attr) {
attr->mNext = mFirst.mNext;
mFirst.mNext = attr;
@ -434,7 +434,7 @@ nsHTMLMappedAttributes::SetAttribute(nsIAtom* aAttrName, const nsString& aValue)
}
}
else {
HTMLAttribute* attr = new HTMLAttribute(aAttrName, aValue);
attr = new HTMLAttribute(aAttrName, aValue);
if (attr) {
HTMLAttribute* prev = &mFirst;
while (prev->mNext && (prev->mNext->mAttribute < aAttrName)) {
@ -1411,7 +1411,7 @@ HTMLAttributesImpl::Clone(nsIHTMLAttributes** aInstancePtrResult) const
NS_IMETHODIMP
HTMLAttributesImpl::SetStyleSheet(nsIHTMLStyleSheet* aSheet)
{
if (mMapped) {
if (mMapped && (aSheet != mMapped->mSheet)) {
mMapped->SetStyleSheet(aSheet);
return UniqueMapped(aSheet);
}

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

@ -429,7 +429,6 @@ 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;
PRUint32 index = 0;
aResults->Count(&index);
if (NS_SUCCEEDED(styledContent->GetInlineStyleRules(aResults))) {

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

@ -423,7 +423,7 @@ nsHTMLMappedAttributes::SetAttribute(nsIAtom* aAttrName, const nsString& aValue)
// add new attribute
// keep these arbitrarily sorted so they'll equal regardless of set order
if (aAttrName < mFirst.mAttribute) { // before first, move first down one
HTMLAttribute* attr = new HTMLAttribute(mFirst);
attr = new HTMLAttribute(mFirst);
if (attr) {
attr->mNext = mFirst.mNext;
mFirst.mNext = attr;
@ -434,7 +434,7 @@ nsHTMLMappedAttributes::SetAttribute(nsIAtom* aAttrName, const nsString& aValue)
}
}
else {
HTMLAttribute* attr = new HTMLAttribute(aAttrName, aValue);
attr = new HTMLAttribute(aAttrName, aValue);
if (attr) {
HTMLAttribute* prev = &mFirst;
while (prev->mNext && (prev->mNext->mAttribute < aAttrName)) {
@ -1411,7 +1411,7 @@ HTMLAttributesImpl::Clone(nsIHTMLAttributes** aInstancePtrResult) const
NS_IMETHODIMP
HTMLAttributesImpl::SetStyleSheet(nsIHTMLStyleSheet* aSheet)
{
if (mMapped) {
if (mMapped && (aSheet != mMapped->mSheet)) {
mMapped->SetStyleSheet(aSheet);
return UniqueMapped(aSheet);
}

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

@ -429,7 +429,6 @@ 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;
PRUint32 index = 0;
aResults->Count(&index);
if (NS_SUCCEEDED(styledContent->GetInlineStyleRules(aResults))) {

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

@ -429,7 +429,6 @@ 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;
PRUint32 index = 0;
aResults->Count(&index);
if (NS_SUCCEEDED(styledContent->GetInlineStyleRules(aResults))) {