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

Side by Side Diff: Source/core/svg/SVGElement.cpp

Issue 146833003: Convert remaining RenderSVG* nodes to RenderObject::isChildAllowed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix 'switch' condition. 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 unified diff | Download patch
« no previous file with comments | « Source/core/svg/SVGElement.h ('k') | Source/core/svg/SVGSwitchElement.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) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org>
3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 // The outermost SVGSVGElement SVGLoad event is fired through Document::disp atchWindowLoadEvent. 967 // The outermost SVGSVGElement SVGLoad event is fired through Document::disp atchWindowLoadEvent.
968 if (isOutermostSVGSVGElement()) 968 if (isOutermostSVGSVGElement())
969 return; 969 return;
970 970
971 // finishParsingChildren() is called when the close tag is reached for an el ement (e.g. </svg>) 971 // finishParsingChildren() is called when the close tag is reached for an el ement (e.g. </svg>)
972 // we send SVGLoad events here if we can, otherwise they'll be sent when any required loads finish 972 // we send SVGLoad events here if we can, otherwise they'll be sent when any required loads finish
973 if (isSVGSVGElement()) 973 if (isSVGSVGElement())
974 sendSVGLoadEventIfPossible(); 974 sendSVGLoadEventIfPossible();
975 } 975 }
976 976
977 bool SVGElement::childShouldCreateRenderer(const Node& child) const
978 {
979 if (child.hasTagName(SVGNames::textPathTag)
980 #if ENABLE(SVG_FONTS)
981 || child.hasTagName(SVGNames::altGlyphTag)
982 #endif
983 || child.hasTagName(SVGNames::tspanTag))
984 return false;
985 return child.isSVGElement();
986 }
987
988 void SVGElement::attributeChanged(const QualifiedName& name, const AtomicString& newValue, AttributeModificationReason) 977 void SVGElement::attributeChanged(const QualifiedName& name, const AtomicString& newValue, AttributeModificationReason)
989 { 978 {
990 Element::attributeChanged(name, newValue); 979 Element::attributeChanged(name, newValue);
991 980
992 if (isIdAttributeName(name)) 981 if (isIdAttributeName(name))
993 document().accessSVGExtensions()->rebuildAllElementReferencesForTarget(t his); 982 document().accessSVGExtensions()->rebuildAllElementReferencesForTarget(t his);
994 983
995 // Changes to the style attribute are processed lazily (see Element::getAttr ibute() and related methods), 984 // Changes to the style attribute are processed lazily (see Element::getAttr ibute() and related methods),
996 // so we don't want changes to the style attribute to result in extra work h ere. 985 // so we don't want changes to the style attribute to result in extra work h ere.
997 if (name != HTMLNames::styleAttr) 986 if (name != HTMLNames::styleAttr)
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 animatableAttributes.add(SVGNames::zAttr); 1213 animatableAttributes.add(SVGNames::zAttr);
1225 } 1214 }
1226 1215
1227 if (name == classAttr) 1216 if (name == classAttr)
1228 return true; 1217 return true;
1229 1218
1230 return animatableAttributes.contains(name); 1219 return animatableAttributes.contains(name);
1231 } 1220 }
1232 #endif 1221 #endif
1233 } 1222 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGElement.h ('k') | Source/core/svg/SVGSwitchElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698