OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2007 Apple Inc. All rights reserved. |
5 * Copyright (C) 2014 Google, Inc. | 5 * Copyright (C) 2014 Google, Inc. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 PassRefPtr<SVGSVGElement> SVGSVGElement::create(Document& document) | 89 PassRefPtr<SVGSVGElement> SVGSVGElement::create(Document& document) |
90 { | 90 { |
91 return adoptRef(new SVGSVGElement(document)); | 91 return adoptRef(new SVGSVGElement(document)); |
92 } | 92 } |
93 | 93 |
94 SVGSVGElement::~SVGSVGElement() | 94 SVGSVGElement::~SVGSVGElement() |
95 { | 95 { |
96 if (m_viewSpec) | 96 if (m_viewSpec) |
97 m_viewSpec->detachContextElement(); | 97 m_viewSpec->detachContextElement(); |
98 | 98 |
| 99 #if !ENABLE(OILPAN) |
99 // There are cases where removedFromDocument() is not called. | 100 // There are cases where removedFromDocument() is not called. |
100 // see ContainerNode::removeAllChildren, called by its destructor. | 101 // see ContainerNode::removeAllChildren, called by its destructor. |
| 102 // With Oilpan, either removedFrom is called or the document |
| 103 // is dead as well and there is no reason to clear the extensions. |
101 document().accessSVGExtensions().removeTimeContainer(this); | 104 document().accessSVGExtensions().removeTimeContainer(this); |
102 | 105 |
103 ASSERT(inDocument() || !accessDocumentSVGExtensions().isSVGRootWithRelativeL
engthDescendents(this)); | 106 ASSERT(inDocument() || !accessDocumentSVGExtensions().isSVGRootWithRelativeL
engthDescendents(this)); |
| 107 #endif |
104 } | 108 } |
105 | 109 |
106 const AtomicString& SVGSVGElement::contentScriptType() const | 110 const AtomicString& SVGSVGElement::contentScriptType() const |
107 { | 111 { |
108 DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/ecmascript", At
omicString::ConstructFromLiteral)); | 112 DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/ecmascript", At
omicString::ConstructFromLiteral)); |
109 const AtomicString& n = fastGetAttribute(SVGNames::contentScriptTypeAttr); | 113 const AtomicString& n = fastGetAttribute(SVGNames::contentScriptTypeAttr); |
110 return n.isNull() ? defaultValue : n; | 114 return n.isNull() ? defaultValue : n; |
111 } | 115 } |
112 | 116 |
113 void SVGSVGElement::setContentScriptType(const AtomicString& type) | 117 void SVGSVGElement::setContentScriptType(const AtomicString& type) |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 // Fall back to traversing our subtree. Duplicate ids are allowed, the first
found will | 828 // Fall back to traversing our subtree. Duplicate ids are allowed, the first
found will |
825 // be returned. | 829 // be returned. |
826 for (Element* element = ElementTraversal::firstWithin(*this); element; eleme
nt = ElementTraversal::next(*element, this)) { | 830 for (Element* element = ElementTraversal::firstWithin(*this); element; eleme
nt = ElementTraversal::next(*element, this)) { |
827 if (element->getIdAttribute() == id) | 831 if (element->getIdAttribute() == id) |
828 return element; | 832 return element; |
829 } | 833 } |
830 return 0; | 834 return 0; |
831 } | 835 } |
832 | 836 |
833 } | 837 } |
OLD | NEW |