Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1132)

Unified Diff: Source/core/svg/SVGFEColorMatrixElement.cpp

Issue 1087283002: Rework the checks for too-few values in feColorMatrix filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Better tests Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/svg/SVGFEColorMatrixElement.cpp
diff --git a/Source/core/svg/SVGFEColorMatrixElement.cpp b/Source/core/svg/SVGFEColorMatrixElement.cpp
index aa12c2b3c817c45db6396d24f6d17f2fa4319ef2..6eb60344ec0b1ea1449a9abfd1e1616058a4d223 100644
--- a/Source/core/svg/SVGFEColorMatrixElement.cpp
+++ b/Source/core/svg/SVGFEColorMatrixElement.cpp
@@ -66,12 +66,8 @@ bool SVGFEColorMatrixElement::setFilterEffectAttribute(FilterEffect* effect, con
FEColorMatrix* colorMatrix = static_cast<FEColorMatrix*>(effect);
if (attrName == SVGNames::typeAttr)
return colorMatrix->setType(m_type->currentValue()->enumValue());
- if (attrName == SVGNames::valuesAttr) {
- Vector<float> values = m_values->currentValue()->toFloatVector();
- if (values.size() == 20)
- return colorMatrix->setValues(m_values->currentValue()->toFloatVector());
- return false;
- }
+ if (attrName == SVGNames::valuesAttr)
+ return colorMatrix->setValues(m_values->currentValue()->toFloatVector());
ASSERT_NOT_REACHED();
return false;

Powered by Google App Engine
This is Rietveld 408576698