| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 invalidate(); | 55 invalidate(); |
| 56 return; | 56 return; |
| 57 } | 57 } |
| 58 | 58 |
| 59 SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName); | 59 SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName); |
| 60 } | 60 } |
| 61 | 61 |
| 62 PassRefPtrWillBeRawPtr<FilterEffect> SVGFEComponentTransferElement::build(SVGFil
terBuilder* filterBuilder, Filter* filter) | 62 PassRefPtrWillBeRawPtr<FilterEffect> SVGFEComponentTransferElement::build(SVGFil
terBuilder* filterBuilder, Filter* filter) |
| 63 { | 63 { |
| 64 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->curr
entValue()->value())); | 64 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->curr
entValue()->value())); |
| 65 | 65 ASSERT(input1); |
| 66 if (!input1) | |
| 67 return nullptr; | |
| 68 | 66 |
| 69 ComponentTransferFunction red; | 67 ComponentTransferFunction red; |
| 70 ComponentTransferFunction green; | 68 ComponentTransferFunction green; |
| 71 ComponentTransferFunction blue; | 69 ComponentTransferFunction blue; |
| 72 ComponentTransferFunction alpha; | 70 ComponentTransferFunction alpha; |
| 73 | 71 |
| 74 for (SVGElement* element = Traversal<SVGElement>::firstChild(*this); element
; element = Traversal<SVGElement>::nextSibling(*element)) { | 72 for (SVGElement* element = Traversal<SVGElement>::firstChild(*this); element
; element = Traversal<SVGElement>::nextSibling(*element)) { |
| 75 if (isSVGFEFuncRElement(*element)) | 73 if (isSVGFEFuncRElement(*element)) |
| 76 red = toSVGFEFuncRElement(*element).transferFunction(); | 74 red = toSVGFEFuncRElement(*element).transferFunction(); |
| 77 else if (isSVGFEFuncGElement(*element)) | 75 else if (isSVGFEFuncGElement(*element)) |
| 78 green = toSVGFEFuncGElement(*element).transferFunction(); | 76 green = toSVGFEFuncGElement(*element).transferFunction(); |
| 79 else if (isSVGFEFuncBElement(*element)) | 77 else if (isSVGFEFuncBElement(*element)) |
| 80 blue = toSVGFEFuncBElement(*element).transferFunction(); | 78 blue = toSVGFEFuncBElement(*element).transferFunction(); |
| 81 else if (isSVGFEFuncAElement(*element)) | 79 else if (isSVGFEFuncAElement(*element)) |
| 82 alpha = toSVGFEFuncAElement(*element).transferFunction(); | 80 alpha = toSVGFEFuncAElement(*element).transferFunction(); |
| 83 } | 81 } |
| 84 | 82 |
| 85 RefPtrWillBeRawPtr<FilterEffect> effect = FEComponentTransfer::create(filter
, red, green, blue, alpha); | 83 RefPtrWillBeRawPtr<FilterEffect> effect = FEComponentTransfer::create(filter
, red, green, blue, alpha); |
| 86 effect->inputEffects().append(input1); | 84 effect->inputEffects().append(input1); |
| 87 return effect.release(); | 85 return effect.release(); |
| 88 } | 86 } |
| 89 | 87 |
| 90 } | 88 } |
| OLD | NEW |