Deprecate the overflowchanged event

Intent to Deprecate:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/1RCzsyEyNU8/5vNpxrhRbUIJ

Review URL: https://codereview.chromium.org/295993006

git-svn-id: svn://svn.chromium.org/blink/trunk@174529 bbb929c8-8fbe-4397-9dbb-9b2b20218538
diff --git a/LayoutTests/fast/events/change-overflow-on-overflow-change-expected.txt b/LayoutTests/fast/events/change-overflow-on-overflow-change-expected.txt
index 69cfc5a..9b8e5ec 100644
--- a/LayoutTests/fast/events/change-overflow-on-overflow-change-expected.txt
+++ b/LayoutTests/fast/events/change-overflow-on-overflow-change-expected.txt
@@ -1,2 +1,3 @@
+CONSOLE WARNING: The 'overflowchanged' event is deprecated and may be removed. Please do not use it.
 PASS
 
diff --git a/LayoutTests/fast/events/overflow-events-expected.txt b/LayoutTests/fast/events/overflow-events-expected.txt
index 62bbbc6..efdf643 100644
--- a/LayoutTests/fast/events/overflow-events-expected.txt
+++ b/LayoutTests/fast/events/overflow-events-expected.txt
@@ -1,2 +1,3 @@
+CONSOLE WARNING: The 'overflowchanged' event is deprecated and may be removed. Please do not use it.
 This tests that overflowchanged events are fired correctly. If the test is successful, the text "SUCCESS" should be shown below.
 SUCCESS
diff --git a/LayoutTests/fast/events/overflow-events-writing-mode-expected.txt b/LayoutTests/fast/events/overflow-events-writing-mode-expected.txt
index 1ea4693..f06a2d2 100644
--- a/LayoutTests/fast/events/overflow-events-writing-mode-expected.txt
+++ b/LayoutTests/fast/events/overflow-events-writing-mode-expected.txt
@@ -1,2 +1,3 @@
+CONSOLE WARNING: The 'overflowchanged' event is deprecated and may be removed. Please do not use it.
 This tests that overflowchanged events are fired correctly on nodes with writing-mode: vertical-lr. If the test is successful, the text "SUCCESS" should be shown below.
 SUCCESS
diff --git a/LayoutTests/fast/events/overflow-viewport-renderer-deleted-expected.txt b/LayoutTests/fast/events/overflow-viewport-renderer-deleted-expected.txt
index 8b13789..536b573 100644
--- a/LayoutTests/fast/events/overflow-viewport-renderer-deleted-expected.txt
+++ b/LayoutTests/fast/events/overflow-viewport-renderer-deleted-expected.txt
@@ -1 +1,2 @@
+CONSOLE WARNING: The 'overflowchanged' event is deprecated and may be removed. Please do not use it.
 
diff --git a/LayoutTests/fast/events/overflowchanged-event-raf-timing-expected.txt b/LayoutTests/fast/events/overflowchanged-event-raf-timing-expected.txt
index da6f576..4a1ac3e 100644
--- a/LayoutTests/fast/events/overflowchanged-event-raf-timing-expected.txt
+++ b/LayoutTests/fast/events/overflowchanged-event-raf-timing-expected.txt
@@ -1,3 +1,4 @@
+CONSOLE WARNING: The 'overflowchanged' event is deprecated and may be removed. Please do not use it.
 Tests that overflowchanged events are deferred until raf.
 
 layout
diff --git a/LayoutTests/fast/overflow/layout-overflow-not-affected-by-visual-overflow-expected.txt b/LayoutTests/fast/overflow/layout-overflow-not-affected-by-visual-overflow-expected.txt
index 5554647..3e4829d 100644
--- a/LayoutTests/fast/overflow/layout-overflow-not-affected-by-visual-overflow-expected.txt
+++ b/LayoutTests/fast/overflow/layout-overflow-not-affected-by-visual-overflow-expected.txt
@@ -1,3 +1,4 @@
+CONSOLE WARNING: The 'overflowchanged' event is deprecated and may be removed. Please do not use it.
 This tests that layout overflow is computed correctly, even if the element is not near the top-left corner of its ancestors and has visual overflow. See crbug.com/254002.
 
 PASS
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 73d60d7..0837cc0 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -3943,7 +3943,7 @@
         UseCounter::count(*this, UseCounter::DOMCharacterDataModifiedEvent);
         addMutationEventListenerTypeIfEnabled(DOMCHARACTERDATAMODIFIED_LISTENER);
     } else if (eventType == EventTypeNames::overflowchanged) {
-        UseCounter::count(*this, UseCounter::OverflowChangedEvent);
+        UseCounter::countDeprecation(*this, UseCounter::OverflowChangedEvent);
         addListenerType(OVERFLOWCHANGED_LISTENER);
     } else if (eventType == EventTypeNames::webkitAnimationStart || (RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled() && eventType == EventTypeNames::animationstart)) {
         addListenerType(ANIMATIONSTART_LISTENER);
diff --git a/Source/core/frame/UseCounter.cpp b/Source/core/frame/UseCounter.cpp
index 4537d99..5f1fd01 100644
--- a/Source/core/frame/UseCounter.cpp
+++ b/Source/core/frame/UseCounter.cpp
@@ -728,6 +728,9 @@
         return "The behavior of importNode() with no boolean argument is about to change from doing a deep clone to doing a shallow clone.  "
             "Make sure to pass an explicit boolean argument to keep your current behavior.";
 
+    case OverflowChangedEvent:
+        return "The 'overflowchanged' event is deprecated and may be removed. Please do not use it.";
+
     // Features that aren't deprecated don't have a deprecation message.
     default:
         return String();