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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 clearResourceReferences(); | 44 clearResourceReferences(); |
45 if (!isConnected()) | 45 if (!isConnected()) |
46 return; | 46 return; |
47 | 47 |
48 AtomicString id; | 48 AtomicString id; |
49 Element* target = SVGURIReference::targetElementFromIRIString( | 49 Element* target = SVGURIReference::targetElementFromIRIString( |
50 hrefString(), treeScope(), &id); | 50 hrefString(), treeScope(), &id); |
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 (treeScope().ensureSVGTreeScopedResources().isElementPendingResource( | 53 if (treeScope().ensureSVGTreeScopedResources().isElementPendingResource( |
54 this, id)) | 54 *this, id)) |
55 return; | 55 return; |
56 if (!id.isEmpty()) { | 56 if (!id.isEmpty()) { |
57 treeScope().ensureSVGTreeScopedResources().addPendingResource(id, this); | 57 treeScope().ensureSVGTreeScopedResources().addPendingResource(id, *this); |
58 DCHECK(hasPendingResources()); | 58 DCHECK(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 | 61 // Register us with the target in the dependencies map. Any change of |
62 // hrefElement that leads to relayout/repainting now informs us, so we can | 62 // hrefElement that leads to relayout/repainting now informs us, so we can |
63 // react to it. | 63 // react to it. |
64 addReferenceTo(toSVGElement(target)); | 64 addReferenceTo(toSVGElement(target)); |
65 } | 65 } |
66 | 66 |
67 targetPathChanged(); | 67 targetPathChanged(); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 void SVGMPathElement::targetPathChanged() { | 104 void SVGMPathElement::targetPathChanged() { |
105 notifyParentOfPathChange(parentNode()); | 105 notifyParentOfPathChange(parentNode()); |
106 } | 106 } |
107 | 107 |
108 void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent) { | 108 void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent) { |
109 if (isSVGAnimateMotionElement(parent)) | 109 if (isSVGAnimateMotionElement(parent)) |
110 toSVGAnimateMotionElement(parent)->updateAnimationPath(); | 110 toSVGAnimateMotionElement(parent)->updateAnimationPath(); |
111 } | 111 } |
112 | 112 |
113 } // namespace blink | 113 } // namespace blink |
OLD | NEW |