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

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

Issue 190793011: Use isSVG*Element() helpers more in SVG code (Part 4) (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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
3 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 258
259 String SVGFontFaceElement::fontFamily() const 259 String SVGFontFaceElement::fontFamily() const
260 { 260 {
261 return m_fontFaceRule->properties().getPropertyValue(CSSPropertyFontFamily); 261 return m_fontFaceRule->properties().getPropertyValue(CSSPropertyFontFamily);
262 } 262 }
263 263
264 SVGFontElement* SVGFontFaceElement::associatedFontElement() const 264 SVGFontElement* SVGFontFaceElement::associatedFontElement() const
265 { 265 {
266 ASSERT(parentNode() == m_fontElement); 266 ASSERT(parentNode() == m_fontElement);
267 ASSERT(!parentNode() || parentNode()->hasTagName(SVGNames::fontTag)); 267 ASSERT(!parentNode() || isSVGFontElement(*parentNode()));
268 return m_fontElement; 268 return m_fontElement;
269 } 269 }
270 270
271 void SVGFontFaceElement::rebuildFontFace() 271 void SVGFontFaceElement::rebuildFontFace()
272 { 272 {
273 if (!inDocument()) { 273 if (!inDocument()) {
274 ASSERT(!m_fontElement); 274 ASSERT(!m_fontElement);
275 return; 275 return;
276 } 276 }
277 277
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 345
346 void SVGFontFaceElement::childrenChanged(bool changedByParser, Node* beforeChang e, Node* afterChange, int childCountDelta) 346 void SVGFontFaceElement::childrenChanged(bool changedByParser, Node* beforeChang e, Node* afterChange, int childCountDelta)
347 { 347 {
348 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil dCountDelta); 348 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil dCountDelta);
349 rebuildFontFace(); 349 rebuildFontFace();
350 } 350 }
351 351
352 } // namespace WebCore 352 } // namespace WebCore
353 353
354 #endif // ENABLE(SVG_FONTS) 354 #endif // ENABLE(SVG_FONTS)
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFilterPrimitiveStandardAttributes.cpp ('k') | Source/core/svg/SVGFontFaceUriElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698