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

Unified Diff: Source/core/rendering/svg/RenderSVGForeignObject.cpp

Issue 133873003: Convert SVG <foreignObject> to use RenderObject::isChildAllowed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reupload. Created 6 years, 11 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/core/rendering/svg/RenderSVGForeignObject.h ('k') | Source/core/svg/SVGForeignObjectElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGForeignObject.cpp
diff --git a/Source/core/rendering/svg/RenderSVGForeignObject.cpp b/Source/core/rendering/svg/RenderSVGForeignObject.cpp
index ef56fcab986f43a295b48e98c13f7abf4c9ec173..898fb05a371587b54c951bdcfd92ed599193b025 100644
--- a/Source/core/rendering/svg/RenderSVGForeignObject.cpp
+++ b/Source/core/rendering/svg/RenderSVGForeignObject.cpp
@@ -45,6 +45,12 @@ RenderSVGForeignObject::~RenderSVGForeignObject()
{
}
+bool RenderSVGForeignObject::isChildAllowed(RenderObject* child, RenderStyle* style) const
+{
+ // Disallow arbitary SVG content. Only allow proper <svg xmlns="svgNS"> subdocuments.
+ return !child->isSVG() || child->isSVGRoot();
+}
+
void RenderSVGForeignObject::paint(PaintInfo& paintInfo, const LayoutPoint&)
{
if (paintInfo.context->paintingDisabled()
« no previous file with comments | « Source/core/rendering/svg/RenderSVGForeignObject.h ('k') | Source/core/svg/SVGForeignObjectElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698