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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 if (!target) { | 51 if (!target) { |
52 // Do not register as pending if we are already pending this resource. | 52 // Do not register as pending if we are already pending this resource. |
53 if (document().accessSVGExtensions().isElementPendingResource(this, id)) | 53 if (document().accessSVGExtensions().isElementPendingResource(this, id)) |
54 return; | 54 return; |
55 | 55 |
56 if (!id.isEmpty()) { | 56 if (!id.isEmpty()) { |
57 document().accessSVGExtensions().addPendingResource(id, this); | 57 document().accessSVGExtensions().addPendingResource(id, this); |
58 ASSERT(hasPendingResources()); | 58 ASSERT(hasPendingResources()); |
59 } | 59 } |
60 } else if (isSVGPathElement(target)) { | 60 } else if (isSVGPathElement(target)) { |
61 // Register us with the target in the dependencies map. Any change of hrefEl
ement | 61 // Register us with the target in the dependencies map. Any change of |
62 // that leads to relayout/repainting now informs us, so we can react to it. | 62 // hrefElement that leads to relayout/repainting now informs us, so we can |
| 63 // react to it. |
63 addReferenceTo(toSVGElement(target)); | 64 addReferenceTo(toSVGElement(target)); |
64 } | 65 } |
65 | 66 |
66 targetPathChanged(); | 67 targetPathChanged(); |
67 } | 68 } |
68 | 69 |
69 void SVGMPathElement::clearResourceReferences() { | 70 void SVGMPathElement::clearResourceReferences() { |
70 removeAllOutgoingReferences(); | 71 removeAllOutgoingReferences(); |
71 } | 72 } |
72 | 73 |
(...skipping 30 matching lines...) Expand all Loading... |
103 void SVGMPathElement::targetPathChanged() { | 104 void SVGMPathElement::targetPathChanged() { |
104 notifyParentOfPathChange(parentNode()); | 105 notifyParentOfPathChange(parentNode()); |
105 } | 106 } |
106 | 107 |
107 void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent) { | 108 void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent) { |
108 if (isSVGAnimateMotionElement(parent)) | 109 if (isSVGAnimateMotionElement(parent)) |
109 toSVGAnimateMotionElement(parent)->updateAnimationPath(); | 110 toSVGAnimateMotionElement(parent)->updateAnimationPath(); |
110 } | 111 } |
111 | 112 |
112 } // namespace blink | 113 } // namespace blink |
OLD | NEW |