| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "core/svg/SVGGeometryElement.h" | 27 #include "core/svg/SVGGeometryElement.h" |
| 28 #include "core/svg/SVGGraphicsElement.h" | 28 #include "core/svg/SVGGraphicsElement.h" |
| 29 #include "core/svg/SVGURIReference.h" | 29 #include "core/svg/SVGURIReference.h" |
| 30 #include "platform/heap/Handle.h" | 30 #include "platform/heap/Handle.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 typedef EventSender<SVGUseElement> SVGUseEventSender; | 34 typedef EventSender<SVGUseElement> SVGUseEventSender; |
| 35 | 35 |
| 36 class SVGUseElement final : public SVGGraphicsElement, | 36 class SVGUseElement final : public SVGGraphicsElement, |
| 37 public SVGURIReference, | 37 public SVGURIReference, |
| 38 public DocumentResourceClient { | 38 public DocumentResourceClient { |
| 39 |
| 39 DEFINE_WRAPPERTYPEINFO(); | 40 DEFINE_WRAPPERTYPEINFO(); |
| 40 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGUseElement); | 41 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGUseElement); |
| 41 public: | 42 public: |
| 42 static PassRefPtrWillBeRawPtr<SVGUseElement> create(Document&); | 43 static PassRefPtrWillBeRawPtr<SVGUseElement> create(Document&); |
| 43 ~SVGUseElement() override; | 44 ~SVGUseElement() override; |
| 44 | 45 |
| 45 void invalidateShadowTree(); | 46 void invalidateShadowTree(); |
| 46 | 47 |
| 47 // Return the element that should be used for clipping, | 48 // Return the element that should be used for clipping, |
| 48 // or null if a valid clip element is not directly referenced. | 49 // or null if a valid clip element is not directly referenced. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 bool buildShadowTree(SVGElement* target, SVGElement* targetInstance, bool fo
undUse); | 91 bool buildShadowTree(SVGElement* target, SVGElement* targetInstance, bool fo
undUse); |
| 91 void clearShadowTree(); | 92 void clearShadowTree(); |
| 92 bool hasCycleUseReferencing(SVGUseElement*, ContainerNode* targetInstance, S
VGElement*& newTarget); | 93 bool hasCycleUseReferencing(SVGUseElement*, ContainerNode* targetInstance, S
VGElement*& newTarget); |
| 93 bool expandUseElementsInShadowTree(SVGElement*); | 94 bool expandUseElementsInShadowTree(SVGElement*); |
| 94 void expandSymbolElementsInShadowTree(SVGElement*); | 95 void expandSymbolElementsInShadowTree(SVGElement*); |
| 95 | 96 |
| 96 void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to
) const; | 97 void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to
) const; |
| 97 | 98 |
| 98 void invalidateDependentShadowTrees(); | 99 void invalidateDependentShadowTrees(); |
| 99 | 100 |
| 100 bool resourceIsStillLoading(); | 101 bool resourceIsStillLoading() const; |
| 101 Document* externalDocument() const; | 102 Document* externalDocument() const; |
| 102 bool instanceTreeIsLoading(SVGElement*); | 103 bool instanceTreeIsLoading(const SVGElement*); |
| 103 void notifyFinished(Resource*) override; | 104 void notifyFinished(Resource*) override; |
| 104 TreeScope* referencedScope() const; | 105 TreeScope* referencedScope() const; |
| 105 void setDocumentResource(ResourcePtr<DocumentResource>); | 106 void setDocumentResource(ResourcePtr<DocumentResource>); |
| 106 | 107 |
| 107 RefPtrWillBeMember<SVGAnimatedLength> m_x; | 108 RefPtrWillBeMember<SVGAnimatedLength> m_x; |
| 108 RefPtrWillBeMember<SVGAnimatedLength> m_y; | 109 RefPtrWillBeMember<SVGAnimatedLength> m_y; |
| 109 RefPtrWillBeMember<SVGAnimatedLength> m_width; | 110 RefPtrWillBeMember<SVGAnimatedLength> m_width; |
| 110 RefPtrWillBeMember<SVGAnimatedLength> m_height; | 111 RefPtrWillBeMember<SVGAnimatedLength> m_height; |
| 111 | 112 |
| 112 bool m_haveFiredLoadEvent; | 113 bool m_haveFiredLoadEvent; |
| 113 bool m_needsShadowTreeRecreation; | 114 bool m_needsShadowTreeRecreation; |
| 114 RefPtrWillBeMember<SVGElement> m_targetElementInstance; | 115 RefPtrWillBeMember<SVGElement> m_targetElementInstance; |
| 115 ResourcePtr<DocumentResource> m_resource; | 116 ResourcePtr<DocumentResource> m_resource; |
| 116 }; | 117 }; |
| 117 | 118 |
| 118 } // namespace blink | 119 } // namespace blink |
| 119 | 120 |
| 120 #endif // SVGUseElement_h | 121 #endif // SVGUseElement_h |
| OLD | NEW |