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

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

Issue 19263002: Get rid of special casing for SVGNumber in the bindings generator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix style issues Created 7 years, 5 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 c65485b238e0b3a0b165d7a7b56c8a9c4f02f219..ec17b18a56a870e2dda7375f755e54f51405fbda 100644
--- a/Source/core/svg/SVGFEColorMatrixElement.cpp
+++ b/Source/core/svg/SVGFEColorMatrixElement.cpp
@@ -102,7 +102,7 @@ bool SVGFEColorMatrixElement::setFilterEffectAttribute(FilterEffect* effect, con
if (attrName == SVGNames::typeAttr)
return colorMatrix->setType(typeCurrentValue());
if (attrName == SVGNames::valuesAttr)
- return colorMatrix->setValues(valuesCurrentValue());
+ return colorMatrix->setValues(valuesCurrentValue().toFloatVector());
ASSERT_NOT_REACHED();
return false;
@@ -157,13 +157,15 @@ PassRefPtr<FilterEffect> SVGFEColorMatrixElement::build(SVGFilterBuilder* filter
break;
}
} else {
- filterValues = valuesCurrentValue();
- unsigned size = filterValues.size();
+ SVGNumberList& values = valuesCurrentValue();
+ unsigned size = values.size();
if ((filterType == FECOLORMATRIX_TYPE_MATRIX && size != 20)
|| (filterType == FECOLORMATRIX_TYPE_HUEROTATE && size != 1)
|| (filterType == FECOLORMATRIX_TYPE_SATURATE && size != 1))
return 0;
+
+ filterValues = values.toFloatVector();
}
RefPtr<FilterEffect> effect = FEColorMatrix::create(filter, filterType, filterValues);
« no previous file with comments | « Source/core/svg/SVGComponentTransferFunctionElement.cpp ('k') | Source/core/svg/SVGFEConvolveMatrixElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698