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

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

Issue 192133002: Use isSVG*Element() helpers more in SVG code (Part 1) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « Source/core/svg/SVGFontFaceSrcElement.cpp ('k') | no next file » | 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) 2007 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 69
70 void SVGFontFaceUriElement::childrenChanged(bool changedByParser, Node* beforeCh ange, Node* afterChange, int childCountDelta) 70 void SVGFontFaceUriElement::childrenChanged(bool changedByParser, Node* beforeCh ange, Node* afterChange, int childCountDelta)
71 { 71 {
72 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil dCountDelta); 72 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil dCountDelta);
73 73
74 if (!parentNode() || !parentNode()->hasTagName(font_face_srcTag)) 74 if (!parentNode() || !parentNode()->hasTagName(font_face_srcTag))
75 return; 75 return;
76 76
77 ContainerNode* grandparent = parentNode()->parentNode(); 77 ContainerNode* grandparent = parentNode()->parentNode();
78 if (grandparent && grandparent->hasTagName(font_faceTag)) 78 if (isSVGFontFaceElement(grandparent))
79 toSVGFontFaceElement(grandparent)->rebuildFontFace(); 79 toSVGFontFaceElement(*grandparent).rebuildFontFace();
80 } 80 }
81 81
82 Node::InsertionNotificationRequest SVGFontFaceUriElement::insertedInto(Container Node* rootParent) 82 Node::InsertionNotificationRequest SVGFontFaceUriElement::insertedInto(Container Node* rootParent)
83 { 83 {
84 loadFont(); 84 loadFont();
85 return SVGElement::insertedInto(rootParent); 85 return SVGElement::insertedInto(rootParent);
86 } 86 }
87 87
88 void SVGFontFaceUriElement::loadFont() 88 void SVGFontFaceUriElement::loadFont()
89 { 89 {
(...skipping 10 matching lines...) Expand all
100 m_resource->beginLoadIfNeeded(fetcher); 100 m_resource->beginLoadIfNeeded(fetcher);
101 } 101 }
102 } else { 102 } else {
103 m_resource = 0; 103 m_resource = 0;
104 } 104 }
105 } 105 }
106 106
107 } 107 }
108 108
109 #endif // ENABLE(SVG_FONTS) 109 #endif // ENABLE(SVG_FONTS)
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFontFaceSrcElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698