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

Unified Diff: Source/WebCore/svg/SVGFilterElement.cpp

Issue 10442022: Merge 116647 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « Source/WebCore/svg/SVGFilterElement.h ('k') | Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/svg/SVGFilterElement.cpp
===================================================================
--- Source/WebCore/svg/SVGFilterElement.cpp (revision 118423)
+++ Source/WebCore/svg/SVGFilterElement.cpp (working copy)
@@ -27,6 +27,7 @@
#include "SVGFilterElement.h"
#include "Attr.h"
+#include "NodeRenderingContext.h"
#include "RenderSVGResourceFilter.h"
#include "SVGElementInstance.h"
#include "SVGFilterBuilder.h"
@@ -193,6 +194,45 @@
return new (arena) RenderSVGResourceFilter(this);
}
+bool SVGFilterElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
+{
+ if (!childContext.node()->isSVGElement())
+ return false;
+
+ Element* element = static_cast<Element*>(childContext.node());
+
+ DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, allowedChildElementTags, ());
+ if (allowedChildElementTags.isEmpty()) {
+ allowedChildElementTags.add(SVGNames::feBlendTag);
+ allowedChildElementTags.add(SVGNames::feColorMatrixTag);
+ allowedChildElementTags.add(SVGNames::feComponentTransferTag);
+ allowedChildElementTags.add(SVGNames::feCompositeTag);
+ allowedChildElementTags.add(SVGNames::feConvolveMatrixTag);
+ allowedChildElementTags.add(SVGNames::feDiffuseLightingTag);
+ allowedChildElementTags.add(SVGNames::feDisplacementMapTag);
+ allowedChildElementTags.add(SVGNames::feDistantLightTag);
+ allowedChildElementTags.add(SVGNames::feDropShadowTag);
+ allowedChildElementTags.add(SVGNames::feFloodTag);
+ allowedChildElementTags.add(SVGNames::feFuncATag);
+ allowedChildElementTags.add(SVGNames::feFuncBTag);
+ allowedChildElementTags.add(SVGNames::feFuncGTag);
+ allowedChildElementTags.add(SVGNames::feFuncRTag);
+ allowedChildElementTags.add(SVGNames::feGaussianBlurTag);
+ allowedChildElementTags.add(SVGNames::feImageTag);
+ allowedChildElementTags.add(SVGNames::feMergeTag);
+ allowedChildElementTags.add(SVGNames::feMergeNodeTag);
+ allowedChildElementTags.add(SVGNames::feMorphologyTag);
+ allowedChildElementTags.add(SVGNames::feOffsetTag);
+ allowedChildElementTags.add(SVGNames::fePointLightTag);
+ allowedChildElementTags.add(SVGNames::feSpecularLightingTag);
+ allowedChildElementTags.add(SVGNames::feSpotLightTag);
+ allowedChildElementTags.add(SVGNames::feTileTag);
+ allowedChildElementTags.add(SVGNames::feTurbulenceTag);
+ }
+
+ return allowedChildElementTags.contains<QualifiedName, SVGAttributeHashTranslator>(element->tagQName());
+}
+
bool SVGFilterElement::selfHasRelativeLengths() const
{
return x().isRelative()
« no previous file with comments | « Source/WebCore/svg/SVGFilterElement.h ('k') | Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698