Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: Source/core/svg/SVGDocument.cpp

Issue 241643006: Remove more dead code from core/ folder (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGDocument.h ('k') | Source/core/workers/WorkerThread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 { 42 {
43 Element* elem = document.documentElement(); 43 Element* elem = document.documentElement();
44 return isSVGSVGElement(elem) ? toSVGSVGElement(elem) : 0; 44 return isSVGSVGElement(elem) ? toSVGSVGElement(elem) : 0;
45 } 45 }
46 46
47 SVGSVGElement* SVGDocument::rootElement() const 47 SVGSVGElement* SVGDocument::rootElement() const
48 { 48 {
49 return rootElement(*this); 49 return rootElement(*this);
50 } 50 }
51 51
52 void SVGDocument::dispatchZoomEvent(float prevScale, float newScale)
53 {
54 RefPtrWillBeRawPtr<SVGZoomEvent> event = SVGZoomEvent::create();
55 event->initEvent(EventTypeNames::zoom, true, false);
56 event->setPreviousScale(prevScale);
57 event->setNewScale(newScale);
58 rootElement()->dispatchEvent(event.release(), IGNORE_EXCEPTION);
59 }
60
61 void SVGDocument::dispatchScrollEvent()
62 {
63 RefPtrWillBeRawPtr<Event> event = Event::create();
64 event->initEvent(EventTypeNames::scroll, true, false);
65 rootElement()->dispatchEvent(event.release(), IGNORE_EXCEPTION);
66 }
67
68 bool SVGDocument::zoomAndPanEnabled() const 52 bool SVGDocument::zoomAndPanEnabled() const
69 { 53 {
70 if (SVGSVGElement* svg = rootElement()) { 54 if (SVGSVGElement* svg = rootElement()) {
71 if (svg->useCurrentView()) { 55 if (svg->useCurrentView()) {
72 if (svg->currentView()) 56 if (svg->currentView())
73 return svg->currentView()->zoomAndPan() == SVGZoomAndPanMagnify; 57 return svg->currentView()->zoomAndPan() == SVGZoomAndPanMagnify;
74 } else { 58 } else {
75 return svg->zoomAndPan() == SVGZoomAndPanMagnify; 59 return svg->zoomAndPan() == SVGZoomAndPanMagnify;
76 } 60 }
77 } 61 }
(...skipping 15 matching lines...) Expand all
93 renderer()->repaint(); 77 renderer()->repaint();
94 } 78 }
95 } 79 }
96 80
97 PassRefPtr<Document> SVGDocument::cloneDocumentWithoutChildren() 81 PassRefPtr<Document> SVGDocument::cloneDocumentWithoutChildren()
98 { 82 {
99 return create(DocumentInit(url())); 83 return create(DocumentInit(url()));
100 } 84 }
101 85
102 } 86 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGDocument.h ('k') | Source/core/workers/WorkerThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698