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

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

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 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/SVGGradientElement.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 19 matching lines...) Expand all
30 namespace WebCore { 30 namespace WebCore {
31 31
32 // Animated property definitions 32 // Animated property definitions
33 DEFINE_ANIMATED_STRING(SVGGlyphRefElement, XLinkNames::hrefAttr, Href, href) 33 DEFINE_ANIMATED_STRING(SVGGlyphRefElement, XLinkNames::hrefAttr, Href, href)
34 34
35 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGlyphRefElement) 35 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGlyphRefElement)
36 REGISTER_LOCAL_ANIMATED_PROPERTY(href) 36 REGISTER_LOCAL_ANIMATED_PROPERTY(href)
37 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) 37 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
38 END_REGISTER_ANIMATED_PROPERTIES 38 END_REGISTER_ANIMATED_PROPERTIES
39 39
40 inline SVGGlyphRefElement::SVGGlyphRefElement(const QualifiedName& tagName, Docu ment* document) 40 inline SVGGlyphRefElement::SVGGlyphRefElement(const QualifiedName& tagName, Docu ment& document)
41 : SVGElement(tagName, document) 41 : SVGElement(tagName, document)
42 , m_x(0) 42 , m_x(0)
43 , m_y(0) 43 , m_y(0)
44 , m_dx(0) 44 , m_dx(0)
45 , m_dy(0) 45 , m_dy(0)
46 { 46 {
47 ASSERT(hasTagName(SVGNames::glyphRefTag)); 47 ASSERT(hasTagName(SVGNames::glyphRefTag));
48 ScriptWrappable::init(this); 48 ScriptWrappable::init(this);
49 registerAnimatedPropertiesForSVGGlyphRefElement(); 49 registerAnimatedPropertiesForSVGGlyphRefElement();
50 } 50 }
51 51
52 PassRefPtr<SVGGlyphRefElement> SVGGlyphRefElement::create(const QualifiedName& t agName, Document* document) 52 PassRefPtr<SVGGlyphRefElement> SVGGlyphRefElement::create(const QualifiedName& t agName, Document& document)
53 { 53 {
54 return adoptRef(new SVGGlyphRefElement(tagName, document)); 54 return adoptRef(new SVGGlyphRefElement(tagName, document));
55 } 55 }
56 56
57 bool SVGGlyphRefElement::hasValidGlyphElement(String& glyphName) const 57 bool SVGGlyphRefElement::hasValidGlyphElement(String& glyphName) const
58 { 58 {
59 // FIXME: We only support xlink:href so far. 59 // FIXME: We only support xlink:href so far.
60 // https://bugs.webkit.org/show_bug.cgi?id=64787 60 // https://bugs.webkit.org/show_bug.cgi?id=64787
61 Element* element = targetElementFromIRIString(getAttribute(XLinkNames::hrefA ttr), document(), &glyphName); 61 Element* element = targetElementFromIRIString(getAttribute(XLinkNames::hrefA ttr), document(), &glyphName);
62 if (!element || !element->hasTagName(SVGNames::glyphTag)) 62 if (!element || !element->hasTagName(SVGNames::glyphTag))
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 void SVGGlyphRefElement::setDy(float dy) 129 void SVGGlyphRefElement::setDy(float dy)
130 { 130 {
131 // FIXME: Honor attribute change. 131 // FIXME: Honor attribute change.
132 // https://bugs.webkit.org/show_bug.cgi?id=64787 132 // https://bugs.webkit.org/show_bug.cgi?id=64787
133 m_dy = dy; 133 m_dy = dy;
134 } 134 }
135 135
136 } 136 }
137 137
138 #endif 138 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGGlyphRefElement.h ('k') | Source/core/svg/SVGGradientElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698