Chromium Code Reviews

Unified Diff: Source/core/svg/SVGAElement.cpp

Issue 147213004: Revert of Convert remaining RenderSVG* nodes to RenderObject::isChildAllowed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase; Include r166238. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « Source/core/svg/SVGAElement.h ('k') | Source/core/svg/SVGElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAElement.cpp
diff --git a/Source/core/svg/SVGAElement.cpp b/Source/core/svg/SVGAElement.cpp
index 7a37381f818c9a781155de2cb267fbb89b26c584..55101fa14fc5b075c8c6f5ee7fd72d90b7520b36 100644
--- a/Source/core/svg/SVGAElement.cpp
+++ b/Source/core/svg/SVGAElement.cpp
@@ -221,6 +221,18 @@ bool SVGAElement::isKeyboardFocusable() const
return false;
}
+bool SVGAElement::childShouldCreateRenderer(const Node& child) const
+{
+ // http://www.w3.org/2003/01/REC-SVG11-20030114-errata#linking-text-environment
+ // The 'a' element may contain any element that its parent may contain, except itself.
+ if (child.hasTagName(SVGNames::aTag))
+ return false;
+ if (parentNode() && parentNode()->isSVGElement())
+ return toSVGElement(parentNode())->childShouldCreateRenderer(child);
+
+ return SVGGraphicsElement::childShouldCreateRenderer(child);
+}
+
bool SVGAElement::willRespondToMouseClickEvents()
{
return isLink() || SVGGraphicsElement::willRespondToMouseClickEvents();
« no previous file with comments | « Source/core/svg/SVGAElement.h ('k') | Source/core/svg/SVGElement.h » ('j') | no next file with comments »

Powered by Google App Engine