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

Unified Diff: third_party/WebKit/Source/core/svg/SVGSVGElement.cpp

Issue 1691883003: Deprecate SVGZoomEvent and SVGZoomEvents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on top of Deprecation.h; restructure template; clean up comment Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
index fc3a9d3eb6083fd04562253ea4a45421fa888ca0..ad987914829ed1dee3db9138c13c840aa02c4837 100644
--- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
@@ -31,14 +31,14 @@
#include "core/dom/StaticNodeList.h"
#include "core/editing/FrameSelection.h"
#include "core/events/EventListener.h"
-#include "core/frame/LocalFrame.h"
-#include "core/page/FrameTree.h"
+#include "core/frame/Deprecation.h"
#include "core/frame/FrameView.h"
-#include "core/frame/UseCounter.h"
+#include "core/frame/LocalFrame.h"
#include "core/layout/LayoutObject.h"
#include "core/layout/svg/LayoutSVGModelObject.h"
#include "core/layout/svg/LayoutSVGRoot.h"
#include "core/layout/svg/LayoutSVGViewportContainer.h"
+#include "core/page/FrameTree.h"
#include "core/svg/SVGAngleTearOff.h"
#include "core/svg/SVGDocumentExtensions.h"
#include "core/svg/SVGNumberTearOff.h"
@@ -201,16 +201,18 @@ void SVGSVGElement::parseAttribute(const QualifiedName& name, const AtomicString
bool setListener = true;
// Only handle events if we're the outermost <svg> element
- if (name == HTMLNames::onunloadAttr)
+ if (name == HTMLNames::onunloadAttr) {
document().setWindowAttributeEventListener(EventTypeNames::unload, createAttributeEventListener(document().frame(), name, value, eventParameterName()));
- else if (name == HTMLNames::onresizeAttr)
+ } else if (name == HTMLNames::onresizeAttr) {
document().setWindowAttributeEventListener(EventTypeNames::resize, createAttributeEventListener(document().frame(), name, value, eventParameterName()));
- else if (name == HTMLNames::onscrollAttr)
+ } else if (name == HTMLNames::onscrollAttr) {
document().setWindowAttributeEventListener(EventTypeNames::scroll, createAttributeEventListener(document().frame(), name, value, eventParameterName()));
- else if (name == SVGNames::onzoomAttr)
+ } else if (name == SVGNames::onzoomAttr) {
+ Deprecation::countDeprecation(document(), UseCounter::DeprecateSVGZoomEvent);
document().setWindowAttributeEventListener(EventTypeNames::zoom, createAttributeEventListener(document().frame(), name, value, eventParameterName()));
- else
+ } else {
setListener = false;
+ }
if (setListener)
return;

Powered by Google App Engine
This is Rietveld 408576698