| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/frame/Deprecation.h" | 5 #include "core/frame/Deprecation.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/dom/ExecutionContext.h" | 8 #include "core/dom/ExecutionContext.h" |
| 9 #include "core/frame/FrameConsole.h" | 9 #include "core/frame/FrameConsole.h" |
| 10 #include "core/frame/FrameHost.h" | 10 #include "core/frame/FrameHost.h" |
| 11 #include "core/frame/LocalFrame.h" | 11 #include "core/frame/LocalFrame.h" |
| 12 #include "core/inspector/ConsoleMessage.h" | 12 #include "core/inspector/ConsoleMessage.h" |
| 13 #include "core/workers/WorkerGlobalScope.h" | 13 #include "core/workers/WorkerGlobalScope.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 enum Milestone { | 17 enum Milestone { |
| 18 M53, | |
| 19 M55, | 18 M55, |
| 20 M56, | 19 M56, |
| 21 M57, | 20 M57, |
| 22 M58, | 21 M58, |
| 23 M59, | 22 M59, |
| 24 }; | 23 }; |
| 25 | 24 |
| 26 const char* milestoneString(Milestone milestone) | 25 const char* milestoneString(Milestone milestone) |
| 27 { | 26 { |
| 28 // These are the Estimated Stable Dates: | 27 // These are the Estimated Stable Dates: |
| 29 // https://www.chromium.org/developers/calendar | 28 // https://www.chromium.org/developers/calendar |
| 30 | 29 |
| 31 switch (milestone) { | 30 switch (milestone) { |
| 32 case M53: | |
| 33 return "M53, around September 2016"; | |
| 34 case M55: | 31 case M55: |
| 35 return "M55, around December 2016"; | 32 return "M55, around December 2016"; |
| 36 case M56: | 33 case M56: |
| 37 return "M56, around January 2017"; | 34 return "M56, around January 2017"; |
| 38 case M57: | 35 case M57: |
| 39 return "M57, around March 2017"; | 36 return "M57, around March 2017"; |
| 40 case M58: | 37 case M58: |
| 41 return "M58, around April 2017"; | 38 return "M58, around April 2017"; |
| 42 case M59: | 39 case M59: |
| 43 return "M59, around June 2017"; | 40 return "M59, around June 2017"; |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 | 352 |
| 356 case UseCounter::WebAnimationHyphenatedProperty: | 353 case UseCounter::WebAnimationHyphenatedProperty: |
| 357 return "Hyphenated property names in Web Animations keyframes are invali
d and therefore ignored. Please use camelCase instead."; | 354 return "Hyphenated property names in Web Animations keyframes are invali
d and therefore ignored. Please use camelCase instead."; |
| 358 | 355 |
| 359 case UseCounter::HTMLKeygenElement: | 356 case UseCounter::HTMLKeygenElement: |
| 360 return willBeRemoved("The <keygen> element", M56, "5716060992962560"); | 357 return willBeRemoved("The <keygen> element", M56, "5716060992962560"); |
| 361 | 358 |
| 362 case UseCounter::EncryptedMediaAllSelectedContentTypesMissingCodecs: | 359 case UseCounter::EncryptedMediaAllSelectedContentTypesMissingCodecs: |
| 363 return String::format("EME requires that contentType strings accepted by
requestMediaKeySystemAccess() include codecs. Non-standard support for contentT
ype strings without codecs will be removed in %s. Please specify the desired cod
ec(s) as part of the contentType.", milestoneString(M56)); | 360 return String::format("EME requires that contentType strings accepted by
requestMediaKeySystemAccess() include codecs. Non-standard support for contentT
ype strings without codecs will be removed in %s. Please specify the desired cod
ec(s) as part of the contentType.", milestoneString(M56)); |
| 364 | 361 |
| 365 case UseCounter::UntrustedEventDefaultHandled: | |
| 366 return String::format("A DOM event generated from JavaScript has trigger
ed a default action inside the browser. This behavior is non-standard and will b
e removed in %s. See https://www.chromestatus.com/features/5718803933560832 for
more details.", milestoneString(M53)); | |
| 367 | |
| 368 case UseCounter::TouchStartUserGestureUtilized: | 362 case UseCounter::TouchStartUserGestureUtilized: |
| 369 return willBeRemoved("Performing operations that require explicit user i
nteraction on touchstart events", M55, "5649871251963904"); | 363 return willBeRemoved("Performing operations that require explicit user i
nteraction on touchstart events", M55, "5649871251963904"); |
| 370 | 364 |
| 371 case UseCounter::TouchMoveUserGestureUtilized: | 365 case UseCounter::TouchMoveUserGestureUtilized: |
| 372 return willBeRemoved("Performing operations that require explicit user i
nteraction on touchmove events", M55, "5649871251963904"); | 366 return willBeRemoved("Performing operations that require explicit user i
nteraction on touchmove events", M55, "5649871251963904"); |
| 373 | 367 |
| 374 case UseCounter::TouchEndDuringScrollUserGestureUtilized: | 368 case UseCounter::TouchEndDuringScrollUserGestureUtilized: |
| 375 return willBeRemoved("Performing operations that require explicit user i
nteraction on touchend events that occur as part of a scroll", M55, "56498712519
63904"); | 369 return willBeRemoved("Performing operations that require explicit user i
nteraction on touchend events that occur as part of a scroll", M55, "56498712519
63904"); |
| 376 | 370 |
| 377 case UseCounter::MIDIMessageEventReceivedTime: | 371 case UseCounter::MIDIMessageEventReceivedTime: |
| (...skipping 22 matching lines...) Expand all Loading... |
| 400 case UseCounter::PaymentAddressCareOf: | 394 case UseCounter::PaymentAddressCareOf: |
| 401 return willBeRemoved("PaymentAddress.careOf", M56, "5728579069411328"); | 395 return willBeRemoved("PaymentAddress.careOf", M56, "5728579069411328"); |
| 402 | 396 |
| 403 // Features that aren't deprecated don't have a deprecation message. | 397 // Features that aren't deprecated don't have a deprecation message. |
| 404 default: | 398 default: |
| 405 return String(); | 399 return String(); |
| 406 } | 400 } |
| 407 } | 401 } |
| 408 | 402 |
| 409 } // namespace blink | 403 } // namespace blink |
| OLD | NEW |