Bug 723853 - Remove dead default cases in content/canvas. r=jmuizelaar.

This commit is contained in:
Rafael Ávila de Espíndola 2012-02-03 17:10:58 +01:00
Родитель b41e6c7936
Коммит 03f4161a88
2 изменённых файлов: 0 добавлений и 24 удалений

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

@ -1754,8 +1754,6 @@ nsCanvasRenderingContext2D::GetMozFillRule(nsAString& aString)
aString.AssignLiteral("nonzero"); break; aString.AssignLiteral("nonzero"); break;
case gfxContext::FILL_RULE_EVEN_ODD: case gfxContext::FILL_RULE_EVEN_ODD:
aString.AssignLiteral("evenodd"); break; aString.AssignLiteral("evenodd"); break;
default:
return NS_ERROR_FAILURE;
} }
return NS_OK; return NS_OK;
} }
@ -2631,9 +2629,6 @@ nsCanvasRenderingContext2D::GetTextAlign(nsAString& ta)
case TEXT_ALIGN_CENTER: case TEXT_ALIGN_CENTER:
ta.AssignLiteral("center"); ta.AssignLiteral("center");
break; break;
default:
NS_ERROR("textAlign holds invalid value");
return NS_ERROR_FAILURE;
} }
return NS_OK; return NS_OK;
@ -2681,9 +2676,6 @@ nsCanvasRenderingContext2D::GetTextBaseline(nsAString& tb)
case TEXT_BASELINE_BOTTOM: case TEXT_BASELINE_BOTTOM:
tb.AssignLiteral("bottom"); tb.AssignLiteral("bottom");
break; break;
default:
NS_ERROR("textBaseline holds invalid value");
return NS_ERROR_FAILURE;
} }
return NS_OK; return NS_OK;
@ -2981,9 +2973,6 @@ nsCanvasRenderingContext2D::DrawOrMeasureText(const nsAString& aRawText,
case TEXT_BASELINE_BOTTOM: case TEXT_BASELINE_BOTTOM:
anchorY = -fontMetrics.emDescent; anchorY = -fontMetrics.emDescent;
break; break;
default:
NS_ERROR("mTextBaseline holds invalid value");
return NS_ERROR_FAILURE;
} }
processor.mPt.y += anchorY; processor.mPt.y += anchorY;

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

@ -1828,8 +1828,6 @@ nsCanvasRenderingContext2DAzure::GetMozFillRule(nsAString& aString)
aString.AssignLiteral("nonzero"); break; aString.AssignLiteral("nonzero"); break;
case FILL_EVEN_ODD: case FILL_EVEN_ODD:
aString.AssignLiteral("evenodd"); break; aString.AssignLiteral("evenodd"); break;
default:
return NS_ERROR_FAILURE;
} }
return NS_OK; return NS_OK;
@ -2843,9 +2841,6 @@ nsCanvasRenderingContext2DAzure::GetTextAlign(nsAString& ta)
case TEXT_ALIGN_CENTER: case TEXT_ALIGN_CENTER:
ta.AssignLiteral("center"); ta.AssignLiteral("center");
break; break;
default:
NS_ERROR("textAlign holds invalid value");
return NS_ERROR_FAILURE;
} }
return NS_OK; return NS_OK;
@ -2893,9 +2888,6 @@ nsCanvasRenderingContext2DAzure::GetTextBaseline(nsAString& tb)
case TEXT_BASELINE_BOTTOM: case TEXT_BASELINE_BOTTOM:
tb.AssignLiteral("bottom"); tb.AssignLiteral("bottom");
break; break;
default:
NS_ERROR("textBaseline holds invalid value");
return NS_ERROR_FAILURE;
} }
return NS_OK; return NS_OK;
@ -3285,9 +3277,6 @@ nsCanvasRenderingContext2DAzure::DrawOrMeasureText(const nsAString& aRawText,
case TEXT_BASELINE_BOTTOM: case TEXT_BASELINE_BOTTOM:
anchorY = -fontMetrics.emDescent; anchorY = -fontMetrics.emDescent;
break; break;
default:
NS_ERROR("mTextBaseline holds invalid value");
return NS_ERROR_FAILURE;
} }
processor.mPt.y += anchorY; processor.mPt.y += anchorY;
@ -3436,8 +3425,6 @@ nsCanvasRenderingContext2DAzure::GetLineCap(nsAString& capstyle)
case CAP_SQUARE: case CAP_SQUARE:
capstyle.AssignLiteral("square"); capstyle.AssignLiteral("square");
break; break;
default:
return NS_ERROR_FAILURE;
} }
return NS_OK; return NS_OK;