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

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: Update -expected files with deprecation messages and rename counter to SVGZoomEvent 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1ecaaac0ca42559360e99f84df089539982c5c0f 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::SVGZoomEvent);
document().setWindowAttributeEventListener(EventTypeNames::zoom, createAttributeEventListener(document().frame(), name, value, eventParameterName()));
- else
+ } else {
setListener = false;
+ }
if (setListener)
return;
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698