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

Side by Side Diff: Source/core/svg/SVGGlyphRefElement.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/SVGGlyphRefElement.h ('k') | Source/core/svg/SVGHKernElement.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) 2011 Leo Yang <leoyang@webkit.org> 2 * Copyright (C) 2011 Leo Yang <leoyang@webkit.org>
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 10 matching lines...) Expand all
21 21
22 #if ENABLE(SVG_FONTS) 22 #if ENABLE(SVG_FONTS)
23 #include "core/svg/SVGGlyphRefElement.h" 23 #include "core/svg/SVGGlyphRefElement.h"
24 24
25 #include "XLinkNames.h" 25 #include "XLinkNames.h"
26 #include "core/svg/SVGParserUtilities.h" 26 #include "core/svg/SVGParserUtilities.h"
27 #include "wtf/text/AtomicString.h" 27 #include "wtf/text/AtomicString.h"
28 28
29 namespace WebCore { 29 namespace WebCore {
30 30
31 SVGGlyphRefElement::SVGGlyphRefElement(Document& document) 31 inline SVGGlyphRefElement::SVGGlyphRefElement(Document& document)
32 : SVGElement(SVGNames::glyphRefTag, document) 32 : SVGElement(SVGNames::glyphRefTag, document)
33 , SVGURIReference(this) 33 , SVGURIReference(this)
34 , m_x(0) 34 , m_x(0)
35 , m_y(0) 35 , m_y(0)
36 , m_dx(0) 36 , m_dx(0)
37 , m_dy(0) 37 , m_dy(0)
38 { 38 {
39 ScriptWrappable::init(this); 39 ScriptWrappable::init(this);
40 } 40 }
41 41
42 DEFINE_NODE_FACTORY(SVGGlyphRefElement)
43
42 bool SVGGlyphRefElement::hasValidGlyphElement(AtomicString& glyphName) const 44 bool SVGGlyphRefElement::hasValidGlyphElement(AtomicString& glyphName) const
43 { 45 {
44 // FIXME: We only support xlink:href so far. 46 // FIXME: We only support xlink:href so far.
45 // https://bugs.webkit.org/show_bug.cgi?id=64787 47 // https://bugs.webkit.org/show_bug.cgi?id=64787
46 Element* element = targetElementFromIRIString(getAttribute(XLinkNames::hrefA ttr), document(), &glyphName); 48 Element* element = targetElementFromIRIString(getAttribute(XLinkNames::hrefA ttr), document(), &glyphName);
47 return isSVGGlyphElement(element); 49 return isSVGGlyphElement(element);
48 } 50 }
49 51
50 template<typename CharType> 52 template<typename CharType>
51 void SVGGlyphRefElement::parseAttributeInternal(const QualifiedName& name, const AtomicString& value) 53 void SVGGlyphRefElement::parseAttributeInternal(const QualifiedName& name, const AtomicString& value)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 void SVGGlyphRefElement::setDy(float dy) 115 void SVGGlyphRefElement::setDy(float dy)
114 { 116 {
115 // FIXME: Honor attribute change. 117 // FIXME: Honor attribute change.
116 // https://bugs.webkit.org/show_bug.cgi?id=64787 118 // https://bugs.webkit.org/show_bug.cgi?id=64787
117 m_dy = dy; 119 m_dy = dy;
118 } 120 }
119 121
120 } 122 }
121 123
122 #endif 124 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGGlyphRefElement.h ('k') | Source/core/svg/SVGHKernElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698