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

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

Issue 216523002: Oilpan: Replace most of RefPtrs for Event objects with oilpan's transition types (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
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) 52 void SVGDocument::dispatchZoomEvent(float prevScale, float newScale)
53 { 53 {
54 RefPtr<SVGZoomEvent> event = SVGZoomEvent::create(); 54 RefPtrWillBeRawPtr<SVGZoomEvent> event = SVGZoomEvent::create();
55 event->initEvent(EventTypeNames::zoom, true, false); 55 event->initEvent(EventTypeNames::zoom, true, false);
56 event->setPreviousScale(prevScale); 56 event->setPreviousScale(prevScale);
57 event->setNewScale(newScale); 57 event->setNewScale(newScale);
58 rootElement()->dispatchEvent(event.release(), IGNORE_EXCEPTION); 58 rootElement()->dispatchEvent(event.release(), IGNORE_EXCEPTION);
59 } 59 }
60 60
61 void SVGDocument::dispatchScrollEvent() 61 void SVGDocument::dispatchScrollEvent()
62 { 62 {
63 RefPtr<Event> event = Event::create(); 63 RefPtrWillBeRawPtr<Event> event = Event::create();
64 event->initEvent(EventTypeNames::scroll, true, false); 64 event->initEvent(EventTypeNames::scroll, true, false);
65 rootElement()->dispatchEvent(event.release(), IGNORE_EXCEPTION); 65 rootElement()->dispatchEvent(event.release(), IGNORE_EXCEPTION);
66 } 66 }
67 67
68 bool SVGDocument::zoomAndPanEnabled() const 68 bool SVGDocument::zoomAndPanEnabled() const
69 { 69 {
70 if (SVGSVGElement* svg = rootElement()) { 70 if (SVGSVGElement* svg = rootElement()) {
71 if (svg->useCurrentView()) { 71 if (svg->useCurrentView()) {
72 if (svg->currentView()) 72 if (svg->currentView())
73 return svg->currentView()->zoomAndPan() == SVGZoomAndPanMagnify; 73 return svg->currentView()->zoomAndPan() == SVGZoomAndPanMagnify;
(...skipping 19 matching lines...) Expand all
93 renderer()->repaint(); 93 renderer()->repaint();
94 } 94 }
95 } 95 }
96 96
97 PassRefPtr<Document> SVGDocument::cloneDocumentWithoutChildren() 97 PassRefPtr<Document> SVGDocument::cloneDocumentWithoutChildren()
98 { 98 {
99 return create(DocumentInit(url())); 99 return create(DocumentInit(url()));
100 } 100 }
101 101
102 } 102 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698