| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 return entries; | 42 return entries; |
| 43 } | 43 } |
| 44 | 44 |
| 45 class SVGAnimatedOrder : public SVGAnimatedIntegerOptionalInteger { | 45 class SVGAnimatedOrder : public SVGAnimatedIntegerOptionalInteger { |
| 46 public: | 46 public: |
| 47 static PassRefPtrWillBeRawPtr<SVGAnimatedOrder> create(SVGElement* contextEl
ement) | 47 static PassRefPtrWillBeRawPtr<SVGAnimatedOrder> create(SVGElement* contextEl
ement) |
| 48 { | 48 { |
| 49 return adoptRefWillBeNoop(new SVGAnimatedOrder(contextElement)); | 49 return adoptRefWillBeNoop(new SVGAnimatedOrder(contextElement)); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void setBaseValueAsString(const String&, SVGParsingError&) override; | 52 SVGParsingError setBaseValueAsString(const String&) override; |
| 53 | 53 |
| 54 protected: | 54 protected: |
| 55 SVGAnimatedOrder(SVGElement* contextElement) | 55 SVGAnimatedOrder(SVGElement* contextElement) |
| 56 : SVGAnimatedIntegerOptionalInteger(contextElement, SVGNames::orderAttr,
0, 0) | 56 : SVGAnimatedIntegerOptionalInteger(contextElement, SVGNames::orderAttr,
0, 0) |
| 57 { | 57 { |
| 58 } | 58 } |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 void SVGAnimatedOrder::setBaseValueAsString(const String& value, SVGParsingError
& parseError) | 61 SVGParsingError SVGAnimatedOrder::setBaseValueAsString(const String& value) |
| 62 { | 62 { |
| 63 SVGAnimatedIntegerOptionalInteger::setBaseValueAsString(value, parseError); | 63 SVGParsingError parseStatus = SVGAnimatedIntegerOptionalInteger::setBaseValu
eAsString(value); |
| 64 | 64 |
| 65 ASSERT(contextElement()); | 65 ASSERT(contextElement()); |
| 66 if (parseError == NoError && (firstInteger()->baseValue()->value() < 1 || se
condInteger()->baseValue()->value() < 1)) { | 66 if (parseStatus == NoError && (firstInteger()->baseValue()->value() < 1 || s
econdInteger()->baseValue()->value() < 1)) { |
| 67 contextElement()->document().accessSVGExtensions().reportWarning( | 67 contextElement()->document().accessSVGExtensions().reportWarning( |
| 68 "feConvolveMatrix: problem parsing order=\"" + value + "\"."); | 68 "feConvolveMatrix: problem parsing order=\"" + value + "\"."); |
| 69 } | 69 } |
| 70 return parseStatus; |
| 70 } | 71 } |
| 71 | 72 |
| 72 inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(Document& document
) | 73 inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(Document& document
) |
| 73 : SVGFilterPrimitiveStandardAttributes(SVGNames::feConvolveMatrixTag, docume
nt) | 74 : SVGFilterPrimitiveStandardAttributes(SVGNames::feConvolveMatrixTag, docume
nt) |
| 74 , m_bias(SVGAnimatedNumber::create(this, SVGNames::biasAttr, SVGNumber::crea
te())) | 75 , m_bias(SVGAnimatedNumber::create(this, SVGNames::biasAttr, SVGNumber::crea
te())) |
| 75 , m_divisor(SVGAnimatedNumber::create(this, SVGNames::divisorAttr, SVGNumber
::create())) | 76 , m_divisor(SVGAnimatedNumber::create(this, SVGNames::divisorAttr, SVGNumber
::create())) |
| 76 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) | 77 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) |
| 77 , m_edgeMode(SVGAnimatedEnumeration<EdgeModeType>::create(this, SVGNames::ed
geModeAttr, EDGEMODE_DUPLICATE)) | 78 , m_edgeMode(SVGAnimatedEnumeration<EdgeModeType>::create(this, SVGNames::ed
geModeAttr, EDGEMODE_DUPLICATE)) |
| 78 , m_kernelMatrix(SVGAnimatedNumberList::create(this, SVGNames::kernelMatrixA
ttr, SVGNumberList::create())) | 79 , m_kernelMatrix(SVGAnimatedNumberList::create(this, SVGNames::kernelMatrixA
ttr, SVGNumberList::create())) |
| 79 , m_kernelUnitLength(SVGAnimatedNumberOptionalNumber::create(this, SVGNames:
:kernelUnitLengthAttr)) | 80 , m_kernelUnitLength(SVGAnimatedNumberOptionalNumber::create(this, SVGNames:
:kernelUnitLengthAttr)) |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 190 |
| 190 RefPtrWillBeRawPtr<FilterEffect> effect = FEConvolveMatrix::create(filter, | 191 RefPtrWillBeRawPtr<FilterEffect> effect = FEConvolveMatrix::create(filter, |
| 191 IntSize(orderXValue, orderYValue), divisorValue, | 192 IntSize(orderXValue, orderYValue), divisorValue, |
| 192 m_bias->currentValue()->value(), IntPoint(targetXValue, targetYValue), m
_edgeMode->currentValue()->enumValue(), | 193 m_bias->currentValue()->value(), IntPoint(targetXValue, targetYValue), m
_edgeMode->currentValue()->enumValue(), |
| 193 m_preserveAlpha->currentValue()->value(), m_kernelMatrix->currentValue()
->toFloatVector()); | 194 m_preserveAlpha->currentValue()->value(), m_kernelMatrix->currentValue()
->toFloatVector()); |
| 194 effect->inputEffects().append(input1); | 195 effect->inputEffects().append(input1); |
| 195 return effect.release(); | 196 return effect.release(); |
| 196 } | 197 } |
| 197 | 198 |
| 198 } // namespace blink | 199 } // namespace blink |
| OLD | NEW |