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 PassRefPtr<SVGRectTearOff> SVGSVGElement::viewport() const | 110 PassRefPtr<SVGRectTearOff> SVGSVGElement::viewport() const |
107 { | 111 { |
108 // FIXME: This method doesn't follow the spec and is basically untested. Par
ent documents are not considered here. | 112 // FIXME: This method doesn't follow the spec and is basically untested. Par
ent documents are not considered here. |
109 // As we have no test coverage for this, we're going to disable it completly
for now. | 113 // As we have no test coverage for this, we're going to disable it completly
for now. |
110 return SVGRectTearOff::create(SVGRect::create(), 0, PropertyIsNotAnimVal); | 114 return SVGRectTearOff::create(SVGRect::create(), 0, PropertyIsNotAnimVal); |
111 } | 115 } |
112 | 116 |
113 float SVGSVGElement::pixelUnitToMillimeterX() const | 117 float SVGSVGElement::pixelUnitToMillimeterX() const |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 // Fall back to traversing our subtree. Duplicate ids are allowed, the first
found will | 784 // Fall back to traversing our subtree. Duplicate ids are allowed, the first
found will |
781 // be returned. | 785 // be returned. |
782 for (Element* element = ElementTraversal::firstWithin(*this); element; eleme
nt = ElementTraversal::next(*element, this)) { | 786 for (Element* element = ElementTraversal::firstWithin(*this); element; eleme
nt = ElementTraversal::next(*element, this)) { |
783 if (element->getIdAttribute() == id) | 787 if (element->getIdAttribute() == id) |
784 return element; | 788 return element; |
785 } | 789 } |
786 return 0; | 790 return 0; |
787 } | 791 } |
788 | 792 |
789 } | 793 } |
OLD | NEW |