OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2007 Eric Seidel <eric@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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 clearResourceReferences(); | 57 clearResourceReferences(); |
58 } | 58 } |
59 | 59 |
60 void SVGMPathElement::buildPendingResource() | 60 void SVGMPathElement::buildPendingResource() |
61 { | 61 { |
62 clearResourceReferences(); | 62 clearResourceReferences(); |
63 if (!inDocument()) | 63 if (!inDocument()) |
64 return; | 64 return; |
65 | 65 |
66 String id; | 66 String id; |
67 Element* target = SVGURIReference::targetElementFromIRIString(href(), docume
nt(), &id); | 67 Element* target = SVGURIReference::targetElementFromIRIString(hrefCurrentVal
ue(), document(), &id); |
68 if (!target) { | 68 if (!target) { |
69 // Do not register as pending if we are already pending this resource. | 69 // Do not register as pending if we are already pending this resource. |
70 if (document()->accessSVGExtensions()->isElementPendingResource(this, id
)) | 70 if (document()->accessSVGExtensions()->isElementPendingResource(this, id
)) |
71 return; | 71 return; |
72 | 72 |
73 if (!id.isEmpty()) { | 73 if (!id.isEmpty()) { |
74 document()->accessSVGExtensions()->addPendingResource(id, this); | 74 document()->accessSVGExtensions()->addPendingResource(id, this); |
75 ASSERT(hasPendingResources()); | 75 ASSERT(hasPendingResources()); |
76 } | 76 } |
77 } else if (target->isSVGElement()) { | 77 } else if (target->isSVGElement()) { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 } | 145 } |
146 | 146 |
147 if (SVGExternalResourcesRequired::isKnownAttribute(attrName)) | 147 if (SVGExternalResourcesRequired::isKnownAttribute(attrName)) |
148 return; | 148 return; |
149 | 149 |
150 ASSERT_NOT_REACHED(); | 150 ASSERT_NOT_REACHED(); |
151 } | 151 } |
152 | 152 |
153 SVGPathElement* SVGMPathElement::pathElement() | 153 SVGPathElement* SVGMPathElement::pathElement() |
154 { | 154 { |
155 Element* target = targetElementFromIRIString(href(), document()); | 155 Element* target = targetElementFromIRIString(hrefCurrentValue(), document())
; |
156 if (target && target->hasTagName(SVGNames::pathTag)) | 156 if (target && target->hasTagName(SVGNames::pathTag)) |
157 return static_cast<SVGPathElement*>(target); | 157 return static_cast<SVGPathElement*>(target); |
158 return 0; | 158 return 0; |
159 } | 159 } |
160 | 160 |
161 void SVGMPathElement::targetPathChanged() | 161 void SVGMPathElement::targetPathChanged() |
162 { | 162 { |
163 notifyParentOfPathChange(parentNode()); | 163 notifyParentOfPathChange(parentNode()); |
164 } | 164 } |
165 | 165 |
166 void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent) | 166 void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent) |
167 { | 167 { |
168 if (parent && parent->hasTagName(SVGNames::animateMotionTag)) | 168 if (parent && parent->hasTagName(SVGNames::animateMotionTag)) |
169 static_cast<SVGAnimateMotionElement*>(parent)->updateAnimationPath(); | 169 static_cast<SVGAnimateMotionElement*>(parent)->updateAnimationPath(); |
170 } | 170 } |
171 | 171 |
172 } // namespace WebCore | 172 } // namespace WebCore |
OLD | NEW |