| 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 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 REGISTER_LOCAL_ANIMATED_PROPERTY(x) | 72 REGISTER_LOCAL_ANIMATED_PROPERTY(x) |
| 73 REGISTER_LOCAL_ANIMATED_PROPERTY(y) | 73 REGISTER_LOCAL_ANIMATED_PROPERTY(y) |
| 74 REGISTER_LOCAL_ANIMATED_PROPERTY(width) | 74 REGISTER_LOCAL_ANIMATED_PROPERTY(width) |
| 75 REGISTER_LOCAL_ANIMATED_PROPERTY(height) | 75 REGISTER_LOCAL_ANIMATED_PROPERTY(height) |
| 76 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) | 76 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) |
| 77 REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox) | 77 REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox) |
| 78 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio) | 78 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio) |
| 79 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) | 79 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) |
| 80 END_REGISTER_ANIMATED_PROPERTIES | 80 END_REGISTER_ANIMATED_PROPERTIES |
| 81 | 81 |
| 82 inline SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document* doc) | 82 inline SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document& doc) |
| 83 : SVGGraphicsElement(tagName, doc) | 83 : SVGGraphicsElement(tagName, doc) |
| 84 , m_x(LengthModeWidth) | 84 , m_x(LengthModeWidth) |
| 85 , m_y(LengthModeHeight) | 85 , m_y(LengthModeHeight) |
| 86 , m_width(LengthModeWidth, "100%") | 86 , m_width(LengthModeWidth, "100%") |
| 87 , m_height(LengthModeHeight, "100%") | 87 , m_height(LengthModeHeight, "100%") |
| 88 , m_useCurrentView(false) | 88 , m_useCurrentView(false) |
| 89 , m_zoomAndPan(SVGZoomAndPanMagnify) | 89 , m_zoomAndPan(SVGZoomAndPanMagnify) |
| 90 , m_timeContainer(SMILTimeContainer::create(this)) | 90 , m_timeContainer(SMILTimeContainer::create(this)) |
| 91 { | 91 { |
| 92 ASSERT(hasTagName(SVGNames::svgTag)); | 92 ASSERT(hasTagName(SVGNames::svgTag)); |
| 93 ScriptWrappable::init(this); | 93 ScriptWrappable::init(this); |
| 94 registerAnimatedPropertiesForSVGSVGElement(); | 94 registerAnimatedPropertiesForSVGSVGElement(); |
| 95 } | 95 } |
| 96 | 96 |
| 97 PassRefPtr<SVGSVGElement> SVGSVGElement::create(const QualifiedName& tagName, Do
cument* document) | 97 PassRefPtr<SVGSVGElement> SVGSVGElement::create(const QualifiedName& tagName, Do
cument& document) |
| 98 { | 98 { |
| 99 return adoptRef(new SVGSVGElement(tagName, document)); | 99 return adoptRef(new SVGSVGElement(tagName, document)); |
| 100 } | 100 } |
| 101 | 101 |
| 102 SVGSVGElement::~SVGSVGElement() | 102 SVGSVGElement::~SVGSVGElement() |
| 103 { | 103 { |
| 104 if (m_viewSpec) | 104 if (m_viewSpec) |
| 105 m_viewSpec->resetContextElement(); | 105 m_viewSpec->resetContextElement(); |
| 106 // There are cases where removedFromDocument() is not called. | 106 // There are cases where removedFromDocument() is not called. |
| 107 // see ContainerNode::removeAllChildren, called by its destructor. | 107 // see ContainerNode::removeAllChildren, called by its destructor. |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 continue; | 769 continue; |
| 770 | 770 |
| 771 Element* element = toElement(node); | 771 Element* element = toElement(node); |
| 772 if (element->getIdAttribute() == id) | 772 if (element->getIdAttribute() == id) |
| 773 return element; | 773 return element; |
| 774 } | 774 } |
| 775 return 0; | 775 return 0; |
| 776 } | 776 } |
| 777 | 777 |
| 778 } | 778 } |
| OLD | NEW |