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

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

Issue 328703005: Use ScriptWrappable::init less (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
« no previous file with comments | « Source/core/svg/SVGPathSeg.cpp ('k') | Source/core/svg/SVGTextPositioningElement.cpp » ('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, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org>
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 }; 72 };
73 73
74 74
75 SVGTextContentElement::SVGTextContentElement(const QualifiedName& tagName, Docum ent& document) 75 SVGTextContentElement::SVGTextContentElement(const QualifiedName& tagName, Docum ent& document)
76 : SVGGraphicsElement(tagName, document) 76 : SVGGraphicsElement(tagName, document)
77 , m_textLength(SVGAnimatedTextLength::create(this)) 77 , m_textLength(SVGAnimatedTextLength::create(this))
78 , m_textLengthIsSpecifiedByUser(false) 78 , m_textLengthIsSpecifiedByUser(false)
79 , m_lengthAdjust(SVGAnimatedEnumeration<SVGLengthAdjustType>::create(this, S VGNames::lengthAdjustAttr, SVGLengthAdjustSpacing)) 79 , m_lengthAdjust(SVGAnimatedEnumeration<SVGLengthAdjustType>::create(this, S VGNames::lengthAdjustAttr, SVGLengthAdjustSpacing))
80 { 80 {
81 ScriptWrappable::init(this);
82
83 addToPropertyMap(m_textLength); 81 addToPropertyMap(m_textLength);
84 addToPropertyMap(m_lengthAdjust); 82 addToPropertyMap(m_lengthAdjust);
85 } 83 }
86 84
87 unsigned SVGTextContentElement::getNumberOfChars() 85 unsigned SVGTextContentElement::getNumberOfChars()
88 { 86 {
89 document().updateLayoutIgnorePendingStylesheets(); 87 document().updateLayoutIgnorePendingStylesheets();
90 return SVGTextQuery(renderer()).numberOfCharacters(); 88 return SVGTextQuery(renderer()).numberOfCharacters();
91 } 89 }
92 90
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 273
276 if (!renderer->isSVGText() && !renderer->isSVGInline()) 274 if (!renderer->isSVGText() && !renderer->isSVGInline())
277 return 0; 275 return 0;
278 276
279 SVGElement* element = toSVGElement(renderer->node()); 277 SVGElement* element = toSVGElement(renderer->node());
280 ASSERT(element); 278 ASSERT(element);
281 return isSVGTextContentElement(*element) ? toSVGTextContentElement(element) : 0; 279 return isSVGTextContentElement(*element) ? toSVGTextContentElement(element) : 0;
282 } 280 }
283 281
284 } 282 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGPathSeg.cpp ('k') | Source/core/svg/SVGTextPositioningElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698