Bug 577993 mark debug code in InsertFontFaceRule and nsStyleAnimation::ComputeDistance

r=dbaron

--HG--
extra : rebase_source : a8b1ed0732f8f06a192dbcc485dffe0bb10d4a50
This commit is contained in:
timeless@mozdev.org 2010-07-15 15:55:05 +03:00
Родитель 4ab7411513
Коммит d758de761b
2 изменённых файлов: 21 добавлений и 13 удалений

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

@ -1685,10 +1685,14 @@ static void
InsertFontFaceRule(nsCSSFontFaceRule *aRule, gfxUserFontSet* aFontSet,
PRUint8 aSheetType)
{
PRInt32 type;
NS_ABORT_IF_FALSE(NS_SUCCEEDED(aRule->GetType(type))
&& type == nsICSSRule::FONT_FACE_RULE,
"InsertFontFaceRule passed a non-fontface CSS rule");
#ifdef DEBUG
{
PRInt32 type;
NS_ABORT_IF_FALSE(NS_SUCCEEDED(aRule->GetType(type))
&& type == nsICSSRule::FONT_FACE_RULE,
"InsertFontFaceRule passed a non-fontface CSS rule");
}
#endif
// aRule->List();

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

@ -370,15 +370,19 @@ nsStyleAnimation::ComputeDistance(nsCSSProperty aProperty,
const nsCSSValue &color1 = array1->Item(4);
const nsCSSValue &color2 = array2->Item(4);
const nsCSSValue &inset1 = array1->Item(5);
const nsCSSValue &inset2 = array2->Item(5);
// There are only two possible states of the inset value:
// (1) GetUnit() == eCSSUnit_Null
// (2) GetUnit() == eCSSUnit_Enumerated &&
// GetIntValue() == NS_STYLE_BOX_SHADOW_INSET
NS_ABORT_IF_FALSE(color1.GetUnit() == color2.GetUnit() &&
inset1 == inset2,
"AddWeighted should have failed");
#ifdef DEBUG
{
const nsCSSValue &inset1 = array1->Item(5);
const nsCSSValue &inset2 = array2->Item(5);
// There are only two possible states of the inset value:
// (1) GetUnit() == eCSSUnit_Null
// (2) GetUnit() == eCSSUnit_Enumerated &&
// GetIntValue() == NS_STYLE_BOX_SHADOW_INSET
NS_ABORT_IF_FALSE(color1.GetUnit() == color2.GetUnit() &&
inset1 == inset2,
"AddWeighted should have failed");
}
#endif
if (color1.GetUnit() != eCSSUnit_Null) {
nsStyleAnimation::Value color1Value