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, |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
14 * | 14 * |
15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
19 */ | 19 */ |
20 | 20 |
21 #include "config.h" | 21 #include "config.h" |
22 #include "core/svg/SVGDocument.h" | 22 #include "core/svg/SVGDocument.h" |
23 | 23 |
24 #include "SVGNames.h" | 24 #include "SVGNames.h" |
25 #include "bindings/v8/ExceptionStatePlaceholder.h" | 25 #include "bindings/v8/ExceptionStatePlaceholder.h" |
26 #include "core/dom/EventNames.h" | 26 #include "core/dom/EventNames.h" |
27 #include "core/dom/NodeRenderingContext.h" | |
28 #include "core/page/FrameView.h" | 27 #include "core/page/FrameView.h" |
29 #include "core/rendering/RenderView.h" | 28 #include "core/rendering/RenderView.h" |
30 #include "core/svg/SVGElement.h" | 29 #include "core/svg/SVGElement.h" |
31 #include "core/svg/SVGSVGElement.h" | 30 #include "core/svg/SVGSVGElement.h" |
32 #include "core/svg/SVGViewSpec.h" | 31 #include "core/svg/SVGViewSpec.h" |
33 #include "core/svg/SVGZoomAndPan.h" | 32 #include "core/svg/SVGZoomAndPan.h" |
34 #include "core/svg/SVGZoomEvent.h" | 33 #include "core/svg/SVGZoomEvent.h" |
35 | 34 |
36 namespace WebCore { | 35 namespace WebCore { |
37 | 36 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 86 |
88 void SVGDocument::updatePan(const FloatPoint& pos) const | 87 void SVGDocument::updatePan(const FloatPoint& pos) const |
89 { | 88 { |
90 if (rootElement()) { | 89 if (rootElement()) { |
91 rootElement()->setCurrentTranslate(FloatPoint(pos.x() - m_translate.x(),
pos.y() - m_translate.y())); | 90 rootElement()->setCurrentTranslate(FloatPoint(pos.x() - m_translate.x(),
pos.y() - m_translate.y())); |
92 if (renderer()) | 91 if (renderer()) |
93 renderer()->repaint(); | 92 renderer()->repaint(); |
94 } | 93 } |
95 } | 94 } |
96 | 95 |
97 bool SVGDocument::childShouldCreateRenderer(const NodeRenderingContext& childCon
text) const | 96 bool SVGDocument::childShouldCreateRenderer(const Node& child) const |
98 { | 97 { |
99 if (childContext.node()->hasTagName(SVGNames::svgTag)) | 98 if (child.hasTagName(SVGNames::svgTag)) |
100 return toSVGSVGElement(childContext.node())->isValid(); | 99 return toSVGSVGElement(&child)->isValid(); |
101 return true; | 100 return true; |
102 } | 101 } |
103 | 102 |
104 } | 103 } |
OLD | NEW |