OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 void SVGDocument::updatePan(const FloatPoint& pos) const | 88 void SVGDocument::updatePan(const FloatPoint& pos) const |
89 { | 89 { |
90 if (rootElement()) { | 90 if (rootElement()) { |
91 rootElement()->setCurrentTranslate(FloatPoint(pos.x() - m_translate.x(),
pos.y() - m_translate.y())); | 91 rootElement()->setCurrentTranslate(FloatPoint(pos.x() - m_translate.x(),
pos.y() - m_translate.y())); |
92 if (renderer()) | 92 if (renderer()) |
93 renderer()->repaint(); | 93 renderer()->repaint(); |
94 } | 94 } |
95 } | 95 } |
96 | 96 |
| 97 PassRefPtr<Document> SVGDocument::cloneDocumentWithoutChildren() |
| 98 { |
| 99 return create(DocumentInit(url())); |
| 100 } |
| 101 |
97 bool SVGDocument::childShouldCreateRenderer(const NodeRenderingContext& childCon
text) const | 102 bool SVGDocument::childShouldCreateRenderer(const NodeRenderingContext& childCon
text) const |
98 { | 103 { |
99 if (childContext.node()->hasTagName(SVGNames::svgTag)) | 104 if (childContext.node()->hasTagName(SVGNames::svgTag)) |
100 return toSVGSVGElement(childContext.node())->isValid(); | 105 return toSVGSVGElement(childContext.node())->isValid(); |
101 return true; | 106 return true; |
102 } | 107 } |
103 | 108 |
104 } | 109 } |
OLD | NEW |