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

Unified Diff: Source/WebCore/dom/NodeRenderingContext.cpp

Issue 9250028: Merge 104328 - [CSSRegions]Crash while collecting svg elements in render flow thread. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 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 | « LayoutTests/fast/regions/svg-root-element-collected-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/dom/NodeRenderingContext.cpp
===================================================================
--- Source/WebCore/dom/NodeRenderingContext.cpp (revision 105357)
+++ Source/WebCore/dom/NodeRenderingContext.cpp (working copy)
@@ -36,6 +36,10 @@
#include "ShadowInclusionSelector.h"
#include "ShadowRoot.h"
+#if ENABLE(SVG)
+#include "SVGNames.h"
+#endif
+
namespace WebCore {
NodeRenderingContext::NodeRenderingContext(Node* node)
@@ -277,6 +281,13 @@
if (!m_node->isElementNode() || !m_style || m_style->flowThread().isEmpty())
return;
+#if ENABLE(SVG)
+ // Allow only svg root elements to be directly collected by a render flow thread.
+ if (m_node->isSVGElement()
+ && (!(m_node->hasTagName(SVGNames::svgTag) && m_node->parentNode() && !m_node->parentNode()->isSVGElement())))
+ return;
+#endif
+
m_flowThread = m_style->flowThread();
ASSERT(m_node->document()->renderView());
m_parentFlowRenderer = m_node->document()->renderView()->renderFlowThreadWithName(m_flowThread);
« no previous file with comments | « LayoutTests/fast/regions/svg-root-element-collected-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698