summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGComponentTransferFunctionElement.cpp
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2010-11-10 15:31:59 -0800
committerTeng-Hui Zhu <ztenghui@google.com>2010-11-17 13:35:59 -0800
commit28040489d744e0c5d475a88663056c9040ed5320 (patch)
treec463676791e4a63e452a95f0a12b2a8519730693 /WebCore/svg/SVGComponentTransferFunctionElement.cpp
parenteff9be92c41913c92fb1d3b7983c071f3e718678 (diff)
downloadexternal_webkit-28040489d744e0c5d475a88663056c9040ed5320.zip
external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.gz
external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.bz2
Merge WebKit at r71558: Initial merge by git.
Change-Id: Ib345578fa29df7e4bc72b4f00e4a6fddcb754c4c
Diffstat (limited to 'WebCore/svg/SVGComponentTransferFunctionElement.cpp')
-rw-r--r--WebCore/svg/SVGComponentTransferFunctionElement.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/WebCore/svg/SVGComponentTransferFunctionElement.cpp b/WebCore/svg/SVGComponentTransferFunctionElement.cpp
index c1750d7..078b30d 100644
--- a/WebCore/svg/SVGComponentTransferFunctionElement.cpp
+++ b/WebCore/svg/SVGComponentTransferFunctionElement.cpp
@@ -33,7 +33,6 @@ namespace WebCore {
SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(const QualifiedName& tagName, Document* document)
: SVGElement(tagName, document)
, m_type(FECOMPONENTTRANSFER_TYPE_UNKNOWN)
- , m_tableValues(SVGNumberList::create(SVGNames::tableValuesAttr))
, m_slope(1)
, m_amplitude(1)
, m_exponent(1)
@@ -54,10 +53,12 @@ void SVGComponentTransferFunctionElement::parseMappedAttribute(Attribute* attr)
setTypeBaseValue(FECOMPONENTTRANSFER_TYPE_LINEAR);
else if (value == "gamma")
setTypeBaseValue(FECOMPONENTTRANSFER_TYPE_GAMMA);
- }
- else if (attr->name() == SVGNames::tableValuesAttr)
- tableValuesBaseValue()->parse(value);
- else if (attr->name() == SVGNames::slopeAttr)
+ } else if (attr->name() == SVGNames::tableValuesAttr) {
+ SVGNumberList newList;
+ newList.parse(value);
+ detachAnimatedTableValuesListWrappers(newList.size());
+ tableValuesBaseValue() = newList;
+ } else if (attr->name() == SVGNames::slopeAttr)
setSlopeBaseValue(value.toFloat());
else if (attr->name() == SVGNames::interceptAttr)
setInterceptBaseValue(value.toFloat());
@@ -105,18 +106,13 @@ void SVGComponentTransferFunctionElement::synchronizeProperty(const QualifiedNam
ComponentTransferFunction SVGComponentTransferFunctionElement::transferFunction() const
{
ComponentTransferFunction func;
- func.type = (ComponentTransferType) type();
+ func.type = static_cast<ComponentTransferType>(type());
func.slope = slope();
func.intercept = intercept();
func.amplitude = amplitude();
func.exponent = exponent();
func.offset = offset();
- SVGNumberList* numbers = tableValues();
-
- ExceptionCode ec = 0;
- unsigned int nr = numbers->numberOfItems();
- for (unsigned int i = 0; i < nr; i++)
- func.tableValues.append(numbers->getItem(i, ec));
+ func.tableValues = tableValues();
return func;
}