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

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

Issue 23685007: Have SVGURIReference API deal with Document references, not pointers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/SVGFEImageElement.cpp ('k') | Source/core/svg/SVGLinearGradientElement.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) 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
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))
63 return false; 63 return false;
64 return true; 64 return true;
65 } 65 }
66 66
67 template<typename CharType> 67 template<typename CharType>
68 void SVGGlyphRefElement::parseAttributeInternal(const QualifiedName& name, const AtomicString& value) 68 void SVGGlyphRefElement::parseAttributeInternal(const QualifiedName& name, const AtomicString& value)
69 { 69 {
70 const CharType* ptr = value.isEmpty() ? 0 : value.string().getCharacters<Cha rType>(); 70 const CharType* ptr = value.isEmpty() ? 0 : value.string().getCharacters<Cha rType>();
71 const CharType* end = ptr + value.length(); 71 const CharType* end = ptr + value.length();
(...skipping 57 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/SVGFEImageElement.cpp ('k') | Source/core/svg/SVGLinearGradientElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698