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

Side by Side Diff: Source/core/dom/RenderTreeBuilder.cpp

Issue 157663002: Remove SVGElement::childShouldCreateRenderer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/svg/SVGAltGlyphElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
7 * Copyright (C) 2011 Google Inc. All rights reserved. 7 * Copyright (C) 2011 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 { 103 {
104 if (!m_renderingParent) 104 if (!m_renderingParent)
105 return false; 105 return false;
106 if (m_node->isSVGElement()) { 106 if (m_node->isSVGElement()) {
107 // SVG elements only render when inside <svg>, or if the element is an < svg> itself. 107 // SVG elements only render when inside <svg>, or if the element is an < svg> itself.
108 if (!m_node->hasTagName(SVGNames::svgTag) && !m_renderingParent->isSVGEl ement()) 108 if (!m_node->hasTagName(SVGNames::svgTag) && !m_renderingParent->isSVGEl ement())
109 return false; 109 return false;
110 if (!toSVGElement(m_node)->isValid()) 110 if (!toSVGElement(m_node)->isValid())
111 return false; 111 return false;
112 } 112 }
113 if (m_renderingParent->isSVGElement() && !toSVGElement(m_renderingParent)->c hildShouldCreateRenderer(*m_node))
114 return false;
115 RenderObject* parentRenderer = this->parentRenderer(); 113 RenderObject* parentRenderer = this->parentRenderer();
116 if (!parentRenderer) 114 if (!parentRenderer)
117 return false; 115 return false;
118 if (!parentRenderer->canHaveChildren()) 116 if (!parentRenderer->canHaveChildren())
119 return false; 117 return false;
120 return true; 118 return true;
121 } 119 }
122 120
123 // Check the specific case of elements that are children of regions but are flow ed into a flow thread themselves. 121 // Check the specific case of elements that are children of regions but are flow ed into a flow thread themselves.
124 bool RenderTreeBuilder::elementInsideRegionNeedsRenderer() 122 bool RenderTreeBuilder::elementInsideRegionNeedsRenderer()
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 newRenderer->setFlowThreadState(parentRenderer->flowThreadState()); 273 newRenderer->setFlowThreadState(parentRenderer->flowThreadState());
276 274
277 RenderObject* nextRenderer = this->nextRenderer(); 275 RenderObject* nextRenderer = this->nextRenderer();
278 textNode->setRenderer(newRenderer); 276 textNode->setRenderer(newRenderer);
279 // Parent takes care of the animations, no need to call setAnimatableStyle. 277 // Parent takes care of the animations, no need to call setAnimatableStyle.
280 newRenderer->setStyle(m_style.release()); 278 newRenderer->setStyle(m_style.release());
281 parentRenderer->addChild(newRenderer, nextRenderer); 279 parentRenderer->addChild(newRenderer, nextRenderer);
282 } 280 }
283 281
284 } 282 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/svg/SVGAltGlyphElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698