Adding TextReset case to GetUniqueStyleData, bug 36997 r=dbaron sr=attinasi a=brendan

git-svn-id: svn://10.0.0.236/trunk@110451 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterlubczynski%netscape.com
2001-12-14 03:47:02 +00:00
parent 87f656065d
commit c0882ccfc5
2 changed files with 16 additions and 0 deletions

View File

@@ -421,6 +421,14 @@ nsStyleContext::GetUniqueStyleData(nsIPresContext* aPresContext, const nsStyleSt
mBits &= ~NS_STYLE_INHERIT_TEXT;
break;
}
case eStyleStruct_TextReset: {
const nsStyleTextReset* reset = (const nsStyleTextReset*)GetStyleData(aSID);
nsStyleTextReset* newReset = new (aPresContext) nsStyleTextReset(*reset);
SetStyle(aSID, *newReset);
result = newReset;
mBits &= ~NS_STYLE_INHERIT_TEXT_RESET;
break;
}
default:
NS_ERROR("Struct type not supported. Please find another way to do this if you can!\n");
}

View File

@@ -421,6 +421,14 @@ nsStyleContext::GetUniqueStyleData(nsIPresContext* aPresContext, const nsStyleSt
mBits &= ~NS_STYLE_INHERIT_TEXT;
break;
}
case eStyleStruct_TextReset: {
const nsStyleTextReset* reset = (const nsStyleTextReset*)GetStyleData(aSID);
nsStyleTextReset* newReset = new (aPresContext) nsStyleTextReset(*reset);
SetStyle(aSID, *newReset);
result = newReset;
mBits &= ~NS_STYLE_INHERIT_TEXT_RESET;
break;
}
default:
NS_ERROR("Struct type not supported. Please find another way to do this if you can!\n");
}