diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-01-11 10:03:25 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-01-11 10:03:25 +0100 |
commit | d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (patch) | |
tree | b318cf594dc1da2fa48224005945c9157f35bb41 /Source/WebCore/dom/NodeRenderingContext.cpp | |
parent | 6300a96eca9f152b379f1bcf3d9efdc5572d989a (diff) | |
download | qtwebkit-d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9.tar.gz |
Imported WebKit commit 75bb2fc5882d2e1b3d5572c2961507996cbca5e3 (http://svn.webkit.org/repository/webkit/trunk@104681)
Diffstat (limited to 'Source/WebCore/dom/NodeRenderingContext.cpp')
-rw-r--r-- | Source/WebCore/dom/NodeRenderingContext.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/WebCore/dom/NodeRenderingContext.cpp b/Source/WebCore/dom/NodeRenderingContext.cpp index 96529fb86..ef85f7d23 100644 --- a/Source/WebCore/dom/NodeRenderingContext.cpp +++ b/Source/WebCore/dom/NodeRenderingContext.cpp @@ -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 @@ void NodeRenderingContext::moveToFlowThreadIfNeeded() 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()->ensureRenderFlowThreadWithName(m_flowThread); |