| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 45 { | 45 { | 
| 46     Element* elem = documentElement(); | 46     Element* elem = documentElement(); | 
| 47     if (elem && elem->hasTagName(SVGNames::svgTag)) | 47     if (elem && elem->hasTagName(SVGNames::svgTag)) | 
| 48         return toSVGSVGElement(elem); | 48         return toSVGSVGElement(elem); | 
| 49 | 49 | 
| 50     return 0; | 50     return 0; | 
| 51 } | 51 } | 
| 52 | 52 | 
| 53 void SVGDocument::dispatchZoomEvent(float prevScale, float newScale) | 53 void SVGDocument::dispatchZoomEvent(float prevScale, float newScale) | 
| 54 { | 54 { | 
| 55     RefPtr<SVGZoomEvent> event = static_pointer_cast<SVGZoomEvent>(createEvent("
     SVGZoomEvents", IGNORE_EXCEPTION_STATE)); | 55     RefPtr<SVGZoomEvent> event = static_pointer_cast<SVGZoomEvent>(createEvent("
     SVGZoomEvents", IGNORE_EXCEPTION)); | 
| 56     event->initEvent(eventNames().zoomEvent, true, false); | 56     event->initEvent(eventNames().zoomEvent, true, false); | 
| 57     event->setPreviousScale(prevScale); | 57     event->setPreviousScale(prevScale); | 
| 58     event->setNewScale(newScale); | 58     event->setNewScale(newScale); | 
| 59     rootElement()->dispatchEvent(event.release(), IGNORE_EXCEPTION_STATE); | 59     rootElement()->dispatchEvent(event.release(), IGNORE_EXCEPTION); | 
| 60 } | 60 } | 
| 61 | 61 | 
| 62 void SVGDocument::dispatchScrollEvent() | 62 void SVGDocument::dispatchScrollEvent() | 
| 63 { | 63 { | 
| 64     RefPtr<Event> event = createEvent("SVGEvents", IGNORE_EXCEPTION_STATE); | 64     RefPtr<Event> event = createEvent("SVGEvents", IGNORE_EXCEPTION); | 
| 65     event->initEvent(eventNames().scrollEvent, true, false); | 65     event->initEvent(eventNames().scrollEvent, true, false); | 
| 66     rootElement()->dispatchEvent(event.release(), IGNORE_EXCEPTION_STATE); | 66     rootElement()->dispatchEvent(event.release(), IGNORE_EXCEPTION); | 
| 67 } | 67 } | 
| 68 | 68 | 
| 69 bool SVGDocument::zoomAndPanEnabled() const | 69 bool SVGDocument::zoomAndPanEnabled() const | 
| 70 { | 70 { | 
| 71     if (rootElement()) { | 71     if (rootElement()) { | 
| 72         if (rootElement()->useCurrentView()) { | 72         if (rootElement()->useCurrentView()) { | 
| 73             if (rootElement()->currentView()) | 73             if (rootElement()->currentView()) | 
| 74                 return rootElement()->currentView()->zoomAndPan() == SVGZoomAndP
     anMagnify; | 74                 return rootElement()->currentView()->zoomAndPan() == SVGZoomAndP
     anMagnify; | 
| 75         } else | 75         } else | 
| 76             return rootElement()->zoomAndPan() == SVGZoomAndPanMagnify; | 76             return rootElement()->zoomAndPan() == SVGZoomAndPanMagnify; | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
| 95 } | 95 } | 
| 96 | 96 | 
| 97 bool SVGDocument::childShouldCreateRenderer(const NodeRenderingContext& childCon
     text) const | 97 bool SVGDocument::childShouldCreateRenderer(const NodeRenderingContext& childCon
     text) const | 
| 98 { | 98 { | 
| 99     if (childContext.node()->hasTagName(SVGNames::svgTag)) | 99     if (childContext.node()->hasTagName(SVGNames::svgTag)) | 
| 100         return toSVGSVGElement(childContext.node())->isValid(); | 100         return toSVGSVGElement(childContext.node())->isValid(); | 
| 101     return true; | 101     return true; | 
| 102 } | 102 } | 
| 103 | 103 | 
| 104 } | 104 } | 
| OLD | NEW | 
|---|