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

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

Issue 22417002: Rename ASSERT_NO_EXCEPTION_STATE and IGNORE_EXCEPTION_STATE (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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/SVGAnimatedLengthList.cpp ('k') | Source/core/svg/SVGLength.cpp » ('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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAnimatedLengthList.cpp ('k') | Source/core/svg/SVGLength.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698