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

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

Issue 327633004: Apply DEFINE/DECLARE_NODE_FACTORY(T) macro to element factories with single Document& argument. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/SVGFontElement.h ('k') | Source/core/svg/SVGFontFaceElement.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) 2007 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. 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 16 matching lines...) Expand all
27 #include "core/dom/ElementTraversal.h" 27 #include "core/dom/ElementTraversal.h"
28 #include "core/frame/UseCounter.h" 28 #include "core/frame/UseCounter.h"
29 #include "core/svg/SVGGlyphElement.h" 29 #include "core/svg/SVGGlyphElement.h"
30 #include "core/svg/SVGHKernElement.h" 30 #include "core/svg/SVGHKernElement.h"
31 #include "core/svg/SVGMissingGlyphElement.h" 31 #include "core/svg/SVGMissingGlyphElement.h"
32 #include "core/svg/SVGVKernElement.h" 32 #include "core/svg/SVGVKernElement.h"
33 #include "wtf/ASCIICType.h" 33 #include "wtf/ASCIICType.h"
34 34
35 namespace WebCore { 35 namespace WebCore {
36 36
37 SVGFontElement::SVGFontElement(Document& document) 37 inline SVGFontElement::SVGFontElement(Document& document)
38 : SVGElement(SVGNames::fontTag, document) 38 : SVGElement(SVGNames::fontTag, document)
39 , m_missingGlyph(0) 39 , m_missingGlyph(0)
40 , m_isGlyphCacheValid(false) 40 , m_isGlyphCacheValid(false)
41 { 41 {
42 ScriptWrappable::init(this); 42 ScriptWrappable::init(this);
43 43
44 UseCounter::count(document, UseCounter::SVGFontElement); 44 UseCounter::count(document, UseCounter::SVGFontElement);
45 } 45 }
46 46
47 DEFINE_NODE_FACTORY(SVGFontElement)
48
47 void SVGFontElement::invalidateGlyphCache() 49 void SVGFontElement::invalidateGlyphCache()
48 { 50 {
49 if (m_isGlyphCacheValid) { 51 if (m_isGlyphCacheValid) {
50 m_glyphMap.clear(); 52 m_glyphMap.clear();
51 m_horizontalKerningTable.clear(); 53 m_horizontalKerningTable.clear();
52 m_verticalKerningTable.clear(); 54 m_verticalKerningTable.clear();
53 } 55 }
54 m_isGlyphCacheValid = false; 56 m_isGlyphCacheValid = false;
55 } 57 }
56 58
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 247
246 Glyph SVGFontElement::missingGlyph() 248 Glyph SVGFontElement::missingGlyph()
247 { 249 {
248 ensureGlyphCache(); 250 ensureGlyphCache();
249 return m_missingGlyph; 251 return m_missingGlyph;
250 } 252 }
251 253
252 } 254 }
253 255
254 #endif // ENABLE(SVG_FONTS) 256 #endif // ENABLE(SVG_FONTS)
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFontElement.h ('k') | Source/core/svg/SVGFontFaceElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698