Fix XUL style attribute change regression by making |#ifdef MOZ_SVG| code the default, but moved elsewhere. b=163481 r=bbaetz sr=bryner

This commit is contained in:
dbaron%fas.harvard.edu 2002-08-22 00:01:30 +00:00
parent e1b0de1025
commit 8580076d1f
4 changed files with 14 additions and 12 deletions

View File

@ -10732,12 +10732,6 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext,
shell->GetFrameManager(getter_AddRefs(frameManager));
PRBool affects;
#ifdef MOZ_SVG
// XXX should check we're in SVG NS here
if (aAttribute == nsHTMLAtoms::style)
affects = PR_TRUE;
else
#endif
frameManager->AttributeAffectsStyle(aAttribute, aContent, affects);
if (affects) {
#ifdef DEBUG_shaver

View File

@ -2011,6 +2011,13 @@ FrameManager::AttributeAffectsStyle(nsIAtom *aAttribute, nsIContent *aContent,
nsresult rv = NS_OK;
NS_ENSURE_TRUE(mPresShell, NS_ERROR_NOT_AVAILABLE);
if (aAttribute == nsHTMLAtoms::style) {
// Perhaps should check that it's XUL, SVG, (or HTML) namespace, but
// it doesn't really matter.
aAffects = PR_TRUE;
return NS_OK;
}
nsCOMPtr<nsIXMLContent> xml(do_QueryInterface(aContent));
if (xml) {
rv = mStyleSet->AttributeAffectsStyle(aAttribute, aContent, aAffects);

View File

@ -2011,6 +2011,13 @@ FrameManager::AttributeAffectsStyle(nsIAtom *aAttribute, nsIContent *aContent,
nsresult rv = NS_OK;
NS_ENSURE_TRUE(mPresShell, NS_ERROR_NOT_AVAILABLE);
if (aAttribute == nsHTMLAtoms::style) {
// Perhaps should check that it's XUL, SVG, (or HTML) namespace, but
// it doesn't really matter.
aAffects = PR_TRUE;
return NS_OK;
}
nsCOMPtr<nsIXMLContent> xml(do_QueryInterface(aContent));
if (xml) {
rv = mStyleSet->AttributeAffectsStyle(aAttribute, aContent, aAffects);

View File

@ -10732,12 +10732,6 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext,
shell->GetFrameManager(getter_AddRefs(frameManager));
PRBool affects;
#ifdef MOZ_SVG
// XXX should check we're in SVG NS here
if (aAttribute == nsHTMLAtoms::style)
affects = PR_TRUE;
else
#endif
frameManager->AttributeAffectsStyle(aAttribute, aContent, affects);
if (affects) {
#ifdef DEBUG_shaver