Changing GetStyleHintForAttributeChanged so that it is invoked on styledContent

instead of htmlContent.
This commit is contained in:
hyatt%netscape.com 1999-02-27 01:34:32 +00:00
parent 634942997c
commit 2a99f6d706
2 changed files with 10 additions and 10 deletions

View File

@ -3586,14 +3586,14 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext,
#endif
// the style tag has its own interpretation based on aHint
if ((nsHTMLAtoms::style != aAttribute) && (NS_STYLE_HINT_UNKNOWN == aHint)) {
nsIHTMLContent* htmlContent;
result = aContent->QueryInterface(kIHTMLContentIID, (void**)&htmlContent);
if (NS_STYLE_HINT_UNKNOWN == aHint) {
nsIStyledContent* styledContent;
result = aContent->QueryInterface(nsIStyledContent::IID(), (void**)&styledContent);
if (NS_OK == result) {
// Get style hint from HTML content object.
htmlContent->GetStyleHintForAttributeChange(aAttribute, &aHint);
NS_RELEASE(htmlContent);
styledContent->GetStyleHintForAttributeChange(aAttribute, &aHint);
NS_RELEASE(styledContent);
}
else aHint = NS_STYLE_HINT_REFLOW;
}

View File

@ -3586,14 +3586,14 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext,
#endif
// the style tag has its own interpretation based on aHint
if ((nsHTMLAtoms::style != aAttribute) && (NS_STYLE_HINT_UNKNOWN == aHint)) {
nsIHTMLContent* htmlContent;
result = aContent->QueryInterface(kIHTMLContentIID, (void**)&htmlContent);
if (NS_STYLE_HINT_UNKNOWN == aHint) {
nsIStyledContent* styledContent;
result = aContent->QueryInterface(nsIStyledContent::IID(), (void**)&styledContent);
if (NS_OK == result) {
// Get style hint from HTML content object.
htmlContent->GetStyleHintForAttributeChange(aAttribute, &aHint);
NS_RELEASE(htmlContent);
styledContent->GetStyleHintForAttributeChange(aAttribute, &aHint);
NS_RELEASE(styledContent);
}
else aHint = NS_STYLE_HINT_REFLOW;
}