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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 void SVGMPathElement::buildPendingResource() | 48 void SVGMPathElement::buildPendingResource() |
49 { | 49 { |
50 clearResourceReferences(); | 50 clearResourceReferences(); |
51 if (!inShadowIncludingDocument()) | 51 if (!inShadowIncludingDocument()) |
52 return; | 52 return; |
53 | 53 |
54 AtomicString id; | 54 AtomicString id; |
55 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(),
treeScope(), &id); | 55 Element* target = SVGURIReference::targetElementFromIRIString(hrefString(),
treeScope(), &id); |
56 if (!target) { | 56 if (!target) { |
57 // Do not register as pending if we are already pending this resource. | 57 // Do not register as pending if we are already pending this resource. |
58 if (document().accessSVGExtensions().isElementPendingResource(this, id)) | 58 if (treeScope().accessSVGTreeScopedResources().isElementPendingResource(
this, id)) |
59 return; | 59 return; |
60 | 60 |
61 if (!id.isEmpty()) { | 61 if (!id.isEmpty()) { |
62 document().accessSVGExtensions().addPendingResource(id, this); | 62 treeScope().accessSVGTreeScopedResources().addPendingResource(id, th
is); |
63 ASSERT(hasPendingResources()); | 63 ASSERT(hasPendingResources()); |
64 } | 64 } |
65 } else if (isSVGPathElement(target)) { | 65 } else if (isSVGPathElement(target)) { |
66 // Register us with the target in the dependencies map. Any change of hr
efElement | 66 // Register us with the target in the dependencies map. Any change of hr
efElement |
67 // that leads to relayout/repainting now informs us, so we can react to
it. | 67 // that leads to relayout/repainting now informs us, so we can react to
it. |
68 addReferenceTo(toSVGElement(target)); | 68 addReferenceTo(toSVGElement(target)); |
69 } | 69 } |
70 | 70 |
71 targetPathChanged(); | 71 targetPathChanged(); |
72 } | 72 } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 notifyParentOfPathChange(parentNode()); | 114 notifyParentOfPathChange(parentNode()); |
115 } | 115 } |
116 | 116 |
117 void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent) | 117 void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent) |
118 { | 118 { |
119 if (isSVGAnimateMotionElement(parent)) | 119 if (isSVGAnimateMotionElement(parent)) |
120 toSVGAnimateMotionElement(parent)->updateAnimationPath(); | 120 toSVGAnimateMotionElement(parent)->updateAnimationPath(); |
121 } | 121 } |
122 | 122 |
123 } // namespace blink | 123 } // namespace blink |
OLD | NEW |