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

Side by Side Diff: Source/core/svg/SVGFEComponentTransferElement.cpp

Issue 1046673006: Add svgAttributeChanged function to SVGFEComponentTransferElement class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
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 30 matching lines...) Expand all
41 } 41 }
42 42
43 DEFINE_TRACE(SVGFEComponentTransferElement) 43 DEFINE_TRACE(SVGFEComponentTransferElement)
44 { 44 {
45 visitor->trace(m_in1); 45 visitor->trace(m_in1);
46 SVGFilterPrimitiveStandardAttributes::trace(visitor); 46 SVGFilterPrimitiveStandardAttributes::trace(visitor);
47 } 47 }
48 48
49 DEFINE_NODE_FACTORY(SVGFEComponentTransferElement) 49 DEFINE_NODE_FACTORY(SVGFEComponentTransferElement)
50 50
51 void SVGFEComponentTransferElement::svgAttributeChanged(const QualifiedName& att rName)
fs 2015/03/31 08:25:50 Please put this method after isSupportedAttribute.
52 {
53 if (!isSupportedAttribute(attrName)) {
54 SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
55 return;
56 }
57
fs 2015/03/31 08:25:50 Add SVGElement::InvalidationGuard invalidationGua
58 if (attrName == SVGNames::inAttr) {
59 invalidate();
60 return;
61 }
62 }
fs 2015/03/31 08:25:50 ASSERT_NOT_REACHED()
63
51 bool SVGFEComponentTransferElement::isSupportedAttribute(const QualifiedName& at trName) 64 bool SVGFEComponentTransferElement::isSupportedAttribute(const QualifiedName& at trName)
52 { 65 {
53 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 66 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
54 if (supportedAttributes.isEmpty()) 67 if (supportedAttributes.isEmpty())
55 supportedAttributes.add(SVGNames::inAttr); 68 supportedAttributes.add(SVGNames::inAttr);
56 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); 69 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
57 } 70 }
58 71
59 PassRefPtrWillBeRawPtr<FilterEffect> SVGFEComponentTransferElement::build(SVGFil terBuilder* filterBuilder, Filter* filter) 72 PassRefPtrWillBeRawPtr<FilterEffect> SVGFEComponentTransferElement::build(SVGFil terBuilder* filterBuilder, Filter* filter)
60 { 73 {
(...skipping 17 matching lines...) Expand all
78 else if (isSVGFEFuncAElement(*element)) 91 else if (isSVGFEFuncAElement(*element))
79 alpha = toSVGFEFuncAElement(*element).transferFunction(); 92 alpha = toSVGFEFuncAElement(*element).transferFunction();
80 } 93 }
81 94
82 RefPtrWillBeRawPtr<FilterEffect> effect = FEComponentTransfer::create(filter , red, green, blue, alpha); 95 RefPtrWillBeRawPtr<FilterEffect> effect = FEComponentTransfer::create(filter , red, green, blue, alpha);
83 effect->inputEffects().append(input1); 96 effect->inputEffects().append(input1);
84 return effect.release(); 97 return effect.release();
85 } 98 }
86 99
87 } 100 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698