| 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 M55, | |
| 19 M56, | 18 M56, |
| 20 M57, | 19 M57, |
| 21 M58, | 20 M58, |
| 22 M59, | 21 M59, |
| 23 }; | 22 }; |
| 24 | 23 |
| 25 const char* milestoneString(Milestone milestone) { | 24 const char* milestoneString(Milestone milestone) { |
| 26 // These are the Estimated Stable Dates: | 25 // These are the Estimated Stable Dates: |
| 27 // https://www.chromium.org/developers/calendar | 26 // https://www.chromium.org/developers/calendar |
| 28 | 27 |
| 29 switch (milestone) { | 28 switch (milestone) { |
| 30 case M55: | |
| 31 return "M55, around December 2016"; | |
| 32 case M56: | 29 case M56: |
| 33 return "M56, around January 2017"; | 30 return "M56, around January 2017"; |
| 34 case M57: | 31 case M57: |
| 35 return "M57, around March 2017"; | 32 return "M57, around March 2017"; |
| 36 case M58: | 33 case M58: |
| 37 return "M58, around April 2017"; | 34 return "M58, around April 2017"; |
| 38 case M59: | 35 case M59: |
| 39 return "M59, around June 2017"; | 36 return "M59, around June 2017"; |
| 40 } | 37 } |
| 41 | 38 |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 case UseCounter::XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: | 284 case UseCounter::XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: |
| 288 return "Synchronous XMLHttpRequest on the main thread is deprecated " | 285 return "Synchronous XMLHttpRequest on the main thread is deprecated " |
| 289 "because of its detrimental effects to the end user's experience. " | 286 "because of its detrimental effects to the end user's experience. " |
| 290 "For more help, check https://xhr.spec.whatwg.org/."; | 287 "For more help, check https://xhr.spec.whatwg.org/."; |
| 291 | 288 |
| 292 case UseCounter::GetMatchedCSSRules: | 289 case UseCounter::GetMatchedCSSRules: |
| 293 return "'getMatchedCSSRules()' is deprecated. For more help, check " | 290 return "'getMatchedCSSRules()' is deprecated. For more help, check " |
| 294 "https://code.google.com/p/chromium/issues/detail?id=437569#c2"; | 291 "https://code.google.com/p/chromium/issues/detail?id=437569#c2"; |
| 295 | 292 |
| 296 case UseCounter::AudioListenerDopplerFactor: | 293 case UseCounter::AudioListenerDopplerFactor: |
| 297 return dopplerWillBeRemoved("'AudioListener.dopplerFactor'", M55, | 294 return dopplerWillBeRemoved("'AudioListener.dopplerFactor'", M56, |
| 298 "5238926818148352"); | 295 "5238926818148352"); |
| 299 | 296 |
| 300 case UseCounter::AudioListenerSpeedOfSound: | 297 case UseCounter::AudioListenerSpeedOfSound: |
| 301 return dopplerWillBeRemoved("'AudioListener.speedOfSound'", M55, | 298 return dopplerWillBeRemoved("'AudioListener.speedOfSound'", M56, |
| 302 "5238926818148352"); | 299 "5238926818148352"); |
| 303 | 300 |
| 304 case UseCounter::AudioListenerSetVelocity: | 301 case UseCounter::AudioListenerSetVelocity: |
| 305 return dopplerWillBeRemoved("'AudioListener.setVelocity()'", M55, | 302 return dopplerWillBeRemoved("'AudioListener.setVelocity()'", M56, |
| 306 "5238926818148352"); | 303 "5238926818148352"); |
| 307 | 304 |
| 308 case UseCounter::PannerNodeSetVelocity: | 305 case UseCounter::PannerNodeSetVelocity: |
| 309 return dopplerWillBeRemoved("'PannerNode.setVelocity()'", M55, | 306 return dopplerWillBeRemoved("'PannerNode.setVelocity()'", M56, |
| 310 "5238926818148352"); | 307 "5238926818148352"); |
| 311 | 308 |
| 312 case UseCounter::PrefixedWindowURL: | 309 case UseCounter::PrefixedWindowURL: |
| 313 return replacedBy("'webkitURL'", "'URL'"); | 310 return replacedBy("'webkitURL'", "'URL'"); |
| 314 | 311 |
| 315 case UseCounter::PrefixedAudioContext: | 312 case UseCounter::PrefixedAudioContext: |
| 316 return replacedBy("'webkitAudioContext'", "'AudioContext'"); | 313 return replacedBy("'webkitAudioContext'", "'AudioContext'"); |
| 317 | 314 |
| 318 case UseCounter::PrefixedOfflineAudioContext: | 315 case UseCounter::PrefixedOfflineAudioContext: |
| 319 return replacedBy("'webkitOfflineAudioContext'", "'OfflineAudioContext'"); | 316 return replacedBy("'webkitOfflineAudioContext'", "'OfflineAudioContext'"); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 "EME requires that contentType strings accepted by " | 433 "EME requires that contentType strings accepted by " |
| 437 "requestMediaKeySystemAccess() include codecs. Non-standard support " | 434 "requestMediaKeySystemAccess() include codecs. Non-standard support " |
| 438 "for contentType strings without codecs will be removed in %s. " | 435 "for contentType strings without codecs will be removed in %s. " |
| 439 "Please specify the desired codec(s) as part of the contentType.", | 436 "Please specify the desired codec(s) as part of the contentType.", |
| 440 milestoneString(M56)); | 437 milestoneString(M56)); |
| 441 | 438 |
| 442 case UseCounter::TouchStartUserGestureUtilized: | 439 case UseCounter::TouchStartUserGestureUtilized: |
| 443 return willBeRemoved( | 440 return willBeRemoved( |
| 444 "Performing operations that require explicit user interaction on " | 441 "Performing operations that require explicit user interaction on " |
| 445 "touchstart events", | 442 "touchstart events", |
| 446 M55, "5649871251963904"); | 443 M56, "5649871251963904"); |
| 447 | 444 |
| 448 case UseCounter::TouchMoveUserGestureUtilized: | 445 case UseCounter::TouchMoveUserGestureUtilized: |
| 449 return willBeRemoved( | 446 return willBeRemoved( |
| 450 "Performing operations that require explicit user interaction on " | 447 "Performing operations that require explicit user interaction on " |
| 451 "touchmove events", | 448 "touchmove events", |
| 452 M55, "5649871251963904"); | 449 M56, "5649871251963904"); |
| 453 | 450 |
| 454 case UseCounter::TouchEndDuringScrollUserGestureUtilized: | 451 case UseCounter::TouchEndDuringScrollUserGestureUtilized: |
| 455 return willBeRemoved( | 452 return willBeRemoved( |
| 456 "Performing operations that require explicit user interaction on " | 453 "Performing operations that require explicit user interaction on " |
| 457 "touchend events that occur as part of a scroll", | 454 "touchend events that occur as part of a scroll", |
| 458 M55, "5649871251963904"); | 455 M56, "5649871251963904"); |
| 459 | 456 |
| 460 case UseCounter::MIDIMessageEventReceivedTime: | 457 case UseCounter::MIDIMessageEventReceivedTime: |
| 461 return willBeRemoved("MIDIMessageEvent.receivedTime", M56, | 458 return willBeRemoved("MIDIMessageEvent.receivedTime", M56, |
| 462 "5665772797952000"); | 459 "5665772797952000"); |
| 463 | 460 |
| 464 case UseCounter::V8SVGSVGElement_UseCurrentView_AttributeGetter: | 461 case UseCounter::V8SVGSVGElement_UseCurrentView_AttributeGetter: |
| 465 return willBeRemoved("SVGSVGElement.useCurrentView", M56, | 462 return willBeRemoved("SVGSVGElement.useCurrentView", M56, |
| 466 "4511711998509056"); | 463 "4511711998509056"); |
| 467 | 464 |
| 468 case UseCounter::V8SVGSVGElement_CurrentView_AttributeGetter: | 465 case UseCounter::V8SVGSVGElement_CurrentView_AttributeGetter: |
| (...skipping 14 matching lines...) Expand all Loading... |
| 483 case UseCounter::PaymentAddressCareOf: | 480 case UseCounter::PaymentAddressCareOf: |
| 484 return willBeRemoved("PaymentAddress.careOf", M56, "5728579069411328"); | 481 return willBeRemoved("PaymentAddress.careOf", M56, "5728579069411328"); |
| 485 | 482 |
| 486 // Features that aren't deprecated don't have a deprecation message. | 483 // Features that aren't deprecated don't have a deprecation message. |
| 487 default: | 484 default: |
| 488 return String(); | 485 return String(); |
| 489 } | 486 } |
| 490 } | 487 } |
| 491 | 488 |
| 492 } // namespace blink | 489 } // namespace blink |
| OLD | NEW |